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

Discussion in 'Linux Networking' started by fuzzybr80, Apr 7, 2006.

  1. fuzzybr80

    fuzzybr80 Guest

    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.
     
    fuzzybr80, Apr 7, 2006
    #1
    1. Advertisements

  2. 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
     
    Robert Harris, Apr 7, 2006
    #2
    1. Advertisements

  3. fuzzybr80

    Moe Trin Guest

    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.
    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.)
    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
     
    Moe Trin, Apr 7, 2006
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.