Gabriel Bermudez ha scritto:
Hi Nick,

I followed your advise but it didn't work out. This are the content of the files where I try to set the default gateway:

/etc/rc.local

ip route add default via xxx.xxx.xxx.xxx dev eth2
touch /var/lock/subsys/local

/etc/sysconfig/network-scripts/route-eth2

default via xxx.xxx.xxx.xxx
You can add the dev eth2 to the end of that comand, but it's not required, as long as there's an interface with an IP in the same subnet already on that network, which should be eth2 (although now you mention that there isn't one assigned...).

Do you get any errors in /var/log/messages?


/etc/sysconfig/network

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=gw1.mynetwork.net
GATEWAY=xxx.xxx.xxx.xxx
none of this seems wrong..

I don't think it has something to do but the eth2 doesn't have an ip assign to it

/etc/sysconfig/network-scripts/ifcfg-eth2

DEVICE=eth2
BOOTPROTO=none
HWADDR=00:15:17:3a:fa:be
ONBOOT=yes
TYPE=Ethernet
hmm, it's probably not going to work without having an interface with a source address..

The logs should give you more information, or at least an error to start.


Thanks for your help.


Nick escribió:
Gabriel Bermudez ha scritto:
Hi,

I'm trying to configure a high availability router for my internal network. I'm able to set both private and public ips on eth0:0 and eth2:0 respectively with heartbeat. The gateway is configured using the /etc/sysconfig/network file (using centos 5.2)

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=gw1.mynetwork.net
GATEWAY=xxx.xxx.xxx.xxx

but for some reason it doesn't persists when I reboot the server. I have to manually use the route command to restore the default gateway

route add -net 0.0.0.0 gw xxx.xxx.xxx.xxx

I've also tried to set up the route in "/etc/rc.local" and in "/etc/sysconfig/network-scripts/route-eth2" files with no success. I know that this is not a heartbeat related problem but I've tried to google this with no success, so any help on this issue would be greatly appreciated.

Thanks in advanced,

Gabriel.
Have a look at the ip comand (ip route in specific), and add instead of all those lines add:

default via xxx.xxx.xxx.xxx

in the route-eth2 file.

ip is much simpler, and if you ever decide to do policy based routing, much more powerful.

Nick




_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to