I have had this problem on and off since RedHat 6, and I always worked through it, but I thought I would ask. When you have multiple network interfaces, how does the system determine the default route? Or is it the first, (or last) interface that comes up? On the problem systems I have to add a "route add default..." statement in some systems in the rc.local to get them to work right. -- MailScanner is like deodorant... You hope everybody uses it, and you notice quickly if they don't!!!!
Edit /etc/sysconfig/network add GATEWAY=xxx.xxx.xxx.xxx 2006/4/7, Scott Silva <ssilva at sgvwater.com>:> > I have had this problem on and off since RedHat 6, and I always worked > through > it, but I thought I would ask. > When you have multiple network interfaces, how does the system determine > the > default route? > Or is it the first, (or last) interface that comes up? > > On the problem systems I have to add a "route add default..." statement in > some systems in the rc.local to get them to work right. > > > -- > > MailScanner is like deodorant... > You hope everybody uses it, and > you notice quickly if they don't!!!! > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >-- ====================Marcus Tulio T. Carvalho Telemacro Sistemas e Servi?os ====================-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20060407/0545eee6/attachment-0001.html>
Marcus Carvalho spake the following on 4/7/2006 1:37 PM:> Edit /etc/sysconfig/network > add > GATEWAY=xxx.xxx.xxx.xxx > > 2006/4/7, Scott Silva <ssilva at sgvwater.com > <mailto:ssilva at sgvwater.com>>: > > I have had this problem on and off since RedHat 6, and I always > worked through > it, but I thought I would ask. > When you have multiple network interfaces, how does the system > determine the > default route? > Or is it the first, (or last) interface that comes up? > > On the problem systems I have to add a "route add default..." > statement in > some systems in the rc.local to get them to work right. > >I have done that, but it still seems to have a mind of its own. Does the gateway statement mater where it is in the file? IE... could it be the second statement instead of the last? -- MailScanner is like deodorant... You hope everybody uses it, and you notice quickly if they don't!!!!
Scott Silva wrote:> I have had this problem on and off since RedHat 6, and I always worked through > it, but I thought I would ask. > When you have multiple network interfaces, how does the system determine the > default route? > Or is it the first, (or last) interface that comes up? > > On the problem systems I have to add a "route add default..." statement in > some systems in the rc.local to get them to work right. > > >You can add a default route into /etc/sysconfig/network, and the network with the matching network ip will take the route. If you have more that one default route capability on different interfaces, you can set up routing tables for each of the networks , and then apply a weighting to each network default route in the main routing table... There is an excellent discussion on it here, that answers your later question about sending out packets on the right interface. http://lartc.org/howto/lartc.rpdb.multiple-links.html If you follow the guidlines in this document but only add a default route to your main preferred gateway all traffic outgoing will be routed to that gateway but replies topackets on the other interfaces will still be serviced via the default routes on those interfaces if they come from networks outside the network ranges of all the network interfaces on the box.... If you want more detail, send me your ip ranges and ips and I will send you a set of ip rules/routes to achieve what you want... Regards Pete