Bugzilla – Bug 555870
dhclient does not get rfc3442 classless static routes
Last modified: 2016-04-15 10:31:58 UTC
Created attachment 327730 [details] dhclient-exit-hooks I'm connected to the LAN and my provider sends classless static routes through DHCP. But dhclient utility, that works with NetworkManager, does not set this routes. So, when I've connected to the Internet with VPN (pptp) I can't access local resources. My routing table looks like: Destination Gateway Genmask Flags Metric Ref Use Iface 10.55.88.0 * 255.255.254.0 U 1 0 0 eth0 default 10.55.88.1 0.0.0.0 UG 0 0 0 eth0 However, the problem is solvable: exit hook script is needed to set rfc3442 classless static routes using dhclient. Debian and Ubuntu linux distributions use this solution. I've attached the file "dhcp-exit-hooks", that placed in my /etc dir. This script does work on setting the routes. Also, in "dhclient.conf" file we need to add line: option rfc3442-classless-static-routes code 121 = array of unsigned integer 8; and "rfc3442-classless-static-routes" in request list. I've attached this file too. So, with additional configuration my routing table looks like: Destination Gateway Genmask Flags Metric Ref Use Iface 85.112.113.96 10.55.88.1 255.255.255.240 UG 0 0 0 eth0 192.188.189.0-n 10.55.88.1 255.255.255.0 UG 0 0 0 eth0 192.168.254.0 10.55.88.1 255.255.255.0 UG 0 0 0 eth0 oivt-net.mipt.r 10.55.88.1 255.255.254.0 UG 0 0 0 eth0 10.55.88.0 * 255.255.254.0 U 1 0 0 eth0 81.5.88-net.mip 10.55.88.1 255.255.252.0 UG 0 0 0 eth0 campus-net-80.0 10.55.88.1 255.255.252.0 UG 0 0 0 eth0 81.5.64.0 10.55.88.1 255.255.240.0 UG 0 0 0 eth0 93.182.0.0 10.55.88.1 255.255.192.0 UG 0 0 0 eth0 172.16.0.0 10.55.88.1 255.240.0.0 UG 0 0 0 eth0 10.0.0.0 10.55.88.1 255.0.0.0 UG 0 0 0 eth0 default 10.55.88.1 0.0.0.0 UG 0 0 0 eth0 And local resources are accessible with VPN connection. I think this behavior should be used by default, or at least, be configurable.
Created attachment 327732 [details] dhclient.conf
Yes, it makes sense to add classless route support to dhclient-script. When you're using ifup and not NetworkManager: just change back and use 'dhcpcd' and not 'dhclient' -- it contains support for classless routes. Although adding it to dhclient-script will not help with NetworkManager, because NetworkManager is AFAIK using own script (own binary) and has to implement it there...
Created attachment 357806 [details] Code catching some rfc corner cases -- v1 The above code catches the 0.0.0.0 link local route (and some invalid gateways) as well as destinations like 129.210.177.132/25, that have to be corrected to 129.210.177.128/25. I'm working e.g. on some input data checks as /42 length or when the net_length needs more data than provided, because they cause syntax errors. When you have some ideas how to improve the code, let me know.
OK, it is included in this submission request: 39653 State:new By:mtomaschewski When:2010-05-07T17:00:52 submit: network:dhcp/dhcp -> openSUSE:Factory Descr: update to 4.1.1, including dhcpv6 support
BTW: See also http://download.opensuse.org/repositories/network:/dhcp/
This is an autogenerated message for OBS integration: This bug (555870) was mentioned in https://build.opensuse.org/request/show/39792 Factory / dhcp