其他分享
首页 > 其他分享> > 核心交换机同一VLAN不同网段如何通信?

核心交换机同一VLAN不同网段如何通信?

作者:互联网

交换机的三层接口可配置多个IP地址,即一个主IP地址,其余均为从IP地址,至多配置255个从IP地址。

网络拓扑

基本配置

LSW1

[LSW1]interface Vlanif 1	
[LSW1-Vlanif1]ip address 10.0.0.254 24
[LSW1-Vlanif1]ip address 10.0.1.254 24 sub #配置从IP地址
[LSW1]interface g0/0/1
[LSW1-GigabitEthernet0/0/1]port link-type trunk 
[LSW1-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[LSW1-GigabitEthernet0/0/1]q
[LSW1]interface g0/0/2
[LSW1-GigabitEthernet0/0/2]port link-type trunk
[LSW1-GigabitEthernet0/0/2]port trunk allow-pass vlan all

LSW2

[Huawei]sysname LSW2
[LSW2]interface Ethernet 0/0/2
[LSW2-Ethernet0/0/2]port link-type trunk 
[LSW2-Ethernet0/0/2]port trunk allow-pass vlan all
[LSW2-Ethernet0/0/2]q
[LSW2]interface Ethernet 0/0/1
[LSW2-Ethernet0/0/1]port link-type access 

LSW3

[Huawei]sysname LSW3
[LSW3]interface Ethernet 0/0/1
[LSW3-Ethernet0/0/1]port link-type trunk 
[LSW3-Ethernet0/0/1]port trunk allow-pass vlan all
[LSW3-Ethernet0/0/1]q
[LSW3]interface Ethernet 0/0/2
[LSW3-Ethernet0/0/2]port link-type access 

PC端

 

 连通性测试

 

标签:LSW2,LSW3,LSW1,网段,Ethernet0,VLAN,交换机,trunk,port
来源: https://blog.csdn.net/weixin_49183673/article/details/123029642