Dynamic Host Configuration Protocol (DHCP) is a protocol for assigning dynamic IP addresses to hosts on a local network. DHCP also delivers TCP/IP configuration parameters such as the subnet mask and the default router. DHCP simplifies network administration because the DHCP server keeps track of IP addresses rather than requiring an administrator to manage the task manually.
For DHCP to operate correctly, all host computers need to contact the DHCP server. Routers by default do not forward host broadcasts beyond their own subnet. A DHCP relay agent forwards DHCP packets over routers that do not support the forwarding of these types of packets. A DHCP relay agent is a type of routing protocol that enables DHCP hosts to obtain IP addresses from a DHCP server on a different subnet.
A DHCP relay agent is usually run on a router. The Cisco Catalyst 4500 series switches have routing capabilities. Therefore a Cisco Catalyst 4500 is the appropriate place to run a DHCP relay agent.
How to Configure a DHCP Relay on a Cisco Catalyst 4500 Switch
1. Log in to the Cisco device using an interactive text-oriented communications facility via a virtual terminal application, such as SSH or Telnet. When a login has succeeded, a read-only command-line prompt appears, such as “Switch>.”
2. Type the command “enable” at the “Switch>” prompt. Type the password into the switch. The command-line changes to a enabled prompt, such as “Switch#.”
3. Type the command “config terminal” at the “Switch#” prompt, and press the “Return” key. The “config terminal” command modifies the prompt to “Router (config) #.”
4. Type the command “interface FastEthernet <slot/port>” at the “Router(config)#” prompt, and press the “Return” key. This command modifies the prompt to “Router(config-if)#.”
5. Type the command “ip helper-address <IP address>” at the “Router(config-if)#” prompt. This command enables the forwarding of DHCP packets to a different subnet.
6. Hold down the “Control” and “Z” keys simultaneously at the “Router(config-if)#” prompt. This takes the router back to the “Router#” prompt. The DHCP relay agent is now configured to support forwarding of DHCP packets.
Reference: Configuring the Cisco IOS DHCP Relay Agent
Notes: Info Help You Know DHCP in Details
Dynamic Host Configuration Protocol works in a client/server mode. DHCP enables clients on an IP network to obtain or lease IP address or configuration from a DHCP server. This reduces workload when managing a large network. DHCP protocol is described in the RFC 2131.
Most modern operating system includes DHCP in their primary settings, these includes windows OS, Novell NetWare, Sun Solaris, Linux and Mac OS. The clients’ requests for addressing configuration from a DHCP network server, the network server manages the assignment of IP addresses and must be obliged to answer to any IP configuration requests from clients.
However, network routers, switches and servers need to have a static IP addresses, DHCP is not intended for the configuration of these types of hosts. Cisco routers use a Cisco IOS features known as Cisco Easy IP Lease. This offers an optional but full-featured DHCP server. Easy IP leases address for 24hrs by default, it is most useful in homes and small offices where users can take the advantages of DHCP and NAT without having an NT or UNIX server
The DHCP sever uses User Datagram Protocol (UTP) as it’s transport protocol to send message to the client on port 68, while the client uses port 67 to send messages to the server.
DHCP severs can offer other information, this include, DNS server addresses, WINS server addresses and domain names. In most DHCP servers, administrators are allowed to define clients MAC addresses, which the server automatically assigns same IP, address each time.
Most administrators prefer to work with Network server that offers DHCP services. These types of network are scalable and easy to manage.