2024年1月18日发(作者:)

#vlan 1 dhcp snooping enablevlan 10 dhcp snooping enable##interface Vlanif1 ip address 172.16.1.2 255.255.255.252#interface Vlanif10 ip address 10.1.1.10 255.255.255.0 dhcp select relay dhcp relay server-ip 172.16.1.1#interface GigabitEthernet0/0/1 dhcp snooping trusted#interface GigabitEthernet0/0/2 port link-type access port default vlan 10ip route-static 0.0.0.0 0.0.0.0 172.16.1.1 默认路由 sysname DHCP_Clientdhcp enableinterface GigabitEthernet0/0/1 ip address dhcp-alloc检查测试dis ip int brief

*down: administratively down^down: standby(l): loopback(s): spoofingThe number of interface that is UP in Physical is 2The number of interface that is DOWN in Physical is 2The number of interface that is UP in Protocol is 2The number of interface that is DOWN in Protocol is 2Interface IP Address/Mask Physical Protocol

GigabitEthernet0/0/0 unassigned down down

GigabitEthernet0/0/1 10.1.1.254/24 up up

GigabitEthernet0/0/2 unassigned down down

NULL0 unassigned up up(s)

测试与DHCP_Server通信

[DHCP_Relay]#sysname DHCP_Relay#ipv6#vlan batch 10#interface Vlanif1 ipv6 enable ipv6 address 3001::2/64 //与服务器互联地址#interface Vlanif10 ipv6 enable ipv6 address 2001::1/64 undo ipv6 nd ra halt ipv6 nd autoconfig managed-address-flag ipv6 nd autoconfig other-flag dhcpv6 relay destination 3001::1#interface MEth0/0/1#interface GigabitEthernet0/0/1#interface GigabitEthernet0/0/2 port link-type access port default vlan 10##ipv6 route-static :: 0 3001::1#return[DHCP_Relay]检查测试:PC>ipconfigLink local : fe80::5689:98ff:fe1f:: 2001::2 / : fe80::4e1f:ccff:fe25:: 0.0.0..: 0.0.: 0.0.0.: :DHCPv6服务器连通性测试PC>ping 3001::1Ping 3001::1: 32 data bytes, Press Ctrl_C to breakFrom 3001::1: bytes=32 seq=1 hop limit=63 time=32 msFrom 3001::1: bytes=32 seq=2 hop limit=63 time=31 msFrom 3001::1: bytes=32 seq=3 hop limit=63 time=32 msFrom 3001::1: bytes=32 seq=4 hop limit=63 time=31 msFrom 3001::1: bytes=32 seq=5 hop limit=63 time=47 ms