SW1关键配置如下:
dhcp enable
interface Vlanif10
ip address 192.168.10.1 255.255.255.0
dhcp select interface
#
interface Vlanif20
ip address 192.168.20.1 255.255.255.0
dhcp select interface
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
SW2关键配置如下:
interface Ethernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface Ethernet0/0/2
port link-type access
port default vlan 10
#
interface Ethernet0/0/3
port link-type access
port default vlan 20
#
结果验证:
备注:如若获取DNS,则
interface vlanif 10
dhcp server dns-list 10.10.10.10
即可。
vlanif 20同理。
时间: 2024-10-13 13:42:18