Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranî)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
1 1
In this lab we'll start off with the simple topology of 2 routers 2
2
router 1 and router 2 3
3
what we'll do here, is configure router 2 as the DHCP server 4
4
and we'll configure router 1 as the DHCP client in this topology. 5
5
No configuration has been done on this routers. 6
6
At the moment as an example, on router 2, sh ip int brief 7
7
shows me that all the interfaces are currently down 7
8
no IP addresses has been configured. 8
9
So the first thing I’m gonna do is go on to the FastEthernet interface 9
10
and configure an IP address of 10.1.1.2/24 mask. 10
11
I'll no shut that interface and now I'll configure the router as the DHCP server. 11
12
So to configure the DHCP server, the first thing you need to do is type ip dhcp 12
13
that gives you a range of options but the one that we're looking for is pool 13
14
so pool, and then we specify a name such as clients, as an example. 14
15
This is just the name, to uniquely identify the pool that you're creating 15
16
and that’s because you can have multiple pools configured on a router. 16
17
Network, we need to specify the network that devices will be allocated addresses from 17
18
now it's important that the IP address that DHCP requests are being received on. 18
19
Which in this example a F0/0 be in the same subnet as the network. 19
20
Otherwise the router is not gonna allocate addresses from the pool. 20
21
So this interface is configured with an IP address of 10.1.1.2 21
22
and we are configuring a network of 10.1.1.0/24 22
23
there are many options available in the pool. 23
24
We’ve already configured the network and mask. 24
25
Next option, you'll probably want to configure is default gateway or default router. 25
26
I’m gonna set that to router 2. 26
27
You'd also want to specify options such as DNS server. 27
28
In this example, I'll configure the router as DNS server 28
29
but typically what your going to do here 29
30
is configure a real DNS server somewhere in your topology. 30
31
So I'll just configure a single DNS server being the local router. 31
32
You can specify how long addresses are allocated to hosts, the default is 1 day 32
33
I’m gonna specify lease time of 7 days. 33
34
Now for devices such as IP phones, you can specify different DHCP option codes. 34
35
150 is TFTP and I’m gonna specify an IP address of a TFTP server. 35
36
Now in the real implementation, your IP telephones will get their configuration 36
37
typically from a Cisco Unified Communications Manager 37
38
or from a Cisco Unified Communications Manager's express router. 38
39
So this would be the IP address of the Cisco communications manager. 39
40
In our example once again, I’m just gonna set that to the local router. 40
41
Now to stop conflicts, an allocation of addresses that belong to servers and routers 40
42
Use the command ip dhcp excluded-address 41
43
and you specify a range of addresses to exclude from allocation to devices. 42
44
Now my router has an IP address of 10.1.1.2 43
45
I don’t want the router to allocate its own IP address to host devices. 44
46
So I’m going to set the exclusion range to include the router's IP address 45
47
and some extra IP addresses here, that would typically be determined 46
48
by how many servers or other devices are going to have IP addresses statically configured. 47
49
sh run will show me my configuration. 48
50
So it’s quite a simple config, I’ve got my exclusion range 49
51
I’ve created a pool called clients. 50
52
Clients will be allocated addresses in this IP address subnet. 51
53
Default router is router 2, the local router. 52
54
DNS server is set to that and option 150 is set to that as well. 53
55
Once again typically, this will be set to servers in your live network. 54
56
I’ve set the lease to 7 days, the default is 1 day. 55
57
show ip dhcp gives me different options, including pool. 56
58
This can be useful because sometimes you can make a typing mistake 57
59
and you may exclude all of your addresses. 58
60
But notice here, total addresses is 254, lease addresses is 0 59
61
no addresses have been leased, address range is in this range. 60
62
Let’s look at bindings, of any address has been allocated 61
63
at the moment no addresses has been allocated. 62
64
So let’s go to the client 64
65
I’m gonna change the MAC address of this client, to something very simple 63
66
so that we can read it in the output 64
67
so MAC address is gonna be A,B,C 65
68
IP address is gonna be set to DHCP 66
69
so the PC will request an IP address from the server 67
70
when I type no shut show debug 68
71
lets run a debug so we can see what’s happening 69
72
debug ip dhcp server and we have different options 70
73
I’m gonna go for packet, which shows me lots of detail. 71
74
So debug ip dhcp server packet now when I hit no shut 72
75
we should start seeing requests from the client, to the DHCP server and there we go 73
76
we've got a DHCP discover message, received from the client on interface FastEthernet 0/0 74
77
The DHCP server will allocate an address without class information 75
78
we didn’t configure a name or class for this device. 76
79
The DHCP servers offering an address to the client, offering it this IP address 77
80
and then sending the reply to the MAC address of the PC that we configured, so that MAC address. 78
81
The client then requests that IP address from the DHCP server 79
82
DHCP server sents back an acknowledgement. 80
83
So sh ip int brief FastEthernet 0/0 on router 1 81
84
has been allocated to this address through DHCP 82
85
sh ip route the router has learnt about the gateway of last resort 83
86
because we've configured a default gateway or default router in the DHCP pool. 84
87
So router 1 has learnt about that network 85
88
and a static default router has been added to the routing table. 86
89
It’s a simple as that to configure a basic DHCP server on the Cisco router 87
90
and allocate addresses to client devices. 88
91
to actually view the messages sent between the client and the server.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.