华三路由器做dhcp relay
R1上:
sysname DHCPServer
int s1/0
ip address 12.1.1.1 255.255.255.0
undo shu
link-protocol ?
fr Frame Relay protocol
hdlcHigh-level Data Link Control protocol
ppp Point-to-Point protocol
stlpSynchronization Transparent Transport Link protocol
link-protocol ppp
exit
ip route-static 23.2.2.0 255.255.255.0 12.1.1.2
dhcp enable
dhcp server ip-pool wudi
network 23.2.2.0 mask 255.255.255.0
gateway-list 23.2.2.2
quit
save
R2上
<H3C>sys
System View: return to User View with Ctrl+Z.
sysname DHCPRelay
dhcp enable
int s1/0
ip address 12.1.1.2 255.255.255.0
undo shu
qui
int g0/0
ip add 23.2.2.2 255.255.255.0
undo shu
dhcp select relay
dhcp relay server-address 12.1.1.1
R3上
sysname DHCPClient
int g0/0
ip add dhcp-alloc
验证:
R3
dis ip int b
*down: administratively down
(s): spoofing(l): loopback
Interface Physical Protocol IP Address Description
GE0/0 up up 23.2.2.1 --
GE0/1 down down -- --
GE0/2 down down -- --
GE5/0 down down -- --
GE5/1 down down -- --
GE6/0 down down -- --
GE6/1 down down -- --
Ser1/0 down down -- --
Ser2/0 down down -- --
Ser3/0 down down -- --
Ser4/0 down down -- --
dis dhcp client
GigabitEthernet0/0 DHCP client information:
Current state: BOUND
Allocated IP: 23.2.2.1 255.255.255.0
Allocated lease: 86400 seconds, T1: 38293 seconds, T2: 75600 seconds
DHCP server: 12.1.1.1
R1
dis dhcp server ip-in-use
IP address Client identifier/ Lease expiration Type
Hardware address
23.2.2.1 0033-3234-302e-3664-Jul9 15:37:35 2015Auto(C)
3234-2e30-3330-352d-
4745-302f-30
R1
ping 23.2.2.1
Ping 23.2.2.1 (23.2.2.1): 56 data bytes, press CTRL_C to break
56 bytes from 23.2.2.1: icmp_seq=0 ttl=254 time=2.211 ms
56 bytes from 23.2.2.1: icmp_seq=1 ttl=254 time=1.382 ms
56 bytes from 23.2.2.1: icmp_seq=2 ttl=254 time=2.971 ms
56 bytes from 23.2.2.1: icmp_seq=3 ttl=254 time=1.370 ms
56 bytes from 23.2.2.1: icmp_seq=4 ttl=254 time=1.787 ms
--- Ping statistics for 23.2.2.1 ---
5 packets transmitted, 5 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 1.370/1.944/2.971/0.599 ms
页:
[1]