Configuring BFD for static routes

Network requirements

When the link between Router A and Router B fails, Router A selection reaches through Router D Router C.

Network diagram

 

 

 

 

Configuration procedure

(1) Configure IP address for each interface (omitted)

(2) Configuration BFD and static routing

Router A # arranged on static routing, BFD detection, through BFD achieved echo packet mode BFD function.

<RouterA> system-view
[RouterA] bfd echo-source-ip 123.1.1.1
[RouterA] interface ethernet 1/2
[RouterA-Ethernet1/2] bfd min-echo-receive-interval 300
[RouterA-Ethernet1/2] bfd detect-multiplier 7
[RouterA-Ethernet1/2] quit
[RouterA] ip route-static 120.1.1.1 24 ethernet 1/2 10.1.1.100 bfd echo-packet
[RouterA] ip route-static 13.1.1.2 24 ethernet 1/1 12.1.1.2 preference 65
[RouterA] quit

 

(3) Verify the configuration.

Router A # Display enabled BFD information.

<RouterA> display bfd Session
 
Total Session Num: 1 Init Mode: Active
 
Session Working Under Echo Mode:
 
LD SourceAddr DestAddr State Holdtime Interface
7 10.1.1.102 10.1.1.100 Up 1700ms Ethernet1/2

 

Router A routing table # Display details.

<RouterA> display ip routing-table protocol static
Public Routing Table : Static
Summary Count : 2
 
Static Routing table Status : <Active>
Summary Count : 1
 
Destination/Mask Proto Pre Cost NextHop Interface
 
120.1.1.1/24 Static 60 0 10.1.1.100 Ethernet1/2
 
Direct Routing table Status : <Inactive>
Summary Count : 1
 
Destination/Mask Proto Pre Cost NextHop Interface
 
13.1.1.2/24 Static 65 0 12.1.1.2 Ethernet1/1

 

A # open on Router the BFD function debugging.

<RouterA> debugging bfd event
<RouterA> debugging bfd scm
<RouterA> terminal debugging

 

A link failure between the switcher and Router B # can be seen Router A can detect the Router B's.

%Nov 12 19:28:28:592 2005 RouterA BFD/5/LOG:Sess[123.1.1.1/10.1.1.100, Eth1/2], Sta: UP->DOWN, Diag: 1

* 0.53892593 RouterA BFD /8/SCM:Sess[123.1.1.1/10.1.1.100, Eth1 / 2], opera: Reset

*0.53892593 RouterA BFD/8/EVENT:Send sess-down Msg, [Src:123.1.1.1, Dst:10.1.1.100, Eth1/2] Protocol: STATIC

*0.53892595 RouterA RM/7/LOG:static route [Dest:120.1.1.1/24,Nexthop:10.1.1.100,ExitIf:Eth1/2] became invalid

# When Router A to Router B link is faulty, by display ip routing-table protocol static view way table information command. Router A selected static route to Router D through Router C.

<RouterA> display ip routing-table protocol static
Public Routing Table : Static
Summary Count : 2
 
Static Routing table Status : < Active>
Summary Count : 1
 
Destination/Mask Proto Pre Cost NextHop Interface
 
13.1.1.2/24 Static 65 0 12.1.1.2 Ethernet1/1
 
Static Routing table Status : < Inactive>
Summary Count : 1
 
Destination/Mask Proto Pre Cost NextHop Interface
 
120.1.1.1/24 Static 60 0 10.1.1.100 Ethernet1/2

 

 

 

 

 

 

BFD for static routing configuration (bidirectional detection)

 

Network requirements

Configure static routes on Router A can reach 14.1.1.0/24 subnet routing, configure static routes on Router B can reach 13.1.1.0/24 subnet routing, BFD detection;

When Router A and Router B link fails BFD can detect.

 

Network diagram

 

 

 

 

 

 

 

Configuration procedure

(1) Configuration BFD

# Configure Router A.

<RouterA> system-view
[RouterA] interface ethernet 1/1
[RouterA-Ethernet1/1] ip address 12.1.1.1 24
[RouterA-Ethernet1/1] bfd min-transmit-interval 500
[RouterA-Ethernet1/1] bfd min-receive-interval 500
[RouterA-Ethernet1/1] bfd detect-multiplier 9
[RouterA-Ethernet1/1] quit
[RouterA] ip route-static 14.1.1.0 24 ethernet 1/1 12.1.1.2 bfd control-packet
[RouterA] quit

 

# Configure Router B.

<RouterB> system-view
[RouterB] interface ethernet 1/1
[RouterB-Ethernet1/1] ip address 12.1.1.2 24
[RouterB-Ethernet1/1] bfd min-transmit-interval 500
[RouterB-Ethernet1/1] bfd min-receive-interval 500
[RouterB-Ethernet1/1] bfd detect-multiplier 9
[RouterB-Ethernet1/1] quit
[RouterB] ip route-static 13.1.1.0 24 ethernet 1/1 12.1.1.1 bfd control-packet
[RouterB] quit

 

(2) Verify the configuration

<RouterA> display bfd session
 
Total Session Num: 1 Init Mode: Active
 
Session Working Under Ctrl Mode:
 
LD/RD SourceAddr DestAddr State Holdtime Interface
4/7 12.1.1.1 12.1.1.2 Up 2000ms Ethernet1/1

 

A # open on Router the BFD function debugging.

<RouterA> debugging bfd event
<RouterA> debugging bfd scm
<RouterA> terminal debugging

 

Link failure between Router A # and switches, can be seen Router A can detect the Router B's.

%Jul 27 10:18:18:672 2007 RouterA BFD/4/LOG:Sess[12.1.1.1/12.1.1.2, Ethernet1/1,Ctrl],

Sta: UP->DOWN, Diag: 1

*Jul 27 10:18:18:672 2007 RouterA BFD/7/EVENT:Send sess-down Msg, [Src:12.1.1.1,

Dst:12.1.1.2,Ethernet1/1,Ctrl], instance:0, protocol:STATIC

*Jul 27 10:18:19:172 2007 RouterA BFD/7/EVENT:Receive Delete-sess, [Src:12.1.1.1

,Dst:12.1.1.2,Ethernet1/1,Ctrl], Direct, Instance:0x0, Proto:STATIC

 

*Jul 27 10:18:19:172 2007 RouterA BFD/7/EVENT:Notify driver to stop receiving bf

 

 

One-way and two-way detection to detect the difference:

1) to establish a connection without the unidirectional detection BFD, a BFD configuration at this time the device sends the destination address is the source address of the interface specified address packets. To this end will forward the packets sent back even according to a linear route. BFD way must be configured so that the transmission source address (bfd echo-source-ip xxxx this address is any address)

2) Bidirectional Detection BFD connection is established, it is not the source address of the BFD configuration, establish a connection address for the next hop address of the static route double. If a piece is not configured with a static route for the next hop neighbor, then the connection is not established, the static route is invalid.

Guess you like

Origin www.cnblogs.com/zsjnp/p/11878599.html
bfd