I have a Centos 3 server with three network interfaces. eth0 is for the local network and the firewall is the gateway, the ip and gateway are set statically. eth1 is a adsl connection using dhcp to allocate the ip. I want to make eth1 the default route. If it was statci I would just use a "route add default gwd eth1" command, but I can't do that with DHCP. How do I make eth1 the default route?
Am Mi, den 15.02.2006 schrieb Chris Mason (Lists) um 18:50:
I have a Centos 3 server with three network interfaces. eth0 is for the local network and the firewall is the gateway, the ip and gateway are set statically. eth1 is a adsl connection using dhcp to allocate the ip. I want to make eth1 the default route. If it was statci I would just use a "route add default gwd eth1" command, but I can't do that with DHCP. How do I make eth1 the default route?
Chris Mason
grep GATEWAYDEV /usr/share/doc/initscripts*/sysconfig.txt
Alexander
Quoting Alexander Dalloz ad+lists@uni-x.org:
Am Mi, den 15.02.2006 schrieb Chris Mason (Lists) um 18:50:
I have a Centos 3 server with three network interfaces. eth0 is for the local network and the firewall is the gateway, the ip and gateway are set statically. eth1 is a adsl connection using dhcp to allocate the ip. I want to make eth1 the default route. If it was statci I would just use a "route add default gwd eth1" command, but I can't do that with DHCP. How do I make eth1 the default route?
Chris Mason
grep GATEWAYDEV /usr/share/doc/initscripts*/sysconfig.txt
Or he can completely ommit specifying any gateways, and let DHCP create one. Which is probably what he want to do anyhow.
---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
Aleksandar Milivojevic wrote:
Or he can completely ommit specifying any gateways, and let DHCP create one. Which is probably what he want to do anyhow.
No, it isn't. I want to specify the default interface. I simplified the question to keep things clear, in reality I have three ISPs, three interfaces, and two firewalls, so I wanted to know how to specify the default interface.
On 2/15/06, Chris Mason (Lists) lists@masonc.com wrote:
Aleksandar Milivojevic wrote:
Or he can completely ommit specifying any gateways, and let DHCP create one. Which is probably what he want to do anyhow.
No, it isn't. I want to specify the default interface. I simplified the question to keep things clear, in reality I have three ISPs, three interfaces, and two firewalls, so I wanted to know how to specify the default interface.
I believe what you want is policy based routing. Try to google "linux policy based routing" without the quotes that is.
-- Leonard Isham, CISSP Ostendo non ostento.
Quoting "Chris Mason (Lists)" lists@masonc.com:
Aleksandar Milivojevic wrote:
Or he can completely ommit specifying any gateways, and let DHCP create one. Which is probably what he want to do anyhow.
No, it isn't. I want to specify the default interface. I simplified the question to keep things clear, in reality I have three ISPs, three interfaces, and two firewalls, so I wanted to know how to specify the default interface.
Correct me if I'm wrong. If you don't specify "GATEWAY" line in any of the ifcfg-* files (or sysconfig/network), and let DHCP set default route, then as soon as DHCP configures the interface, you'll get default route pointing to it.
Unless you have waaaay fancier network setup than you described, that is ;-)
---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.