7.4.1 Packet Tracer – Basic DHCP and NAT Configuration Answers
|Device||Interface||IP Address||Subnet Mask||Default Gateway|
Upon completion of this lab, you will be able to:
- Perform basic router configurations.
- Configure a Cisco IOS DHCP server.
- Configure static and default routing.
- Configure static NAT.
- Configure dynamic NAT with a pool of addresses.
- Configure NAT overload.
In this lab, you will configure the DHCP and NAT IP services. One router is the DHCP server. The other router forwards DHCP requests to the server. You will also configure both static and dynamic NAT configurations, including NAT overload. When you have completed the configurations, verify the connectivity between the inside and outside addresses.
Task 1: Perform Basic Router Configurations
Step 1: Configure the routers.
Configure the R1, R2, and ISP routers according to the following guidelines:
- Configure the device hostname.
- Disable DNS lookup.
- Configure a priviledged EXEC mode password.
- Configure a message-of-the-day banner.
- Configure a password for the console connections.
- Configure a password for all vty connections.
- Configure IP addresses on all routers. The PCs receive IP addressing from DHCP later in the activity.
- Enable OSPF with process ID 1 on R1 and R2. Do not advertise the 22.214.171.124/27 network.
Step 2. Check results.
Your completion percentage should be 58%. If not, click Check Results to see which required components are not yet completed.
Task 2: Configure a Cisco IOS DHCP Server
Step 1: Exclude statically assigned addresses.
The DHCP server assumes that all IP addresses in a DHCP address pool subnet are available for assigning to DHCP clients. You must specify the IP addresses that the DHCP server should not assign to clients. These IP address are usually static addresses reserved for the router interface, switch management IP address, servers, and local network printer. The ip dhcp excluded-address command prevents the router from assigning IP addresses within the configured range. The following commands exclude the first 10 IP addresses from each pool for the LANs attached to R1. These addresses will not be assigned to any DHCP clients.
R1(config)# ip dhcp excluded-address 192.168.10.1 192.168.10.10 R1(config)# ip dhcp excluded-address 192.168.11.1 192.168.11.10
Step 2: Configure the pool.
Create the DHCP pool using the ip dhcp pool command and name it R1Fa0.
R1(config)# ip dhcp pool R1Fa0
Specify the subnet to use when assigning IP addresses. DHCP pools automatically associate with an interface based on the network statement. The router now acts as a DHCP server, handing out addresses in the 192.168.10.0/24 subnet starting with 192.168.10.1.
R1(dhcp-config)# network 192.168.10.0 255.255.255.0
Configure the default router and domain name server for the network. Clients receive these settings via DHCP, along with an IP address.
R1(dhcp-config)# dns-server 192.168.11.5 R1(dhcp-config)# default-router 192.168.10.1
Note: There is not a DNS server at 192.168.11.5. You are configuring the command for practice only.
R1(config)# ip dhcp pool R1Fa1 R1(dhcp-config)# network 192.168.11.0 255.255.255.0 R1(dhcp-config)# dns-server 192.168.11.5 R1(dhcp-config)# default-router 192.168.11.1
Step 3: Verify the DHCP configuration.
You can verify the DHCP server configuration in several different ways. The most basic way is to configure a host on the subnet to receive an IP address via DHCP. You can then issue commands on the router to get more information. The show ip dhcp binding command provides information on all currently assigned DHCP addresses. For instance, the following output shows that the IP address 192.168.10.11 has been assigned to MAC address 3031.632e.3537.6563. The IP lease expires on September 14, 2007 at 7:33 pm.
R1# show ip dhcp binding IP address Client-ID/ Lease expiration Type Hardware address 192.168.10.11 0007.EC66.8752 -- Automatic 192.168.11.11 00E0.F724.8EDA -- Automatic R1#
Step 4. Check results.
Your completion percentage should be 75%. If not, click Check Results to see which required components are not yet completed.
Task 3: Configure Static and Default Routing
Step 1. Configure static and default routes
ISP uses static routing to reach all networks beyond R2. However, R2 translates private addresses into public addresses before sending traffic to ISP. Therefore, ISP must be configured with the public addresses that are part of the NAT configuration on R2. Enter the following static route on ISP:
ISP(config)# ip route 126.96.36.199 255.255.255.240 serial 0/0/1
This static route includes all addresses assigned to R2 for public use.
Configure a default route on R2 and propagate the route in OSPF.
R2(config)# ip route 0.0.0.0 0.0.0.0 188.8.131.52 R2(config)# router ospf 1 R2(config-router)# default-information originate
Allow a few seconds for R1 to learn the default route from R2 and then check the R1 routing table. Alternatively, you can clear the routing table with the clear ip route * command. A default route pointing to R2 should appear in the R1 routing table. From R1, ping the serial 0/0/1 interface on R2 (184.108.40.206). The pings should be successful. Troubleshoot if the pings fail.
Step 2. Check results.
Your completion percentage should be 83%. If not, click Check Results to see which required components are not yet completed.