本帖最后由 goodluck 于 2022-8-25 14:27 编辑
目标:PC1访问PC2,A路径down后,自动切换B路径 1. 配置IP 2. 在R2上配置去往1.1.1.0和2.2.2.0的路由 [R2] ip route-static 1.1.1.0 24 Ethernet 0/0/0 12.1.1.1 [R2]ip route-static 2.2.2.0 24 Ethernet 0/0/1 21.1.1.2 3. 在R1配置去往21.1.1.0的路由,在R3上配置去往12.1.1.0的路由 [R1]ip route-static 21.1.1.0 24 GigabitEthernet 0/0/0 12.1.1.2 [R3]ip route-static 12.1.1.0 24 Ethernet 0/0/0 21.1.1.1 4. 配置BFD [R1]bfd [R1-bfd]quit [R1]bfd 1 bind peer-ip 21.1.1.2 source-ip 12.1.1.1 auto [R1-bfd-session-1]commit [R1-bfd-session-1]quit [R3]bfd [R3-bfd]quit [R3]bfd 1 bind peer-ip 21.1.1.2 source-ip 12.1.1.1 auto [R3-bfd-session-1]commit [R3-bfd-session-1]quit [R3]display bfd session all (查看BFD状态) -------------------------------------------------------------------------------- Local Remote PeerIpAddr State Type InterfaceName -------------------------------------------------------------------------------- 8192 8192 12.1.1.1 Up S_AUTO_PEER - -------------------------------------------------------------------------------- Total UP/DOWN Session Number : 1/0 *邻接关系UP 5. 配置R1到2.2.2.0网络的A路径路由+BFD邻居关系检测 [R1]ip route-static 2.2.2.0 24 GigabitEthernet 0/0/0 12.1.1.2 track bfd-session 1 6. 配置R1到2.2.2.0网络的B路径的次优路由 [R1]ip route-static 2.2.2.0 24 Ethernet 0/0/1 14.1.1.2 preference 61 permanent 华为静态路由默认管理距离为60,这里次优路由修改为61+永久存在参数 7. 配置R3到1.1.1.0网络的A路径路由+ BFD邻居关系检测 [R3]ip route-static 1.1.1.0 24 Ethernet 0/0/0 21.1.1.1 track bfd-session 2 8. 配置R3到1.1.1.0网络的B路径的次优路由 [R3]ip route-static 1.1.1.0 24 GigabitEthernet 0/0/0 14.1.1.1 preference 61 perm anent 想要获得更多实验相关内容,请添加我的微信
|