Trixbox CentOS Default GW Problem (Multi-homed server)

Posted by slashp on Server Fault See other posts from Server Fault or by slashp
Published on 2011-04-08T18:56:28Z Indexed on 2013/10/19 21:59 UTC
Read the original article Hit count: 266

I'm having an issue with a CentOS trixbox server which is dual-homed (one private facing NIC [eth1], one internet-facing NIC [eth0]).

I can't seem to get the default gateway to set properly to our ISP's GW via eth0. I've modified the /etc/sysconfig/network to contain both a GATEWAY & GATEWAYDEV line and removed the GATEWAY line from /etc/sysconfig/network-scripts/ifcfg-eth1 (as well as /etc/sysconfig/network-scripts/ifcfg-eth0).

No default GW shows up in the routing table unless it's specified in the ifcfg-eth1 file (which both the wrong interface and wrong gateway IP), otherwise, the routing table simply does not contain a default gateway..any ideas would be greatly appreciated!

Thanks!

EDIT

Just realized when attempting to add the default gateway manually using the route add command, I receive an error stating:

SIOCADDRT: Network is unreachable

I know this error can occur when your default gateway and interface IP address are not on the same subnet..in this case, my public IP address of eth0 is a /29.

© Server Fault or respective owner

Related posts about centos

Related posts about routing