Networking Forums

Networking Forums > Computer Networking > Linux Networking > Problems with two network cards on Debian Etch

Reply
Thread Tools Display Modes

Problems with two network cards on Debian Etch

 
 
bisbar@gmail.com
Guest
Posts: n/a

 
      07-06-2007, 03:16 PM
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.

 
Reply With Quote
 
 
 
 
Tauno Voipio
Guest
Posts: n/a

 
      07-06-2007, 06:07 PM
(E-Mail Removed) 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

 
Reply With Quote
 
bisbar@gmail.com
Guest
Posts: n/a

 
      07-06-2007, 09:58 PM
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 <tauno.voi...@INVALIDiki.fi> 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



 
Reply With Quote
 
Pascal Hambourg
Guest
Posts: n/a

 
      07-06-2007, 10:44 PM
Hello,

(E-Mail Removed) 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.
 
Reply With Quote
 
Tauno Voipio
Guest
Posts: n/a

 
      07-07-2007, 08:35 AM
Pascal Hambourg wrote:
> Hello,
>
> (E-Mail Removed) 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 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
Problem with Debian Etch and NTP Àngel Català Linux Networking 22 04-11-2008 02:21 PM
Problem with inews on Debian etch Laurens Kils-Huetten Linux Networking 0 06-21-2007 06:25 PM
Problem with dns in Debian Etch cantabile Linux Networking 0 05-18-2007 10:10 PM
Debian Etch, DEC 21041 NIC chip set Dave Boland Linux Networking 1 05-12-2007 07:31 PM
debian [testing/etch] redirected broadcasts not working mabra Linux Networking 2 02-19-2007 05:59 AM



1 2 3 4 5 6 7 8 9 10 11