ACC_SW: sy undo info enable
1.配置IP地址 vlan batch 10 20 int vlan 10 ip add 192.168.10.2 24 int vlan 20 ip add 192.168.20.2 24
2.创建DHCP服务器组,并为DHCP服务器组添加DHCP服务器对应网段的网关IP dhcp enable dhcp server group dhcp10 #创建DHCP服务器组 dhcp-server 192.168.10.1 0 #指向DHCP服务器 q dhcp server group dhcp20 #创建DHCP服务器组 dhcp-server 192.168.20.1 0 #指向DHCP服务器 q int vlan 10 dhcp select relay #将地址池获取方式改为中继 dhcp relay server-select dhcp10 #绑定对应的DHCP服务器地址组 int vlan 20 dhcp select relay #将地址池获取方式改为中继 dhcp relay server-select dhcp20 #绑定对应的DHCP服务器地址组
3.配置对应的端口 int g0/0/1 port link-type ac port de vlan 10 int g0/0/2 port link-type ac port de vlan 20 int g0/0/3 port link-type trunk port trunk all vlan all
Core_SW: sy vlan batch 10 20 undo info enable
1.配置对应的端口 int g0/0/1 por link-type trunk port trunk all vlan all
2.配置全局地址池 dhcp enable ip pool pool10 network 192.168.10.0 mask 24 gateway 192.168.10.1 dns-list 114.114.114.114 q ip pool pool20 network 192.168.20.0 mask 24 gateway 192.168.20.1 dns-list 114.114.114.114 q
3.关联地址池和对应的vlan int vlan 10 ip add 192.168.10.1 24 dhcp select global int vlan 20 ip add 192.168.20.1 24 dhcp select global
PC1:
PC2: