lab 1.2.6 configuring dhcp – instructor version 1700saturn.glyndwr.ac.uk/cisco/ccna/semester...

27
38 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc. Lab 1.2.6 Configuring DHCP – Instructor Version 1700 Objective Configure a router for Dynamic Host Configuration Protocol (DHCP) to dynamically assign addresses to attached hosts. Background/Preparation Routing between the ISP and the campus router uses a static route between the ISP and the gateway, and a default route between the gateway and the ISP. The ISP connection to the Internet is identified by a loopback address on the ISP router. Cable a network similar to the one in the diagram above. Any router that meets the interface requirements displayed on the above diagram may be used. This includes the following and any of their possible combinations: 800 series routers 1600 series routers 1700 series routers 2500 series routers 2600 series routers Please refer to the chart at the end of the lab to correctly identify the interface identifiers to be used based on the equipment in the lab. The configuration output used in this lab is produced from 1721

Upload: buicong

Post on 06-Feb-2018

290 views

Category:

Documents


10 download

TRANSCRIPT

Page 1: Lab 1.2.6 Configuring DHCP – Instructor Version 1700saturn.glyndwr.ac.uk/cisco/CCNA/Semester 4/pdf/knet... · 43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003,

38 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc.

Lab 1.2.6 Configuring DHCP – Instructor Version 1700

Objective • Configure a router for Dynamic Host Configuration Protocol (DHCP) to dynamically assign

addresses to attached hosts.

Background/Preparation Routing between the ISP and the campus router uses a static route between the ISP and the gateway, and a default route between the gateway and the ISP. The ISP connection to the Internet is identified by a loopback address on the ISP router.

Cable a network similar to the one in the diagram above. Any router that meets the interface requirements displayed on the above diagram may be used. This includes the following and any of their possible combinations:

• 800 series routers

• 1600 series routers

• 1700 series routers

• 2500 series routers

• 2600 series routers

Please refer to the chart at the end of the lab to correctly identify the interface identifiers to be used based on the equipment in the lab. The configuration output used in this lab is produced from 1721

Page 2: Lab 1.2.6 Configuring DHCP – Instructor Version 1700saturn.glyndwr.ac.uk/cisco/CCNA/Semester 4/pdf/knet... · 43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003,

39 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc.

series routers. Any other router used may produce slightly different output. Conduct the following steps on each router unless specifically instructed otherwise.

Start a HyperTerminal session.

Note: Refer to the erase and reload instructions at the end of this lab. Perform those steps on all routers in this lab assignment before continuing.

Step 1 Configure the routers Configure all of the following according to the chart:

• The hostname

• The console password

• The virtual terminal password

• The enable secret password

• The interfaces

If problems occur during this configuration, refer to Lab 1.1.4a Configuring NAT.

Step 2 Save the configuration At the privileged EXEC mode prompt, on both routers, type the command copy running-config startup-config.

Step 3 Create a static route a. Addresses 172.16.12.0/24 have been allocated for Internet access outside of the company. Use

the ip route command to create the static route:

ISP(config)#ip route 172.16.12.0 255.255.255.0 172.16.1.6

b. Is the static route in the routing table? Yes ISP#show ip route 00:02:08: %SYS-5-CONFIG_I: Configured from console by consoleute Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS

inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is not set 172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks S 172.16.12.0/24 [1/0] via 172.16.1.6 C 172.16.13.0/24 is directly connected, Loopback0

C 172.16.1.4/30 is directly connected, Serial0

Step 4 Create a default route a. Use the ip route command to add a default route from the campus router to the ISP router.

This will provide the mechanism to forward any unknown destination address traffic to the ISP:

campus(config)#ip route 0.0.0.0 0.0.0.0 172.16.1.5

Page 3: Lab 1.2.6 Configuring DHCP – Instructor Version 1700saturn.glyndwr.ac.uk/cisco/CCNA/Semester 4/pdf/knet... · 43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003,

40 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc.

b. Is the static route in the routing table? Yes campus#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS

inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is 172.16.1.5 to network 0.0.0.0 172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks C 172.16.12.0/24 is directly connected, FastEthernet0 C 172.16.1.4/30 is directly connected, Serial0 S* 0.0.0.0/0 [1/0] via 172.16.1.5

