Files
ferrix/docs/lab/r1/frr.conf
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

45 lines
1.3 KiB
Plaintext

! r1: AS65001. Peers with ferrix (AS65000) and r2 (AS65002).
! Applies policy on routes from ferrix based on the communities students set:
! NO_EXPORT (65535:65281) standard: not sent to r2 (FRR honours it)
! 65001:100 r1 prepends its own ASN three times
! BLACKHOLE (65535:666) dropped at r1
frr defaults traditional
hostname r1
log stdout
!
ip route 192.0.2.0/24 Null0
!
bgp community-list standard PREPEND-ME permit 65001:100
bgp community-list standard BLACKHOLE permit 65535:666
!
route-map FROM-FERRIX deny 10
match community BLACKHOLE
!
route-map FROM-FERRIX permit 20
match community PREPEND-ME
set as-path prepend 65001 65001 65001
!
route-map FROM-FERRIX permit 30
!
route-map PERMIT-ALL permit 10
!
router bgp 65001
bgp router-id 10.200.0.2
no bgp ebgp-requires-policy
no bgp network import-check
neighbor 10.200.0.1 remote-as 65000
neighbor 10.200.0.1 description ferrix
neighbor 10.200.0.1 timers 10 30
neighbor 10.200.0.3 remote-as 65002
neighbor 10.200.0.3 description r2
neighbor 10.200.0.3 timers 10 30
!
address-family ipv4 unicast
network 192.0.2.0/24
neighbor 10.200.0.1 route-map FROM-FERRIX in
neighbor 10.200.0.1 route-map PERMIT-ALL out
neighbor 10.200.0.3 route-map PERMIT-ALL in
neighbor 10.200.0.3 route-map PERMIT-ALL out
exit-address-family
!