Networking Forums

Networking Forums > Computer Networking > Linux Networking > configuring Multiple network cards

Reply
Thread Tools Display Modes

configuring Multiple network cards

 
 
Siddharth S Malu
Guest
Posts: n/a

 
      11-26-2003, 01:55 PM
Can anyone help me with this problem (I am new to linux) --

I'm trying to set up a machine as a network router in my lab with the
following configuration:

1. The router machine has 3 network cards
2. eth0 is connected to the outside world (it is working fine currently
- I am connected to the internet.)
3. eth1 is connected to a port to which 2 linux machines are connected.
This is the DMZ - each of the two machines has its own IP address. One
machine is a password and file server and the other is the mail and web
server. eth1 previously had its own IP address
4. eth2 is connected to another port to which all the 192.168 machines
are connected.

I am using this configuration because this is what existed before our
firewall router broke down.

I have these questions:

1. What gateway should I specify for eth1? Should it be the IP address
of eth0?

2. When I do use the IP address of eth0 as gateway for eth1, I am still
connected to the internet, but I cannot ping the machines inside my
domain any more!!

What might I be doing wrong?

--
Change 'T' to 'i' for mailing directly.

 
Reply With Quote
 
 
 
 
Robert Spielmann
Guest
Posts: n/a

 
      11-26-2003, 11:23 PM
Siddharth S Malu wrote:

> Can anyone help me with this problem (I am new to linux) --
>
> I'm trying to set up a machine as a network router in my lab with the
> following configuration:
>
> 1. The router machine has 3 network cards
> 2. eth0 is connected to the outside world (it is working fine currently
> - I am connected to the internet.)
> 3. eth1 is connected to a port to which 2 linux machines are connected.
> This is the DMZ - each of the two machines has its own IP address. One
> machine is a password and file server and the other is the mail and web
> server. eth1 previously had its own IP address
> 4. eth2 is connected to another port to which all the 192.168 machines
> are connected.
>
> I am using this configuration because this is what existed before our
> firewall router broke down.
>
> I have these questions:
>
> 1. What gateway should I specify for eth1? Should it be the IP address
> of eth0?
>
> 2. When I do use the IP address of eth0 as gateway for eth1, I am still
> connected to the internet, but I cannot ping the machines inside my
> domain any more!!
>
> What might I be doing wrong?
>


Are the boxes at eth1 supposed to send password and file data out to the
internet or only to the boxes in the local domain?

To my knowledge, if you set the IP address of eth0 as the default gateway
for eth1, eth1 will send all packets there first. man route tells you about
the GW option:

gw GW route packets via a gateway. NOTE: The specified gateway must be
reachable first. This usually means that you have to set up a static route
to the gateway beforehand. -->If you specify the address of one of your
local interfaces, it will be used to decide about the interface to which
the packets should be routed to.<-- This is a BSDism compatibility hack.

So if eth0 is the default GW of eth1 and it doesn´t know where to route
packets that are supposed to go to one of the boxes connected to eth2, they
can of course not reach their destination. I think you´ll have to set your
own routes here.

Good luck!

 
Reply With Quote
 
David Efflandt
Guest
Posts: n/a

 
      11-27-2003, 06:00 PM
On Wed, 26 Nov 2003, Siddharth S Malu
<(E-Mail Removed)> (T=i) wrote:
> Can anyone help me with this problem (I am new to linux) --
>
> I'm trying to set up a machine as a network router in my lab with the
> following configuration:
>
> 1. The router machine has 3 network cards
> 2. eth0 is connected to the outside world (it is working fine currently
> - I am connected to the internet.)
> 3. eth1 is connected to a port to which 2 linux machines are connected.
> This is the DMZ - each of the two machines has its own IP address. One
> machine is a password and file server and the other is the mail and web
> server. eth1 previously had its own IP address
> 4. eth2 is connected to another port to which all the 192.168 machines
> are connected.
>
> I am using this configuration because this is what existed before our
> firewall router broke down.
>
> I have these questions:
>
> 1. What gateway should I specify for eth1? Should it be the IP address
> of eth0?


None. You only use a gateway for non-local networks (not directly
connected), and I assume 2 boxes on eth1 are directly connected with
switch or hub. Those would only use network or host routing (no gw).

Unless you have any internal routers, your only gateway should be default
gw on eth0 that leads to internet.

> 2. When I do use the IP address of eth0 as gateway for eth1, I am still
> connected to the internet, but I cannot ping the machines inside my
> domain any more!!


You probably have incorrect netmasks and/or routing, but a specific answer
is impossible without knowing IPs/netmasks involved or whether eth0
network knows to use your eth0 IP as gw to reach IPs on eth1.

If using same netmask for eth0 and eth1, that would conflict. You could
try setting eth1 netmask as 255.255.255.255, broadcast same as IP, and
specific host routes for those 2 hosts on eth1 (no route is necessary for
your own eth1 IP). If eth0 network does not know those 2 IPs are behind
you, you may need to enable proxy_arp for eth0
(echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp)

Your iptables also has to be correctly configured (which is easy for 3
nics including DMZ in SuSE, but not sure what tools RH has).

--
David Efflandt - All spam ignored http://www.de-srv.com/
 
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
Using Multiple network cards IshmaelDS Windows Networking 2 07-18-2008 03:01 PM
How to host multiple SSL websites using multiple network cards rou DPL Windows Networking 3 08-01-2007 05:32 PM
Multiple network cards on a single PC Simon Finnigan Home Networking 9 10-26-2005 03:30 PM
multiple network cards in one subnet - possible? Tomasz Chmielewski Linux Networking 15 08-25-2005 08:46 AM
Problem with Multiple network cards on the same subnet. Chris Tellor Linux Networking 0 12-29-2003 05:16 AM



1 2 3 4 5 6 7 8 9 10 11