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


    I run a Fedora Core 4 system with two network devices eth0 (assigned and eth1 (assigned The local network is, the gateway is

    # route
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use
    Iface * UH 0 0 0
    eth1 * U 0 0 0
    eth0 * U 0 0 0
    eth1 * U 0 0 0
    default UG 0 0 0
    default UG 0 0 0

    Although rules to 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 -> Destination Host Unreachable
    ping -I eth0 -> Destination Host Unreachable
    ping -I eth1 -> Works fine!

    Similar problems exist for the internet outgoing connections with the
    default and 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. 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 with netmask it
    would probably work. If not, post a description of your network topology.

    Robert Harris, Apr 7, 2006
    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
    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.