El lun, 21-06-2010 a las 19:57 -0400, Rick Thomas escribió:
I have a machine with two net interfaces.
it seems to always pick the wrong one (eth1) as the default route.
I can change it with
route del default route add default eth0
after it's up (or in rc.local, of course), but I'd like to figure out what I need to do this "the CentOS way" (e.g. edit some configuration file? Run some config utility, what?) once and for all.
Can somebody point me to the canonical documentation on the subject? I've searched /usr/share/doc and the man pages, but I can't find anything useful.
Googling for "default route centos" gives some interesting stuff, but nothing definitive.
Maybe I'm missing something, but why you specify an interface and not an IP address as default gateway?
You can specify the gateway in the /etc/sysconfig/networking file or in the /etc/sysconfig/network-scripts/ifcfg-ethX, where X is the number of the eth interface. The variable GATEWAY is used.
This files are read by /etc/init.d/network script, but probably this script expect an IP address, should check the script to verify this.
It will be usefull if you send the output of the route -n command, and the content of /etc/sysconfig/network-scripts/ifcfg-eth{0,1} so we can help you better.
Enrique.
Thanks!
Rick _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos