network scripts debian
Working at setting up some new firewalls with multi-path routing over 2 isps. Doing it with debian sarge.
Problem is the normal network scripts use ifconfig and route.
In my tests I did a simple setup script.
Feel like I am reinventing the wheel :-)
Is it OK to use the network scripts to setup the interface and then remove the routes ifconfig created and add any needed routes with ip commands?
Or am I best setting up the connections from scratch?
Also related is some of interfaces are dynamic. I ran rewrite dhclient-script or just rebuild routes in dhclient-exit-hooks.d.
Also dhcpd-script gives
new_subnet_mask=.........
new_ip_address=....
new_network_number=......
interface=eth2
But for ip route need the length part of new_network_number/length
Is there a simple way to calculate length from new_subnet_mask ?
Thanks
John
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 7 lines · John McMonagle
Working at setting up some new firewalls with multi-path routing over 2 isps. Doing it with debian sarge.
Problem is the normal network scripts use ifconfig and route.
In my tests I did a simple setup script.
Quoted 7 lines
Feel like I am reinventing the wheel :-)
Is it OK to use the network scripts to setup the interface and then remove the routes ifconfig created and add any needed routes with ip commands?
Or am I best setting up the connections from scratch?
After struggling with exactly this same issue myself, I simply created everything from scratch. Otherwise, I couldn't ever get it to work.
Quoted 10 lines
Also related is some of interfaces are dynamic. I ran rewrite dhclient-script or just rebuild routes in dhclient-exit-hooks.d.
Also dhcpd-script gives
new_subnet_mask=.........
new_ip_address=....
new_network_number=......
interface=eth2
Quoted 3 lines
But for ip route need the length part of new_network_number/length
Is there a simple way to calculate length from
new_subnet_mask?
dunno about that one.
Glen
Signature · 8 lines
****************************************************************** Glen W. Mabey [email protected] http://mabeys.homelinux.com/glen/ ****************************************************************** _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/