首页 > 其他 > 详细

VLAN间路由之SVI

时间:2021-02-05 15:14:30      阅读:24      评论:0      收藏:0      [点我收藏+]

SVI【Switch Virtual Interface】交换机虚拟接口

网络拓扑图如下:通过交换机SVI虚拟接口,来打通不同VLAN间的网络互通

技术分享图片

 

 在sw2 上配置命令:

<Huawei>system-view 
[Huawei]sysname sw2
[sw2]vlan batch 10 20
[sw2]undo info-center enable
[sw2]interface Ethernet 0/0/2
[sw2-Ethernet0/0/2]port link-type access
[sw2-Ethernet0/0/2]port default vlan 10
[sw2-Ethernet0/0/2]quit
[sw2]interface Ethernet 0/0/3
[sw2-Ethernet0/0/3]port link-type access
[sw2-Ethernet0/0/3]port default vlan 10
[sw2-Ethernet0/0/3]quit

[sw2]interface Ethernet 0/0/4
[sw2-Ethernet0/0/4]port link-type access
[sw2-Ethernet0/0/4]port default vlan  20
[sw2-Ethernet0/0/4]quit

[sw2]interface Ethernet 0/0/1
[sw2-Ethernet0/0/1]port link-type trunk
[sw2-Ethernet0/0/1]port trunk allow-pass vlan all
[sw2-Ethernet0/0/1]quit 

在sw3 上配置命令:

<Huawei>system-view 
[Huawei]undo info-center enable 
[Huawei]vlan batch 10 20
[Huawei]interface Ethernet 0/0/2
[Huawei-Ethernet0/0/2]port link-type access
[Huawei-Ethernet0/0/2]port default vlan 10
[Huawei-Ethernet0/0/2]quit

[Huawei]interface Ethernet 0/0/3
[Huawei-Ethernet0/0/3]port link-type access
[Huawei-Ethernet0/0/3]port default vlan 20
[Huawei-Ethernet0/0/3]quit
[Huawei]interface Ethernet 0/0/4
[Huawei-Ethernet0/0/4]port link-type access
[Huawei-Ethernet0/0/4]port default vlan 20
[Huawei-Ethernet0/0/4]quit

[Huawei]interface Ethernet 0/0/1
[Huawei-Ethernet0/0/1]port link-type trunk
[Huawei-Ethernet0/0/1]port trunk allow-pass vlan all
[Huawei-Ethernet0/0/1]quit 

核心交换机sw1 上配置命令:

 1 <Huawei>system-view
 2 [Huawei]sysname sw1
 3 [sw1]undo info-center enable 
 4 [sw1]vlan batch 10 20
 5 [sw1]interface GigabitEthernet 0/0/1
 6 [sw1-GigabitEthernet0/0/1]port link-type trunk 
 7 [sw1-GigabitEthernet0/0/1]port trunk allow-pass vlan all
 8 [sw1-GigabitEthernet0/0/1]quit 
 9 [sw1]interface GigabitEthernet 0/0/2
10 [sw1-GigabitEthernet0/0/2]port link-type trunk
11 [sw1-GigabitEthernet0/0/2]port trunk allow-pass vlan all
12 [sw1-GigabitEthernet0/0/2]quit
13 
14 [sw1]interface vlanif 10        #进入虚拟vlan 10接口
15 [sw1-Vlanif10]ip address 1.1.1.254 24    #设置vlan 10的网关地址
16 [sw1-Vlanif10]quit
17 [sw1]interface vlanif 20        #进入虚拟vlan 20接口
18 [sw1-Vlanif20]ip address 2.2.2.254 24    #设置vlan 20的网关地址
19 [sw1-Vlanif20]quit

查看核心上的路由表信息【学习了2条路由信息,下一跳接口分别指向vlanif 10和vlanif 20】:display ip routing-table

技术分享图片

 

VLAN间路由之SVI

原文:https://www.cnblogs.com/xiykj/p/14377769.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!