Step 5 Create the DHCP address pool To configure the campus LAN pool, use the following commands:

campus(config)#ip dhcp pool campus campus(dhcp-config)#network 172.16.12.0 255.255.255.0 campus(dhcp-config)#default-router 172.16.12.1 campus(dhcp-config)#dns-server 172.16.1.2 campus(dhcp-config)#domain-name foo.com campus(dhcp-config)#netbios-name-server 172.16.1.10

Step 6 Excluding addresses from pool To exclude addresses from the pool, use the following commands:

campus(config)#ip dhcp excluded-address 172.16.12.1 172.16.12.11

Page 4: Lab 1.2.6 Configuring DHCP – Instructor Version 1700saturn.glyndwr.ac.uk/cisco/CCNA/Semester 4/pdf/knet... · 43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003,

41 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc.

Step 7 Verifying DHCP Operation

a. At each workstation on the directly connected subnet configure the TCP/IP properties so the

workstation will obtain an IP address and Domain Name System (DNS) server address from the DHCP server. After changing and saving the configuration, reboot the workstation.

b. To confirm the TCP/IP configuration information on each host use Start > Run > winipcfg /all. If running Windows 2000, check using ipconfig /all in a DOS window.

c. What IP address was assigned to the workstation? 172.16.12.11

d. What other information was automatically assigned? domain name, dns, netbios, subnet mask, gateway

e. When was the lease obtained? Student should have listed time and date

f. When will the lease expire? Student should have listed time and date

Step 8 View DHCP bindings a. From the campus router, the bindings for the hosts can be seen. To see the bindings, use the

command show ip dhcp binding at the privileged EXEC mode prompt.

campus#show ip dhcp binding IP address Hardware address Lease expiration Type

172.16.12.11 0100.10a4.188f.c9 Mar 02 1993 01:25 AM Automatic

b. What were the IP addresses assigned? 172.16.12.11

c. What are the three other fields listed in the output? mac address, lease expiration and type

Page 5: Lab 1.2.6 Configuring DHCP – Instructor Version 1700saturn.glyndwr.ac.uk/cisco/CCNA/Semester 4/pdf/knet... · 43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003,

42 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc.

Upon completion of the previous steps, finish the lab by doing the following:

• Logoff by typing exit

• Turn the router off

• Remove and store the cables and adapter

Page 6: Lab 1.2.6 Configuring DHCP – Instructor Version 1700saturn.glyndwr.ac.uk/cisco/CCNA/Semester 4/pdf/knet... · 43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003,

43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc.

Campus Router#configure terminal Router(config)#hostname campus campus(config)#enable password cisco campus(config)#enable secret class campus(config)#line console 0 campus(config-line)#password cisco campus(config-line)#login campus(config-line)#exit campus(config)#line vty 0 4 campus(config-line)#password cisco campus(config-line)#login campus(config-line)#exit campus(config)#interface fastethernet 0 campus(config-if)#ip address 172.16.12.1 255.255.255.0 campus(config-if)#no shutdown campus(config-if)#exit campus(config)#interface serial 0 campus(config-if)#ip address 172.16.1.6 255.255.255.252 campus(config-if)#clock rate 64000 campus(config-if)#no shutdown campus(config-if)#exit campus(config)#ip route 0.0.0.0 0.0.0.0 172.16.1.5 campus(config)#exit campus#copy running-config startup-config Campus DHCP configuration campus#configure terminal campus(config)#ip dhcp pool campus campus(dhcp-config)#network 172.16.12.0 255.255.255.0 campus(dhcp-config)#default-router 172.16.12.1 campus(dhcp-config)#dns-server 172.16.1.2 campus(dhcp-config)#domain-name foo.com campus(dhcp-config)#netbios-name-server 172.16.1.10 campus(dhcp-config)#ip dhcp excluded-address 172.16.12.1 172.16.12.10 campus(dhcp-config)#exit campus(config)#exit campus#copy running-config startup-config ISP Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname ISP ISP(config)#enable password cisco ISP(config)#enable secret class ISP(config)#line console 0 ISP(config-line)#password cisco ISP(config-line)#login ISP(config-line)#exit ISP(config)#line vty 0 4 ISP(config-line)#password cisco ISP(config-line)#login ISP(config-line)#exit ISP(config)#interface loopback 0 ISP(config-if)#ip address 172.16.13.1 255.255.255.0 ISP(config-if)#no shutdown ISP(config-if)#exit ISP(config)#interface serial 0

