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

  1. Web server with PHP 8.1+ support
  2. PHP cURL extension
  3. BIRD routing daemon
  4. Birdwatcher API service
  5. SSL certificate (recommended for production)

Installation

  1. Clone this repository to your web server:

    git clone https://github.com/yourusername/bgp-session-viewer.git
    cd bgp-session-viewer
  2. 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>
  3. 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

  1. Edit config.php with 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
    ];
  2. (Optional) Install Parsedown for proper peering-policy markdown rendering:

    composer install

    Without it, the policy tab falls back to a basic built-in formatter.

  3. The cache/ directory is created automatically on first request. Make sure the web server user can write to the project directory (or pre-create cache/ with chmod 755).

Usage

  1. Access your installation through a web browser:

    https://network.example.com
  2. 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

  1. 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');
  2. Custom styling can be added to style.css

Credits

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.