Kategorie

OTT Upgrade – DHCP option 175

You are here:
< All Topics
Document Date and version2020.07.31
Revision1
Let us know how to improve below document on: support@halny.com

Concept

  • if ONT receives DHCP OFFER packet with proper DHCP Option 175 to ip-host interface, next it downloads XML file with upgrade settings.
  • then ONT inspects downloaded XML file to check:
    1. At first, ONT checks EXCLUDED section
      • if there is ONT’s GPON/SN, then the upgrade process is closed
    2. ONT compares active firmware version is the same as in XML file
      • if firmware version is higher than active, then ONT downloads firmware file and upgrades itself
      • if firmware version is lower than active, then ONT checks DOWNGRADE_ENABLED flag
        • if that flag is set YES next ONT will be downgraded
      • if firmware version is the same as standby, next ONT will switch to standby and reboot
  • after ONT downloads firmware or switch to standby, next RELOAD_TIME is verified
  • ONT will reload according to set time in RELOAD_TIME flag

Topology and service scenario

Proper value of option 175

Option 175: IP address based on protocol:

  • for FTP (login credentials, ip address and port, XML file):
    • ftp://user:password@192.168.1.67/HALNy-upgrade.xml (default port)
    • ftp://user:password@192.168.1.67:2121/HALNy-upgrade.xml.xml
    • ftp://192.168.1.67/HALNy-upgrade.xml.xml (anonymous)
  • for HTTP (contains IP address and port, XML file):
    • http://1.1.1.1/upgrade.xml (default port)
    • http://1.1.1.1:8080/upgrade.xml

Name of .xml file (HALNy-upgrade.xml) does not matter

Example of upgrade XML

Link to upgrade xml example file: upgrade.xml

<?xml version="1.0"?>
<OTT version="1">
	<HL-1GE>
		<URL>ftp://ftpuser:password123@192.168.223.11/</URL>
		<FILENAME>/HALNY/FIRMWARE/G_ONU_HL-1GE_V2-0-12_001-enc.bin</FILENAME>
		<VERSION>V2.0.12</VERSION>
		<DOWNGRADE_ENABLED>YES</DOWNGRADE_ENABLED>
		<RELOAD_TIME>NOW</RELOAD_TIME> <!-- NOW|0-23 -->
		<EXCLUDED>SN-ONT, SN-ONT</EXCLUDED> <!-- SN-ONT, SN-ONT -->
	</HL-1GE>
	<HLE-4GMV>
		<URL>ftp://ftpuser:password123@192.168.223.11</URL>
		<FILENAME>/HALNY/FIRMWARE/G_ONU_HLE-4GMV_V2-0-13_001-enc.bin</FILENAME>
		<VERSION>V2.0.13</VERSION>
		<DOWNGRADE_ENABLED>YES</DOWNGRADE_ENABLED>
		<RELOAD_TIME>NOW</RELOAD_TIME> <!-- NOW|0-23 -->
		<EXCLUDED></EXCLUDED> <!-- SN-ONT, SN-ONT -->
	</HLE-4GMV>
	<HL-4GMV>
		<URL>ftp://ftpuser:password123@192.168.223.11</URL>
		<FILENAME>G_ONU_HL-4GMV_V2-0-13_001-enc.bin</FILENAME>
		<VERSION>V2.0.13</VERSION>
		<DOWNGRADE_ENABLED>YES</DOWNGRADE_ENABLED>
		<RELOAD_TIME>NOW</RELOAD_TIME> <!-- NOW|0-23 -->
		<EXCLUDED></EXCLUDED> <!-- SN-ONT, SN-ONT -->
	</HL-4GMV>
	<HL-4GQVS>
		<URL>ftp://ftpuser:password123@192.168.12.136</URL>
		<FILENAME>G_ONU_HL-4GQVS_V3-0-5_001-enc.bin</FILENAME>
		<VERSION>V3.0.5</VERSION>
		<DOWNGRADE_ENABLED>YES</DOWNGRADE_ENABLED>
		<RELOAD_TIME>NOW</RELOAD_TIME> <!-- NOW|0-23 -->
		<EXCLUDED></EXCLUDED> <!-- SN-ONT, SN-ONT -->
	</HL-4GQVS>
</OTT>

<FILENAME> path to the firmware file
<VERSION> firmware version to which ONT will be upgraded
<DOWNGRADE_ENABLED> if set to YES, ONT may download lower software version
<RELOAD TIME> ONT’s reload time, if upgrade succeeded
<EXCLUDED> ONTs with according GPON/SN won’t be upgraded.

No matter which OLT vendor ONT HALNY is connected to. ONT which is using OTT Upgrade may be upgraded just using DHCP Option 175.

Sample configuration of DHCP option 175 for Linux DHCP Server (isc-dhcp)

Installation isc-dhcp-server

Install isc-dhcp-server from debian/ubuntu repository

 $apt-get install isc-dhcp-server

Select default network interface for isc-dhcp-server

$nano /etc/default/isc-dhcp-server

 # Defaults for isc-dhcp-server (sourced by /etc/init.d/isc-dhcp-server)

 # Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf).
 #DHCPDv4_CONF=/etc/dhcp/dhcpd.conf
 #DHCPDv6_CONF=/etc/dhcp/dhcpd6.conf

 # On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
 #       Separate multiple interfaces with spaces, e.g. "eth0 eth1".
 INTERFACESv4="enp0s3"
 INTERFACESv6=""

Simple isc-dhcp-server configuration with DHCP option 175

Edit isc-dhcp-serverconfig file

/etc/dhcp/dhcpd.conf
#definition of option code 175
option halny_upgrade code 175=text;


subnet 192.168.30.0 netmask 255.255.255.0 {
        range 192.168.30.2 192.168.30.254;
        option subnet-mask 255.255.255.0;
        option broadcast-address 192.168.30.255;
        option halny_upgrade "ftp://ftpuser:password123@192.168.30.200/hl_upgrade.xml";
}

Where 192.168.30.200 is FTP server address.

Set static ip address of dhcp-server interface

$cat /etc/network/interfaces
 
auto enp0s3
iface enp0s3 inet static
        address 192.168.30.1
        netmask 255.255.255.0

Hardware-mask configuration

You can add option 175 only for HALNY ONT using hardware mask:
Edit isc-dhcp-server config file:

/etc/dhcp/dhcpd.conf

subnet 192.168.30.0 netmask 255.255.255.0 {
        range 192.168.30.2 192.168.30.254;
        option subnet-mask 255.255.255.0;
        option broadcast-address 192.168.30.255;
}
if substring(hardware, 1, 3) = e0:5a:9f {
	option halny_upgrade "ftp://ftpuser:password123@192.168.30.200/hl_upgrade.xml";
}

Mikrotik DHCP server configuration

DHCP server -> Add Option 175:

  1. Add new option
Obrazek posiada pusty atrybut alt; plik o nazwie Przechwytywanie2.png

Add values of option 175

Add created option to specific network (ONT iphost network space)


Table of Contents