IP路由基础配置
一、配置公网的IPv4 FRR功能示例
通过配置公网IPv4 FRR,主链路故障时,流量可以快速切换到备份链路。
组网需求
如下图所示,要求在DeviceT上备份出接口和备份下一跳,使得链路B为链路A的备份,当链路A出现故障时,流量可以快速切换至链路B上。
配置公网IPv4 FRR功能组网图
配置思路
1、在DeviceT、DeviceA和DeviceC上使能OSPF基本功能
2、在DeviceT、DeviceB和DeviceC上使能ISIS基本功能
3、在DeviceT上使能公网IPv4 FRR功能,查看备份出接口和备份下一跳的信息。
4、IPv4 Frr去使能后,查看备份出接口和备份下一跳的信息。
操作步骤
1、配置各个接口的IP地址
设备名称 | 接口 | IP地址 |
DeviceT | Ethernet1/0/1 | 172.16.1.1/24 |
Ethernet1/0/2 | 192.168.10.1/24 | |
Ethernet1/0/3 | 192.168.20.1/24 | |
DeviceA |
Ethernet1/0/1 |
192.168.10.2/24 |
Ethernet1/0/2 | 192.168.11.2/24 | |
DeviceB | Ethernet1/0/1 | 192.168.20.2/24 |
Ethernet1/0/2 | 192.168.21.2/24 | |
DeviceC |
Ethernet1/0/1 |
172.17.1.1/24 |
Ethernet1/0/2 | 192.168.11.1/24 | |
Ethernet1/0/3 | 192.168.21.1/24 |
2、在DeviceT、DeviceA和DeviceC上配置OSPF
DeviceT
1 2 3 4 5 | ospf 1 area 0.0.0.0 network 192.168.10.0 0.0.0.255 area 0.0.0.1 network 172.16.1.0 0.0.0.255 |
DeviceA
1 2 3 4 | ospf 1 area 0.0.0.0 network 192.168.10.0 0.0.0.255 network 192.168.11.0 0.0.0.255 |
DeviceC
1 2 3 4 5 6 | ospf 1 area 0.0.0.0 network 192.168.11.0 0.0.0.255 network 192.168.21.0 0.0.0.255 area 0.0.0.2 network 172.17.1.0 0.0.0.255 |
3、在DeviceT、DeviceB和DeviceC上配置IS-IS
DeviceT
1 2 3 4 5 6 7 8 9 | # isis 1 network-entity 10.0000.0000.0001.00 # interface GigabitEthernet1/0/3 undo shutdown ip address 192.168.20.1 255.255.255.0 isis enable 1 # |
DeviceB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # isis 1 network-entity 10.0000.0000.0002.00 # interface Ethernet1/0/1 undo shutdown ip address 192.168.20.2 255.255.255.0 isis enable 1 # interface GigabitEthernet1/0/2 undo shutdown ip address 192.168.21.2 255.255.255.0 isis enable 1 # |
DeviceC
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # isis 1 network-entity 10.0000.0000.0003.00 # interface Ethernet1/0/1 undo shutdown ip address 172.17.1.1 255.255.255.0 isis enable 1 # interface Ethernet1/0/3 undo shutdown ip address 192.168.21.1 255.255.255.0 isis enable 1 # |
4、查看路由信息
从路由表中可以看到:到达目的地址172.17.1.0/24有两条路由,其下一跳为192.168.10.2的路由是最优路由(因为OSPF路由的优先级比IS-IS路由的优先级高一些)。
5、使能公网IPv4 FRR功能
#在DeviceT上使能FRR功能
1 2 3 | # ip frr # |
从路由表中可以看到:到达目的地址172.17.1.0/24的路由有备份出接口和备份下一跳(IS-IS路由成为了备份路由)。
6、检查配置结果
在DeviceT上模拟链路故障
1 2 3 4 | [~DeviceT] interface Ethernet 1/0/2 [~DeviceT-Ethernet1/0/2]shutdown [*DeviceT-Ethernet1/0/2]commit [~DeviceT-Ethernet1/0/2]quit |
在DeviceT上查看到172.17.1.0/24路由的路由信息
可以看到当链路A发生故障时,转发路径会快速切换到链路B上去。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
2018-11-12 jsp+servlet实现的验证登陆
2018-11-12 Servlet转发