dhclient-script, hooks, and changing the environment

Theodore Tso tytso at mit.edu
Fri Aug 8 23:50:15 UTC 2008


On Fri, Aug 08, 2008 at 03:29:43PM -0300, martin f krafft wrote:
> also sprach Theodore Tso <tytso at mit.edu> [2008.08.08.1453 -0300]:
> > In the past I've used dhclient-enter-hooks.d to work around buggy
> > hotel networks which advertise a gateway for the default route
> > which is outside the local network.
> 
> netconf could handle this internally, and it would be fair to
> include this.
> 
> So assuming yo get a 192.168.0.0/24 address and the default gateway
> is 10.0.0.1, what is the best approach? Hacking the netmask seems
> awful. Adding a route that makes 10.0.0.1 link-local seems better,
> no?

Yes, adding a specific link-local route is probably better.  In
practice, the various Awful Hotel Network implementations would give
you an IP configuration that was something like this

IP Addr: 10.0.2.67
Netmask: 255.255.255.0
Gateway: 10.0.8.1

So the simpler thing for me to do was to hack the netmask to be 255.255.0.0.

But I agree, adding IP-specific route for the gateway out to the
interface is the best thing to do.

	     	 				- Ted



More information about the netconf-devel mailing list