dhclient with multiple routing tables

Fernando devel at netkeep.com.br
Tue May 21 19:00:36 UTC 2013


Hi all, thanks for the support, in fact with the clue given by Steven 
and reading /sbin/dhclient-script I was able to extract all the 
variables I need using a script in /etc/dhcp/dhclient-enter-hooks.d and 
now I am half way done, now with some changes in /sbin/dhclient-script I 
will be able to make dhcp write the configs in alternate routing tables 
because it uses the simple and well known route comand.... ;-)

With the modifications I beleave that I will be able to do somethig like 
dhclient eth0 && dhclient eth1 and as a resut have 2 instances of 
dhclient running each one writing in a different routing table...  will 
keep you posted!

Thanks!



Em 21/05/2013 14:47, Simon Hobson escreveu:
> Fernando wrote:
>> in both cases my network will be under two NATs, one from the routers and other
> >from the server itself.
>
> You can fix that easily - don't do any NAT other than on the routers.
> Say your router A NATs its public IP to 192.168.1.0/24, and router B NATs its public IP to 192.168.2.0/24. You give your machine an interface in both subnets, and ROUTE between those and your internal network on (say) 192.168.3.0/24. Note I said ROUTE - just route without any NAT and you eliminate the second NAT layer.
> All it needs is to add a static route to each router so it knows to send packets for 192.168.3.0/24 via your server. You could possibly include the two "external" networks as well, but I doubt that's required - ie give router A a static route for 192.168.2.0/24 via your server, and router B a static route for 192.168.1.0/24 via your server.
>
> That will eliminate the two layers of NAT, though if you want to configure stuff that the routers can't do then you may still have a reason for wanting to get rid of them.
>
> Also, you might cnsider getting the DHCP client to do all the stuff that will keep the ISP happy, but statically config your server (assuming you have a static IP). Not sure whether that can be done by making the scripts "null scripts", or whether you'd need to hack the code to stop it altering network configs.
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users



More information about the dhcp-users mailing list