- The status page has a collapsible "Configuration" section showing the config file as read at startup, with its path. Served by the new GET /api/config; RouterInfo::with_config carries the text. - Removed the AS-path prepends field and the SwissIX prepend presets (42476:101..103) from the form to keep the exercise focused. The API still accepts `prepend`. - Docs follow: the handout loses its prepending exercise, the lab README its prepend row, and the BIRD config notes that the 42476 namespace is still admitted for hand-typed values. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
63 lines
2.8 KiB
Markdown
63 lines
2.8 KiB
Markdown
# 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. **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.
|
|
|
|
4. **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.
|
|
|
|
5. **Blackholing.** Announce with `BLACKHOLE`. What happens? When would an
|
|
operator want this?
|
|
|
|
6. **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?
|