79 lines
2.1 KiB
Markdown
79 lines
2.1 KiB
Markdown
# FRR Minimal RTR Client Config
|
|
|
|
中文文档: [README.zh.md](./README.zh.md)
|
|
|
|
This folder provides a minimal FRR setup for black-box interop testing
|
|
against this repository's RTR server defaults.
|
|
|
|
Server defaults in this repo:
|
|
- TCP: `0.0.0.0:323`
|
|
- TLS: `0.0.0.0:324`
|
|
|
|
Reference:
|
|
- `src/main.rs`
|
|
|
|
## Files
|
|
|
|
- `daemons.example`: sample `/etc/frr/daemons`
|
|
- `frr.conf.example`: static sample `/etc/frr/frr.conf`
|
|
- `frr.conf.template`: Docker template used to generate `/etc/frr/frr.conf`
|
|
- `entrypoint.sh`: renders `frr.conf.template` from environment variables before starting FRR
|
|
- `.env`: default Docker environment values
|
|
|
|
## How to apply on an FRR host
|
|
|
|
1. Copy `daemons.example` to `/etc/frr/daemons`.
|
|
2. Copy `frr.conf.example` to `/etc/frr/frr.conf`.
|
|
3. Restart FRR:
|
|
|
|
```bash
|
|
sudo systemctl restart frr
|
|
```
|
|
|
|
## Verify
|
|
|
|
```bash
|
|
vtysh -c "show rpki configuration"
|
|
vtysh -c "show rpki cache-server"
|
|
vtysh -c "show rpki cache-connection"
|
|
vtysh -c "show rpki prefix-table"
|
|
```
|
|
|
|
If `show rpki cache-connection` is connected and `show rpki prefix-table`
|
|
contains VRPs, the RTR client path is working.
|
|
|
|
## Docker quick start
|
|
|
|
From repository root:
|
|
|
|
```bash
|
|
docker compose --env-file deploy/frr/.env -f deploy/frr/docker-compose.yml up -d
|
|
docker exec -it frr-rpki-client vtysh -c "show rpki cache-connection"
|
|
docker exec -it frr-rpki-client vtysh -c "show rpki prefix-table"
|
|
```
|
|
|
|
The Docker example defaults to `127.0.0.1:323`. Override the RTR server
|
|
endpoint with environment variables:
|
|
|
|
```bash
|
|
RPKI_FRR_RPKI_HOST=10.0.0.12 \
|
|
RPKI_FRR_RPKI_PORT=323 \
|
|
docker compose --env-file deploy/frr/.env -f deploy/frr/docker-compose.yml up -d
|
|
```
|
|
|
|
Stop:
|
|
|
|
```bash
|
|
docker compose --env-file deploy/frr/.env -f deploy/frr/docker-compose.yml down
|
|
```
|
|
|
|
## Notes
|
|
|
|
- This setup targets RTR over TCP (`rpki cache tcp`).
|
|
- Docker mode renders `frr.conf.template` into `/etc/frr/frr.conf` at startup.
|
|
- Keep protocol-level conformance checks in Rust tests and
|
|
`src/bin/rtr_debug_client`.
|
|
- `network_mode: host` is kept for the minimal FRR container example, but the
|
|
RTR server address is controlled by `RPKI_FRR_RPKI_HOST` and
|
|
`RPKI_FRR_RPKI_PORT`.
|