Page 7: Lab 1.2.6 Configuring DHCP – Instructor Version 1700saturn.glyndwr.ac.uk/cisco/CCNA/Semester 4/pdf/knet... · 43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003,

44 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc.

ISP(config-if)#ip address 172.16.1.5 255.255.255.252 ISP(config-if)#no shutdown ISP(config)#ip route 172.16.12.0 255.255.255.0 172.16.1.6 ISP(config)#exit ISP#copy running-config startup-config

Page 8: Lab 1.2.6 Configuring DHCP – Instructor Version 1700saturn.glyndwr.ac.uk/cisco/CCNA/Semester 4/pdf/knet... · 43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003,

45 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc.

Erasing and reloading the router Enter into the privileged EXEC mode by typing enable.

If prompted for a password, enter class (if that does not work, ask the instructor).

Router>enable

At the privileged EXEC mode, enter the command erase startup-config.

Router#erase startup-config

The responding line prompt will be:

Erasing the nvram filesystem will remove all files! Continue? [confirm]

Press Enter to confirm.

The response should be:

Erase of nvram: complete

Now at the privileged EXEC mode, enter the command reload.

Router(config)#reload

The responding line prompt will be:

System configuration has been modified. Save? [yes/no]:

Type n and then press Enter.

The responding line prompt will be:

Proceed with reload? [confirm]

Press Enter to confirm.

In the first line of the response will be:

Reload requested by console.

After the router has reloaded the line prompt will be:

Would you like to enter the initial configuration dialog? [yes/no]:

Type n and then press Enter.

The responding line prompt will be:

Press RETURN to get started!

Press Enter.

Now the router is ready for the assigned lab to be performed.

Page 9: Lab 1.2.6 Configuring DHCP – Instructor Version 1700saturn.glyndwr.ac.uk/cisco/CCNA/Semester 4/pdf/knet... · 43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003,

46 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc.

Router Interface Summary Router Model

Ethernet Interface #1

Ethernet Interface #2

Serial Interface #1

Serial Interface #2

800 (806) Ethernet 0 (E0) Ethernet 1 (E1) 1600 Ethernet 0 (E0) Ethernet 1 (E1) Serial 0 (S0) Serial 1 (S1) 1700 FastEthernet 0 (FA0) FastEthernet 1 (FA1) Serial 0 (S0) Serial 1 (S1) 2500 Ethernet 0 (E0) Ethernet 1 (E1) Serial 0 (S0) Serial 1 (S1) 2600 FastEthernet 0/0 (FA0/0) FastEthernet 0/1 (FA0/1) Serial 0/0 (S0/0) Serial 0/1 (S0/1)

In order to find out exactly how the router is configured, look at the interfaces. This will identify what type and how many interfaces the router has. There is no way to effectively list all of the combinations of configurations for each router class. What is provided are the identifiers for the possible combinations of interfaces in the device. This interface chart does not include any other type of interface even though a specific router may contain one. An example of this might be an ISDN BRI interface. The string in parenthesis is the legal abbreviation that can be used in an IOS command to represent the interface.

Page 10: Lab 1.2.6 Configuring DHCP – Instructor Version 1700saturn.glyndwr.ac.uk/cisco/CCNA/Semester 4/pdf/knet... · 43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003,

203 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc.

Lab 1.2.6 Configuring DHCP – Instructor Version 2500

Objective • Configure a router for Dynamic Host Configuration Protocol (DHCP) to dynamically assign

addresses to attached hosts.

Background/Preparation Routing between the ISP and the campus router uses a static route between the ISP and the gateway, and a default route between the gateway and the ISP. The ISP connection to the Internet is identified by a loopback address on the ISP router.

Cable a network similar to the one in the diagram above. Any router that meets the interface requirements displayed on the above diagram may be used. This includes the following and any of their possible combinations:

• 800 series routers

• 1600 series routers

• 1700 series routers

• 2500 series routers

• 2600 series routers

