Anda di halaman 1dari 5

10/24/12

vLab

Sample Solution

Print this page Open in new window

Task Index Task 1 CONFIGURING A CISCO ROUTER AS A DHCP SERVER

Task 1 CONFIGURING A CISCO ROUTER AS A DHCP SERVER Step 1 : Console into Sw 1. Rem ove the existing ip default-gatew ay from the configuration. Action:

s w 1 >e n a b l e s w 1 #c o n f i gt s w 1 ( c o n f i g ) #n oi pd e f a u l t g a t e w a y s w 1 ( c o n f i g ) # Result:

Step 2 : Console into R1. Change the address on interface f0/0 to 192.168.1.1 255.255.255.0 Action:

r 1 >e n a b l e r 1 #c o n f i gt r 1 ( c o n f i g ) #i n t e r f a c ef 0 / 0 r 1 ( c o n f i g i f ) #i pa d d r e s s1 9 2 . 1 6 8 . 1 . 12 5 5 . 2 5 5 . 2 5 5 . 0 r 1 ( c o n f i g i f ) # Result: Anytime you see a device blinking, it is a reminder to console into a new device. Explanation: If you are prompted for a passw ord, enter cisco for user mode and sanfran for privileged mode. Step 3 : On R1, configure a DHCP pool using an IOS com m and. Nam e it Engineering. Action:

r 1 ( c o n f i g i f ) #e x i t r 1 ( c o n f i g ) #i pd h c pp o o lE n g i n e e r i n g r 1 ( d h c p c o n f i g ) # Result: In the coursew are, the Cisco SDM is discussed as one method to configure a Cisco router as a DHCP server. How ever, the DHCP service can just as easily be configured at the command line. For screenshots of the method via SDM, you can still review w hat is in the book, but here w e w ill focus on the more direct approach. Explanation: Here is the scenario for this lab. The engineers in your department are all on the same subnet and are connected to Sw 1. Rather than
ekvcse.vlab.elementk.com/vlab/labLockerDisplay.vlab 1/5

10/24/12

Here is the scenario for this lab. The engineers in your department are all on the same subnet and are connected to Sw 1. Rather than purchasing a separate DHCP server to assign IP addresses to the engineers, you have decided to configure R1 as their DHCP server. Step 4 : On R1, configure the pool of addresses to be assigned to clients to be taken from the 192.168.1.0 /24 netw ork. Action:

vLab

r 1 ( d h c p c o n f i g ) #n e t w o r k1 9 2 . 1 6 8 . 1 . 0/ 2 4 r 1 ( d h c p c o n f i g ) # Result: The address on f0/0 is 192.168.1.1 and on the same subnet as your engineers. Explanation: This command allow s the first engineer to receive the IP address 192.168.1.2, the second to receive 192.168.1.3, the third to receive 192.168.1.4, and so on. The router is smart enough to know not to give out the .1 address, because it is already using it. Step 5 : Configure R1s DHCP service to assign the dom ain nam e, cisco.com , to each DHCP client. Action:

r 1 ( d h c p c o n f i g ) #d o m a i n n a m ec i s c o . c o m r 1 ( d h c p c o n f i g ) # Result: Explanation: In addition to an IP address and subnet mask, a DHCP server can also supply the client w ith other parameters such as the domain name, default gatew ay, DNS server address, etc., w hen the lease is given. Step 6 : On R1, have the DHCP server assign the default gatew ay of 192.168.1.1 to the clients as part of the lease. Action:

r 1 ( d h c p c o n f i g ) #d e f a u l t r o u t e r1 9 2 . 1 6 8 . 1 . 1 r 1 ( d h c p c o n f i g ) # Result: 192.168.1.1 is R1. The engineers w ill automatically send any packets that are not on the local netw ork to R1 to be routed. Explanation: Gatew ay is an older term for router. Therefore, the default gatew ay is actually the default router to go to w hen packets have destinations that are not local. Step 7 : On R1, have the DHCP service list 4.2.2.1 as the DNS server for all hosts on the Engineering subnet to use. Action:

r 1 ( d h c p c o n f i g ) #d n s s e r v e r4 . 2 . 2 . 1 r 1 ( d h c p c o n f i g ) # Result:

Explanation: DNS translates domain names into IP addresses. The address show n here is only an example.
ekvcse.vlab.elementk.com/vlab/labLockerDisplay.vlab 2/5

10/24/12

vLab

Step 8 : By default, the DHCP service on your router w ill lease the address to clients for one day. Change this to 5 days on R1. Action:

r 1 ( d h c p c o n f i g ) #l e a s e5 r 1 ( d h c p c o n f i g ) # Result: Explanation: Once the lease expires, the client can request a new lease. Step 9 : Pretend that the users on the engineering subnet all shared files w ith each other on an FTP server w ith the address 192.168.1.5. You dont w ant the DHCP server to accidentally assign this address also to a user, so exclude it from the pool. Action:

