You are on page 1of 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

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. Action: r 1 ( d h c p c o n f i g ) #d n s s e r v e r4 . 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 .168. have the DHCP service list 4. have the DHCP server assign the default gatew ay of 192. Explanation: This command allow s the first engineer to receive the IP address 192.1. 1 .2.0 /24 netw ork. 1 . you have decided to configure R1 as their DHCP server.168.vlab 2/5 . The address show n here is only an example. the default gatew ay is actually the default router to go to w hen packets have destinations that are not local. Rather than purchasing a separate DHCP server to assign IP addresses to the engineers.1 is R1. and so on.1 address. 1 6 8 . The router is smart enough to know not to give out the .. a DHCP server can also supply the client w ith other parameters such as the domain name.vlab.elementk.1. configure the pool of addresses to be assigned to clients to be taken from the 192.4. etc. cisco. 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 . because it is already using it. ekvcse.1 to the clients as part of the lease.2. 2 .168. 1 r 1 ( d h c p c o n f i g ) # Result: Explanation: DNS translates domain names into IP addresses. The engineers w ill automatically send any packets that are not on the local netw ork to R1 to be routed.1 and on the same subnet as your engineers. the second to receive 192. default gatew ay.1. Step 6 : On R1. 0/ 2 4 r 1 ( d h c p c o n f i g ) # Result: The address on f0/0 is 192.1.10/24/12 Here is the scenario for this lab. Step 7 : On R1.com/vlab/labLockerDisplay. 1 6 8 . Step 5 : Configure R1’s DHCP service to assign the dom ain nam e.3.1.168.168.168. w hen the lease is given.168. DNS server address. Action: vLab r 1 ( d h c p c o n f i g ) #n e t w o r k1 9 2 .1. Step 4 : On R1.1.1 as the DNS server for all hosts on the Engineering subnet to use. the third to receive 192. to each DHCP client. 1 r 1 ( d h c p c o n f i g ) # Result: 192. Explanation: Gatew ay is an older term for router. 2 .com .2. Therefore. The engineers in your department are all on the same subnet and are connected to Sw 1.

1.1. Enable DHCP on R1.1. you can test your configuration by making the sw itch itself a DCHP client. the DHCP service on your router w ill lease the address to clients for one day. Step 10 : By default. 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 . 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. 1 .168. 5 r 1 ( c o n f i g ) # Result: This command is done from global configuration mode. Sw 1 w as configured w ith the IP address of 10. 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.1.5.vlab. Configure the VLAN 1 interface to get its IP address from the DHCP server. but the router w as not acting as a DCHP server until now .vlab 3/5 .1.5 address w ill be skipped w hen leases are handed out. so exclude it from the pool.com/vlab/labLockerDisplay. Prior to this step. 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 don’t have engineers attached to Sw 1. 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. Change this to 5 days on R1.10/24/12 vLab Step 8 : By default. the . ekvcse.2 and a default gatew ay of 10. 1 6 8 . Explanation: With this command.elementk. the DHCP service on a Cisco router is disabled.1. Step 11 : Console into Sw 1. the client can request a new lease. Explanation: You have configured the DHCP parameters in the previous steps. You don’t w ant the DHCP server to accidentally assign this address also to a user.

verify that the DHCP server has assigned the DNS server address: 4. since it w ould be the first available address in the DHCP pool.168. 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.1 Step 16 : On Sw 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. After you have entered the no shut command.com/vlab/labLockerDisplay.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.vlab 4/5 .10/24/12 vLab Step 12 : On Sw 1. w ait for a status m essage.1. you trigger the DHCP request.vlab. and then re-enable it. w ait about 10 seconds before proceeding to the next step.elementk. verify that the DHCP server has assigned it a new default gatew ay address: 192.168. Step 13 : On Sw 1. verify that VLAN 1 has been given a new address.2. verify that the DHCP server has assigned the dom ain nam e. 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.com . Action: s w 1 #s h o wi pd o m a i n s w 1 # Result: You should see: cisco.2.2.1. shut dow n the VLAN 1 interface.com Step 15 : On Sw 1. cisco.2. Step 14 : On Sw 1.2.

Instead of using the Sam ple Solution link w hich w alks you through each step. and the next IP address to be assigned. selecting all devices. Once the devices are all marked green.vlab 5/5 . Result: To take the lab a second time.vLab Result: You should see: 192. you can begin the lab. 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.vlab. Action: You can take this lab again if time permits.com/vlab/labLockerDisplay. 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.elementk. DHCPOFFER. it is a reminder to console into a new device. ekvcse. you can use the Suggested Approach link. Step 18 : On R1.1 Step 17 : Console into R1. This provides the same steps. you first need to reset the devices back to the baseline configurations that w ere present at the beginning of the lab. Step 19 : You have finished the lab. Explanation: Near the bottom of the output you can see how many leases have been given out. and DHCPREQUEST messages. This can be done by clicking on the Device Controls link on the left bar. the range. You can also test your mastery of the material w hen you take a lab for the second time.168. and clicking the Reload button. but w ithout the w alkthrough.1. use a show com m and to verify DHCP server statistics. This process takes several minutes.