SW2(config)#int rang fa0/23-24
SW2(config-if-range)#ip dhcp snooping trust
测试:
Client3(config)#interface fa0/1 Client3(config-if)#no shutdown Client3(config-if)#ip address dhcp
*Jan 31 03:25:54.103: %DHCP-6-ADDRESS_ASSIGN: Interface FastEthernet0/1 assigned DHCP address 192.168.20.3, mask 255.255.255.0, hostname Client3 Client2(config-if)#
sw1#show ip dhcp snooping binding
MacAddress IpAddress Lease(sec) Type VLAN Interface
------------------ --------------- ---------- ------------- ---- --------------------
58:35:D9:B1:36:69 192.168.20.3 85861 dhcp-snooping 2 FastEthernet0/24
Total number of bindings: 1 sw1#
Note:
当连接服务器的交换机不插入82 option,另一台插入option后,不能拿地址;所以比较好的办法为在服务器上定义relay trust option,交换机全部插入option。