6.3 VLAN间的通信
==========================================================
1.基础配置
==========================================================
S1:
sy
syname S1
undo info-cen en
vlan batch 2 3
int g0/0/1
port link-type access
port default vlan 2
int g0/0/2
port link-type access
port default vlan 3
dis vlan
------------------------------------------
S3:
sy
syname S3
undo info-cen en
vlan batch 2 3
int g0/0/1
port link-type access
port default vlan 2
int g0/0/2
port link-type access
port default vlan 3
dis vlan
------------------------------------------
S1:
int g0/0/23
port link-type trunk
port trunk allow-pass vlan all
--------------
S3:
int g0/0/24
port link-type trunk
port trunk allow-pass vlan all
--------------
S2:
vlan batch 2 3
int g0/0/23
port link-type trunk
port trunk allow-pass vlan all
int g0/0/24
port link-type trunk
port trunk allow-pass vlan all
==========================================================
2.使用vlanif接口实现vlan间的通信
==========================================================
#在S2上为vlan 2、vlan 3创建vlanif接口,并为vlanif接口配置IP地址,该IP地址应该是属于vlan2、vlan 3的终端电脑的网关地址。
S2:
int vlanif 2
ip add 10.0.1.100 24
int vlanif 3
ip add 10.0.2.100 24
dis vlan
------------------------------------------
用ping命令查看终端间通信情况
PC1测试PC3:ping 10.0.1.3
PC2测试PC4:ping 10.0.2.4
==========================================================
3.使用vlan聚合实现vlan间的通信
==========================================================
#在S2上为vlan 2和vlan 3创建vlanif接口,并为vlanif接口配置IP地址,该IP地址应该是属于vlan2的终端电脑的网关地址。
S2:
undo int vlanif 2
undo int vlanif 3
vlan 4
q
int g0/0/23
undo port trunk allow-pass vlan 4
int g0/0/24
undo port trunk allow-pass vlan 4
vlan 4
aggregate-vlan
access-vlan 2 3
int vlanif 4
ip add 10.0.0.100 16
arp-proxy inner-sub-vlan-proxy en
------------------------------------------