40 lines
2.1 KiB
Markdown
40 lines
2.1 KiB
Markdown
# routing-lab
|
|
|
|
Hi, this is [me](https://s3lph.me) getting some hands-on experience with routing protocols by building a small docker-compose based lab environment.
|
|
|
|
> [!IMPORTANT]
|
|
> This lab environment uses IPv6 **exclusively**.
|
|
> [IPv6 support](https://docs.docker.com/config/daemon/ipv6/) **must** be enabled in Docker beforehand!
|
|
|
|
## Network Architecture
|
|
|
|
- There are 3 AS: AS23, AS42 and AS1337
|
|
- Each pair of AS' has its own direct interconnect in a dedicated docker network.
|
|
- Exception: There are two AS23-AS42 interconnects, each in its own docker network.
|
|
- The IP range used in each interconnect is `fd00:d0ca:<ASN1><ASN2>:<IC#>::/64`, where AS1337 uses `13` instead. `<IC#>` is the interconnect ID (as there's tw between AS23 and AS42).
|
|
|
|
## eBGP
|
|
|
|
- Each AS runs an OpenBGPD router for eBGP peering.
|
|
- An [alice-lg](https://github.com/alice-lg/alice-lg) looking class connecting to all 3 BGP routers is started on [http://localhost:7340](http://localhost:7340).
|
|
- Each AS announces the `fd00:d0ca:<ASN>:1::/64` prefix.
|
|
|
|
|
|
Example: traceroute from AS42 eBGP router to AS23 eBGP router: When the link is taken offline, the traffic is routed via AS1337 instead:
|
|
|
|
```shell-session
|
|
routing-lab-as42-1:/ # traceroute fd00:d0ca:23:1::10
|
|
traceroute to fd00:d0ca:23:1::10 (fd00:d0ca:23:1::10), 30 hops max, 72 byte packets
|
|
1 fd00:d0ca:23:1::10 (fd00:d0ca:23:1::10) 0.022 ms 0.016 ms 0.014 ms
|
|
routing-lab-as42-1:/ # bgpctl -s /run/bgpd.sock.42 neigh as23_1 down
|
|
request processed
|
|
routing-lab-as42-1:/ # traceroute fd00:d0ca:23:1::10
|
|
traceroute to fd00:d0ca:23:1::10 (fd00:d0ca:23:1::10), 30 hops max, 72 byte packets
|
|
1 routing-lab-as1337-1.routing-lab_as42_as1337_1 (fd00:d0ca:4213:1::1337) 0.059 ms 0.016 ms 0.020 ms
|
|
2 fd00:d0ca:23:1::10 (fd00:d0ca:23:1::10) 0.031 ms 0.019 ms 0.017 ms
|
|
routing-lab-as42-1:/ # bgpctl -s /run/bgpd.sock.42 neigh as23_1 up
|
|
request processed
|
|
routing-lab-as42-1:/ # traceroute fd00:d0ca:23:1::10
|
|
traceroute to fd00:d0ca:23:1::10 (fd00:d0ca:23:1::10), 30 hops max, 72 byte packets
|
|
1 fd00:d0ca:23:1::10 (fd00:d0ca:23:1::10) 0.017 ms 0.018 ms 0.018 ms
|
|
```
|