A new design for this blog
I finally found the time and motivation to build a new fully custom design I’ve been thinking about for quite some time. The site also moved from Hugo to Astro.
I built the new fully custom design specifically for content and articles about network. Some highlights are
- Pinned, interactive topology diagrams
- Stay next to the text while you scroll
- Interactive, with dynamic highlighting
- e.g. router names in the text link to the diagram
- You can customize where they show (left, right, top)
- For left and right, you can even adjust their width to your liking
- You can always collapse / hide them
- Margin notes!!!
- I often have notes and additions that I believe are too important to omit, but not important enough to be in the actual text
- Spoilers are too disruptive ⇒ Margin Notes!
- Much nicer code blocks
- Inline notes with dynamic highlighting
- You can customize how they are displayed (buttons show when you hover about the code block)
- Highlighted areas
- Toggle line wrapping
- Inline notes with dynamic highlighting
- A little bit of custom typography, e.g. IBM Plex font
This article is a demo for every feature of the new layout, as the existing articles do not yet make full use of them.
While the content below is based on the route-reflector section of Part 4: BGP as advanced routing protocol. any changes are LLM-generated - sorry I really can’t be bothered writing demo content myself
Demo content
Every purple Demo box on this page explains the feature directly below it: what you see, how to try it, the Markdown syntax, and where it comes from. “Package” means an existing component (configuration only). “Custom” means code in this repository.
| # | Feature | Source |
|---|---|---|
| 1 | Obsidian-style callouts (> [!error]) |
Package: rehype-callouts |
| 2 | Lab section: topology right / left / top, hide, phone drawer | Custom: rehype-lab-topology.mjs, lab.ts, lab.css |
| 3 | Router names linked to the topology (opt-in with @) |
Custom: rehype-lab-topology.mjs, lab.ts |
| 4 | Topology follows the text while scrolling | Custom: lab.ts |
| 5 | Layer buttons, selecting a router | Custom: lab.ts + hand-made SVG |
| 6 | EOS syntax highlighting | Custom grammar: grammars/eos.tmLanguage.json |
| 7 | Code block titles, copy button | Package: Expressive Code |
| 8 | Notes next to code lines | Package: starlight-codeblocks |
| 9 | Notes button “shown / on hover” | Custom: notes.ts, notes.css |
| 10 | Note bubble pointing at one word | Package: starlight-codeblocks |
| 11 | Prose links that highlight code lines | Package: starlight-codeblocks |
| 12 | Underlined token with a hover note in output | Package: starlight-codeblocks |
| 13 | Long output collapsed with “expand” | Package: starlight-codeblocks |
| 14 | Light/dark switch (◐, top right) | Custom: Header.astro, global.css |
| 15 | Underlined tokens in three severities (error / warning / info) | Package: starlight-codeblocks |
| 16 | Several notes on one line; notes that span several lines | Package: starlight-codeblocks (+ two custom colors in astro.config.mjs) |
| 17 | Notes that refer to a range of lines (ranges may overlap) | Custom: remark-code-extras.mjs, notes.ts |
| 18 | Margin notes from Markdown footnotes | Custom: layout.ts, layout.css |
| 19 | Floating table of contents; page layout with topology, contents and margin notes | Custom: layout.ts, layout.css |
| 20 | Math (LaTeX syntax → MathML, no JavaScript) | Package: temml, remark-math; custom: remark-temml.mjs |
| 21 | Code blocks: line numbers, collapsible sections, wrap hints | Package: Expressive Code plugins; custom: wrap hints in notes.css |
The text comes from the original article. These parts were added for this article and are not in the original:
- All note texts inside code blocks and all note bubbles.
- The
###subheadings in the lab section are new. They exist so the page has places for the topology to switch focus. - Small wording changes: “This route reflector
rr1gets…” (addedrr1), “Forfoh” (was “For FOH”), and backticks around router names in a few sentences. - Router names in the prose start with
@in the Markdown (Demo 3). - “Let’s look at the RR config first” became “Let’s look at the RR config”, because the order of the blocks reads that way.
- The margin notes (footnotes). Note 3 is filler text to test a very long note.
- The formulas under Demo 20 and the text around them.
- The code blocks under Demo 15, Demo 16 and Demo 17, put together from the article’s configs (the faulty
remote-asis deliberate).
The Contents button lists the headings of the page and marks the section you are reading. Click it to hide the list; it stays hidden on your next visit. It is always possible to hide it.
Where things go on a wide screen (1200 px or more):
- Topology right (default): contents on the left, text, topology on the right with the notes below the diagram. Topology left: mirrored. Topology top: contents left, margin notes right. Topology hidden: margin notes on the side where the topology was.
- Not enough room for everything: first the text narrows (down to 640 px). Then, for left/right only, the contents and the topology cannot both be open: the one you opened last stays, the other one collapses to its button or handle at the screen edge. Open that one again and it wins. Without an open topology, margin notes that do not fit become numbers with a bubble. In top mode the topology never pushes the contents away.
- Who gets freed space: closing the contents gives the room to the lab text (up to 792 px) and then all of it to the topology (up to 1100 px). Margin notes never take width from an open topology.
- Very wide screen: everything open at once; the contents can still be hidden.
- Long contents: all main sections stay listed; subsections only unfold along the path to the section you are reading. Try the separate test page with 96 headings: Test: long table of contents.
- Phone: a Contents button at the bottom left opens the list above it.
To try the widths, zoom the browser: Ctrl + - makes the page think the screen is wider (67 % zoom on a 1600 px screen ≈ 2390 px), Ctrl + + narrower, Ctrl + 0 back.
The page text is 910 px at most. Next to an open topology, the text of a lab section stays at 792 px at most, so the wider page text never takes room from the topology. The page text is centred and never moves while you scroll. Only a lab section has its own position: its text moves as far towards the contents as they allow, so the topology gets the most room (with the contents open, the lab text stays aligned with the page and gets narrower instead). That position is fixed up front, so nothing slides while you scroll; it only changes when you open or close the contents or the topology.
Source: custom (src/scripts/layout.ts, src/styles/layout.css).
Example topology: OSPF + iBGP with Route Reflector + eBGP
The red box below is an Obsidian callout: > [!error].
Syntax: a blockquote starting with > [!error] Title. Obsidian renders the same syntax natively, so the file looks the same in your vault.
Types: note, info, tip, warning, error, example, and more. These Demo boxes are [!example].
Source: package rehype-callouts with its Obsidian theme.
Due to a bug in the OSPF unnumbered ECMP logic in Arista EOS (at least in versions 4.34.3M and 4.35.0F), we are setting maximum-paths 1 on the OSPF configuration. For more details, check my blog article The curious case of an OSPF unnumbered ECMP bug in Arista EOS.
From the topology image down to the end marker <!-- /lab --> (just above “After the lab”), the page is a lab section. Without a marker it would run to the next topology image or the end of the post; headings play no part.
- Wide screen (1200 px or more): the three layout buttons in the topology’s top bar put it on the left, on top, or on the right (default).
- Left / right: two columns; the topology stays pinned while you scroll. A “Topology” handle sits in the middle of the panel edge that faces the text. Click it to hide the panel: the handle moves to the screen edge (vertically centred), the text slides back to the middle, and the chevron flips. Click the handle there to bring the panel back.
- Topology width: drag the edge of the topology container that faces the text (diagram and notes card; the edge lights up on hover, the cursor changes). The lab text gives way down to 640 px. Double-click the edge for the automatic width again. With the keyboard: Tab to the edge, arrow keys change the width,
Homeresets it. The width is remembered across visits (one value for all topologies). - Top: once the start of the section has scrolled past, a small “Topology” tab hangs from the top edge of the window. Click it to drop the diagram down over the text; the layout buttons (and “Selected: …” when you have selected a router) are inside that dropdown, and the tab itself never moves. Click the tab again or press Escape to fold it away. It covers the text instead of pushing it down, so the page does not jump while you read.
- Narrow screen / phone: one column. A “Topology” button at the bottom right opens the topology as a drawer from the bottom. The diagram in the drawer is at least 640 px wide; swipe sideways to pan. “Close” or Escape closes it.
- Without JavaScript: the topology is a normal image in the text.
- The page remembers the position (left/top/right) across visits. Hidden/shown and folded/unfolded only last until you close the browser tab; a new visit starts with the default again.
Syntax: one image line below a heading, with the title "lab":

