Skip to content
Bartek Kois edited this page May 6, 2023 · 58 revisions

What is GPON Monitor

GPON Monitor is an ASP.NET Core web application intended for quick diagnostic of Dasan Networks GPON OLTs and related ONTs.

GPON Monitor home page

Currently supported ONUs:

  • Dasan Netowrks: H640G, H640GW-02, H645B, H645G, H660GM, H660GM-A, H660GW, H660RM, H665C, H665G, H665, H680GW
  • Halny: HL-1GE2, HL-1GE, HL-1G, HL-1GC, HL-1GR, HL-2GRV, HL-4GMV2, HL-4GMV3, HL-4GMV4, HL-4GMV, HL-4GMVR, HL-4G, HL-4GQV, HL-4GQVS, HL-4GXV, HL-GSFP
  • Leox: LXT-010G-D, LXT-011G-D, LXT-240G-C1, LXT-010S-H, LXT-010H-D.

Installation and configuration (for Linux Debian 11)

System requirements:

GPON Monitor requires:

  • .NET Core >=7.0.0 compatible server (https://www.microsoft.com/net/core),
  • Dasan Networks OLT running software version 6.xx or higher with configured SNMP service (RW access),
  • routable connection between server and monitored OLT.

Install .NET Core enviroment

Install the latest version of .NET Core (https://docs.microsoft.com/pl-pl/dotnet/core/install/linux-debian):

sudo apt-get update; \
  sudo apt-get install -y apt-transport-https && \
  sudo apt-get update && \
  sudo apt-get install -y aspnetcore-runtime-7.0

Install supervisor and nginx:

sudo apt-get install supervisor nginx

Install GPON Monitor binaries

Download, unpack the latest version od GPONMonitor form https://github.com/bartekkois/GPONMonitor/releases and restore dependencies

sudo mkdir -p /var/www_aspnetcore/GPONMonitor
cd /var/www_aspnetcore
curl -sSL -o GPONMonitor-1.0.14.zip https://github.com/bartekkois/GPONMonitor/releases/download/1.0.11/GPONMonitor-1.0.14.zip
sudo unzip GPONMonitor-1.0.14.zip  -d /var/www_aspnetcore/GPONMonitor

Configure monitored OLTs

Configure monitored OLTs in GPONMonitor/devicesconfiguration.json (name and SNMP related variables as shown below).

{
  "DevicesConfiguration": {
    "Devices": [
      {
        "Name": "GPON OLT A",
        "IpAddress": "10.1.1.21",
        "SnmpPort": "161",
        "SnmpVersion": "2",
        "SnmpCommunity": "public",
        "SnmpTimeout": 6000,
        "SnmpV3Credentials": {
          "AuthenticationUsername": "",
          "AuthenticationType": "",   // supported types: SHA1, MD5
          "AuthenticationPassword": "",
          "EncryptionType": "",        // supported types: DES, AES
          "EncryptionPassword": ""
        },
        "IpHostWebManagementPort": 80
      },
      {
        "Name": "GPON OLT B",
        "IpAddress": "10.1.1.11",
        "SnmpPort": "161",
        "SnmpVersion": "2",
        "SnmpCommunity": "public",
        "SnmpTimeout": 6000,
        "SnmpV3Credentials": {
          "AuthenticationUsername": "",
          "AuthenticationType": "",   // supported types: SHA1, MD5
          "AuthenticationPassword": "",
          "EncryptionType": "",        // supported types: DES, AES
          "EncryptionPassword": ""
        },
        "IpHostWebManagementPort": 80
      },
      {
        "Name": "GPON OLT C",
        "IpAddress": "10.2.1.11",
        "SnmpPort": "161",
        "SnmpVersion": "3",
        "SnmpCommunity": "public",
        "SnmpTimeout": 6000,
        "SnmpV3Credentials": {
          "AuthenticationUsername": "username",
          "AuthenticationType": "SHA1",   // supported types: SHA1, MD5
          "AuthenticationPassword": "userAuthenticationPassword",
          "EncryptionType": "DES",        // supported types: DES, AES
          "EncryptionPassword": "encryptionPassword"
        },
        "IpHostWebManagementPort": 80
      }
    ]
  }
}

Configure and restart supervisor:

Change the default configuration in /etc/supervisor/conf.d/GPONMonitor.conf to:

[program:GPONMonitor]
command=/usr/local/bin/dotnet /var/www_aspnetcore/GPONMonitor/GPONMonitor.dll
directory=/var/www_aspnetcore/GPONMonitor
autostart=true
autorestart=true
stderr_logfile=/var/log/GPONMonitor.err.log
stdout_logfile=/var/log/GPONMonitor.out.log
environment=ASPNETCORE_ENVIRONMENT=Production
user=www-data
stopsignal=INT

Restart supervisor:

service supervisor restart

Configure and restart nginx:

Change the default configuration in /etc/nginx/sites-available/default to:

server {
        listen 5001 default_server;
        listen [::]:5001 default_server;
        root /var/www_aspnetcore/GPONMonitor;
        server_name _;

        location / {
                    proxy_pass http://localhost:5000;
                    proxy_http_version 1.1;
                    proxy_set_header Upgrade $http_upgrade;
                    proxy_set_header Connection keep-alive;
                    proxy_set_header Host $host;
                    proxy_cache_bypass $http_upgrade;
        }
}

Restart nginx:

service nginx restart

Installation and configuration (for Docker Compose)

System requirements:

GPON Monitor requires:

  • Docker Compose compatible server (https://docs.docker.com/compose/),
  • Dasan Networks OLT running software version 6.xx or higher with configured SNMP service (RW access),
  • routable connection between server and monitored OLT.

Prepare the environment

mkdir /docker
mkdir /docker/GPONMonitor
wget https://raw.githubusercontent.com/bartekkois/GPONMonitor/master/src/GPONMonitor/devicesconfiguration.json -P /docker/GPONMonitor
wget https://raw.githubusercontent.com/bartekkois/GPONMonitor/master/docker-compose.deploy.yml -P /docker/GPONMonitor

Configure monitored OLTs in /docker/GPONMonitor/devicesconfiguration.json (name and SNMP related variables)

Start the container

docker-compose -f /docker/GPONMonitor/docker-compose.deploy.yml up -d

Usage

Access GPON Monitor through your web browser at http://your_server_ip:5001

Upgrade

To upgrade application simply stop the supervisor, change GPONMonitor binaries while preserving devicesconfiguration.json and start supervisor.

Security considerations

For security reasons we highly encourage NOT to expose this application to the public internet and to use it ONLY in your intranet or through the VPN.

Other notes

  • Changes in the devicesconfiguration.json requires application to be restarted via supervisor.
  • Any underscore sign '_' in ONUs descriptions is automatically changed to space in order to deal with spaces in the OLT CLI.
  • ONUs can by filtered by the ONU Port ID and ONU ID using an underscore operator (e.g.

3._ - shows all ONUs on Port 3,

3.1_ - shows all ONUs on Port 3 with ID beginning with 1,

3._user - shows all ONUs on Port 3 containing "user" in their name).