Two network cards howto - Networking

This is a discussion on Two network cards howto - Networking ; Hi all, running fedora 8, the title says almost all. On eth0 there's the adsl router. The internal network is on eth1, 192.168.0.something . I'd like to use eth1 for internal files transfert, yet all the traffic goes on eth0 ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Two network cards howto

  1. Two network cards howto

    Hi all,
    running fedora 8, the title says almost all.

    On eth0 there's the adsl router. The internal network is on eth1,
    192.168.0.something .

    I'd like to use eth1 for internal files transfert, yet all the traffic
    goes on eth0 only.

    I have to add this in rc.local:
    route add default gw 192.168.1.1 dev eth0

    otherwise no machine will go on ethernet.

    Here are the two configurations:

    cat ifcfg-eth0
    # Realtek Semiconductor Co., Ltd. RTL-8169SC Gigabit Ethernet
    DEVICE=eth0
    ONBOOT=yes
    BOOTPROTO=none
    HWADDR=00:50:8d:b2:51:b4
    NETMASK=255.255.255.0
    IPADDR=192.168.1.100
    GATEWAY=192.168.1.1
    TYPE=Ethernet
    USERCTL=no
    IPV6INIT=no
    PEERDNS=yes


    and

    cat ifcfg-eth1
    # Realtek Semiconductor Co., Ltd. RTL-8169SC Gigabit Ethernet
    DEVICE=eth1
    ONBOOT=yes
    BOOTPROTO=none
    HWADDR=00:50:8d:b2:51:b5
    TYPE=Ethernet
    NETMASK=255.255.255.0
    IPADDR=192.168.0.10
    GATEWAY=192.168.0.254
    USERCTL=no
    IPV6INIT=no
    PEERDNS=yes


    any help appreciated. Thanks.

  2. Re: Two network cards howto

    Mon, 09 Jun 2008 20:29:05 +0000, Jim:


    > I have to add this in rc.local:
    > route add default gw 192.168.1.1 dev eth0
    >
    > otherwise no machine will go on ethernet.
    >

    meant "on internet", of course.

  3. Re: Two network cards howto

    Jim wrote:
    > Hi all,
    > running fedora 8, the title says almost all.
    >
    > On eth0 there's the adsl router. The internal network is on eth1,
    > 192.168.0.something .
    >
    > I'd like to use eth1 for internal files transfert, yet all the traffic
    > goes on eth0 only.
    >
    > I have to add this in rc.local:
    > route add default gw 192.168.1.1 dev eth0
    >
    > otherwise no machine will go on ethernet.


    Remove GATEWAY line on ETH1 this
    should work BETTER ;-)


    >
    > Here are the two configurations:
    >
    > cat ifcfg-eth0
    > # Realtek Semiconductor Co., Ltd. RTL-8169SC Gigabit Ethernet
    > DEVICE=eth0
    > ONBOOT=yes
    > BOOTPROTO=none
    > HWADDR=00:50:8d:b2:51:b4
    > NETMASK=255.255.255.0
    > IPADDR=192.168.1.100
    > GATEWAY=192.168.1.1
    > TYPE=Ethernet
    > USERCTL=no
    > IPV6INIT=no
    > PEERDNS=yes
    >
    >
    > and
    >
    > cat ifcfg-eth1
    > # Realtek Semiconductor Co., Ltd. RTL-8169SC Gigabit Ethernet
    > DEVICE=eth1
    > ONBOOT=yes
    > BOOTPROTO=none
    > HWADDR=00:50:8d:b2:51:b5
    > TYPE=Ethernet
    > NETMASK=255.255.255.0
    > IPADDR=192.168.0.10
    > GATEWAY=192.168.0.254
    > USERCTL=no
    > IPV6INIT=no
    > PEERDNS=yes
    >
    >
    > any help appreciated. Thanks.


  4. Re: Two network cards howto

    On Jun 9, 11:29 pm, Jim wrote:
    > Hi all,
    > running fedora 8, the title says almost all.
    >
    > On eth0 there's the adsl router. The internal network is on eth1,
    > 192.168.0.something .
    >
    > I'd like to use eth1 for internal files transfert, yet all the traffic
    > goes on eth0 only.
    >
    > I have to add this in rc.local:
    > route add default gw 192.168.1.1 dev eth0
    >
    > otherwise no machine will go on ethernet.

    Remove the line of the Gateway entry on eth1 file and you will not
    need to add that line to your rc.local?
    It should be only 1 default Gateway to a system, Or if you have 2
    Internet connections and want to use them both it's another story and
    they call it multi path routing and is that case your system will not
    has a default gateway entry. You use eth0 to connect to the wan, So
    it's only need a gateway entry, And this will be your default gateway.
    -Do you know why you can't contact the Internet without adding that
    line to your rc.local file, It's just because Linux execute the
    startup scripts in sequential, In this case Linux add the entry of the
    gateway on eth0 first as the default gateway to the system, Then You
    added another default gateway to eth1 which is 192.168.0.254, Now the
    system will consider this ip your default gateway, And so your system
    will not be able to reach the Internet through this ip and this
    interface. Then rc,local is the last line to be executed, And so it
    added the right gateway again which in your case is 192.168.1.1 ,So
    your system could reach the Internet
    -Just use the route command to show your routing information and you
    will know there what is wrong

    > Here are the two configurations:
    >
    > cat ifcfg-eth0
    > # Realtek Semiconductor Co., Ltd. RTL-8169SC Gigabit Ethernet
    > DEVICE=eth0
    > ONBOOT=yes
    > BOOTPROTO=none
    > HWADDR=00:50:8d:b2:51:b4
    > NETMASK=255.255.255.0
    > IPADDR=192.168.1.100
    > GATEWAY=192.168.1.1
    > TYPE=Ethernet
    > USERCTL=no
    > IPV6INIT=no
    > PEERDNS=yes
    >
    > and
    >
    > cat ifcfg-eth1
    > # Realtek Semiconductor Co., Ltd. RTL-8169SC Gigabit Ethernet
    > DEVICE=eth1
    > ONBOOT=yes
    > BOOTPROTO=none
    > HWADDR=00:50:8d:b2:51:b5
    > TYPE=Ethernet
    > NETMASK=255.255.255.0
    > IPADDR=192.168.0.10
    > GATEWAY=192.168.0.254
    > USERCTL=no
    > IPV6INIT=no
    > PEERDNS=yes
    >
    > any help appreciated. Thanks.

    Ask if you need further information,
    Regards,

  5. Re: Two network cards howto

    Tue, 10 Jun 2008 01:19:45 -0700, habibielwa7id:

    > On Jun 9, 11:29 pm, Jim wrote:
    >> Hi all,
    >> running fedora 8, the title says almost all.
    >>
    >> On eth0 there's the adsl router. The internal network is on eth1,
    >> 192.168.0.something .


    >> any help appreciated. Thanks.

    > Ask if you need further information,
    > Regards,


    Thanks a lot to both of you, and thanks for the explanation. Now the net
    is fine and dandy.

+ Reply to Thread