DHCP option 121 string calculator - static classless routes distribution

Here is a spreadsheet to calculate the string needed for option 121 on a DHCP server.

DHCP option 121 is for distribution of IPv4 classless static routes to clients or why not between routers. Mikrotik DHCP client support it.

I did collect some important information about option 121 that are spread over Internet or that follow my experiments.

There are a couple online calculators available but they do not support /32 masks for the destination network.

Building the option 121 string is a bit tricky because of the hex conversion plus network address shortening (by 8 bits frontiers), so i did add a teaching version string to explain its structure.

Happy new year !
DHCP option 121 calculator v1.2.xlsx (165 KB)

I know this is a old post, but I wanted to add to the collective knowledge.

one use for this is /32 DHCP routing. The specific example is that you have a /24 or larger block, but you wish to have all of your customers come back to your router for routing, no ARPs no layer 2 connectivity to any device on the network.

Its really simple to enable this, by changing your DHCP server netmask to 32
However, you also need a DHCP option 121, to point the customer to the classless route, in our case the default gateway. This spreadsheet will allow you to do this (the one in this thread) by simply calculating the value of the DHCP option 121. Then you need to put that option on the network that you wish to use. Note that that option value will be DIFFERANT for each subnet you have.

So simply put to do /32 DHCP routing, with a prefix larger than /32, so lets say a /21 or even a /16. You can change the netmask to 32 in the dhcp networks tab, then add the option 121 to that network.

Very interesting, thanks for sharing this idea.

Old things are like stones. They rock !

Some info on how to read option 121 from client:
http://forum.mikrotik.com/t/classless-routes-not-being-added-by-dhcp-client/149116/21