Skip to main content

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

  1. BNG initiates TCP connection to neighbor IP on port 179
  2. BGP OPEN message exchange
  3. Neighbor relationship established
  4. Route updates begin

Subscriber Route Advertisement

When announce_subscriber_routes is enabled:

  1. Subscriber session established (PPPoE or DHCP)
  2. Subscriber IP assigned (e.g., 203.0.113.10)
  3. Host route created in kernel (/32 for PPPoE, /32 for DHCP)
  4. FRR picks up route via redistribute connected
  5. Route advertised to BGP neighbors
  6. Upstream network can reach subscriber directly

Route Withdrawal

When subscriber disconnects:

  1. Session terminated
  2. Host route removed from kernel
  3. FRR withdraws route from BGP
  4. BGP neighbors receive withdrawal
  5. 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

  1. Check BGP is enabled: show configuration | match bgp
  2. Check neighbor is reachable: ping 10.255.0.254
  3. Check firewall allows TCP 179
  4. Check FRR is running: sudo systemctl status frr
  5. Check FRR logs: sudo vtysh -c "show bgp neighbors"

Subscriber Routes Not Advertised

  1. Check route advertisement is enabled: show configuration | match announce_subscriber_routes
  2. Check subscriber route exists: show routes | match 203.0.113
  3. Check FRR is advertising: sudo vtysh -c "show bgp ipv4 unicast"
  4. Check neighbor is receiving: Check upstream router's BGP table

BGP Session Flapping

  1. Check network stability: ping -c 100 10.255.0.254
  2. Check for configuration changes
  3. Check FRR logs: sudo journalctl -u frr -f
  4. Check for resource exhaustion: free -h, df -h

Best Practices

  1. ASN — Use private ASN range (64512-65534 or 4200000000+)
  2. Router ID — Use loopback IP (system.router_id)
  3. Neighbors — Configure redundant neighbors for resilience
  4. Route Advertisement — Enable for subscriber reachability
  5. Monitoring — Monitor BGP session state and route count
  6. Testing — Test with traceroute from upstream
  7. Documentation — Document ASN and neighbor relationships

Next Steps