Routing
BGP and OSPF integration for subscriber route advertisement.
Overview
AthenaBNG integrates with FRRouting to advertise subscriber routes to upstream networks via BGP and OSPF.
BGP Integration
Neighbor Establishment
- BNG initiates TCP connection to neighbor IP on port 179
- BGP OPEN message exchange
- Neighbor relationship established
- Route updates begin
Subscriber Route Advertisement
When announce_subscriber_routes is enabled:
- Subscriber session established (PPPoE or DHCP)
- Subscriber IP assigned (e.g., 203.0.113.10)
- Host route created in kernel (/32 for PPPoE, /32 for DHCP)
- FRR picks up route via
redistribute connected - Route advertised to BGP neighbors
- Upstream network can reach subscriber directly
Route Withdrawal
When subscriber disconnects:
- Session terminated
- Host route removed from kernel
- FRR withdraws route from BGP
- BGP neighbors receive withdrawal
- Route no longer reachable
OSPF Integration
OSPF can be used for internal routing within the ISP network.
Configuration
routing:
bgp:
enabled: true
asn: 64512
neighbors:
- address: "10.255.0.254"
remote_as: 64500
announce_subscriber_routes: true
ospf:
enabled: false
Monitoring
View BGP Summary
abng> show bgp summary
View Routes
abng> show routes
Check FRRouting Status
sudo systemctl status frr
sudo vtysh -c "show bgp summary"
Troubleshooting
BGP Neighbor Not Establishing
- Check BGP is enabled:
show configuration | match bgp - Check neighbor is reachable:
ping 10.255.0.254 - Check firewall allows TCP 179
- Check FRR is running:
sudo systemctl status frr - Check FRR logs:
sudo vtysh -c "show bgp neighbors"
Subscriber Routes Not Advertised
- Check route advertisement is enabled:
show configuration | match announce_subscriber_routes - Check subscriber route exists:
show routes | match 203.0.113 - Check FRR is advertising:
sudo vtysh -c "show bgp ipv4 unicast" - Check neighbor is receiving: Check upstream router's BGP table
BGP Session Flapping
- Check network stability:
ping -c 100 10.255.0.254 - Check for configuration changes
- Check FRR logs:
sudo journalctl -u frr -f - Check for resource exhaustion:
free -h,df -h
Best Practices
- ASN — Use private ASN range (64512-65534 or 4200000000+)
- Router ID — Use loopback IP (system.router_id)
- Neighbors — Configure redundant neighbors for resilience
- Route Advertisement — Enable for subscriber reachability
- Monitoring — Monitor BGP session state and route count
- Testing — Test with
traceroutefrom upstream - Documentation — Document ASN and neighbor relationships
Next Steps
- RADIUS AAA — RADIUS integration
- Monitoring — Prometheus and syslog