route, default route, eth0 and eth1

A.J. Bonnema abonnema at xs4all.nl
Mon Jun 5 15:06:15 UTC 2006


Paul Howarth wrote:
> On Sun, 2006-06-04 at 08:05 +0200, A.J. Bonnema wrote:
>> Hi all,
>>
>> I draw my configuration of ethernetcards:
>>
>> PC (eth0 10.0.0.1)-->3com switch-->speedtouch(10.0.0.138)-->theNet
>> PC (eth1 192.168.1.10)-->FSG (192.168.1.1)-->speedtouch(10.0.0.138)

I apologize, there is one small inacuracy in the second line. It should
read:

PC (eth1 192.168.1.10)-->FSG (192.168.1.1)-->3com
switch-->speedtouch(10.0.0.138)

The WAN port of the FSG is unused. It is connected to the 10.0.0-network
through the 3com switch.

> Remove any GATEWAY settings in /etc/sysconfig/network-scripts/ifcfg-*
> and add to /etc/sysconfug/network:
> 
> GATEWAY=10.0.0.138
> 
> Paul.
> 

Hi Paul and Craig (who gave the same advice),

I did what you said and nothing changed. The resulting route was:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth1
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth1



The contents of /etc/sysconfig/network is:

NETWORKING=yes
HOSTNAME=athene
GATEWAY=10.0.0.138

The contents of /etc/sysconfig/networking/devices/ifcfg-eth0 is:

DEVICE=eth0
ONBOOT=yes
IPADDR=10.0.0.1
NETMASK=255.255.255.0
METRIC=1
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes
BOOTPROTO=none

The contents of /etc/sysconfig/networking/devices/ifcfg-eth1 is:

DEVICE=eth1
ONBOOT=yes
IPADDR=192.168.1.10
NETMASK=255.255.255.0
METRIC=10
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes
BOOTPROTO=none

The route I need to end up with is:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth1
0.0.0.0         10.0.0.138      0.0.0.0         UG    0      0        0 eth0
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth1

where the last line is probably unnecessary.


-- 
A.J. Bonnema, Leiden The Netherlands,
user #328198 (Linux Counter http://counter.li.org)





More information about the fedora-list mailing list