How Can We Help?
OTT Upgrade – DHCP option 175
Document Date and version | 2021.02.15 |
Tested with ONT HALNy HL-1GE/2, HL-1GC, HL-4G, HL-4GMV | Supported on Version: V2.0.13 or above |
Tested with Ethernet Router HLE-4GMV | Supported on Version: V2.0.18 or above |
Tested with ONT HALNy HL-4GQV / HL-4GQVS / HL-4GQVS2 / HL-4GXV / HL-4GXV-F | Supported on Version: V3.1.21p1 or above |
Tested with Ethernet Router HLE-3GM / HLE-3GX-F | Supported on Version: V3.1.21p1 or above |
Tested with ONT HALNy HL-1B, HL-2BV, HL-4G2 | Supported on Version: V4.0.3 or above |
Tested with ONT HALNy HL-4BX3V-F | Supported on Version: V5.0.9 or above |
Revision | 2 |
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:
- At first, ONT checks EXCLUDED section
- if there is ONT’s GPON/SN, then the upgrade process is ended
- ONT compares its active firmware version to firmware version 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, then ONT will be downgraded
- if firmware version is the same as standby, then ONT will switch to standby and reboot
- At first, ONT checks EXCLUDED section
- after ONT downloads firmware or switch to standby, the next RELOAD_TIME is verified
- ONT will reload itself according to time set 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
- ftp://192.168.1.67/HALNy-upgrade.xml (anonymous)
- for FTPS (login credentials, ip address and port, XML file):
- ftps://user:password@192.168.1.67/HALNy-upgrade.xml (default port 990)
- ftps://user:password@192.168.1.67:3131/HALNy-upgrade.xml
- ftps://192.168.1.67/HALNy-upgrade.xml (anonymous)
- for HTTP (contains IP address and port, XML file):
- http://1.1.1.1/HALNy-upgrade.xml (default port)
- http://1.1.1.1:8080/HALNy-upgrade.xml
- for HTTPS (contains IP address and port, XML file):
- https://1.1.1.1/HALNy-upgrade.xml (default port 443)
- https://1.1.1.1:4433/HALNy-upgrade.xml
Attention!
FTPS/HTTPS are supported from V2.0.21/V3.0.16
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 routers 192.168.30.1;
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 routers 192.168.30.1;
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:
- Add new option
Add values of option 175
Add created option to specific network (ONT iphost network space)