两台route-client和oute-server
route-client的f0/0和route-server的f0/0相连
route-server配制
dhcp-server(config)#ip dhcp ex
dhcp-server(config)#ip dhcp excluded-address 192.168.1.1 192.168.1.10
dhcp-server(config)#int f0/0
dhcp-server(config-if)#ip add 192.168.1.2 255.255.255.0
dhcp-server(config-if)#no sh
dhcp-server(config-if)#exit
dhcp-server(config)#ip dhcp pool wolf
dhcp-server(dhcp-config)#network 192.168.1.0 /24
^
% Invalid input detected at '^' marker.
dhcp-server(dhcp-config)#network 192.168.1.0 255.255.255.0
dhcp-server(dhcp-config)#def
dhcp-server(dhcp-config)#default-router 192.168.1.1
dhcp-server(dhcp-config)#dns
dhcp-server(dhcp-config)#dns-server 202.96.128.68
dhcp-server(dhcp-config)#lease 1
route-clinet
client(config)#int f0/0
client(config-if)#ip address dhcp
client(config-if)#end
client(config)#int f0/0
client(config-if)#ip address dhcp
client(config-if)#end
测试:
client#sh ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.1.11 YES DHCP up up
FastEthernet0/1 unassigned YES unset administratively down down
Serial1/0 unassigned YES unset administratively down down
Serial1/1 unassigned YES unset administratively down down
Serial1/2 unassigned YES unset administratively down down
Serial1/3 unassigned YES unset administratively down down
Serial1/4 unassigned YES unset administratively down down
Serial1/5 unassigned YES unset administratively down down
Serial1/6 unassigned YES unset administratively down down
Serial1/7 unassigned YES unset administratively down down
Vlan1 unassigned YES unset administratively down down
client#ping 192.168.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 31/31/32 ms
client#ping 192.168.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 31/44/94 ms
转载于:https://blog.51cto.com/chaohu/452579