On this page
At the end of the first level a static route kept sending traffic to a neighbor that had gone, because a static route has no way of asking. A routing protocol fixes exactly that. Two routers hold a conversation; each tells the other what it can reach, and when the conversation stops, everything learned through it is withdrawn. This post is one such conversation: a single BGP session between a leaf and a spine on SONiC. It is typed in the switch command line and then followed twice: down into the routing software, to see what SONiC wrote, and one learned route all the way to the forwarding plane. The switches run Enterprise SONiC 4.6.0; the same session follows on community SONiC, where it is typed in FRR's own shell.
This is the written deep dive for the first lesson of the fabric level of the SONiC course on the LevelUP I.T. YouTube channel. It runs on the lab built in lesson 1, from the blank lab. Every output below is from the lab as the lesson recorded it.
What you'll find here
- BGP in one page: configured neighbors, autonomous systems, the AS path, keepalives.
- Who does the routing on a SONiC switch: FRR's processes in the
bgpcontainer. - The session, line by line, and how to read the summary, the neighbor detail and BGP's table.
- What the command line wrote: the BGP tables in CONFIG_DB, and the block generated in FRR.
- One learned route in five places, from FRR to ASIC_DB.
- The session shut down, and the route withdrawn with it.
- Community SONiC: the routing mode, the session in
vtysh,no bgp ebgp-requires-policy, andfrr.conf.