1.登陆S7706核心交换机后
1.建立新的VLAN
vlan 156
vlan 157
2.为VLAN 156 VLAN157分别设置DHCP的POOL(也就是需要分配的地址)
ip pool vlan156
gateway-list 10.10.156.1
network 10.10.156.0 mask 255.255.255.0
excluded-ip-address 10.10.156.2 10.10.156.50
excluded-ip-address 10.10.156.249 10.10.156.254
lease day 0 hour 23 minute 0
dns-list 202.106.0.20 114.114.114.114
ip pool vlan157
gateway-list 10.10.157.1
network 10.10.157.0 mask 255.255.255.0
excluded-ip-address 10.10.157.2 10.10.157.50
excluded-ip-address 10.10.157.249 10.10.157.254
lease day 0 hour 23 minute 0
dns-list 202.106.0.20 114.114.114.114
3.设置vlan156 VLAN157的网关和启用DHCP服务
interface Vlanif156
ip address 10.10.156.1 255.255.255.0
dhcp select global
interface Vlanif157
ip address 10.10.157.1 255.255.255.0
dhcp select global
2.登陆5720s接入交换机
1.设置上联端口为TRUK(我的上联口是GigabitEthernet0/0/49)
interface GigabitEthernet0/0/49
port link-type trunk
port trunk allow-pass vlan 2 to 4094
####################
思科交换机命令
interface GigabitEthernet0/49
switchport mode trunk
####################
2.建立vlan
vlan 156
vlan 157
3.将端口加入vlan
interface GigabitEthernet0/0/45
port link-type access
port default vlan 156
##############
思科交换机命令
interface FastEthernet0/45
switchport access vlan 156
switchport mode access
快速端口
spanning-tree portfast
#################