DHCP defines in rf12001 that UDP is used for datagram transmission and port 68 are used.
After Cisco IOS 12.0 T1, it can be configured as DHCP relay, DHCP client, and DHCP service.
Router # conf t
Enter configuration commands, one per line. End with cntl/Z.
Router (config) # int fa0/0
Router (config-If) # IP helper-address 10.1.1.1 specify the IP address of the DHCP server
In fact, the IP helper-address command not only forwards DHCP request packets, but also forwards other UDP packets by default, such as DNS requests, and forwards all the Server IP addresses defined by it, this will undoubtedly increase the server load and cause network problems. You can use the following command to disable meaningless UDP broadcast forwarding:
Router (config) # No IP forward-Protocol UDP?
- DHCP Client Configuration
Router # conf t
Enter configuration commands, one per line. End with cntl/Z.
Router (config) # int fa0/0
Router (config-If) # IP address DHCP Client-ID fa0/0 enable the DHCP Client and get the IP too much from the fa0/0 interface (it is not recommended to configure the router as a DHCP client, it is generally used when a vro connects to the ISP as a network boundary)
- DHCP server configuration
Router # conf t
Enter configuration commands, one per line. End with cntl/Z.
Router (config) # enable DHCP in service DHCP
Router (config-If) # ip dhcp pool 10.1.1.0/24 defines DHCP pool
Router (config-If) # network 10.1.1.0 255.255.255.0 defines the address range
Router (config-If) # default-router 10.1.1.1 defines the Default Gateway
Router (config-If) # exit
Router (config) # ip dhcp excluded-address 10.1.1.100 10.1.1.150 defines the excluded IP address range
Router (config-If) # End