码迷,mamicode.com
首页 > 其他好文 > 详细

华为eNSP浮动路由实现不同vlan之间的通信

时间:2018-05-09 10:51:18      阅读:408      评论:0      收藏:0      [点我收藏+]

标签:浮动路由

技术分享图片
实验要求:为两个路由器之间配置浮动路由,两台主机互通
AR9
<Huawei>undo terminal monitor #关闭提示信息
Info: Current terminal monitor is off.
<Huawei>sys #进入系统视图
Enter system view, return user view with Ctrl+Z.
[Huawei]int g0/0/0 #进入端口视图
[Huawei-GigabitEthernet0/0/0]ip add 192.168.1.254 24 #配置IP地址
[Huawei-GigabitEthernet0/0/0]q
[Huawei]int g0/0/2
[Huawei-GigabitEthernet0/0/2]ip add 192.168.2.1 24
[Huawei-GigabitEthernet0/0/2]q
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 192.168.3.1 24
[Huawei-GigabitEthernet0/0/1]q
[Huawei]ip route-static 192.168.4.0 24 192.168.2.2 preference 60 #配置路由协议的优先级为60(注:优先级越小越好)
[Huawei]ip route-static 192.168.4.0 24 192.168.3.2 preference 80
AR10
<Huawei>undo terminal monitor
Info: Current terminal monitor is off
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 192.168.4.254 24
[Huawei-GigabitEthernet0/0/1]q
[Huawei]int g0/0/2
[Huawei-GigabitEthernet0/0/2]ip add 192.168.2.2 24
[Huawei-GigabitEthernet0/0/2]q
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 192.168.3.2 24
[Huawei-GigabitEthernet0/0/0]q
[Huawei]ip route-static 192.168.1.0 24 192.168.2.1 preference 60
Info: Succeeded in modifying route.
[Huawei]ip route-static 192.168.1.0 24 192.168.3.1 preference 80
Info: Succeeded in modifying route.
验证:在AR9和AR10的命令行输入display routing-table
AR9如图所示:
技术分享图片

AR10如图所示:
技术分享图片

现在我们看到的路由是主路由,两台主机也能互通
现在我们更改优先级,使用备用路由互通
AR9
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]ip route-static 192.168.4.0 24 192.168.2.2 preference 80
Info: Succeeded in modifying route.
[Huawei]ip route-static 192.168.4.0 24 192.168.3.2 preference 60
Info: Succeeded in modifying route.
AR10
[Huawei]ip route-static 192.168.1.0 24 192.168.2.1 preference 80
Info: Succeeded in modifying route.
[Huawei]ip route-static 192.168.1.0 24 192.168.3.1 preference 60
Info: Succeeded in modifying route.
验证:在AR9和AR10的命令行输入display routing-table,且两台主机互通
AR9如图所示
技术分享图片

AR10如图所示
技术分享图片

华为eNSP浮动路由实现不同vlan之间的通信

标签:浮动路由

原文地址:http://blog.51cto.com/13721773/2114254

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!