What email address or phone number would you like to use to sign in to Docs.com?
If you already have an account that you use with Office or other Microsoft services, enter it here.
Or sign in with:
Signing in allows you to download and like content, and it provides the authors analytical data about your interactions with their content.
Embed code for: 16.6 Configuring a DHCP Client
Select a size
16.6 Configuring a DHCP Client
Configuring a DHCP Client Section 16: Enabling Internet Connectivity In situations where a small branch office needs Internet connectivity, the Cisco IOS router can be configured to obtain the border interface IP address from the ISP. Since static IP addresses are not required by the branch to allow incoming application requests from the Internet, DHCP is both less expensive and a simpler configuration than a static IP address assignment. In the example configuration, global configuration mode is entered and the Internet border interface GigabitEthernet0/0 is selected. Instead of configuring a static IP address, the administrator uses the dhcp parameter in the ip address command. If the ISP has a DHCP server that is listening for incoming requests, an address assignment will be made. After you enter the command, within a few seconds the router sends a logging message to the console, indicating (in this instance) that 18.104.22.168 with a 30bit subnet mask (255.255.255.252) was assigned to the interface. This mask is a common subnet mask where there are only two IP hosts on a subnet. In this instance, the network ID is 22.214.171.124, the default gateway is 126.96.36.199, and the broadcast address is 188.8.131.52. You can use the command shortcut conf t instead of typing out the complete configure terminal command. Router#conf t Router(config)#interface GigabitEthernet0/0 Router(config-if)#ip address dhcp Interface Ethernet0 assigned DHCP address 184.108.40.206, mask 255.255.255.252 Router(config-if)#end Router# Configuring GigabitEthernet 0/0 as a DHCP client Command Description Command Description interface GigabitEthernet 0/0 Enters the interface configuration mode for GigabitEthernet 0/0. ip address dhcp Configures interface GigabitEthernet 0/0 as a DHCP client. When executed, the interface will be set to "up" and it will broadcast for a DHCP server. end Exits the configuration mode and returns the prompt to the EXEC mode. Router administrators can validate the DHCP address assignment with the show ip interface brief command. The "Method" field is set to DHCP. This setting verifies that interface GigabitEthernet 0/0 received its IP configuration from the ISP DHCP server. Router#show ip interface brief Interface IP-Address OK? Method Status Protocol GigabitEthernet0/0 220.127.116.11 YES DHCP up up In addition to a dynamic IP address assignment, a secondary benefit of using DHCP is that you do not need to create a static route to the nexthop router IP address. The DHCP protocol sends the IP address and subnet mask for the border interface and automatically installs the IP address of the gateway of last resort into the routing table as a static route. Router#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 18.104.22.168 to network 0.0.0.0 22.214.171.124/30 is subnetted, 1 subnets C 126.96.36.199 is directly connected, Ethernet0 S* 0.0.0.0/0 [254/0] via 188.8.131.52 You can validate connectivity to the ISP gateway IP address by using the ping command. Router#ping 184.108.40.206 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 220.127.116.11, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms Content Unavailable This content is unavailable in this version of the course. Up Next: Introducing NAT