Files
ferrix/docs/lab/HANDOUT.md
T
Rayhaan JaufeerallyandClaude Fable 5.1 a137160b48 feature: lab topology, student handout; drop peer routes on session end
Phase 5 of the teaching demo plus two fixes found while exercising the
dialer on the status page.

- Adj-RIB-In: routes learned from a peer are removed when its session ends
  (RFC 4271 §8.2.2), emitting a Withdrawn event per prefix before the
  session Down event. Previously stale routes from dead sessions stayed in
  the received table.
- statusz: poll the peers table every 5 s so dial state (Connecting /
  Backoff and its retry countdown) stays current; those changes carry no
  event.
- docs/lab: docker-compose topology with ferrix (AS65000) and two FRR
  routers. r2 accepts nothing directly from ferrix so student prefixes
  only reach it via r1, then come back with AS path 65002 65001 65000. r1
  applies community-driven policy: NO_EXPORT stops forwarding, 65001:100
  prepends, BLACKHOLE drops. Dockerfile for the daemon.
- docs/lab/HANDOUT.md: student exercises walking through announcement,
  reading the bytes, prepending, NO_EXPORT, action communities,
  blackholing and withdrawal.

The container files have not been executed (no runtime available here);
docs/lab/README.md lists what is most likely to need adjusting.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-16 23:26:10 +02:00

3.0 KiB

Announcing a prefix with BGP

You have a BGP router. It speaks to two neighbouring autonomous systems, and whatever you announce will travel around a loop and come back to you, so you can see exactly what the network did with it.

Open the router's status page (your instructor will give you the address, usually http://<host>:8080/statusz). Everything on the page is live.

Your prefix: 10.100.<N>.0/24 where N is the number you were given. Use your name as owner: only you can withdraw what you announce.

The topology

 you ──announce──▶ AS65000 (ferrix) ──▶ AS65001 (r1) ──▶ AS65002 (r2) ──▶ back to AS65000

Everything under Received routes came in from a neighbour. A yellow row means it is one of the prefixes announced locally: it went around the loop.

Exercises

  1. Plain announcement. Announce your prefix with no options. Watch the event log, then find your prefix in Received routes. What is its AS path, and why is it that long? Which ASN appears first, and what does that tell you about the direction the route travelled?

  2. Read the bytes. Click bytes on your route under Local routes. Hover the coloured segments. Find the 16 bytes of marker, the length, and the AS_PATH attribute. How many bytes does your ASN take up in the path, and why?

  3. Prepending. Withdraw, then announce again with AS-path prepends set to 3. Compare the AS path you get back with exercise 1. Where in the path did the extra entries appear? What would a router in AS65002 that has two routes to your prefix conclude?

  4. NO_EXPORT. Announce with the community NO_EXPORT (use the well-known picker). Wait ten seconds. Does your prefix come back? Look at the topology and explain which router stopped it and why it still accepted it.

  5. Asking a neighbour for help. Announce with the community 65001:100. r1 has been configured to act on that. What changed in the AS path this time, and who changed it? This is how real operators ask an upstream to prepend on their behalf; look up your ISP's "BGP communities" page later.

  6. Blackholing. Announce with BLACKHOLE. What happens? When would an operator want this?

  7. Withdraw. Withdraw your prefix and watch the event log. How many messages did it take, and what did the withdrawal look like on the wire compared to the announcement? (Click bytes before withdrawing to compare.)

Things to notice

  • Your router never sent anyone else's routes onward. Only the two FRR routers re-advertise. What is a router that re-advertises called, and what would happen to the AS path if ferrix did it too?
  • The AS path is BGP's loop prevention. Your prefix came back with your own ASN in the path and the router accepted it anyway. What should it have done, and why is this lab allowed to cheat?
  • Communities are just 32-bit tags with no built-in meaning except a few well-known ones. Everything r1 did with 65001:100 was policy someone wrote. Whose job is it to document what a community means?