19.2. Dynamic Routing with FRRouting
Static routes are correct until something changes. Dynamic routing
exists so that routers can discover networks, follow link failures, and
re-route without a person editing files, and on Debian the implementation
is FRRouting - frr in the archive - which descends from the classic
Quagga and GNU Zebra lineage and carries several protocols in one
package:
| Protocol | Type | Fills this role |
|---|---|---|
| OSPF | link-state, interior | One administrative domain converges on full topology knowledge; best for a site or campus under one team. |
| IS-IS | link-state, interior | OSPF's role at larger scale; less common on small Debian deployments. |
| RIP | distance-vector, interior | Small legacy networks; slow convergence limits new deployments. |
| BGP | path-vector, exterior | Exchange reachability between autonomous systems - sites, providers, peering points. |
The two protocols this chapter exercises are the two a Debian administrator most often meets: OSPF inside a routed site, BGP between networks owned by different people. Both run on the same two routers - rtrouter as AS 65001 and rtpeer as AS 65002 - over the transit network they share.
19.2.1. Routing Daemons, Router Identities, and Configuration Persistence
FRRouting is not one program but a set of cooperating daemons behind one
CLI, vtysh. Install the package on both routers, as john on each,
with sudo apt install frr. The package enables only zebra, the
daemon that talks to the kernel; each routing protocol daemon starts
disabled and is switched on in /etc/frr/daemons, a plain
shell-sourced file. Confirm the CLI and service first, on rtrouter,
as john:
$ sudo vtysh -c "show version"
FRRouting 10.3 (rtrouter) on Linux(6.12.86+deb13-amd64).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
configured with:
Selected output - the next line continues with the package's complete build configuration for another screenful and is elided here. What matters is the version pair: FRRouting 10.3, the release Debian 13 ships, on the 6.12 kernel. The service unit is already active:
$ sudo systemctl is-active frr
active
Enable the two protocol daemons by editing /etc/frr/daemons in a root
shell (enter with sudo -i, leave with exit), or with one targeted
substitution, on rtrouter as john:
$ sudo sed -i -e 's/^bgpd=no/bgpd=yes/' -e 's/^ospfd=no/ospfd=yes/' /etc/frr/daemons
$ sudo grep -E '^(bgpd|ospfd)=' /etc/frr/daemons
bgpd=yes
ospfd=yes
The sed command itself prints nothing; the grep confirms both lines
changed. The single quotes keep the patterns intact; the ^ anchors
them so only the = defaults are touched.
With integrated configuration - Debian's default - the whole routing
configuration lives in one file, /etc/frr/frr.conf, regardless of how
many daemons read it. The router's complete file, created in the
workspace and walked through piece by piece below:
# /home/john/debian-handbook/routing/rtrouter-frr.conf
frr version 10.3
frr defaults traditional
hostname rtrouter
log syslog informational
service integrated-vtysh-config
!
interface eth3
ip ospf network point-to-point
ip ospf hello-interval 1
ip ospf dead-interval 4
!
ip prefix-list PEER-IN seq 5 permit 203.0.113.0/24
ip prefix-list PEER-IN seq 10 deny 0.0.0.0/0 le 32
!
ip prefix-list ADVERTISE-OUT seq 5 permit 192.168.219.0/24
ip prefix-list ADVERTISE-OUT seq 10 deny 0.0.0.0/0 le 32
!
route-map PEER-IN permit 10
match ip address prefix-list PEER-IN
set local-preference 200
!
route-map ADVERTISE-OUT permit 10
match ip address prefix-list ADVERTISE-OUT
!
router ospf
ospf router-id 10.19.255.1
network 192.168.219.0/24 area 0
network 192.168.220.0/24 area 0
network 192.168.221.0/24 area 0
!
router bgp 65001
bgp router-id 10.19.255.1
timers bgp 3 9
no bgp ebgp-requires-policy
neighbor 192.168.221.20 remote-as 65002
!
address-family ipv4 unicast
network 192.168.219.0/24
neighbor 192.168.221.20 route-map PEER-IN in
neighbor 192.168.221.20 route-map ADVERTISE-OUT out
exit-address-family
!
line vty
!
Figure 19.3. Conceptual architecture of FRR on Debian: vtysh edits one integrated configuration for every daemon; ospfd and bgpd compute routes and hand their best paths to zebra, which alone writes the kernel's routing table.
Two identities are worth fixing deliberately before the protocols start.
A router ID is a stable 32-bit number that identifies the box to OSPF
and BGP - ospf router-id and bgp router-id here. Without it, the
daemon picks the highest interface address, which changes when
interfaces change and can restart sessions at the worst moment. The IDs
10.19.255.1 and 10.19.255.2 are documentation-range addresses that
exist on no interface at all; they only need to be unique, not
reachable. An AS number identifies the administrative domain in BGP -
65001 here, 65002 on rtpeer, both from the private range 64512–65534
that is never announced to the internet.
The interface block tunes OSPF on the transit link: point-to-point
network type (no designated-router election on a two-router link), a
1-second hello and a 4-second dead interval so failures are noticed in
seconds instead of the default 40. The prefix lists and route maps
implement BGP policy and are dissected in Section 19.2.4; the two
router blocks follow in Sections 19.2.2 and 19.2.3.
Install the file with the package's own ownership and mode - FRR's
configuration is group-readable by frrvty and nothing else - then
restart the service so the newly enabled daemons start, on rtrouter as
john:
$ sudo install -m 0640 rtrouter-frr.conf /etc/frr/frr.conf
$ sudo chown frr:frr /etc/frr/frr.conf
$ sudo systemctl restart frr
$ sudo systemctl enable frr
All four are silent. The same setup happens on rtpeer: enable the same
two daemons with the sed command above, then install rtpeer's
configuration (shown in the next subsection) with the same install,
chown, restart, and enable sequence. vtysh reads these files too -
its -c option takes one command line at a time:
vtysh usage |
Description |
|---|---|
-c "command" |
Run one command and exit; quote the whole command. |
-c "configure terminal" -c ... |
Chain config-mode commands; each -c is one line. |
no -c |
Open the interactive CLI; exit leaves it, end returns to view mode. |
19.2.2. Building an OSPF Network and Following Adjacencies and Routes
OSPF routers become neighbors, exchange link-state advertisements, and
each computes its own shortest-path tree over the resulting map. The
protocol selects interfaces with network statements: any interface
whose address falls in the listed prefix runs OSPF, in the listed area.
Areas partition a domain - everything here sits in area 0, the backbone,
which is the correct single-area design for a small site. rtpeer's
configuration mirrors the router's:
# /home/john/debian-handbook/routing/rtpeer-frr.conf
frr version 10.3
frr defaults traditional
hostname rtpeer
log syslog informational
service integrated-vtysh-config
!
ip route 203.0.113.0/24 blackhole
ip route 203.0.113.128/25 blackhole
!
interface eth1
ip ospf network point-to-point
ip ospf hello-interval 1
ip ospf dead-interval 4
!
router ospf
ospf router-id 10.19.255.2
network 192.168.221.0/24 area 0
network 198.51.100.0/24 area 0
!
router bgp 65002
bgp router-id 10.19.255.2
timers bgp 3 9
no bgp ebgp-requires-policy
neighbor 192.168.221.2 remote-as 65001
!
address-family ipv4 unicast
network 203.0.113.0/24
network 203.0.113.128/25
exit-address-family
!
line vty
!
The peer advertises two things into OSPF: the transit network it shares
with rtrouter, and its dummy0 test network. It also carries two
blackhole routes, which matter to BGP in Section 19.2.3 and do nothing
to OSPF. After both routers' files are installed and the service
restarted on each, the adjacency comes up. On rtrouter, as john:
$ sudo vtysh -c "show ip ospf neighbor"
Neighbor ID Pri State Up Time Dead Time Address Interface RXmtL RqstL DBsmL
10.19.255.2 1 Full/- 12.111s 3.102s 192.168.221.20 eth3:192.168.221.2 0 0 0
The neighbor table is the first place to look at any OSPF deployment.
Full/- means the adjacency has finished forming - both routers have
synchronized databases and are on speaking terms; the dash is the
designated-router field, empty because a point-to-point link elects
nobody. The Dead Time column counts down to zero and resets on every
hello: four seconds here, per the interface block in frr.conf. A
neighbor stuck in Init or ExStart instead of Full is the usual
sign of mismatched hello/dead timers, an MTU disagreement, or an
authentication failure.
The routes OSPF installed, again on rtrouter as john:
$ sudo vtysh -c "show ip route ospf"
Codes: K - kernel route, C - connected, L - local, S - static,
R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
f - OpenFabric, t - Table-Direct,
> - selected route, * - FIB route, q - queued, r - rejected, b - backup
t - trapped, o - offload failure
IPv4 unicast VRF default:
O 192.168.219.0/24 [110/10] is directly connected, eth1, weight 1, 00:00:26
O 192.168.220.0/24 [110/10] is directly connected, eth2, weight 1, 00:00:26
O 192.168.221.0/24 [110/10] is directly connected, eth3, weight 1, 00:00:26
O>* 198.51.100.0/24 [110/20] via 192.168.221.20, eth3, weight 1, 00:00:09
The three connected networks appear with the OSPF code O because the
protocol now owns their advertisement; the > marks the selected route
and * its installation in the kernel's forwarding table. The learned
entry is the interesting one: 198.51.100.0/24 via the peer's transit
address, with administrative distance 110 (OSPF's; a static route at
distance 1 would outrank it) and metric 20 - the path cost, 10 for the
transit link plus 10 on the peer. Cost is how OSPF prefers paths; each
interface runs at cost 10 here, the value FRR assigns when a virtio
interface reports no bandwidth to derive from. Reachability is the
point of the whole exercise, on rtrouter as john:
$ ping -c 2 198.51.100.1
PING 198.51.100.1 (198.51.100.1) 56(84) bytes of data.
64 bytes from 198.51.100.1: icmp_seq=1 ttl=64 time=0.369 ms
64 bytes from 198.51.100.1: icmp_seq=2 ttl=64 time=0.400 ms
--- 198.51.100.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1029ms
rtt min/avg/max/mdev = 0.369/0.384/0.400/0.015 ms
One command shows the protocol's view of the link that carries it, on rtrouter as john:
$ sudo vtysh -c "show ip ospf interface eth3"
eth3 is up
ifindex 5, MTU 1500 bytes, BW 0 Mbit <UP,LOWER_UP,BROADCAST,RUNNING,MULTICAST>
Internet Address 192.168.221.2/24, Broadcast 192.168.221.255, Area 0.0.0.0
MTU mismatch detection: enabled
Router ID 10.19.255.1, Network Type POINTOPOINT, Cost: 10
Transmit Delay is 1 sec, State Point-To-Point, Priority 1
No backup designated router on this network
Multicast group memberships: OSPFAllRouters
Timer intervals configured, Hello 1s, Dead 4s, Wait 4s, Retransmit 5
Hello due in 0.382s
Neighbor Count is 1, Adjacent neighbor count is 1
Graceful Restart hello delay: 10s
LSA retransmissions: 4
The timers configured in frr.conf are live - Hello 1s, Dead 4s - and
the neighbor count matches the adjacency table. If both sides must agree
on every one of these values for a session to form, then changing them
is a two-router operation: edit frr.conf on both, restart both, and
compare show ip ospf interface side by side when something refuses to
reach Full.
19.2.3. Establishing BGP Sessions and Advertising Selected Prefixes
OSPF shares routes inside one administration; BGP shares them between
administrations, and trusts nothing by default. A session is defined by
an address and a remote AS number - on rtrouter, neighbor
192.168.221.20 remote-as 65002 - and every prefix in each direction is
a policy decision. The session runs over TCP port 179 on the transit
network the two routers already share; OSPF is not a prerequisite, but
using a directly connected network keeps the first example free of
route-recursion questions.
A network statement under router bgp does not create a route; it
says "if this exact prefix is in my routing table, announce it." That is
the purpose of rtpeer's two blackhole static routes: they place
203.0.113.0/24 and 203.0.113.128/25 in the RIB - as documentation
prefixes with no real destination, traffic to them is silently
discarded locally - so BGP has something to announce. rtrouter
announces LAN A the same way, no static route needed because the
connected route already exists.
After both files are installed and the service restarted, the session should be established. On rtrouter, as john:
$ sudo vtysh -c "show bgp summary"
IPv4 Unicast Summary:
BGP router identifier 10.19.255.1, local AS number 65001 VRF default vrf-id 0
BGP table version 4
RIB entries 3, using 384 bytes of memory
Peers 1, using 23 KiB of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd PfxSnt Desc
192.168.221.20 4 65002 22 20 4 0 0 00:00:20 1 1 N/A
Total number of neighbors 1
The one-line neighbor row carries the diagnosis: the state column shows
a prefix count (PfxRcd 1) rather than a state word, which is the
established state. The message counters advance on every keepalive; if
they freeze, the TCP session is gone. The same up for figure and the
negotiated timers appear in the full neighbor record. Selected output
- the session state, timers, and the policy attachments that matter to
this chapter; the capability and graceful-restart detail between them
is elided:
$ sudo vtysh -c "show bgp neighbor 192.168.221.20"
BGP neighbor is 192.168.221.20, remote AS 65002, local AS 65001, external link
Hostname: rtpeer
BGP version 4, remote router ID 10.19.255.2, local router ID 10.19.255.1
BGP state = Established, up for 00:00:22
Hold time is 9 seconds, keepalive interval is 3 seconds
...
Message statistics:
Sent Rcvd
Opens: 3 2
Updates: 6 8
Keepalives: 11 11
...
For address family: IPv4 Unicast
Route map for incoming advertisements is *PEER-IN
Route map for outgoing advertisements is *ADVERTISE-OUT
1 accepted prefixes
Connections established 2; dropped 1
Local host: 192.168.221.2, Local port: 179
Foreign host: 192.168.221.20, Foreign port: 42868
The timers bgp 3 9 from frr.conf negotiated into a 3-second
keepalive and 9-second hold time: a session whose peer misses three
keepalives is declared down. The router IDs match the ones configured by
hand, and the route-map names on the last lines are the policy from
Section 19.2.4 doing its job in both directions.
What the session actually carried lands in the BGP table, on rtrouter as john:
$ sudo vtysh -c "show bgp ipv4 unicast"
BGP table version is 4, local router ID is 10.19.255.1, vrf id 0
Default local pref 100, local AS 65001
Status codes: s suppressed, d damped, h history, u unsorted, * valid, > best, = multipath,
i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 192.168.219.0/24 0.0.0.0 0 32768 i
*> 203.0.113.0/24 192.168.221.20 0 200 0 65002 i
Displayed 2 routes and 2 total paths
Two prefixes: LAN A, originated locally (0.0.0.0 next hop, weight
32768, path empty), and the peer's /24 with AS path 65002 - one hop
through the peer's autonomous system, as an external route should look.
The > marks the best path in each case; LocPrf 200 on the learned
route is Section 19.2.4's doing, visible here as an attribute BGP carried
in with the prefix.
19.2.4. Prefix Filters, Route Policy, and Preventing Unintended Advertisements
rtpeer announces two documentation prefixes, 203.0.113.0/24 and
203.0.113.128/25. rtrouter's BGP table shows only the first. The
difference is policy, written as prefix lists and route maps in
rtrouter-frr.conf, and the distinction between them matters:
- A prefix list matches prefixes: exact, or by mask range. It says nothing about what to do with a match.
- A route map is the policy container: its clauses match on prefix lists (or AS paths, communities, and more), and each clause permits, denies, or rewrites attributes such as local preference.
PEER-IN controls what rtrouter accepts. These lines are the policy's
excerpt from /etc/frr/frr.conf, already installed in
Section 19.2.1; the prefix list permits the /24 and denies everything
else - the second line is the one that gives a prefix list its safety,
because without it every unmatched prefix falls through to an
implicit permit:
ip prefix-list PEER-IN seq 5 permit 203.0.113.0/24
ip prefix-list PEER-IN seq 10 deny 0.0.0.0/0 le 32
route-map PEER-IN permit 10
match ip address prefix-list PEER-IN
set local-preference 200
0.0.0.0/0 le 32 is the idiom for "any prefix of any length," so the
deny line rejects the whole IPv4 space except what an earlier sequence
permitted. Sequence numbers (seq 5, seq 10) leave room to insert
clauses without renumbering. The route map does the accepting, and the
set clause raises local preference to 200 for whatever it accepts:
local preference is how this router ranks alternative internal paths
to the same destination, and it travels only inside an AS - an attribute
for influencing outbound choices from rtrouter's own perspective.
ADVERTISE-OUT is the mirror policy on the sending side, the matching
excerpt from frr.conf, and its importance is hard to overstate.
Without it, every prefix in rtrouter's BGP table - including anything
learned from rtpeer - would be offered back to rtpeer, and in a
transit topology, to every other peer:
ip prefix-list ADVERTISE-OUT seq 5 permit 192.168.219.0/24
ip prefix-list ADVERTISE-OUT seq 10 deny 0.0.0.0/0 le 32
route-map ADVERTISE-OUT permit 10
match ip address prefix-list ADVERTISE-OUT
Both maps attach to the one neighbor, inbound and outbound, in the
router bgp block. FRR additionally refuses to exchange prefixes with
an eBGP peer that has no policy in a direction, unless
no bgp ebgp-requires-policy lifts the guard; the explicit route maps
already satisfy it, and the line in the file makes the intent
unconditional.
Verify the inbound side first. The /25 was announced but never
accepted, on rtrouter as john:
$ sudo vtysh -c "show bgp ipv4 unicast 203.0.113.128/25"
% Network not in table
The prefix list as the daemon loaded it:
$ sudo vtysh -c "show ip prefix-list PEER-IN"
ZEBRA: ip prefix-list PEER-IN: 2 entries
seq 5 permit 203.0.113.0/24
seq 10 deny 0.0.0.0/0 le 32
OSPF: ip prefix-list PEER-IN: 2 entries
seq 5 permit 203.0.113.0/24
seq 10 deny 0.0.0.0/0 le 32
BGP: ip prefix-list PEER-IN: 2 entries
seq 5 permit 203.0.113.0/24
seq 10 deny 0.0.0.0/0 le 32
Prefix lists are defined globally and visible to every daemon, which is why the listing repeats per daemon. The route map that uses it - selected output showing the BGP instance, which is the one doing the work, with the ZEBRA and OSPF repeats elided:
$ sudo vtysh -c "show route-map PEER-IN"
BGP:
route-map: PEER-IN Invoked: 6 (0 milliseconds total) Optimization: enabled Processed Change: false
permit, sequence 10 Invoked 3 (0 milliseconds total)
Match clauses:
ip address prefix-list PEER-IN
Set clauses:
local-preference 200
The invocation counters are live evidence that the map ran - six calls, three of them reaching the permit clause, the rest denied by the implicit deny at the map's end.
Now the outbound side: exactly what rtrouter promises to its peer, on rtrouter as john:
$ sudo vtysh -c "show bgp ipv4 unicast neighbors 192.168.221.20 advertised-routes"
BGP table version is 4, local router ID is 10.19.255.1, vrf id 0
Default local pref 100, local AS 65001
Status codes: s suppressed, d damped, h history, u unsorted, * valid, > best, = multipath,
i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 192.168.219.0/24 0.0.0.0 0 32768 i
Total number of prefixes 1
One prefix, the one the policy permits. Compare what rtpeer sends - on rtpeer, as john, the same query against its neighbor:
$ sudo vtysh -c "show bgp ipv4 unicast neighbors 192.168.221.2 advertised-routes"
BGP table version is 3, local router ID is 10.19.255.2, vrf id 0
Default local pref 100, local AS 65002
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 192.168.219.0/24 192.168.221.2 0 0 65001 i
*> 203.0.113.0/24 0.0.0.0 0 32768 i
*> 203.0.113.128/25 0.0.0.0 0 32768 i
Total number of prefixes 3
Selected output - the status-code legend is elided. rtpeer has no
outbound filter, so it offers back the LAN A prefix it learned, both
documentation prefixes, and nothing else. The reflected prefix is
harmless here - rtrouter discards it on arrival because its own AS
number appears in the path, the AS-path loop check, and the earlier
neighbor output counted exactly that under AS-PATH loop. In a real
network, being selective on both sides is what keeps a router from
becoming an accidental transit provider between two peers: the
advertised-routes view is the one to check before wondering why a peer
receives something unexpected.
19.2.5. Diagnosing Neighbor Failures, Route Selection, and Convergence
Routing protocols fail in two flavors: the session dies, or the session lives while the route vanishes. Induce the first, on rtpeer as john, with an administrative shutdown of the BGP neighbor - the same thing a maintenance window does to a session, without touching any link:
$ sudo vtysh -c "configure terminal" -c "router bgp 65002" -c "neighbor 192.168.221.2 shutdown"
The command prints nothing. Across on rtrouter, as john, the session state is the first thing that changes:
$ sudo vtysh -c "show bgp summary"
IPv4 Unicast Summary:
BGP router identifier 10.19.255.1, local AS number 65001 VRF default vrf-id 0
BGP table version 5
RIB entries 1, using 128 bytes of memory
Peers 1, using 23 KiB of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd PfxSnt Desc
192.168.221.20 4 65002 29 26 0 0 0 00:00:14 Active 0 N/A
Total number of neighbors 1
The state column is a word now, not a count. Active means rtrouter is
actively trying to open the TCP session and getting nothing; Idle
means it has given up for the moment and is waiting for the retry timer;
Connect sits between them. The learned prefix is already withdrawn -
RIB entries dropped from 3 to 1, and the 203.0.113.0/24 route is gone
from the table. Withdrawal on session loss is immediate; no timer
waits.
Bring it back, on rtpeer as john:
$ sudo vtysh -c "configure terminal" -c "router bgp 65002" -c "no neighbor 192.168.221.2 shutdown"
Again silent. Within the keepalive interval, on rtrouter as john:
$ sudo vtysh -c "show bgp summary"
IPv4 Unicast Summary:
BGP router identifier 10.19.255.1, local AS number 65001 VRF default vrf-id 0
BGP table version 6
RIB entries 3, using 384 bytes of memory
Peers 1, using 23 KiB of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd PfxSnt Desc
192.168.221.20 4 65002 38 34 6 0 0 00:00:13 1 1 N/A
Total number of neighbors 1
The prefix count is back. The neighbor record remembers the incident, on rtrouter as john - selected output from the same command as before, with the capability detail elided:
$ sudo vtysh -c "show bgp neighbor 192.168.221.20"
BGP neighbor is 192.168.221.20, remote AS 65002, local AS 65001, external link
Hostname: rtpeer
BGP state = Established, up for 00:00:15
...
Message statistics:
Sent Rcvd
Opens: 5 3
Notifications: 0 2
...
Prefix statistics:
Inbound filtered: 4
AS-PATH loop: 4
...
Connections established 3; dropped 2
Connections established 3; dropped 2 is the session's history, and the
two Notifications received are the formal NOTIFICATION messages a
shutdown sends. This record is how to distinguish a flapping session
from one that has never come up: a session that establishes, then drops,
then establishes has a link or timer problem; a session stuck in Active
never established at all.
The second flavor of failure kills the route while the link is what carries it. Take the peer's transit interface down, on rtpeer as john:
$ sudo ip link set eth1 down
The OSPF dead interval is four seconds, and the adjacency expires, on rtrouter as john:
$ sudo vtysh -c "show ip ospf neighbor"
Neighbor ID Pri State Up Time Dead Time Address Interface RXmtL RqstL DBsmL
No rows at all. The OSPF route follows the adjacency out of the table:
$ sudo vtysh -c "show ip route ospf"
Codes: K - kernel route, C - connected, L - local, S - static,
R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
f - OpenFabric, t - Table-Direct,
> - selected route, * - FIB route, q - queued, r - rejected, b - backup
t - trapped, o - offload failure
IPv4 unicast VRF default:
O 192.168.219.0/24 [110/10] is directly connected, eth1, weight 1, 00:01:32
O 192.168.220.0/24 [110/10] is directly connected, eth2, weight 1, 00:01:32
O 192.168.221.0/24 [110/10] is directly connected, eth3, weight 1, 00:01:32
198.51.100.0/24 is gone - BGP learned nothing new because its session
rides the same dead link, which is also why a real transit design keeps
the BGP session on a path that survives the failure you expect. Restore
the link, on rtpeer as john:
$ sudo ip link set eth1 up
The adjacency reforms without any intervention:
$ sudo vtysh -c "show ip ospf neighbor"
Neighbor ID Pri State Up Time Dead Time Address Interface RXmtL RqstL DBsmL
10.19.255.2 1 Full/- 13.737s 3.936s 192.168.221.20 eth3:192.168.221.2 0 0 0
That round trip - link down, neighbor gone in dead-interval seconds,
route withdrawn; link up, neighbor returns, route reinstalled - is
convergence, and its speed is a configuration choice: the 1s/4s timers
here trade a little protocol chatter for fast failure detection, and
a stable production core often runs the defaults instead. What is not
a choice is verifying it: change a link, watch the neighbor state, then
watch the route table, on both routers.
One more diagnostic belongs in every FRR toolbox, because runtime
changes made through vtysh -c "configure terminal" live in the running
configuration and evaporate on restart - the shutdown above was undone
before it could surprise anyone at the next reboot. Compare what is
running against what is on disk, on rtrouter as john. Selected output
- the file's own policy blocks, plus defaults the daemons add
themselves; the interface, router bgp, and router ospf stanzas
continue beyond the elision:
$ sudo vtysh -c "show running-config"
Building configuration...
Current configuration:
!
frr version 10.3
frr defaults traditional
hostname rtrouter
log syslog informational
no ipv6 forwarding
service integrated-vtysh-config
!
ip prefix-list ADVERTISE-OUT seq 5 permit 192.168.219.0/24
ip prefix-list ADVERTISE-OUT seq 10 deny 0.0.0.0/0 le 32
ip prefix-list PEER-IN seq 5 permit 203.0.113.0/24
ip prefix-list PEER-IN seq 10 deny 0.0.0.0/0 le 32
!
route-map ADVERTISE-OUT permit 10
match ip address prefix-list ADVERTISE-OUT
exit
!
route-map PEER-IN permit 10
match ip address prefix-list PEER-IN
set local-preference 200
exit
!
...
The remainder matches /etc/frr/frr.conf line for line, reordered by
daemon. The hostname and no ipv6 forwarding lines are inserted by
the daemons; with
service integrated-vtysh-config, saving from within vtysh writes the
whole thing back to the one file. The habit that keeps routers boring:
make deliberate changes in the file, restart, verify with show - and
treat configure terminal as the tool for experiments you intend to
undo, exactly as this section did.