OSPF All in One Lab---(BFD>SM)
Section VII BFD

Section VII BFD
We’ve talked about FRR before and know it’s used to avoid network interruption for network convergence needs time. Now we’ll talk about BFD, it has similar function as FRR(Fast Reroute).
We should disable frr at first, [RouterA-ospf-1]undo frr.
Routing for Network
Destination Cost Type NextHop AdvRouter Area
1.1.1.1/32 0 Stub 1.1.1.1 1.1.1.1 0.0.0.0
10.1.1.0/24 1 Transit 10.1.1.1 1.1.1.1 0.0.0.0
10.5.1.0/24 10 Transit 10.5.1.1 1.1.1.1 0.0.0.0
2.2.2.2/32 1 Stub 10.1.1.2 2.2.2.2 0.0.0.0
4.4.4.4/32 2 Inter-area 10.1.1.2 4.4.4.4 0.0.0.0
5.5.5.5/32 3 Inter-area 10.1.1.2 4.4.4.4 0.0.0.0
10.2.1.0/24 2 Inter-area 10.1.1.2 2.2.2.2 0.0.0.0
10.3.1.0/24 2 Inter-area 10.1.1.2 2.2.2.2 0.0.0.0
10.4.1.0/24 3 Inter-area 10.1.1.2 4.4.4.4 0.0.0.0
From Routing table of RouterA, we can see that RouterA to RouterB is the main link while RouterA to RouterC to RouterB is backup link.
[RouterA-ospf-1]bfd all-interfaces enable
Now we can see BFD session is established on all interfaces of RouterA.
[RouterA]display ospf bfd session all
OSPF Process 1 with Router ID 1.1.1.1
Area 0.0.0.0 interface 10.1.1.1(GigabitEthernet0/0/0)'s BFD Sessions
NeighborId:2.2.2.2 AreaId:0.0.0.0 Interface:GigabitEthernet0/0
/0
BFDState:up rx :1000 tx :1000
Multiplier:3 BFD Local Dis:8193 LocalIpAdd:10.1.1.1
RemoteIpAdd:10.1.1.2 Diagnostic Info:No diagnostic information
Area 0.0.0.0 interface 10.5.1.1(GigabitEthernet0/0/1)'s BFD Sessions
NeighborId:3.3.3.3 AreaId:0.0.0.0 Interface:GigabitEthernet0/0
/1
BFDState:up rx :1000 tx :1000
Multiplier:3 BFD Local Dis:8192 LocalIpAdd:10.5.1.1
RemoteIpAdd:10.5.1.2 Diagnostic Info:No diagnostic information
When I disable GE0/0/0 of RouterA, the routing table of RouterA is as below:
Routing for Network
Destination Cost Type NextHop AdvRouter Area
1.1.1.1/32 0 Stub 1.1.1.1 1.1.1.1 0.0.0.0
10.5.1.0/24 10 Transit 10.5.1.1 1.1.1.1 0.0.0.0
10.3.1.0/24 11 Inter-area 10.5.1.2 3.3.3.3 0.0.0.0
Routing for ASEs
Destination Cost Type Tag NextHop AdvRouter
200.0.0.0/8 11 Type1 1 10.5.1.2 3.3.3.3
We can see the NextHop becomes 10.5.1.2 immediately, the effort is amazing, which is the same as FRR.
By the way, if we want to change parameters such as Rx(BFD packets interval) and Tx etc, we can configure specific interface, but it’s optional.
Section VIII GTSM
In order to avoid illegal OSPF packets, we can use GTSM to define TTL value.
If we want to get familiar with TTL, we can ping RouterA GE0/0/0 from RouterE; through the packet capturing function, we can see ICMP packet as below:

From RouterA to RouterE, the value of TTL(Time to Live) is 255.

From RouterE to RouterA, the value is 253. So we can see that the packet of router itself has TTL value 255, one hop can reduce the value by one. From RouterE to RouterA, there are two routers, so the value is 253 instead.
Once we get GTSM enabled, then we can make sure only OSPF packets from these five Routers can be accepted so that no illegal OSPF packets will pass for their TTL value isn’t in the range.
[RouterA]ospf valid-ttl-hops 3
For the maximum hops is 3 (from RouterA to RouterE)
The valid TTL range of the detected packets is [255 -hops + 1, 255].