Please refer to the chart at the end of the lab to correctly identify the interface identifiers to be used based on the equipment in the lab. The configuration output used in this lab is produced from 1721

Page 11: Lab 1.2.6 Configuring DHCP – Instructor Version 1700saturn.glyndwr.ac.uk/cisco/CCNA/Semester 4/pdf/knet... · 43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003,

204 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc.

series routers. Any other router used may produce slightly different output. Conduct the following steps on each router unless specifically instructed otherwise.

Start a HyperTerminal session.

Note: Refer to the erase and reload instructions at the end of this lab. Perform those steps on all routers in this lab assignment before continuing.

Step 1 Configure the routers Configure all of the following according to the chart:

• The hostname

• The console password

• The virtual terminal password

• The enable secret password

• The interfaces

If problems occur during this configuration, refer to Lab 1.1.4a Configuring NAT.

Step 2 Save the configuration At the privileged EXEC mode prompt, on both routers, type the command copy running-config startup-config.

Step 3 Create a static route a. Addresses 172.16.12.0/24 have been allocated for Internet access outside of the company. Use

the ip route command to create the static route:

ISP(config)#ip route 172.16.12.0 255.255.255.0 172.16.1.6

b. Is the static route in the routing table? Yes ISP#show ip route 00:02:08: %SYS-5-CONFIG_I: Configured from console by consoleute Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS

inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is not set 172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks S 172.16.12.0/24 [1/0] via 172.16.1.6 C 172.16.13.0/24 is directly connected, Loopback0

C 172.16.1.4/30 is directly connected, Serial0

Step 4 Create a default route a. Use the ip route command to add a default route from the campus router to the ISP router.

This will provide the mechanism to forward any unknown destination address traffic to the ISP:

campus(config)#ip route 0.0.0.0 0.0.0.0 172.16.1.5

Page 12: Lab 1.2.6 Configuring DHCP – Instructor Version 1700saturn.glyndwr.ac.uk/cisco/CCNA/Semester 4/pdf/knet... · 43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003,

205 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc.

b. Is the static route in the routing table? Yes campus#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS

inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is 172.16.1.5 to network 0.0.0.0 172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks C 172.16.12.0/24 is directly connected, Ethernet0 C 172.16.1.4/30 is directly connected, Serial0 S* 0.0.0.0/0 [1/0] via 172.16.1.5

Step 5 Create the DHCP address pool To configure the campus LAN pool, use the following commands:

campus(config)#ip dhcp pool campus campus(dhcp-config)#network 172.16.12.0 255.255.255.0 campus(dhcp-config)#default-router 172.16.12.1 campus(dhcp-config)#dns-server 172.16.1.2 campus(dhcp-config)#domain-name foo.com campus(dhcp-config)#netbios-name-server 172.16.1.10

Step 6 Excluding addresses from pool To exclude addresses from the pool, use the following commands:

campus(config)#ip dhcp excluded-address 172.16.12.1 172.16.12.11

Page 13: Lab 1.2.6 Configuring DHCP – Instructor Version 1700saturn.glyndwr.ac.uk/cisco/CCNA/Semester 4/pdf/knet... · 43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003,

206 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc.

Step 7 Verifying DHCP Operation

a. At each workstation on the directly connected subnet configure the TCP/IP properties so the

workstation will obtain an IP address and Domain Name System (DNS) server address from the DHCP server. After changing and saving the configuration, reboot the workstation.

b. To confirm the TCP/IP configuration information on each host use Start > Run > winipcfg /all. If running Windows 2000, check using ipconfig /all in a DOS window.

c. What IP address was assigned to the workstation? 172.16.12.11

d. What other information was automatically assigned?

domain name, dns, netbios, subnet mask, gateway

e. When was the lease obtained? 10:00 AM 4/28/03

f. When will the lease expire? 10:00 AM 4/29/03

Page 14: Lab 1.2.6 Configuring DHCP – Instructor Version 1700saturn.glyndwr.ac.uk/cisco/CCNA/Semester 4/pdf/knet... · 43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003,

207 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc.

Step 8 View DHCP bindings d. From the campus router, the bindings for the hosts can be seen. To see the bindings, use the

command show ip dhcp binding at the privileged EXEC mode prompt.

campus#show ip dhcp binding IP address Hardware address Lease expiration Type

