[ATP/FLEX] How to add static route via device DHCP option

Zyxel_Cooldia
Zyxel_Cooldia Posts: 1,511  Zyxel Employee
Zyxel Certified Network Administrator - Security Zyxel Certified Sales Associate 100 Answers 1000 Comments
edited June 2023 in Other Topics

This article provides configuration guide on how to set the DHCP option 33 on Nebula. Assume we would like to add static route on client OS routing table, instead of adding on gateway, we can add DHCP option 33 for clients. This example illustrates how to configure DHCP option for static routing in client.

Configurations

Go to Configure > Firewall > Interface, and edit lan1 interface setting


Click Add new to create DHCP option.


Code is 33, and type is hex string.


Based on the RFC DHCP option definition, the IP format is hex string, so you should convert the IP to Hex string. In this scenario, the value is 0A000001C0A80A02

0A000001 is hex string mapping to IP 10.0.0.1, C0A80A02 is 192.168.10.2, which means to IP 10.0.0.1, the next hop is 192.168.10.2

Note: If you want to add multi routing entries, just append the hex string 0A000001C0A80A20A000003C0A80A2

Verification

Open Windows command prompt and type route print -4 command to show Windows routing table. You can see the client has routing entry in Windows routing table.