Configuring DHCP and the IP Helper Command


On a large network, keeping up with network changes and the necessary manual configurations creates a lot of work for the administrator. Many administrators don't realize that their Cisco routers can also be DHCP servers and distribute and track host addressing.

Manually configuring host IP information and changes is time-consuming and potentially prone to errors. If the network changes frequently and has limited address space, assigning a static address to a machine that accesses the network infrequently, such as a remote user 's laptop or workstation that is used only a few hours a day, is a waste of time.

This is where a DHCP server works well in the network. DHCP is a protocol developed from BOOTP (Boot Protocol), with a few modifications, such as the BOOTP relay agent. BOOTP was used (or may still be used) to allow diskless workstations to be configured with the necessary TCP/IP parameters to communicate on the network. DHCP dynamically assigns the IP address, subnet mask, DNS server, and WINS information. All information is only valid until the lease time assigned by an administrator expires or the host is manually released before the expiration period.

It is not necessary to have a DHCP server on each subnet, because DHCP can work across Cisco routers (as discussed in the next section of this chapter), or function with the help of BOOTP relay agents that listen to the DHCP messages and then forward them. Certain addresses have to remain the same with every reboot of a host and thus need to be configured as address reservations on the DHCP server. This ensures the correct address assignment for default gateways, DNS servers, and so forth.

In Global Configurations mode on a Cisco router, you can configure DHCP. The following is an example of a configuration on a Cisco 1720 using the IP-PLUS version of the Cisco IOS.

 RTR(config)#  ip dhcp pool 0  RTR(config)#  network 10.1.0.0 /16  RTR(config)#  domain-name digitalcrawlspaces.com  RTR(config)#  dns-server 206.13.31.12 10.1.2.25  RTR(config)#  default-router 10.1.1.1  RTR(config)#  netbios-name-server 10.1.2.1 10.2.2.3  RTR(config)#  netbios-node-type h-node  RTR(config)#  lease 30  RTR(config)#  ip dhcp excluded-address 10.1.2.1 10.1.2.25  

The output above will successfully configure DHCP on the router. It will begin distributing IP addresses for any DHCP requests that come in on the interface configured for the same subnet that was configured with the network command. For security purposes you may want to create a manual binding for a DHCP client. With a manual binding in place, the NIC card must have the specified MAC address before it can receive a DHCP configuration. Let's look at an example of binding an IP address with a MAC address:

 RTR(config)#  ip dhcp pool Sean  RTR(config)#  host 10.1.2.99  RTR(config)#  hardware-address 1c33.ab45.89cd ieee802  RTR(config)#  client-name SeansLaptop  

The above output shows that the IP address 10.1.2.99 will be assigned to the client each time using the 1c33.ab45.89cd MAC address. In a network environment, routers are commonly placed between two segments to prevent broadcasts from being forwarded between them. This design keeps local traffic local on the network segment and forwards only unicast traffic. When a DHCP server and DHCP client are implemented into a network, all requests are broadcast within that segment. But what happens if you have a client in a different segment of the network that needs access to its resources? How do you allow DHCP to send broadcasts across the router and still keep other broadcasts local on the segment?

IP Helper Addresses

The IP Helper Address is a specialized address-translation command that converts broadcast messages into directed broadcast or unicast messages. The ip helper-address command is used on a router to instruct the router to convert the messages accordingly .

If the IP Helper Address is specified and UDP forwarding is enabled, broadcast packets destined for the following eight protocols and their associated port numbers are forwarded by default:

  • TFTP (port 69)

  • DNS (port 53)

  • Time (port 37)

  • TACACS (Terminal Access Controller Access Control System) (port 49)

  • BOOTP client (port 68)

  • BOOTP server (port 67)

  • NetBIOS name server (port 137)

  • NetBIOS datagram service (port 138)

If only one server is located on a remote segment, the IP Helper Address is configured with the address of that server. Any broadcast traffic of the type just listed is forwarded to that server. If several servers are located on a remote segment, the IP Helper Address is configured with the broadcast address for that segment. Broadcast traffic of the type in the preceding list is sent in the form of a directed broadcast to all the servers on the segment. This helps in many ways. For example, let's say that you have a DHCP server distributing addresses in a remote segment. The broadcast forwarding from that server will allow clients on the remote segment to obtain the DHCP information to configure their machine.

Before you use this setting, make sure you consider all the other broadcast issues you might unleash on your network. Just imagine what the impact would be if you were to have 30 subnets' worth of broadcast traffic hitting the same segment.



CCNP CIT Exam Cram 2 (642-831)
CCNP CIT Exam Cram 2 (Exam Cram 642-831)
ISBN: 0789730219
EAN: 2147483647
Year: 2003
Pages: 213
Authors: Sean Odom

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net