172.16.12.11 0100.10a4.188f.c9 Mar 02 1993 01:25 AM Automatic

e. What were the IP addresses assigned? 172.16.12.11

a. What are the three other fields listed in the output? mac address, lease expiration and type campus#show ip dhcp binding IP address Client-ID/ Lease expiration Type Hardware address 172.16.12.2 0063.6973.636f.2d30. Mar 02 1993 12:03 AM Automatic 3030.342e.6330.3735. 2e31.3530.302d.564c. 31

172.16.12.11 0108.0046.06fb.b6 Mar 02 1993 12:04 AM Automatic

Upon completion of the previous steps, finish the lab by doing the following:

• Logoff by typing exit

• Turn the router off

• Remove and store the cables and adapter

Page 15: Lab 1.2.6 Configuring DHCP – Instructor Version 1700saturn.glyndwr.ac.uk/cisco/CCNA/Semester 4/pdf/knet... · 43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003,

208 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc.

Campus Router#configure terminal Router(config)#hostname campus campus(config)#enable password cisco campus(config)#enable secret class campus(config)#line console 0 campus(config-line)#password cisco campus(config-line)#login campus(config-line)#exit campus(config)#line vty 0 4 campus(config-line)#password cisco campus(config-line)#login campus(config-line)#exit campus(config)#interface ethernet 0 campus(config-if)#ip address 172.16.12.1 255.255.255.0 campus(config-if)#no shutdown campus(config-if)#exit campus(config)#interface serial 0 campus(config-if)#ip address 172.16.1.6 255.255.255.252 campus(config-if)#clock rate 64000 campus(config-if)#no shutdown campus(config-if)#exit campus(config)#ip route 0.0.0.0 0.0.0.0 172.16.1.5 campus(config-if)#exit campus#copy running-config startup-config Campus DHCP configuration campus#configure terminal campus(config)#ip dhcp pool campus campus(dhcp-config)#network 172.16.12.0 255.255.255.0 campus(dhcp-config)#default-router 172.16.12.1 campus(dhcp-config)#dns-server 172.16.1.2 campus(dhcp-config)#domain-name foo.com campus(dhcp-config)#netbios-name-server 172.16.1.10 campus(dhcp-config)#ip dhcp excluded-address 172.16.12.1 172.16.12.10 campus(dhcp-config)#exit campus(config)#exit campus#copy running-config startup-config

ISP Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname ISP ISP(config)#enable password cisco ISP(config)#enable secret class ISP(config)#line console 0 ISP(config-line)#password cisco ISP(config-line)#login ISP(config-line)#exit ISP(config)#line vty 0 4 ISP(config-line)#password cisco ISP(config-line)#login ISP(config-line)#exit ISP(config)#interface loopback 0 ISP(config-if)#ip address 172.16.13.1 255.255.255.0 ISP(config-if)#no shutdown ISP(config-if)#exit ISP(config)#interface serial 0

Page 16: Lab 1.2.6 Configuring DHCP – Instructor Version 1700saturn.glyndwr.ac.uk/cisco/CCNA/Semester 4/pdf/knet... · 43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003,

209 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc.

ISP(config-if)#ip address 172.16.1.5 255.255.255.252 ISP(config-if)#no shutdown ISP(config-if)#exit ISP(config)#ip route 172.16.12.0 255.255.255.0 172.16.1.6 ISP(config)#exit ISP#copy running-config startup-config

Page 17: Lab 1.2.6 Configuring DHCP – Instructor Version 1700saturn.glyndwr.ac.uk/cisco/CCNA/Semester 4/pdf/knet... · 43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003,

210 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc.

Erasing and reloading the router Enter into the privileged EXEC mode by typing enable.

If prompted for a password, enter class (if that does not work, ask the instructor).

Router>enable

At the privileged EXEC mode, enter the command erase startup-config.

Router#erase startup-config

The responding line prompt will be:

Erasing the nvram filesystem will remove all files! Continue? [confirm]

Press Enter to confirm.

The response should be:

Erase of nvram: complete

Now at the privileged EXEC mode, enter the command reload.

Router(config)#reload

The responding line prompt will be:

System configuration has been modified. Save? [yes/no]:

Type n and then press Enter.

