Re: Problems getting 2 NICs to work.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Di, den 18.05.2004 schrieb Kevin Kimmell um 15:27:

> That's where I tried to put it (I type wrong before). But using the 
> GATEWAY= command has a different outcome in the route table than when I 
> type "ip route add default via 12.168.88.254"

Hm? In which way is the result different? Can you post it? Both are
setting the default route.

> Is there a place where I can put that command and be assured that it 
> runs after the NIC is activated? I'm guessing I need to find the rc.d 
> file that starts the NIC and insert that command after it.

It is said in the page I pointed you to now twice. If you want to set a
device specific route then use
/etc/sysconfig/network-scripts/ethX-route. If you want to set a device
independent static route then place the proper command in
/etc/sysconfig/static-routes. That file is checked by
/etc/init.d/network:

        # Add non interface-specific static-routes.
        if [ -f /etc/sysconfig/static-routes ]; then
           grep "^any" /etc/sysconfig/static-routes | while read ignore
args ; do
              /sbin/route add -$args
           done
        fi

So the line has to be like:

any $net/cidr via $gw

If you just want to set the default route for a device, then the
static-routes is wrong and too no need for an "ip route add default via
12.168.88.254" line anywhere in your system. Setting
GATEWAY=12.168.88.254 in the /etc/sysconfig/network configuration file
is sufficient. Be sure not other GATEWAY parameter is set then in
/etc/sysconfig/network-scripts/ifcfg-ethX files. But all that has been
said now several times.

Alexander


-- 
Alexander Dalloz | Enger, Germany | GPG key 1024D/ED695653 1999-07-13
Fedora GNU/Linux Core 1 (Yarrow) on Athlon CPU kernel 2.4.22-1.2188.nptl
Sirendipity 16:45:15 up 5 days, 14:29, load average: 0.28, 0.36, 0.35 
                   [ ÎÎÏÎÎ Ï'ÎÏÏÎÎ - gnothi seauton ]
             my life is a planetarium - and you are the stars

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux