ls1:

vlan batch 2 3 4 5 6

interface GigabitEthernet 0/0/1

port link-type trunk

port trunk allow-pass vlan 2 to 6

port trunk pvid vlan 3

interface GigabitEthernet 0/0/4

port link-type trunk

port trunk allow-pass vlan 2 to 6

interface GigabitEthernet 0/0/2

port link-type access

port default vlan 2

stp edged-port enable

interface GigabitEthernet 0/0/3
port link-type access
port default vlan 3
stp edged-port enable

ls2:

vlan batch 2 3 4 5 6
interface GigabitEthernet 0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 6
interface GigabitEthernet 0/0/4
port link-type trunk
port trunk allow-pass vlan 2 to 6
interface GigabitEthernet 0/0/2
port link-type access
port default vlan 2
stp edged-port enable
interface GigabitEthernet 0/0/3
port link-type access
port default vlan 5
stp edged-port enable

ls3:

vlan batch 2 3 4 5 6
interface GigabitEthernet 0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 6
interface GigabitEthernet 0/0/2
port link-type access
port default vlan 5
stp edged-port enable
interface GigabitEthernet 0/0/3
port link-type access
port default vlan 6
stp edged-port enable

dhcp:

dhcp enable
interface GigabitEthernet 0/0/0
undo shutdown
interface GigabitEthernet 0/0/0.2
dot1q termination vid 2
ip address 192.168.2.254 255.255.255.0
dhcp select global
interface GigabitEthernet 0/0/0.1
dot1q termination vid 3 to 6
ip address 192.168.1.254 255.255.255.0
dhcp select global
ip pool vlan2
network 192.168.2.0 mask 255.255.255.0
gateway-list 192.168.2.254
dns-list 8.8.8.8 114.114.114.114
ip pool vlan1
network 192.168.1.0 mask 255.255.255.0
gateway-list 192.168.1.254
dns-list 8.8.8.8
acl number 2000
rule deny ip source 192.168.1.50 0.0.0.15 destination 192.168.1.60 0.0.0.15
rule permit ip
interface GigabitEthernet 0/0/0.1
traffic-filter inbound acl 2000

Logo

DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。

更多推荐