Skip to end of metadata
Go to start of metadata


The DHCP option 121 (classless static route) allows network clients to transmit not only information such as the DHCP client address, gateway and DNS server, but additionally one or more static routes that the clients can enter into their local routing table and use.

This document describes how you configure the DHCP option 121 on LANCOM routers.


1) Procedure:

1.1) The DHCP option 121 is configured in the menu IPv4 → DHCPv4 → DHCP options.

Start by clicking on Add.

1.2) Set the following values:

  • Option number: The value 121 must be entered here.
  • Network name: Select here the name of the network to which the settings are to apply. If you leave this field empty, the DHCP option applies to all networks.
  • Type: Choose the data type 8-bit integer.
  • Value: Enter, for example, the hexadecimal value of 0x10,0x0A,0x00,0xC0,0xA8,0x02,0x01 here. This would use of a 16-bit netmask, the destination network would have the address range and the gateway would have the IP address

Look on the Internet for online tools for calculating hex values.

1.3) Save your entries with OK and write the configuration back to the LANCOM router.

2) Function check:

2.1) If DHCP option 121 was configured correctly, a DHCP trace carried out on the LANCOM router will display a correct DHCP acknowledged (DHCPACK) from the DHCP client (marked in green):

[DHCP] 2020/02/13 17:26:24,929 [info] : DHCP Client Rx (LAN, INTRANET)
DHCP Server Message (reply): DHCPACK
  Op    = 02       | HType = 01   | HLen  = 06   | Hops  = 00
  XId   = 4bf7f83a | Secs  = 1e39 | Flags = 0000
  CIAdr =          | YIAdr =
  SIAdr =          | GIAdr =
  CHAdr = f4 8e 38 c4 19 9c 00 00 00 00 00 00 00 00 00 00
Message-Type (53):     ack (5)
Server-ID (54):
Client-ID (61):        ETH:f4:8e:38:c4:19:9c
Netmask (1): 
Gateway (3): 
DNS-Server (6):
DNS-Domain (15):       work
Broadcast (28):
LeaseTime (51):        30000
Classless Static Route (121):
                       Length: 7

2.2) Use the CLI to access the current routing table in the LANCOM router (command: ls /Status/IP-Router/Act.-IP-Routing-Tab.) and you will also find a correct entry there:

ls /Status/IP-Router/Act.-IP-Routing-Tab.

IP-Address        IP-Netmask        Rtg-tag  Next-Hop          Target-Interface            Type(Distance)           Masquerade
=============================================-----------------------------------------------------------------------------------       0       INTRANET                    DHCP (15)                No         0           #Loopback                   Loopback (0)             No     0           INTRANET                    Connected LAN (2)        No   0           #Loopback                   Local LAN (0)            No