This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DHCP option 121 syntax

Due to the nature of my home network, i found it necessary to provide a static route to clients one of my subnets, as I have another subnet hanging off the end (bad design, I know, but it's practical, cheap, and it works). I couldn't find the syntax for the DHCP option 121, so i worked it out. This post is FYI for the most part.

The 'Hex' type should be selected, and the values are constructed like this:

<masklength>:<dest-octet1>:..:<dest-octetn>:<rtrOctet1>:<rtrOctet2>:<rtrOctet3>:<rtrOctet4>

you must only include the octets in scope of the <masklength>, the significant octets. In my example, that would be:

18:ac:10:64:c0:a8:01:f8

24 (0x18) bit mask, network ID 172 (0xAC).16 (0x10).100 (0x64) with a destination of 192 (0xC0) .168 (0xA8) .1 (0x01).248 (0xF8)

If you specify any option 121 value, the default router will NOT be added, so you MUST tag that on the end:

00:c0:a8:01:64

00 (address 0, no significant octets) means the default route and the address is 192.168.1.100. or me, the full string in the options tab should contain 

18:ac:10:64:c0:a8:01:f8:00:c0:a8:01:64

tcpdump -vv will show this at the end of the DHCP ACK:

Classless-Static-Route Option 121, length 13: (172.16.100.0/24:192.168.1.248),(default:_gateway)

the construction is defined in RFC3422 if you're interested.



This thread was automatically locked due to age.