Obsidian ignores the title and shows a normal image.
The title also sets this topology’s defaults: "lab" is right and shown. Add a position (left, top, right) and/or a state (shown, hidden), e.g. "lab left", "lab right hidden", "lab top shown". Left/right start shown unless hidden; top starts folded unless shown. Unknown words print a [lab-topology] build warning. What the reader changes is remembered per topology (the position across visits, hidden/folded only for the browser tab), so each topology keeps your default until the reader changes that one.
Source: custom (src/plugins/rehype-lab-topology.mjs, src/scripts/lab.ts, src/styles/lab.css).
Caveat: the SVG is a stand-in, generated from the router positions of the article’s draw.io drawing, with simpler icons. A real post would use a draw.io SVG export with the attributes described in the README.
In this example, we modify the previous example by introducing a Route Reflector (RR)1 to avoid a full mesh iBGP configuration. We will use a single, separate Route Reflector (do not do this at home)2 server for simplicity, but in production you would want to have at least two RRs for redundancy.
The small numbers 1 and 2 in the paragraph above are notes. Where they show depends on the topology:
- Topology open (left/right): the topology keeps all its width. The notes of the lines on screen are listed in a separate Notes card below the topology panel; the list changes as you scroll and scrolls by itself when it is longer than the space. Hovering a number or a note highlights both.
- Topology hidden, topology on top, or outside a lab section: the note sits in the margin next to its line.
- Not enough room (or a phone): the number stays in the text and the note opens in a bubble when you hover or tap it.
Note 3 (in the paragraph after this box) is deliberately very long, to test scrolling: the notes card below the topology scrolls on its own, without scrolling the page. There is one more note further down, in the Originator ID paragraph.
To see them move: hide the topology with its handle (the notes go to the margin), open it again (they go below the diagram), or switch to top mode.
Syntax: normal Markdown footnotes: [^rfc] in the text and [^rfc]: Note text anywhere in the file (here: at the end). Obsidian shows them natively. Without JavaScript they are the usual numbered list at the end of the page.
Source: custom (src/scripts/layout.ts, src/styles/layout.css).
This route reflector rr1 gets the loopback 10.10.0.1 and is part of the OSPF unnumbered network like all other routers. All other routers peer with the RR via iBGP.3
In the paragraph above, the router name has a dotted orange underline; the loopback next to it does not. Only the name is linked, because only the name was marked in the Markdown.
- Hover a linked name: the router shows in blue in the topology while the mouse is on it.
- Click it (or Enter): the router stays selected, in blue, the name gets a blue background, and the topology’s top bar says “Selected: …”. Click again to release. Clicking another name moves the selection.
- Phone: tapping a name opens the drawer with that router selected.
Syntax: `@rr1` instead of `rr1`. The site removes the @. Router names and loopbacks (`@10.1.0.1`, with or without /32) work. A name that is not in the topology is reported as a build warning. Without @, nothing is linked. In Obsidian the @ stays visible, so it reads like a mention.
Source: custom (rehype-lab-topology.mjs at build time, lab.ts in the browser). The names come from data-node and data-ip attributes in the SVG.
Caveat: a draw.io export would need these attributes too. In draw.io they would be set as shape properties; how they appear in an export is not verified yet.
Scroll slowly. The router that the text at about 40 % of the window height talks about is highlighted in orange in the topology, with its links and BGP sessions. The names in the text do not change color; only the diagram does.
How the page decides:
- Code block: only if its title starts with
@:title="@rr1: show ip bgp"(the site removes the@). The router name is the first word after it. Such a title also gets the orange underline and can be hovered and clicked like a name in the text. The CLI prompt inside the code does not count. The Demo 15 and 16 blocks have titles without@, so they do not change the highlight. - Paragraph: the linked names (
@) in it. - Paragraph without names: keeps the router of the block before it, until the next heading.
A router you select (blue, Demo 3 and 5) wins over the orange one until you release it. The “Follow text” button turns following off; the page remembers that.
Source: custom (lab.ts).
- “Physical links” / “iBGP sessions” / “eBGP sessions” above the diagram hide or show each layer (a chip only appears if the drawing has that kind). Solid grey lines are cables (with their speed); green dashed lines are iBGP sessions to the RR; the pink dashed line is the eBGP session to the broadcast truck.
- Click a router in the diagram (or focus it with Tab and press Enter) to select it (blue). Click it again to release.
Source: custom (lab.ts), with the layers drawn as separate groups in the SVG.
Caveat: the BGP session layer is drawn by hand; the Containerlab topology only describes cables. In a real post, draw the sessions in draw.io on their own layer.
The client side: stage-center
6. EOS highlighting: section starts (router bgp, address-family), commands, addresses, interfaces and ! comments get their own colors. In show output further down: the CLI prompt, route status codes, best/Estab in green, Not best: … in red, Or-ID/C-LST. Fence: ```eos. Source: custom grammar (grammars/eos.tmLanguage.json), loaded into Expressive Code. It is written for this site because the existing VS Code grammar for EOS has no license.
7. Title and copy button: the tab with the router name comes from title="@stage-center" on the fence line (the @ links it to the topology, see Demo 4). Hover the block for the copy button: it copies the plain config, without notes and numbers. Source: package (Expressive Code). Next to it, also only on hover: a line wrap button that wraps long lines of that block (and unwraps them again); useful for long show output on narrow screens. Source: custom (src/scripts/codewrap.ts).
8. Notes next to the lines: the numbered markers and the notes beside the code. Hover a note to highlight its line, and the other way round; click to keep the highlight. If the column is too narrow, the notes become a list under the block (like the foh block further down). Syntax: ! [!annotate] Note text at the end of a line. Every code block with notes gets this style automatically (one rule for all code notes; the build adds the package’s annotations="side"). Source: package (starlight-codeblocks), the automatic rule is custom (remark-code-extras.mjs).
9. Notes button: the speech-bubble button next to the copy button (top right of the code). It switches between shown (notes beside or under the code) and on hover (bubble crossed out): the notes are hidden, and hovering a number shows its note as a bubble with an arrow pointing at the number. It disappears when the mouse leaves; nothing stays open. On a phone, tap a number. The choice applies to all blocks on all pages and is remembered in your browser. Source: custom (notes.ts, notes.css).
For a note that should always be visible as a bubble, the author uses an inline callout instead (Demo 10).
Let’s look at the configs and take stage-center as an example again:
router bgp 64496 router-id 10.2.0.1 no bgp default ipv4-unicast maximum-paths 8 neighbor rr peer group neighbor rr remote-as 64496 neighbor rr update-source Loopback1 neighbor 10.10.0.1 peer group rr ! address-family ipv4 neighbor rr activate- Note 1, for line 2: The loopback of
stage-center. The RR uses it as Originator ID when it reflects routes from here. - Note 2, for line 5: One peer group for the RR replaces the peer group with seven iBGP peers.
- Note 3, for line 6: Same AS, so this is still iBGP.
- Note 4, for line 8: The only BGP neighbor: the loopback of
rr1.
As you can see, the config has become much simpler. We have got rid of all the iBGP peers and replaced them with a single RR peer group.
The block below is the same client config with one deliberate mistake. Three words are underlined with a wavy line, in three colors:
- Red (error):
64499 - Yellow (warning): the RR neighbor address
- Blue (info): the peer group name
rr
Hover or Tab to an underlined word: the message opens, starting with the severity. Several underlines can be on the same line.
Syntax: one line per underline, directly above the code line: ! [!error /64499/] Message, ! [!warning /text/] Message, ! [!info /text/] Message. The text between the slashes picks the word.
Source: package (starlight-codeblocks, “squiggles”). There are exactly these three severities; their colors can be changed in the config, but there are no extra severities.
router bgp 64496 router-id 10.2.0.1 neighbor rr (Info: The peer group name. Any name works; it only has to be the same on all neighbor rr lines.)InfoThe peer group name. Any name works; it only has to be the same on all neighbor rr lines. peer group neighbor rr remote-as 64499 (Error: Wrong AS: rr1 is in AS 64496. With 64499 this becomes an eBGP session, not the iBGP session the RR design needs.)ErrorWrong AS: rr1 is in AS 64496. With 64499 this becomes an eBGP session, not the iBGP session the RR design needs. neighbor rr update-source Loopback1 neighbor 10.10.0.1 (Warning: The only route reflector. If rr1 fails, this router loses all iBGP routes. Use at least two RRs in production.)WarningThe only route reflector. If rr1 fails, this router loses all iBGP routes. Use at least two RRs in production. peer group rr- Line 3, info: The peer group name. Any name works; it only has to be the same on all
neighbor rrlines. - Line 4, error: Wrong AS:
rr1is in AS 64496. With 64499 this becomes an eBGP session, not the iBGP session the RR design needs. - Line 6, warning: The only route reflector. If
rr1fails, this router loses all iBGP routes. Use at least two RRs in production.
Several notes on one line: in the block below, the neighbor rr peer group line has two numbered notes (1 and 2). Write ! [!annotate] first note [!annotate] second note at the end of the line: each [!annotate] adds one marker. Bubbles ([!callout]) and footnotes ([!ref]) also stack when you put two directive lines above the same line.
Notes that span several lines: the blue band marks the four BGP lines with the label “BGP”, the purple band the two OSPF lines with “OSPF”. Syntax: ! [!code bgp:4] Message at the end of the first line; the number is how many lines the band covers. bgp and ospf are two custom colors defined in astro.config.mjs (lineStates.states); built-in ones are error, warning, info, success.
Overlapping spans do not work. If a second band starts inside the first, its label shows, but the lines keep the color of the first band, so the reader cannot see where the second one ends. Expressive Code’s labeled line ranges ({"1":1-3} {"2":2-5}) have the same problem: overlapping ranges merge. Real overlapping, nested spans would need custom code, for example brackets in the left margin, one lane per span.
Source: package (starlight-codeblocks: annotations and line states).
BGP:router bgp 64496BGP iBGP to the RRBGP: router-id 10.2.0.1BGP: neighbor rr peer groupBGP: neighbor 10.10.0.1 peer group rrOSPF:router ospf 1OSPF OSPF only carries the loopbacksOSPF: network 10.2.0.1/32 area 0.0.0.0- Note 1, for line 3: Creates the peer group.
- Note 2, for line 3: All settings on the
neighbor rrlines apply to every member.
The route reflector: rr1
10. Note bubble on one word: the bubble with the arrow pointing at route-reflector-client. It is always visible, needs no JavaScript, and is not copied. Syntax: a line ! [!callout /route-reflector-client/] Text directly above the target line; the text between the slashes picks the word. Source: package (starlight-codeblocks).
11. Prose links that highlight code lines: in the two paragraphs after the block, “all other routers” and the neighbor ibgp-peers route-reflector-client link are dotted links. Hover or click one: the matching lines in the block light up. Syntax: ! [!mention clients] at the end of each line in the block, and [all other routers](#mention:clients) in the text. Source: package (starlight-codeblocks).
Let’s look at the RR config:
router bgp 64496 router-id 10.10.0.1 no bgp default ipv4-unicast maximum-paths 8 neighbor ibgp-peers peer group neighbor ibgp-peers remote-as 64496 neighbor ibgp-peers update-source Loopback1Turns every member of the peer group into an RR client. neighbor ibgp-peers route-reflector-client neighbor 10.1.0.1 peer group ibgp-peers neighbor 10.2.0.1 peer group ibgp-peers neighbor 10.3.0.1 peer group ibgp-peers neighbor 10.4.0.1 peer group ibgp-peers neighbor 10.5.0.1 peer group ibgp-peers neighbor 10.6.0.1 peer group ibgp-peers neighbor 10.7.0.1 peer group ibgp-peers neighbor 10.8.0.1 peer group ibgp-peers ! address-family ipv4 neighbor ibgp-peers activateAs you can see, the RR peers with all other routers via iBGP and is configured as route-reflector for the ibgp-peers peer group.
The important part is the neighbor ibgp-peers route-reflector-client line. This tells the RR that all peers in the ibgp-peers peer group are route-reflector clients. Therefore, the RR will reflect routes between these clients.
Each note in the block below covers several lines. Hover or focus a note, or its number, and its lines are highlighted. In “on hover” mode (Demo 9), hovering a number shows the bubble and highlights the range at the same time.
The ranges overlap on purpose: note 1 covers the four peer-group lines, note 2 the route-reflector-client line plus the eight members below it, note 3 only the eight members. Only one range is highlighted at a time, so the overlap is no problem.
Syntax: ! [!annotate:4] Note text at the end of the first line of the range. The number is how many code lines the note covers, counted from its own line (same convention as [!code bgp:4] in Demo 16).
Source: custom (src/plugins/remark-code-extras.mjs turns [!annotate:4] into a normal note before the package sees it and records the range; src/scripts/notes.ts highlights it). The package itself only knows notes for one line.
router bgp 64496 router-id 10.10.0.1 neighbor ibgp-peers peer group neighbor ibgp-peers remote-as 64496 neighbor ibgp-peers update-source Loopback1 neighbor ibgp-peers route-reflector-client neighbor 10.1.0.1 peer group ibgp-peers neighbor 10.2.0.1 peer group ibgp-peers neighbor 10.3.0.1 peer group ibgp-peers neighbor 10.4.0.1 peer group ibgp-peers neighbor 10.5.0.1 peer group ibgp-peers neighbor 10.6.0.1 peer group ibgp-peers neighbor 10.7.0.1 peer group ibgp-peers neighbor 10.8.0.1 peer group ibgp-peers ! address-family ipv4 neighbor ibgp-peers activate- Note 1, for line 3: The peer group: these four lines apply to every member.
- Note 2, for line 6: Makes every member an RR client: this line and the eight members below.
- Note 3, for line 7: The eight clients: every router in the OSPF area except the RR itself.
Next-hop handling on foh
For foh, I have made a little change for the sake of demonstration:
Same syntax as the stage-center block, but this block has longer lines. There is no room for a notes column, so the notes appear as a numbered list under the block. The package picks this automatically from the longest line.
route-map NEXT-HOP-SELF-FOR-EBGP permit 10 match route-type external set ip next-hop 10.1.0.1
router bgp 64496 router-id 10.1.0.1 ... ! address-family ipv4 ... neighbor rr activate neighbor rr route-map NEXT-HOP-SELF-FOR-EBGP out- Note 1, for line 2: Only routes learned via eBGP, i.e. from
broadcast-truck. - Note 2, for line 3: The loopback of
foh. Every iBGP router can reach it through OSPF. - Note 3, for line 12: Applied towards the RR only. The RR then reflects the rewritten next-hop to all clients.
Instead of using next-hop-self, we are using a route-map to set the next-hop for all external routes (eBGP routes) to foh itself (10.1.0.1) when they are sent out to the Route Reflector. This is just to demonstrate that there are multiple ways to achieve the same goal.
What the RR sees
Let’s look at the RR:
- Line numbers on every code block (except shell/plain text blocks). They are not copied by the copy button, and selecting the code by hand does not select them either.
- Collapsible section: in the next block, the legend (lines 2–9) is folded into a bar that says how many lines are hidden. Click the bar to unfold it in place, click again to fold it. Syntax:
collapse={2-9}on the fence line; several ranges work too (collapse={2-9, 20-30}). - Wrap hints: switch on line wrapping with the wrap button (top right of a code block, on hover). Every continuation row then gets a small ↪ in the line-number column, and continued lines keep their indentation. Try it on the long
broadcast-truckoutput at the end of the lab.
Source: packages @expressive-code/plugin-line-numbers and @expressive-code/plugin-collapsible-sections (as in astro-erudite v2); the wrap hints are custom (notes.css).
In the block below, the next-hop in the third route line has a wavy underline. Hover or focus it to see the note. This marks one token without adding a line to the output.
Syntax: a line ! [!info /10.1.0.1/] Text directly above the line. [!warning …] and [!error …] exist too, with yellow and red underlines.
Source: package (starlight-codeblocks, it calls these “squiggles”).
Also in the next blocks: one more numbered note (on “Advertised to 7 peers”) and one more bubble (on C-LST).
rr1>show ip bgp8 collapsed lines
BGP routing table information for VRF defaultRouter identifier 10.10.0.1, local AS number 64496Route status codes: s - suppressed contributor, * - valid, > - active, E - ECMP head, e - ECMP S - Stale, c - Contributing to ECMP, b - backup, L - labeled-unicast, q - Pending FIB install % - Pending best path selectionOrigin codes: i - IGP, e - EGP, ? - incompleteRPKI Origin Validation codes: V - valid, I - invalid, U - unknownAS Path Attributes: Or-ID - Originator ID, C-LST - Cluster List, LL Nexthop - Link Local Nexthop
Network Next Hop Metric AIGP LocPref Weight Path * > 10.3.10.0/24 10.3.0.1 0 - 100 0 i * > 10.8.10.0/24 10.8.0.1 0 - 100 0 i * > 10.9.0.1/32 10.1.0.1 (Info: Next-hop rewritten by the route-map on foh.)InfoNext-hop rewritten by the route-map on foh. 0 - 100 0 64497 i * > 10.9.10.0/24 10.1.0.1 0 - 100 0 64497 i- Line 14, info: Next-hop rewritten by the route-map on
foh.
Here we can see that the RR has learned all routes from the clients, both the internal ones and the external ones from broadcast-truck. The next-hop for the external routes is correctly set to foh (10.1.0.1).
Looking at one of the routes in more detail:
rr1>show ip bgp 10.9.10.0/24 detailBGP routing table information for VRF defaultRouter identifier 10.10.0.1, local AS number 64496BGP routing table entry for 10.9.10.0/24 Paths: 1 available 64497 (Received from a RR-client) 10.1.0.1 from 10.1.0.1 (10.1.0.1) Origin IGP, metric 0, localpref 100, IGP metric 18, weight 0, tag 0 Received 00:56:49 ago, valid, internal, best Rx SAFI: Unicast Advertised to 7 peers: peer-group ibgp-peers: 10.2.0.1 10.3.0.1 10.4.0.1 10.5.0.1 10.6.0.1 10.7.0.1 10.8.0.1- Note 1, for line 11: Seven, not eight: the RR does not send the route back to
foh, where it came from.
We can also see that it’s reflected / advertised to all peers, except 10.1.0.1, which is the original client (foh).
rr1>show ip bgp sumBGP summary information for VRF defaultRouter identifier 10.10.0.1, local AS number 64496Neighbor Status Codes: m - Under maintenance Neighbor V AS MsgRcvd MsgSent InQ OutQ Up/Down State PfxRcd PfxAcc PfxAdv 10.1.0.1 4 64496 70 71 0 0 00:55:35 Estab 2 2 2 10.2.0.1 4 64496 70 71 0 0 00:55:32 Estab 0 0 4 10.3.0.1 4 64496 70 70 0 0 00:55:30 Estab 1 1 3 10.4.0.1 4 64496 68 72 0 0 00:55:31 Estab 0 0 4 10.5.0.1 4 64496 69 72 0 0 00:55:30 Estab 0 0 4 10.6.0.1 4 64496 70 73 0 0 00:55:34 Estab 0 0 4 10.7.0.1 4 64496 69 72 0 0 00:55:29 Estab 0 0 4 10.8.0.1 4 64496 70 70 0 0 00:55:31 Estab 1 1 3We can see that all iBGP peers are established with the RR.
What the clients see
Now let’s look at stage-center again:
stage-center>show ip bgp sumBGP summary information for VRF defaultRouter identifier 10.2.0.1, local AS number 64496Neighbor Status Codes: m - Under maintenance Neighbor V AS MsgRcvd MsgSent InQ OutQ Up/Down State PfxRcd PfxAcc PfxAdv 10.10.0.1 4 64496 76 74 0 0 00:59:13 Estab 4 4 0It only has one neighbour - the RR.
stage-center>show ip bgpBGP routing table information for VRF defaultRouter identifier 10.2.0.1, local AS number 64496Route status codes: s - suppressed contributor, * - valid, > - active, E - ECMP head, e - ECMP S - Stale, c - Contributing to ECMP, b - backup, L - labeled-unicast, q - Pending FIB install % - Pending best path selectionOrigin codes: i - IGP, e - EGP, ? - incompleteRPKI Origin Validation codes: V - valid, I - invalid, U - unknownAS Path Attributes: Or-ID - Originator ID, C-LST - Cluster List, LL Nexthop - Link Local Nexthop
Network Next Hop Metric AIGP LocPref Weight Path * > 10.3.10.0/24 10.3.0.1 0 - 100 0 i Or-ID: 10.3.0.1 C-LST: 10.10.0.1 * > 10.8.10.0/24 10.8.0.1 0 - 100 0 i Or-ID: 10.8.0.1 C-LST: 10.10.0.1 * > 10.9.0.1/32 10.1.0.1 0 - 100 0 64497 i Or-ID: 10.1.0.1 C-LST: 10.10.0.1The RRs this route passed through: only rr1. * > 10.9.10.0/24 10.1.0.1 0 - 100 0 64497 i Or-ID: 10.1.0.1 C-LST: 10.10.0.1We can see that stage-center has learned all routes via the RR, with the correct next-hops. We also see two new fields: Or-ID (Originator ID) and C-LST (Cluster List). These are used by the RR to prevent routing loops.
The Originator ID is the router ID of the original advertiser of the route, and the Cluster List is a list of RRs that have processed the route.4
iBGP Route Reflectors violate the iBGP split-horizon rule, which states that iBGP learned routes should not be advertised to other iBGP peers. Therefore, the Originator ID is introduced to identify the original source of the route. If a client receives a route with its own router ID as the Originator ID, it knows that it is the original source and will not process the route again.
If a RR sees its own router ID in the Cluster List, it knows that it has already processed the route and will not reflect it again.
The question as to whether in scenarios with multiple Route Reflectors the Cluster-ID of each RR should be identical or unique cannot be answered definitively. It depends…
stage-right and broadcast-truck
Finally, let’s look at stage-right and broadcast-truck:
Both blocks below are cut off with a fade and an “expand” button. The show ip route bgp legend (about 20 lines nobody reads) is hidden after line 3; the 70-line broadcast-truck table after line 16. The copy button still copies everything.
Syntax: expandable={3} on the fence line (the number of lines shown).
Source: package (starlight-codeblocks).
stage-right>show ip route bgp
VRF: defaultSource Codes: C - connected, S - static, K - kernel, O - OSPF, O IA - OSPF inter area, O E1 - OSPF external type 1, O E2 - OSPF external type 2, O N1 - OSPF NSSA external type 1, O N2 - OSPF NSSA external type2, O3 - OSPFv3, O3 IA - OSPFv3 inter area, O3 E1 - OSPFv3 external type 1, O3 E2 - OSPFv3 external type 2, O3 N1 - OSPFv3 NSSA external type 1, O3 N2 - OSPFv3 NSSA external type2, B - Other BGP Routes, B I - iBGP, B E - eBGP, R - RIP, I L1 - IS-IS level 1, I L2 - IS-IS level 2, A B - BGP Aggregate, A O - OSPF Summary, NG - Nexthop Group Static Route, V - VXLAN Control Service, M - Martian, DH - DHCP client installed default route, DP - Dynamic Policy Route, L - VRF Leaked, G - gRIBI, RC - Route Cache Route, CL - CBF Leaked Route
B I 10.3.10.0/24 [200/0] via 10.2.0.1, Ethernet3 B I 10.8.10.0/24 [200/0] via 10.6.0.1, Ethernet1 B I 10.9.0.1/32 [200/0] via 10.2.0.1, Ethernet3 B I 10.9.10.0/24 [200/0] via 10.2.0.1, Ethernet3All routes are there with resolved next-hops. Nice!
In broadcast-truck the output is a bit longer, because everything is ECMP’d:
broadcast-truck>show ip bgpBGP routing table information for VRF defaultRouter identifier 10.9.0.1, local AS number 64497Route status codes: s - suppressed contributor, * - valid, > - active, E - ECMP head, e - ECMP S - Stale, c - Contributing to ECMP, b - backup, L - labeled-unicast, q - Pending FIB install % - Pending best path selectionOrigin codes: i - IGP, e - EGP, ? - incompleteRPKI Origin Validation codes: V - valid, I - invalid, U - unknownAS Path Attributes: Or-ID - Originator ID, C-LST - Cluster List, LL Nexthop - Link Local Nexthop
Network Next Hop Metric AIGP LocPref Weight Path * >Ec 10.1.0.1/32 fe80::a8c1:abff:fef9:2e09%Et4 0 - 100 0 64496 i * ec 10.1.0.1/32 fe80::a8c1:abff:fe3d:e982%Et1 0 - 100 0 64496 i * ec 10.1.0.1/32 fe80::a8c1:abff:fe76:2007%Et5 0 - 100 0 64496 i * ec 10.1.0.1/32 fe80::a8c1:abff:fe7c:dafd%Et3 0 - 100 0 64496 i * ec 10.1.0.1/32 fe80::a8c1:abff:feb1:b6c1%Et2 0 - 100 0 64496 i * ec 10.1.0.1/32 fe80::a8c1:abff:fe8d:e6f%Et6 0 - 100 0 64496 i * >Ec 10.2.0.1/32 fe80::a8c1:abff:fe76:2007%Et5 0 - 100 0 64496 i * ec 10.2.0.1/32 fe80::a8c1:abff:fef9:2e09%Et4 0 - 100 0 64496 i * ec 10.2.0.1/32 fe80::a8c1:abff:fe8d:e6f%Et6 0 - 100 0 64496 i * ec 10.2.0.1/32 fe80::a8c1:abff:feb1:b6c1%Et2 0 - 100 0 64496 i * ec 10.2.0.1/32 fe80::a8c1:abff:fe7c:dafd%Et3 0 - 100 0 64496 i * ec 10.2.0.1/32 fe80::a8c1:abff:fe3d:e982%Et1 0 - 100 0 64496 i * >Ec 10.3.0.1/32 fe80::a8c1:abff:fe76:2007%Et5 0 - 100 0 64496 i * ec 10.3.0.1/32 fe80::a8c1:abff:fef9:2e09%Et4 0 - 100 0 64496 i * ec 10.3.0.1/32 fe80::a8c1:abff:fe8d:e6f%Et6 0 - 100 0 64496 i * ec 10.3.0.1/32 fe80::a8c1:abff:feb1:b6c1%Et2 0 - 100 0 64496 i * ec 10.3.0.1/32 fe80::a8c1:abff:fe7c:dafd%Et3 0 - 100 0 64496 i * ec 10.3.0.1/32 fe80::a8c1:abff:fe3d:e982%Et1 0 - 100 0 64496 i * >Ec 10.3.10.0/24 fe80::a8c1:abff:fe76:2007%Et5 0 - 100 0 64496 i * ec 10.3.10.0/24 fe80::a8c1:abff:fef9:2e09%Et4 0 - 100 0 64496 i * ec 10.3.10.0/24 fe80::a8c1:abff:fe8d:e6f%Et6 0 - 100 0 64496 i * ec 10.3.10.0/24 fe80::a8c1:abff:feb1:b6c1%Et2 0 - 100 0 64496 i * ec 10.3.10.0/24 fe80::a8c1:abff:fe7c:dafd%Et3 0 - 100 0 64496 i * ec 10.3.10.0/24 fe80::a8c1:abff:fe3d:e982%Et1 0 - 100 0 64496 i * >Ec 10.4.0.1/32 fe80::a8c1:abff:fe76:2007%Et5 0 - 100 0 64496 i * ec 10.4.0.1/32 fe80::a8c1:abff:fef9:2e09%Et4 0 - 100 0 64496 i * ec 10.4.0.1/32 fe80::a8c1:abff:fe8d:e6f%Et6 0 - 100 0 64496 i * ec 10.4.0.1/32 fe80::a8c1:abff:feb1:b6c1%Et2 0 - 100 0 64496 i * ec 10.4.0.1/32 fe80::a8c1:abff:fe7c:dafd%Et3 0 - 100 0 64496 i * ec 10.4.0.1/32 fe80::a8c1:abff:fe3d:e982%Et1 0 - 100 0 64496 i * >Ec 10.5.0.1/32 fe80::a8c1:abff:fe76:2007%Et5 0 - 100 0 64496 i * ec 10.5.0.1/32 fe80::a8c1:abff:fef9:2e09%Et4 0 - 100 0 64496 i * ec 10.5.0.1/32 fe80::a8c1:abff:fe8d:e6f%Et6 0 - 100 0 64496 i * ec 10.5.0.1/32 fe80::a8c1:abff:feb1:b6c1%Et2 0 - 100 0 64496 i * ec 10.5.0.1/32 fe80::a8c1:abff:fe7c:dafd%Et3 0 - 100 0 64496 i * ec 10.5.0.1/32 fe80::a8c1:abff:fe3d:e982%Et1 0 - 100 0 64496 i * >Ec 10.6.0.1/32 fe80::a8c1:abff:fe76:2007%Et5 0 - 100 0 64496 i * ec 10.6.0.1/32 fe80::a8c1:abff:fef9:2e09%Et4 0 - 100 0 64496 i * ec 10.6.0.1/32 fe80::a8c1:abff:fe8d:e6f%Et6 0 - 100 0 64496 i * ec 10.6.0.1/32 fe80::a8c1:abff:feb1:b6c1%Et2 0 - 100 0 64496 i * ec 10.6.0.1/32 fe80::a8c1:abff:fe7c:dafd%Et3 0 - 100 0 64496 i * ec 10.6.0.1/32 fe80::a8c1:abff:fe3d:e982%Et1 0 - 100 0 64496 i * >Ec 10.7.0.1/32 fe80::a8c1:abff:fe76:2007%Et5 0 - 100 0 64496 i * ec 10.7.0.1/32 fe80::a8c1:abff:fef9:2e09%Et4 0 - 100 0 64496 i * ec 10.7.0.1/32 fe80::a8c1:abff:fe8d:e6f%Et6 0 - 100 0 64496 i * ec 10.7.0.1/32 fe80::a8c1:abff:feb1:b6c1%Et2 0 - 100 0 64496 i * ec 10.7.0.1/32 fe80::a8c1:abff:fe7c:dafd%Et3 0 - 100 0 64496 i * ec 10.7.0.1/32 fe80::a8c1:abff:fe3d:e982%Et1 0 - 100 0 64496 i * >Ec 10.8.0.1/32 fe80::a8c1:abff:fe76:2007%Et5 0 - 100 0 64496 i * ec 10.8.0.1/32 fe80::a8c1:abff:fef9:2e09%Et4 0 - 100 0 64496 i * ec 10.8.0.1/32 fe80::a8c1:abff:fe8d:e6f%Et6 0 - 100 0 64496 i * ec 10.8.0.1/32 fe80::a8c1:abff:feb1:b6c1%Et2 0 - 100 0 64496 i * ec 10.8.0.1/32 fe80::a8c1:abff:fe7c:dafd%Et3 0 - 100 0 64496 i * ec 10.8.0.1/32 fe80::a8c1:abff:fe3d:e982%Et1 0 - 100 0 64496 i * >Ec 10.8.10.0/24 fe80::a8c1:abff:fe76:2007%Et5 0 - 100 0 64496 i * ec 10.8.10.0/24 fe80::a8c1:abff:fe3d:e982%Et1 0 - 100 0 64496 i * ec 10.8.10.0/24 fe80::a8c1:abff:feb1:b6c1%Et2 0 - 100 0 64496 i * ec 10.8.10.0/24 fe80::a8c1:abff:fe8d:e6f%Et6 0 - 100 0 64496 i * ec 10.8.10.0/24 fe80::a8c1:abff:fe7c:dafd%Et3 0 - 100 0 64496 i * ec 10.8.10.0/24 fe80::a8c1:abff:fef9:2e09%Et4 0 - 100 0 64496 i * > 10.9.0.1/32 - - - - 0 i * > 10.9.10.0/24 - - - - 0 i * >Ec 10.10.0.1/32 fe80::a8c1:abff:fe76:2007%Et5 0 - 100 0 64496 i * ec 10.10.0.1/32 fe80::a8c1:abff:fef9:2e09%Et4 0 - 100 0 64496 i * ec 10.10.0.1/32 fe80::a8c1:abff:fe8d:e6f%Et6 0 - 100 0 64496 i * ec 10.10.0.1/32 fe80::a8c1:abff:feb1:b6c1%Et2 0 - 100 0 64496 i * ec 10.10.0.1/32 fe80::a8c1:abff:fe7c:dafd%Et3 0 - 100 0 64496 i * ec 10.10.0.1/32 fe80::a8c1:abff:fe3d:e982%Et1 0 - 100 0 64496 iAfter the lab
Formulas are written in LaTeX syntax, exactly as Obsidian renders them: $…$ inside a sentence, $$…$$ on their own lines for a centred formula. The build turns them into MathML, which browsers display natively: no JavaScript, no extra stylesheet, screen readers can read it, and the colour follows light/dark mode. Font: STIX Two Math. Long formulas scroll sideways instead of breaking the layout.
Source: package temml (LaTeX → MathML) and remark-math (recognises $…$), custom src/plugins/remark-temml.mjs connecting them. Temml supports most of LaTeX math, but not every KaTeX-only extension: supported functions. A command Temml does not know shows up in red instead of breaking the build.
Why route reflectors scale better: with iBGP routers, a full mesh needs
sessions, while a single route reflector needs only . For the routers of this lab that is versus ; doubling the network to gives versus . The full mesh grows with , the route reflector with .
The OSPF cost of an interface comes from the reference bandwidth (here auto-cost reference-bandwidth 800000, in Mbit/s):
Rendering test (not about networking): fractions in text like , Greek , roots , and a few display constructs:
A deliberately long formula, to test sideways scrolling on narrow screens:
An unknown command renders in red: .
This heading ends the lab section, so the topology column goes away and the text is back to one column.
The ◐ button at the top right switches the theme for the page and the code blocks, and remembers the choice. Without a saved choice, the page follows your system setting.
Source: custom (Header.astro, BaseHead.astro, global.css). Typography, colors and the header are placeholders; the real theme comes with the migration.
Footnotes
-
Route reflection is specified in RFC 4456. ↩
-
With a single RR, every iBGP route depends on that one router: if it fails, the clients lose all routes they learned from each other. ↩
-
Test of a very long note (filler text, not article content). Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll.
Paragraph 2. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll.
Paragraph 3. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll.
Paragraph 4. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll.
Paragraph 5. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll.
Paragraph 6. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll.
Paragraph 7. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll. Filler sentence to make this note long, so that the notes container has to scroll. ↩
-
Strictly, the Cluster List holds Cluster IDs. Without explicit configuration, an RR uses its router ID as Cluster ID, which is why
10.10.0.1shows up here. ↩