The responding line prompt will be:

Proceed with reload? [confirm]

Press Enter to confirm.

In the first line of the response will be:

Reload requested by console.

After the router has reloaded the line prompt will be:

Would you like to enter the initial configuration dialog? [yes/no]:

Type n and then press Enter.

The responding line prompt will be:

Press RETURN to get started!

Press Enter.

Now the router is ready for the assigned lab to be performed.

Page 18: Lab 1.2.6 Configuring DHCP – Instructor Version 1700saturn.glyndwr.ac.uk/cisco/CCNA/Semester 4/pdf/knet... · 43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003,

211 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc.

Router Interface Summary Router Model

Ethernet Interface #1

Ethernet Interface #2

Serial Interface #1

Serial Interface #2

800 (806) Ethernet 0 (E0) Ethernet 1 (E1) 1600 Ethernet 0 (E0) Ethernet 1 (E1) Serial 0 (S0) Serial 1 (S1) 1700 FastEthernet 0 (FA0) FastEthernet 1 (FA1) Serial 0 (S0) Serial 1 (S1) 2500 Ethernet 0 (E0) Ethernet 1 (E1) Serial 0 (S0) Serial 1 (S1) 2600 FastEthernet 0/0 (FA0/0) FastEthernet 0/1 (FA0/1) Serial 0/0 (S0/0) Serial 0/1 (S0/1)

In order to find out exactly how the router is configured, look at the interfaces. This will identify what type and how many interfaces the router has. There is no way to effectively list all of the combinations of configurations for each router class. What is provided are the identifiers for the possible combinations of interfaces in the device. This interface chart does not include any other type of interface even though a specific router may contain one. An example of this might be an ISDN BRI interface. The string in parenthesis is the legal abbreviation that can be used in an IOS command to represent the interface.

Page 19: Lab 1.2.6 Configuring DHCP – Instructor Version 1700saturn.glyndwr.ac.uk/cisco/CCNA/Semester 4/pdf/knet... · 43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003,

368 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc.

Lab 1.2.6 Configuring DHCP – Instructor Version 2600

Objective • Configure a router for Dynamic Host Configuration Protocol (DHCP) to dynamically assign

addresses to attached hosts.

Background/Preparation Routing between the ISP and the campus router uses a static route between the ISP and the gateway, and a default route between the gateway and the ISP. The ISP connection to the Internet is identified by a loopback address on the ISP router.

Cable a network similar to the one in the diagram above. Any router that meets the interface requirements displayed on the above diagram may be used. This includes the following and any of their possible combinations:

• 800 series routers

• 1600 series routers

• 1700 series routers

• 2500 series routers

• 2600 series routers

Please refer to the chart at the end of the lab to correctly identify the interface identifiers to be used based on the equipment in the lab. The configuration output used in this lab is produced from 1721

Page 20: Lab 1.2.6 Configuring DHCP – Instructor Version 1700saturn.glyndwr.ac.uk/cisco/CCNA/Semester 4/pdf/knet... · 43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003,

369 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc.

series routers. Any other router used may produce slightly different output. Conduct the following steps on each router unless specifically instructed otherwise.

Start a HyperTerminal session.

Note: Refer to the erase and reload instructions at the end of this lab. Perform those steps on all routers in this lab assignment before continuing.

Step 1 Configure the routers Configure all of the following according to the chart:

• The hostname

• The console password

• The virtual terminal password

• The enable secret password

• The interfaces

If problems occur during this configuration, refer to Lab 1.1.4a Configuring NAT.

Step 2 Save the configuration At the privileged EXEC mode prompt, on both routers, type the command copy running-config startup-config.

Step 3 Create a static route a. Addresses 172.16.12.0/24 have been allocated for Internet access outside of the company. Use

the ip route command to create the static route:

ISP(config)#ip route 172.16.12.0 255.255.255.0 172.16.1.6

b. Is the static route in the routing table? Yes ISP#show ip route 00:02:08: %SYS-5-CONFIG_I: Configured from console by consoleute Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS

inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is not set 172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks S 172.16.12.0/24 [1/0] via 172.16.1.6 C 172.16.13.0/24 is directly connected, Loopback0

C 172.16.1.4/30 is directly connected, Serial0/0

