Problems with two network cards on Debian Etch - Networking

This is a discussion on Problems with two network cards on Debian Etch - Networking ; Hi, I've installed Debian Etch on a server with two network cards - eth0 connected to the private network and eth1 to the internet - both with static addresses. The installation was completed with eth0 as the primary network connection. ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Problems with two network cards on Debian Etch

  1. Problems with two network cards on Debian Etch

    Hi,

    I've installed Debian Etch on a server with two network cards - eth0
    connected to the private network and eth1 to the internet - both with
    static addresses. The installation was completed with eth0 as the
    primary network connection.

    eth0=192.168.1.90
    eth1=209.xxx.xxx.xxx

    After rebooting, both IP addresses are pingable from the server as
    well as from other computers in the private network, but the public IP
    address is not visible from the internet. However, after a ifdown eth1
    followed by ifup eth1, the public IP address then becomes available
    and I can connect (ssh) to the server from the internet (my home
    machine). (I use a backdoor through another server and get on my
    server to issue the ifdown/ifup commands.)

    Has anyone else faced a similar problem? How does one get to the
    source of the problem? Is there a fix? Is it a problem with Debian?
    Should I use RHEL/CentOS5 instead?

    Thanks. Much appreciated.


  2. Re: Problems with two network cards on Debian Etch

    bisbar@gmail.com wrote:
    > Hi,
    >
    > I've installed Debian Etch on a server with two network cards - eth0
    > connected to the private network and eth1 to the internet - both with
    > static addresses. The installation was completed with eth0 as the
    > primary network connection.
    >
    > eth0=192.168.1.90
    > eth1=209.xxx.xxx.xxx
    >
    > After rebooting, both IP addresses are pingable from the server as
    > well as from other computers in the private network, but the public IP
    > address is not visible from the internet. However, after a ifdown eth1
    > followed by ifup eth1, the public IP address then becomes available
    > and I can connect (ssh) to the server from the internet (my home
    > machine). (I use a backdoor through another server and get on my
    > server to issue the ifdown/ifup commands.)
    >
    > Has anyone else faced a similar problem? How does one get to the
    > source of the problem? Is there a fix? Is it a problem with Debian?
    > Should I use RHEL/CentOS5 instead?


    Is the Net visible from the server, when the server
    is not visible from the Net?

    Does your server have a firewall?

    You can check with

    iptables -nvL

    The pinging of *any* of the local addresses does not
    prove anything about the network connections, as the
    IP stack is smart enough to route traffic to all the
    local addresses via the loopback interface, lo.

    Please check the state of eth1 before and after the
    ifdown/ifup sequence. You can do it with

    ifconfig -a eth1

    --

    Tauno Voipio
    tauno voipio (at) iki fi


  3. Re: Problems with two network cards on Debian Etch

    Hi Tauno,

    Thank you for you reply. In the meantime I stumbled upon a solution.
    In the /etc/network/interfaces I just added eth1 at the end of the
    allow-hotplug line and the card worked after a reboot. I can now ping
    and connect (ssh) from the internet.


    --------
    # The loopback network interface
    auto lo
    iface lo inet loopback

    # The primary network interface
    allow-hotplug eth0 eth1
    iface eth0 inet static
    address 192.168.1.90
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.3
    # dns-* options are implemented by the resolvconf package, if
    installed
    dns-nameservers 192.168.1.10 192.168.1.12
    dns-search neighbourhoodlink.org

    iface eth1 inet static
    address 209.xxx.xxx.xxx
    netmask 255.255.255.240
    gateway 209.xxx.xxx.33

    auto eth1
    auto eth0
    -----




    On Jul 6, 2:07 pm, Tauno Voipio wrote:
    > bis...@gmail.com wrote:
    > > Hi,

    >
    > > I've installed Debian Etch on a server with two network cards - eth0
    > > connected to the private network and eth1 to the internet - both with
    > > static addresses. The installation was completed with eth0 as the
    > > primary network connection.

    >
    > > eth0=192.168.1.90
    > > eth1=209.xxx.xxx.xxx

    >
    > > After rebooting, both IP addresses are pingable from the server as
    > > well as from other computers in the private network, but the public IP
    > > address is not visible from the internet. However, after a ifdown eth1
    > > followed by ifup eth1, the public IP address then becomes available
    > > and I can connect (ssh) to the server from the internet (my home
    > > machine). (I use a backdoor through another server and get on my
    > > server to issue the ifdown/ifup commands.)

    >
    > > Has anyone else faced a similar problem? How does one get to the
    > > source of the problem? Is there a fix? Is it a problem with Debian?
    > > Should I use RHEL/CentOS5 instead?

    >
    > Is the Net visible from the server, when the server
    > is not visible from the Net?
    >
    > Does your server have a firewall?
    >
    > You can check with
    >
    > iptables -nvL
    >
    > The pinging of *any* of the local addresses does not
    > prove anything about the network connections, as the
    > IP stack is smart enough to route traffic to all the
    > local addresses via the loopback interface, lo.
    >
    > Please check the state of eth1 before and after the
    > ifdown/ifup sequence. You can do it with
    >
    > ifconfig -a eth1
    >
    > --
    >
    > Tauno Voipio
    > tauno voipio (at) iki fi




  4. Re: Problems with two network cards on Debian Etch

    Hello,

    bisbar@gmail.com a écrit :
    >
    > iface eth0 inet static
    > address 192.168.1.90
    > netmask 255.255.255.0
    > network 192.168.1.0
    > broadcast 192.168.1.255
    > gateway 192.168.1.3

    ^^^^^^^^^^^^^^^^^^^
    Here is the probable cause of your problem. Having two (or more)
    conflicting active *default* gateways/routes at the same time makes no
    sense and causes trouble. Only one will actually be used, depending on
    which one was created first or last, with 50% chances that it is the
    wrong one.

  5. Re: Problems with two network cards on Debian Etch

    Pascal Hambourg wrote:
    > Hello,
    >
    > bisbar@gmail.com a écrit :
    >
    >>
    >> iface eth0 inet static
    >> address 192.168.1.90
    >> netmask 255.255.255.0
    >> network 192.168.1.0
    >> broadcast 192.168.1.255
    >> gateway 192.168.1.3

    >
    > ^^^^^^^^^^^^^^^^^^^
    > Here is the probable cause of your problem. Having two (or more)
    > conflicting active *default* gateways/routes at the same time makes no
    > sense and causes trouble. Only one will actually be used, depending on
    > which one was created first or last, with 50% chances that it is the
    > wrong one.


    That's right.

    A rule of thumb for setting the default gateway
    for a leaf node in the Net:

    Point default gateway to the next-hop router toward
    the Internet. Without advanced IP routing, there
    must be one and only one default gateway.

    What is a leaf node in the Net?

    It is a node with only one connection to the
    rest of the Net. This applies to the most of us
    Linux users.

    --

    Tauno Voipio
    tauno voipio (at) iki fi

+ Reply to Thread