On this page
BGP Session Viewer
A modern, responsive web interface for viewing BGP session status and network information. Originally created by AaranCloud and modified by Xodo Technology, LLC.
Features
- Real-time BGP session status monitoring
- IPv4 and IPv6 protocol support
- PeeringDB integration
- Network stats (peers, upstreams, downstreams, prefixes) via the BGPView API
- Dark/Light theme support
- Responsive design
- Email address obfuscation
- Session filtering and sorting
Prerequisites
- Web server with PHP 8.1+ support
- PHP cURL extension
- BIRD routing daemon
- Birdwatcher API service
- SSL certificate (recommended for production)
Installation
-
Clone this repository to your web server:
git clone https://github.com/yourusername/bgp-session-viewer.git cd bgp-session-viewer -
Configure your web server (Apache example):
<VirtualHost *:80> ServerName network.example.com DocumentRoot /path/to/bgp-session-viewer <Directory /path/to/bgp-session-viewer> AllowOverride All Require all granted </Directory> </VirtualHost> -
Install and configure Birdwatcher on your BIRD routers:
# Install Birdwatcher git clone https://github.com/alice-lg/birdwatcher.git cd birdwatcher make # Configure Birdwatcher cp etc/birdwatcher.conf.example /etc/birdwatcher.conf # Edit the configuration vim /etc/birdwatcher.conf # Start the service ./birdwatcher -config /etc/birdwatcher.conf
Configuration
-
Edit
config.phpwith your settings:// Network Information define('NETWORK_NAME', 'Your Network Name'); define('ASN', '65000'); define('COPYRIGHT_TEXT', 'Your Company Name'); // Contact Information define('PEER_EMAIL', '[email protected]'); define('ABUSE_EMAIL', '[email protected]'); // Birdwatcher Router Configuration $BIRDWATCHER_ROUTERS = [ 'router1' => [ 'name' => 'Router Location', 'ipv4' => [ 'url' => 'http://rtr.location.example.com:6969', 'daemon' => 'bird' ], 'ipv6' => [ 'url' => 'http://rtr.location.example.com:6970', 'daemon' => 'bird6' ] ] ]; // Hidden BGP Sessions (optional) $HIDDEN_BGP_SESSIONS = [ 'BHS_', // Hide all BHS sessions 'RC_', // Hide all Route Collector sessions ]; -
(Optional) Install Parsedown for proper peering-policy markdown rendering:
composer installWithout it, the policy tab falls back to a basic built-in formatter.
-
The
cache/directory is created automatically on first request. Make sure the web server user can write to the project directory (or pre-createcache/withchmod 755).
Usage
-
Access your installation through a web browser:
https://network.example.com -
The interface will show:
- BGP session status
- Protocol information
- PeeringDB details
- Network statistics
Session Filtering
- Sessions can be hidden using prefixes in
$HIDDEN_BGP_SESSIONS - IPv4/IPv6 protocols are automatically filtered based on their suffix (_v4/_v6)
- Sessions are sorted alphabetically by default
Customization
-
Theme settings in
config.php:define('PRIMARY_COLOR', '#20f9ff'); define('LOGO_PATH', 'path/to/your/logo.png'); define('LOGO_DARK_PATH', 'path/to/your/logo.png'); define('DEFAULT_THEME', 'dark'); -
Custom styling can be added to
style.css
Credits
- Original creator: AaranCloud
- Modified by: Xodo Technology, LLC
Please keep the credits section in the footer as a courtesy to the original developers.
License
This project is licensed under the MIT License - see the LICENSE file for details.