Does the OS X DHCP client support classless static routes (RFC3442)?
Solution 1
Per https://stackoverflow.com/questions/316574/dhcp-setting-in-mac-os-x, it should be possible to use ipconfig
to get the values of arbitrary options from the most recent DHCP transaction. I presume you'd need to use a custom launchd
plist to run something when the interface is (re)configured.
Solution 2
Well, it looks like OSX 10.11 El Capitan supports it. Now my laptop catches the rule in our office and I no longer have to fix the routing table manually.
Solution 3
Yosemite and older Mac OS X requires additional software to support DHCP static routes. I have made the software open source: https://github.com/beckit/DHCP_121_macOS
Related videos on Youtube
rthomson
Just another sysadmin. techslaves.org is my home, but it's not nearly as interesting as SF.
Updated on September 17, 2022Comments
-
rthomson over 1 year
Simply put: does Mac OS X support RFC3442?
RFC3442 implements DHCP codes (121 and 249) to provide classless static routes to DHCP clients.
I can only seem to find rather old information circa 2005-2008 which implies that OS X does not support RFC3442. Any chance this has changed recently and I'm just doing something wrong while setting it up? My anecdotal testing seems to confirm that OS X does not support RFC3442 but I'm looking for confirmation.
If OS X still doesn't support RFC3442, what is an alternative method of pushing static routes to OS X clients?
-
rthomson about 13 yearsThat workaround is definitely viable. I suppose the answer to the first questions is no, then?
-
geekosaur about 13 yearsRight, this is a workaround. The linked article lists the RFCs it obeys, and 3442 wasn't one of them. But any decent DHCP client (admittedly this excludes at least some Solaris versions...) provides a mechanism to get at other DHCP options, because custom options are used fairly widely in larger shops.
-
mivk almost 11 yearsUsing ipconfig with 10.7, the classless routing options are not shown. There seems to be no way to get them in the Mac. Or does the Mac only request certain options and the dhcp server only sends the requested ones?
-
Phil P about 9 yearsDHCP is modelled on the client saying "give me this list of options" and the server only returning the values it has for that list of options. You can tell the server to forcibly include a parameter even when not included in the parameter request list. For ISC dhcpd, this might be done with
option dhcp-parameter-request-list = concat(option dhcp-parameter-request-list, 79)
to add 0x79 (121, CIDR route list) to the list. For dnsmasq, you'd specify the option withdhcp-option-force=...
instead ofdhcp-option=...