Git Product home page Git Product logo

lg's Introduction

HSDN PHP Looking Glass

PHP Version of BGP Looking Glass script, based on the Perl sources: https://github.com/Cougar/lg

General Features

  • Supports the Telnet and SSH (through Putty/plink, sshpass, or ssh).
  • Supports the Cisco, MikroTik v5/v6, Juniper, Huawei (Comware), Quagga (Zebra) and OpenBGPD routers.
  • Supports the IPv4 and IPv6 protocols.
  • Automatic conversion IPs to subnets using Merit RADb for MikroTik (http://www.ra.net/).
  • Drawing graph of BGP AS pathes using GraphViz toolkit.
  • Works on php 5.2.0 and above.

System Requirements

Installation Instructions

  1. Copy index.php file to your web server home directory.
  2. Copy lg_config.php.example file as lg_config.php into your web server home directory.
  3. Edit lg_config.php configuration file (see parameters description below).

Configuration Parameters

Branding Configuration

  • $_CONFIG['asn'] - Your AS number for display on the LG page.
  • $_CONFIG['company'] - Your company for display on the LG page.
  • $_CONFIG['logo'] - Your company logo for display on the LG page.
  • $_CONFIG['color'] - Main color of design elements on the LG page.
  • $_CONFIG['ipwhois'] - URL address of the IP whois service.
  • $_CONFIG['aswhois'] - URL address of the AS whois service.

Programs Configuration

  • $_CONFIG['sshauthtype'] - SSH authentication type (you can use password or privatekey as value)
  • $_CONFIG['sshprivatekeypath'] - Absolute path to SSH private key
  • $_CONFIG['sshpwdcommand'] - Type of command to make a SSH connection with password authentication (you can use plink or sshpass as value).
  • $_CONFIG['plink'] - Path to plink command if you use it (for SSH connections).
  • $_CONFIG['sshpass'] - Path to sshpass command if you use it (for SSH connections).

Routers Configuration

Configuration of routers is specified as array in the parameter $_CONFIG['routers'] with following format:

$_CONFIG['routers'] = array
(
    'router1' = array
    (
        // Router parameters
    ),
    'router2' = array
    (
        // Router parameters
    ),
    // etc.
);
Router parameters:
  • url - URL address in format: [ssh|telnet]://[login]:[password]@[host]:[port].
  • sshauthtype - SSH authentication type in format: [password|privatekey].
  • sshprivatekeypath - SSH private key path in example format: /opt/lg/keys/id_rsa.
  • pingtraceurl - URL address for ping and traceroute tools for Quagga routers (or FALSE).
  • description - Router description.
  • group - Router group name - AS number (or FALSE).
  • ipv6 - Router is supports IPv6 (TRUE or FALSE).
  • os - Router type (ios, mikrotik, quagga, junos, openbgpd, huawei).

Demonstration

Graph of BGP AS pathes demonstration

License

HSDN Looking Glass

Copyright (C) 2012-2019 Information Networks Ltd.
Copyright (C) 2000-2002 Cougar
Copyright (C) 2014 Regional Networks Ltd.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

lg's People

Contributors

justkeepquiet avatar mirackle-spb avatar vettamatt avatar bretton avatar mctaguma avatar rostov114 avatar michelepietravalle avatar rguaitanele avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.