r 1 ( d h c p c o n f i g ) #e x i t r 1 ( c o n f i g ) #i pd h c pe x c l u d e d a d d r e s s1 9 2 . 1 6 8 . 1 . 5 r 1 ( c o n f i g ) # Result: This command is done from global configuration mode. Explanation: With this command, the .5 address w ill be skipped w hen leases are handed out. Step 10 : By default, the DHCP service on a Cisco router is disabled. Enable DHCP on R1. Action:

r 1 ( c o n f i g ) #s e r v i c ed h c p r 1 ( c o n f i g ) # Result: This command is also done from global configuration mode. Explanation: You have configured the DHCP parameters in the previous steps, but the router w as not acting as a DCHP server until now . Step 11 : Console into Sw 1. Configure the VLAN 1 interface to get its IP address from the DHCP server. Action:

s w 1 >e n a b l e s w 1 #c o n f i gt s w 1 ( c o n f i g ) #i n t e r f a c ev l a n1 s w 1 ( c o n f i g i f ) #i pa d d r e s sd h c p s w 1 ( c o n f i g i f ) # Result: Explanation: Since this is a lab and you really dont have engineers attached to Sw 1, you can test your configuration by making the sw itch itself a DCHP client. Prior to this step, Sw 1 w as configured w ith the IP address of 10.1.1.2 and a default gatew ay of 10.1.1.1.
ekvcse.vlab.elementk.com/vlab/labLockerDisplay.vlab 3/5

10/24/12

vLab

Step 12 : On Sw 1, shut dow n the VLAN 1 interface, w ait for a status m essage, and then re-enable it. Action:

s w 1 ( c o n f i g i f ) #s h u t ( W A I TF O RT H ES T A T U SM E S S A G E ) s w 1 ( c o n f i g i f ) #n os h u t

Result: Explanation: By shutting dow n the interface and bringing it back online, you trigger the DHCP request. After you have entered the no shut command, w ait about 10 seconds before proceeding to the next step. Step 13 : On Sw 1, verify that VLAN 1 has been given a new address. Action:

s w 1 ( c o n f i g i f ) #e n d s w 1 #s h o wi pi n t e r f a c eb r i e f s w 1 # Result: Explanation: You should find that VLAN 1 now has the address 192.168.1.2, since it w ould be the first available address in the DHCP pool. Step 14 : On Sw 1, verify that the DHCP server has assigned the dom ain nam e, cisco.com . Action:

s w 1 #s h o wi pd o m a i n s w 1 # Result: You should see: cisco.com Step 15 : On Sw 1, verify that the DHCP server has assigned the DNS server address: 4.2.2.1 Action:

s w 1 #s h o wi pn a m e s e r v e r s w 1 # Result: You should see: 4.2.2.1 Step 16 : On Sw 1, verify that the DHCP server has assigned it a new default gatew ay address: 192.168.1.1 Action:

s w 1 #s h o wi pd e f a u l t g a t e w a y s w 1 #
ekvcse.vlab.elementk.com/vlab/labLockerDisplay.vlab 4/5

vLab

Result: You should see: 192.168.1.1 Step 17 : Console into R1. Use a show com m and to verify the range of the DHCP pool you previously configured. Action:

r 1 ( c o n f i g ) #e n d r 1 #s h o wi pd h c pp o o l r 1 # Result: Anytime you see a device blinking, it is a reminder to console into a new device. Explanation: Near the bottom of the output you can see how many leases have been given out, the range, and the next IP address to be assigned. Step 18 : On R1, use a show com m and to verify DHCP server statistics. Action:

r 1 #s h o wi pd h c ps e r v e rs t a t i s t i c s r 1 # Result: Explanation: This allow s you to see counts on the underlying DHCP packets that are being exchanged like the DHCPDISCOVER, DHCPOFFER, and DHCPREQUEST messages. Step 19 : You have finished the lab. Action: You can take this lab again if time permits. Result: To take the lab a second time, you first need to reset the devices back to the baseline configurations that w ere present at the beginning of the lab. This can be done by clicking on the Device Controls link on the left bar, selecting all devices, and clicking the Reload button. Once the devices are all marked green, you can begin the lab. This process takes several minutes. You can also test your mastery of the material w hen you take a lab for the second time. Instead of using the Sam ple Solution link w hich w alks you through each step, you can use the Suggested Approach link. This provides the same steps, but w ithout the w alkthrough.

ekvcse.vlab.elementk.com/vlab/labLockerDisplay.vlab

5/5

Anda mungkin juga menyukai