RE: Default Route question when there are two nic cards

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

 



"Styma, Robert E (Robert)" <stymar@xxxxxxxxxx> wrote:

Mine is set in /etc/sysconfig/network

GATEWAY=148.197.29.254

but sometimes appears in all of the
/etc/sysconfig/network-scripts/ifcfg-ethx's

Don't think there is any harm in having it in all of them - provided it
says the same thing!

That did the trick.  That an removing the erroneous one from ifcfg-eth1.
Turns out the last one processed won.

The default route is tried last. I end up with the following routing table using the ifcfg-ethX files below:

[root@fraud ~]# netstat -n -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface 72.19.169.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1 192.168.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1 0.0.0.0 72.19.169.1 0.0.0.0 UG 0 0 0 eth0
[root@fraud ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
# 3Com Corporation 3c905C-TX/TX-M [Tornado]
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=72.19.169.230 <-- My external IP address
NETMASK=255.255.255.0
GATEWAY=72.19.169.1 <-- My ISP's gateway
[root@fraud ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=none
IPADDR=192.168.255.254
NETMASK=255.255.0.0
GATEWAY=72.19.169.230 <-- Set GW for internal NIC to external IP address
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes
MTU=9000

Internal traffic from the server goes out eth1 since that route gets tried before the default route.

Cheers,
Dave

--
Politics, n. Strife of interests masquerading as a contest of principles.
-- Ambrose Bierce


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

  Powered by Linux