Step 4 Create a default route a. Use the ip route command to add a default route from the campus router to the ISP router.

This will provide the mechanism to forward any unknown destination address traffic to the ISP:

campus(config)#ip route 0.0.0.0 0.0.0.0 172.16.1.5

Page 21: Lab 1.2.6 Configuring DHCP – Instructor Version 1700saturn.glyndwr.ac.uk/cisco/CCNA/Semester 4/pdf/knet... · 43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003,

370 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc.

b. Is the static route in the routing table? Yes campus#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS

inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is 172.16.1.5 to network 0.0.0.0 172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks C 172.16.12.0/24 is directly connected, FastEthernet0/0 C 172.16.1.4/30 is directly connected, Serial0/0

S* 0.0.0.0/0 [1/0] via 172.16.1.5

Step 5 Create the DHCP address pool To configure the campus LAN pool, use the following commands:

campus(config)#ip dhcp pool campus campus(dhcp-config)#network 172.16.12.0 255.255.255.0 campus(dhcp-config)#default-router 172.16.12.1 campus(dhcp-config)#dns-server 172.16.1.2 campus(dhcp-config)#domain-name foo.com campus(dhcp-config)#netbios-name-server 172.16.1.10

Step 6 Excluding addresses from pool To exclude addresses from the pool, use the following commands:

campus(config)#ip dhcp excluded-address 172.16.12.1 172.16.12.11

Page 22: Lab 1.2.6 Configuring DHCP – Instructor Version 1700saturn.glyndwr.ac.uk/cisco/CCNA/Semester 4/pdf/knet... · 43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003,

371 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc.

Step 7 Verifying DHCP Operation

a. At each workstation on the directly connected subnet configure the TCP/IP properties so

the workstation will obtain an IP address and Domain Name System (DNS) server address from the DHCP server. After changing and saving the configuration, reboot the workstation.

b. To confirm the TCP/IP configuration information on each host use Start > Run > winipcfg /all. If running Windows 2000, check using ipconfig /all in a DOS window.

c. What IP address was assigned to the workstation? 172.16.12.11

d. What other information was automatically assigned? domain name, dns, netbios, subnet mask, gateway

e. When was the lease obtained? Student should list time and date

f. When will the lease expire? Student should list time and date

Page 23: Lab 1.2.6 Configuring DHCP – Instructor Version 1700saturn.glyndwr.ac.uk/cisco/CCNA/Semester 4/pdf/knet... · 43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003,

372 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc.

Step 8 View DHCP bindings a. From the campus router, the bindings for the hosts can be seen. To see the bindings, use the

command show ip dhcp binding at the privileged EXEC mode prompt.

campus#show ip dhcp binding IP address Hardware address Lease expiration Type

172.16.12.11 0100.10a4.188f.c9 Mar 02 1993 01:25 AM Automatic

b. What were the IP addresses assigned? 172.16.12.11

c. What are the three other fields listed in the output? mac address, lease expiration and type

Upon completion of the previous steps, finish the lab by doing the following:

• Logoff by typing exit

• Turn the router off

• Remove and store the cables and adapter

Page 24: Lab 1.2.6 Configuring DHCP – Instructor Version 1700saturn.glyndwr.ac.uk/cisco/CCNA/Semester 4/pdf/knet... · 43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003,

373 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc.

