dhclient dry-run - need to know the def gateway without installing the def route

Sten Carlsen stenc at s-carlsen.dk
Mon Apr 7 20:19:13 UTC 2014


On 07/04/14 21.15, Simon Hobson wrote:
> alessandro macuz <alessandro.macuz at gmail.com> wrote:
>
>> I could deduce the gateway from the DHCP server IP address because normally they coincide but that would be my assumption.
> You've heard the expression that "assume" makes an "ass" out of "u" and "me", well your assumption is badly wrong. In home and small networks it is likely to be true (not mine though). But once you get to business networks then its more likely that the DHCP server is not at the same IP address as the router.
In my home network, that is certainly also not true, the DHCP server
resides on a linux server, that also hosts the DNS. Then I have 3
different gateways, they each provide one IP4 public address.
>
> However, I'm still not quite sure why you are doing things the long way round. What's specifically wrong with using the route that comes with the lease ? Or more to the point, what's wrong with dealing with it when you get it ? And BTW - have you considered the possibility of getting different answers to your two queries ?
>
> For many clients (certainly the ISC one on Linux) you can supply your own script/modify the stock one. That means you can go and accept a lease, then use your own script to fiddle with the system. Or at least I thin that's the case.
There are scripts you can tinker with (I have done it, it is not that
difficult) and there are even hooks that you can use to attach your own
SW to.
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users

-- 
Best regards

Sten Carlsen

No improvements come from shouting:

       "MALE BOVINE MANURE!!!" 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20140407/1fe74509/attachment.html>


More information about the dhcp-users mailing list