Hà Nội: NTT03, Line 1, Thống Nhất Complex, 82 Nguyễn Tuân, Thanh Xuân, Hà Nội. ● HCM: Số 31B, Đường 1, Phường An Phú, Quận 2 (Thủ Đức), TP HCM. ===> Đơn Vị Hàng Đầu Trong Lĩnh Vực Cung Cấp Thiết Bị Security - Network - Wifi - CCTV - Conference - Máy chủ Server - Lưu trữ Storge.
Danh mục sản phẩm

Configure a Static Route to Coordinate with BFD Example

Network Requirements

  • On Device1, configure two static routes to network segment 201.0.0.0/24. One route passes Device2 while the other route passes Route3. Device first uses the route that passes Device 3 to forward packets. Similarly, on Device3, configure two static routes to network segment 200.0.0.0/24. Device3 first uses the route that passes Device1 to forward packets.
  • On Device1 and Device3, configure static routes to coordinate with BFD. When the route between Device1 and Device3 is faulty, they can quickly switch over to the route that passes Device2.

Network Topology

Networking for Configuring a Static Route to Coordinate with BFD

Figure 3-5 Networking for Configuring a Static Route to Coordinate with BFD

Configuration Steps

Step 1: Create VLANs, and add ports to the required VLANs. (Omitted)

Step 2: Configure IP addresses for the ports. (Omitted)

Step 3: Configure static routes.

#On Device1, configure two static routes to network segment 201.0.0.0/24.

Device1#configure terminal
Device1(config)#ip route 201.0.0.0 255.255.255.0 vlan2 10.1.1.2
Device1(config)#ip route 201.0.0.0 255.255.255.0 vlan3 20.1.1.2 10

#On Device2, configure two static routes to network segments 200.0.0.0/24 and 201.0.0.0/24 respectively.

Device2#configure terminal
Device2(config)#ip route 200.0.0.0 255.255.255.0 20.1.1.1
Device2(config)#ip route 201.0.0.0 255.255.255.0 30.1.1.2

#On Device3, configure two static routes to network segment 200.0.0.0/24.

Device3#configure terminal
Device3(config)#ip route 200.0.0.0 255.255.255.0 vlan2 10.1.1.1
Device3(config)#ip route 200.0.0.0 255.255.255.0 vlan3 30.1.1.1 10

#Query the routing table of Device1.

Device1#show ip route  
Codes: C - connected, S - static, R - RIP, O - OSPF, OE-OSPF External, M - Management 
       D - Redirect, E - IRMP, EX - IRMP external, o - SNSP, B - BGP, i-ISIS  
 
Gateway of last resort is not set 
 
C 10.1.1.0/24 is directly connected, 00:07:41, vlan2 
C 20.1.1.0/24 is directly connected, 00:07:29, vlan3
C 127.0.0.0/8 is directly connected, 101:56:14, lo0 
C 200.0.0.0/24 is directly connected, 00:15:33, vlan4
S 201.0.0.0/24 [1/100] via 10.1.1.2, 00:02:23, vlan2

#Query the routing table of Device3.

Device3#show ip route  
Codes: C - connected, S - static, R - RIP, O - OSPF, OE-OSPF External, M Management 
       D - Redirect, E - IRMP, EX - IRMP external, o - SNSP, B BGP, i-ISIS  
 
Gateway of last resort is not set 
 
C 10.1.1.0/24 is directly connected, 00:10:21, vlan2 
C 30.1.1.0/24 is directly connected, 00:10:09, vlan3
C 127.0.0.0/8 is directly connected, 126:44:08, lo0
S 200.0.0.0/24 [1/100] via 10.1.1.1, 00:06:12, vlan2 
C 201.0.0.0/24 is directly connected, 00:20:37, vlan4 

Step 4: Configure a static route to coordinate with BFD.

#Configure Device1.

Device1(config)#bfd fast-detect
Device1(config)#ip route static bfd vlan2 10.1.1.2

#Configure Device3.

Device1(config)#bfd fast-detect
Device3(config)#ip route static bfd vlan2 10.1.1.1

Step 5: Check the result.

#Query the BFD session of Device1.

Device1#show bfd session  
OurAddr     NeighAddr    LD/RD   State   Holddown   interface       
10.1.1.1	10.1.1.2     15/22   UP      5000       vlan2 

#Query the BFD session of Device3.

Device3#show bfd session  
OurAddr     NeighAddr    LD/RD   State   Holddown   interface       
10.1.1.2    10.1.1.1     22/15   UP      5000       vlan2 

The BFD sessions have been normally set up on Device1 and Device3, indicating that the static routes are configured to coordinate with BFD successfully.

#When the route between Device1 and Device3 is faulty, BFD quickly detects the line fault and switch over to the route that passes Device2 for communication. Query the BFD session and routing table of Device1.

Device1#show bfd session  
OurAddr      NeighAddr     LD/RD   State    Holddown   interface       
10.1.1.1     10.1.1.2      15/0    DOWN     5000       vlan2 
 
Device1#show ip route  
Codes: C - connected, S - static, R - RIP, O - OSPF, OE-OSPF External, M Management 
       D - Redirect, E - IRMP, EX - IRMP external, o - SNSP, B BGP, i-ISIS  
 
Gateway of last resort is not set 
 
C 10.1.1.0/24 is directly connected, 00:29:07, vlan2
C 20.1.1.0/24 is directly connected, 00:28:55, vlan3
C 127.0.0.0/8 is directly connected, 102:17:40, lo0 
C 200.0.0.0/24 is directly connected, 00:36:58, vlan4 
S 201.0.0.0/24 [10/10] via 20.1.1.2, 00:00:09, vlan3 

The BFD handling method on Device3 is the same as that on Device1.