Campus Router#configure terminal Router(config)#hostname campus campus(config)#enable password cisco campus(config)#enable secret class campus(config)#line console 0 campus(config-line)#password cisco campus(config-line)#login campus(config-line)#exit campus(config)#line vty 0 4 campus(config-line)#password cisco campus(config-line)#login campus(config-line)#exit campus(config)#interface fastethernet 0/0 campus(config-if)#ip address 172.16.12.1 255.255.255.0 campus(config-if)#no shutdown campus(config-if)#exit campus(config)#interface serial 0/0 campus(config-if)#ip address 172.16.1.6 255.255.255.252 campus(config-if)#clock rate 64000 campus(config-if)#no shutdown campus(config-if)#exit campus(config)#ip route 0.0.0.0 0.0.0.0 172.16.1.5 campus(config-if)#exit campus#copy running-config startup-config Campus DHCP configuration campus#configure terminal campus(config)#ip dhcp pool campus campus(dhcp-config)#network 172.16.12.0 255.255.255.0 campus(dhcp-config)#default-router 172.16.12.1 campus(dhcp-config)#dns-server 172.16.1.2 campus(dhcp-config)#domain-name foo.com campus(dhcp-config)#netbios-name-server 172.16.1.10 campus(dhcp-config)#ip dhcp excluded-address 172.16.12.1 172.16.12.10 campus(dhcp-config)#exit campus(config)#exit campus#copy running-config startup-config ISP Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname ISP ISP(config)#enable password cisco ISP(config)#enable secret class ISP(config)#line console 0 ISP(config-line)#password cisco ISP(config-line)#login ISP(config-line)#exit ISP(config)#line vty 0 4 ISP(config-line)#password cisco ISP(config-line)#login ISP(config-line)#exit ISP(config)#interface loopback 0 ISP(config-if)#ip address 172.16.13.1 255.255.255.0 ISP(config-if)#no shutdown ISP(config-if)#exit ISP(config)#interface serial 0/0

Page 25: Lab 1.2.6 Configuring DHCP – Instructor Version 1700saturn.glyndwr.ac.uk/cisco/CCNA/Semester 4/pdf/knet... · 43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003,

374 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc.

ISP(config-if)#ip address 172.16.1.5 255.255.255.252 ISP(config-if)#no shutdown ISP(config-if)#exit ISP(config)#ip route 172.16.12.0 255.255.255.0 172.16.1.6 ISP(config)#exit ISP#copy running-config startup-config

Page 26: Lab 1.2.6 Configuring DHCP – Instructor Version 1700saturn.glyndwr.ac.uk/cisco/CCNA/Semester 4/pdf/knet... · 43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003,

375 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc.

Erasing and reloading the router Enter into the privileged EXEC mode by typing enable.

If prompted for a password, enter class (if that does not work, ask the instructor).

Router>enable

At the privileged EXEC mode, enter the command erase startup-config.

Router#erase startup-config

The responding line prompt will be:

Erasing the nvram filesystem will remove all files! Continue? [confirm]

Press Enter to confirm.

The response should be:

Erase of nvram: complete

Now at the privileged EXEC mode, enter the command reload.

Router(config)#reload

The responding line prompt will be:

System configuration has been modified. Save? [yes/no]:

Type n and then press Enter.

The responding line prompt will be:

Proceed with reload? [confirm]

Press Enter to confirm.

In the first line of the response will be:

Reload requested by console.

After the router has reloaded the line prompt will be:

Would you like to enter the initial configuration dialog? [yes/no]:

Type n and then press Enter.

The responding line prompt will be:

Press RETURN to get started!

Press Enter.

Now the router is ready for the assigned lab to be performed.

Page 27: Lab 1.2.6 Configuring DHCP – Instructor Version 1700saturn.glyndwr.ac.uk/cisco/CCNA/Semester 4/pdf/knet... · 43 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003,

376 - 489 CCNA 4: WAN Technologies v 3.1 - Lab 1.2.6 Copyright 2003, Cisco Systems, Inc.

Router Interface Summary Router Model

Ethernet Interface #1

Ethernet Interface #2

Serial Interface #1

Serial Interface #2

800 (806) Ethernet 0 (E0) Ethernet 1 (E1) 1600 Ethernet 0 (E0) Ethernet 1 (E1) Serial 0 (S0) Serial 1 (S1) 1700 FastEthernet 0 (FA0) FastEthernet 1 (FA1) Serial 0 (S0) Serial 1 (S1) 2500 Ethernet 0 (E0) Ethernet 1 (E1) Serial 0 (S0) Serial 1 (S1) 2600 FastEthernet 0/0 (FA0/0) FastEthernet 0/1 (FA0/1) Serial 0/0 (S0/0) Serial 0/1 (S0/1)

In order to find out exactly how the router is configured, look at the interfaces. This will identify what type and how many interfaces the router has. There is no way to effectively list all of the combinations of configurations for each router class. What is provided are the identifiers for the possible combinations of interfaces in the device. This interface chart does not include any other type of interface even though a specific router may contain one. An example of this might be an ISDN BRI interface. The string in parenthesis is the legal abbreviation that can be used in an IOS command to represent the interface.