When we manage IP addresses, we will assume that the DHCP server is used. Here we will explain the content of the route DHCP settings. The method for setting up DHCP through routing is often involved in practical applications. Here we will mainly explain how to use a router to configure a DHCP server. Project requirements: XX enterprise has three departments, which are divided into VLAN for the three departments in layer-3 switching.
Route DHCP settings. IP address planning is as follows:
VLAN10 192.168.10.1 VLAN20 192.168.20.1 VLAN30 192.168.30.1 A cisco2811 router is used as the DCHP server.
Route DHCP settings are as follows:
Enable
Configure terminal
No iprouting
Interface f0/0
Ip address 192.168.30.100 255.255.255.0
No shutdown
Exit
Ip default gateway 192.168.30.1
Service dhcp
Ip dhcp pool vlan10 can be changed at Will)
Network 192.168.10.0 255.255.255.0 VLAN10 network segment and subnet mask)
Default-router 192.168.10.1VLAN10 IP address)
Dns-server 61.134.1.4 218.30.19.40 Shaanxi DNS)
Lease 8 is valid for 8 days)
Exit
Service dhcp
Ip dhcp pool vlan20 can be changed at Will)
Network 192.168.20.0 255.255.255.0 VLAN10 network segment and subnet mask)
Default-router 192.168.20.1 IP address of VLAN20)
Dns-server 61.134.1.4 218.30.19.40 Shaanxi DNS)
Lease 8 is valid for 8 days)
Exit
Service dhcp
Ip dhcp pool vlan30 can be changed at Will)
Network 192.168.10.0 255.255.255.0 VLAN10 network segment and subnet mask)
Default-router 192.168.30.1 IP address of VLAN30)
Dns-server 61.134.1.4 218.30.19.40 Shaanxi DNS)
Lease 8 is valid for 8 days)
Exit
The preceding figure shows the route DHCP settings. The enterprise has several VLANs which need to be used as DHCP pools. You can modify the IP addresses of the Enterprise Based on the IP addresses of the enterprise.
In addition, DHCP relay must be performed on layer-3 switches. Only the VLAN where DHCP is located can automatically obtain the IP address, but other VLANs cannot!
In the above section, we talked about how to execute DHCP relay commands on layer-3 switches. Here I will write only one relay command as an instance:
Interface vlan10
Ip helper-address 192.168.30.100 ip address of the DHCP server)
Exit
Remember: When performing DHCP relay, it must correspond to the DHCP pool one by one. There are several DCHP pools that need to be used for DHCP relay.