Hi Nick,

Well, as you recommended I set an IP to eth2 NIC and it worked out :-D . Thank you very much for your help. One more thing, that machine is also a VPN server and the openvpn client's side complained about sending the vpn start up request to ip A (assigned to eth2:0) and receiving the response from ip B (assigned to eth2), so I added the "float" option to the client's openvpn configuration file and everything is ok now. This means that whatever packet sent from the server will have eth2's ip, but I think this can be solved with IPsrsaddr resource agent ... so that's the next thing I will experimenting with :-) Again Nick, thank you very much for your help it was very ... well helpful ;-)

Regards,

Nick escribió:
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
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to