2-DHCP中继原理与配置
DHCP中继配置命令如下: iphelper-address DHCPsrv-IPAddress 其中DHCPsrv-IPAddress为DHCP服务器的IP地址
SW-3L(config)#interface vlan 2
SW-3L(config-if)#ip address 192.168.2.1 255.255.255.0
SW-3L(config-if)#ip helper-address 192.168.100.100
SW-3L(config-if)#no shutdown
SW-3L(config)#interface vlan 3
SW-3L(config-if)#
%LINK-5-CHANGED: Interface Vlan3, changed state to up
SW-3L(config-if)#ip address 192.168.3.1 255.255.255.0
SW-3L(config-if)#ip helper-address 192.168.100.100
SW-3L(config-if)#no shutdown
SW-3L(config)#interface vlan 100
SW-3L(config-if)#
%LINK-5-CHANGED: Interface Vlan100, changed state to up
SW-3L(config-if)#ip address 192.168.100.1 255.255.255.0
SW-3L(config-if)#no shutdown