Experiment topology diagram:
①R1 for DHCP server, configure 172.16.1.0/24 and 172.16.2.0/24 two address pools
②PC1 Get 172.16.1.0 network segment IP, gateway for 172.16.1.254
③PC2 Get 172.16.2.0 network segment IP, gateway for 172.16.2.254
1.R1, R2 Configure IP and open port.
Configure DHCP address pool on 2.R1
IP DHCP pool pool1 DHCP address pool naming
Network 172.16.1.0 255.255.255.0 configuration can be allocated to the network segment
Default-router 172.16.1.254 Configure the default gateway
IP DHCP Pool pool2
Network 172.16.2.0 255.255.255.0
Default-router 172.16.2.254
3. Configure DHCP Relay Agent on R2
Interface fastethernet1/0
IP helper-address 192.168.1.1 indicates that a DHCP request package is sent to the server through the f1/0 port
4. Configure static routes on the R1
IP route 172.16.2.0 255.255.255.0 192.168.1.2 across the network segment to the client to assign IP address, also need to route up to
5. Configure automatic access to IP on PC1, PC2
No IP routing the router as a PC
int f0/0
IP Add DHCP interface set to get IP address automatically
No shut
6. View Effects
Note: Trial multiple routers the "service DHCP" command is turned on by default
This article from the "Small White Big Go" blog, please be sure to keep this source http://kindit.blog.51cto.com/2286921/1132822