项目要求:
1、划分子网
2、各个子网之间数据不通
3、各个子网到服务器数据通
1:划分子网
VLAN1 192.168.1.1 192.168.1.30 /27 224
VLAN2 192.168.1.33 192.168.1.62 /27 224
VLAN3 192.168.1.65 192.168.1.94 /27 224
VLAN4 192.168.1.97 192.168.1.126 /27 224
VLAN5 192.168.1.129 192.168.1.158 /27 224
2:交换机配置
lsw1配置
sys
sys s1
vlan batch 1 to 5
int vlan 1
ip add 192.168.1.1 27
int vlan 2
ip add 192.168.1.33 27
int vlan 3
ip add 192.168.1.65 27
int vlan 4
ip add 192.168.1.97 27
int vlan 5
ip add 192.168.1.129 27
int e 0/0/1
port link-type trunk
port trunk allow-pass vlan all
acl 3000
rule 10 permit icmp source 0.0.0.0 255.255.255.255 destination 192.168.1.128 0.0.0.31
rule 11 permit icmp source 192.168.1.128 0.0.0.31 destination 0.0.0.0 255.255.255.255
rule 12 deny icmp source 0.0.0.0 255.255.255.255 destination 0.0.0.0 255.255.255.255
lsw2配置
sys
sys 2
vlan batch 1 to 5
int e 0/0/4
port link-type trunk
port trunk allow-pass vlan all
int e 0/0/3
port link-type trunk
port trunk allow-pass vlan all
int e 0/0/2
port link-type trunk
port trunk allow-pass vlan all
int e 0/0/1
port link-type trunk
port trunk allow-pass vlan all
lsw3配置
sys
sys 3
vlan batch 1 to 5
int e 0/0/2
port link-type access
port default vlan 5
int e 0/0/1
port link-type trunk
port trunk allow-pass vlan all
lsw4配置
sys
sys 4
vlan batch 1 to 5
int e 0/0/2
port link-type trunk
port trunk allow-pass vlan all
int e 0/0/1
port link-type access
port default vlan 2
int e 0/0/3
port link-type access
port default vlan 4
lsw5配置
sys
sys 5
vlan batch 1 to 5
int e 0/0/2
port link-type access
port default vlan 3
int e 0/0/3
port link-type trunk
port trunk allow-pass vlan all