Networking Forums

Networking Forums > Computer Networking > Linux Networking > Proper routes for linux machine with two network ports to same network

Reply
Thread Tools Display Modes

Proper routes for linux machine with two network ports to same network

 
 
fuzzybr80@gmail.com
Guest
Posts: n/a

 
      04-07-2006, 08:09 AM
Hi,

I run a Fedora Core 4 system with two network devices eth0 (assigned
10.10.10.30) and eth1 (assigned 10.10.10.31). The local network is
10.10.10.0, the gateway is 10.10.10.1

# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
10.10.10.1 * 255.255.255.255 UH 0 0 0
eth1
10.10.10.0 * 255.255.255.0 U 0 0 0
eth0
10.10.10.0 * 255.255.255.0 U 0 0 0
eth1
169.254.0.0 * 255.255.0.0 U 0 0 0
eth1
default 10.10.10.1 0.0.0.0 UG 0 0 0
eth1
default 10.10.10.1 0.0.0.0 UG 0 0 0
eth0

Although rules to 10.10.10.0 exists for both eth interfaces, It seems
that traffic going to the local network at 10.10.10.* goes thru eth0 if
no interface specified. If I pull out the network cable at eth0,
ping 10.10.10.100 -> Destination Host Unreachable
ping 10.10.10.100 -I eth0 -> Destination Host Unreachable
ping 10.10.10.100 -I eth1 -> Works fine!

Similar problems exist for the internet outgoing connections with the
default and 10.10.10.1 gateway routes.

How do I add the routes properly so that the machine will look at which
interface is working or sort of, and choose the correct route?

Thanks for any pointers.

 
Reply With Quote
 
 
 
 
Robert Harris
Guest
Posts: n/a

 
      04-07-2006, 08:17 AM
(E-Mail Removed) wrote:
> Hi,
>
> I run a Fedora Core 4 system with two network devices eth0 (assigned
> 10.10.10.30) and eth1 (assigned 10.10.10.31). The local network is
> 10.10.10.0, the gateway is 10.10.10.1
>
> # route
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use
> Iface
> 10.10.10.1 * 255.255.255.255 UH 0 0 0
> eth1
> 10.10.10.0 * 255.255.255.0 U 0 0 0
> eth0
> 10.10.10.0 * 255.255.255.0 U 0 0 0
> eth1
> 169.254.0.0 * 255.255.0.0 U 0 0 0
> eth1
> default 10.10.10.1 0.0.0.0 UG 0 0 0
> eth1
> default 10.10.10.1 0.0.0.0 UG 0 0 0
> eth0
>
> Although rules to 10.10.10.0 exists for both eth interfaces, It seems
> that traffic going to the local network at 10.10.10.* goes thru eth0 if
> no interface specified. If I pull out the network cable at eth0,
> ping 10.10.10.100 -> Destination Host Unreachable
> ping 10.10.10.100 -I eth0 -> Destination Host Unreachable
> ping 10.10.10.100 -I eth1 -> Works fine!
>
> Similar problems exist for the internet outgoing connections with the
> default and 10.10.10.1 gateway routes.
>
> How do I add the routes properly so that the machine will look at which
> interface is working or sort of, and choose the correct route?
>
> Thanks for any pointers.
>

It looks as if eth0 and eth1 are both attached to the same subnet. If
they are on different subnets, then they need different network
addresses (i.e. destination & netmask needs to be different for them,
where & is a logical 'and').

If you gave eth1 the address 10.10.11.1 with netmask 255.255.255.0 it
would probably work. If not, post a description of your network topology.

Robert
 
Reply With Quote
 
Moe Trin
Guest
Posts: n/a

 
      04-07-2006, 08:14 PM
On 7 Apr 2006, in the Usenet newsgroup comp.os.linux.networking, in article
<(E-Mail Removed) .com>, (E-Mail Removed)
wrote:

>I run a Fedora Core 4 system with two network devices eth0 (assigned
>10.10.10.30) and eth1 (assigned 10.10.10.31). The local network is
>10.10.10.0, the gateway is 10.10.10.1


What is the purpose of having two NICs on the same network? Increased
speed? Only possible on a switched network when connecting to different
hosts at the same time (and a real bear to set up). Redundancy for when
one link fails? See the advanced routing howto.

>Although rules to 10.10.10.0 exists for both eth interfaces, It seems
>that traffic going to the local network at 10.10.10.* goes thru eth0 if
>no interface specified. If I pull out the network cable at eth0,
>ping 10.10.10.100 -> Destination Host Unreachable
>ping 10.10.10.100 -I eth0 -> Destination Host Unreachable
>ping 10.10.10.100 -I eth1 -> Works fine!


Yes - the kernel is assuming you changed your mind, and only uses the last
link configured when they go to the same place. (Honestly, this "problem"
gets posted very frequently because of a lack of understanding of basic
network concepts.)

>How do I add the routes properly so that the machine will look at which
>interface is working or sort of, and choose the correct route?


It is working properly. Perhaps the HOWTO can help if you want to try
something different.

-rw-rw-r-- 1 gferg ldp 297491 Sep 4 2003 Adv-Routing-HOWTO

Old guy
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to network a WinXP SP2 with a Debian Linux machine Steve Turner Linux Networking 9 05-15-2008 07:44 AM
IPSec tunnel to remote office; need proper static routes for RRAS guywolcott Windows Networking 2 02-24-2008 07:55 PM
How to set my Linux machine to have two network cards with two IPs keanewoon@gmail.com Linux Networking 4 05-28-2007 02:31 PM
How to network boot Linux from a Windows XP machine. susheel.kaushik@gmail.com Linux Networking 0 05-25-2005 01:29 AM
How to check network status on the Linux machine Andrew Linux Networking 3 12-06-2004 05:54 PM



1 2 3 4 5 6 7 8 9 10 11