Re: configuring Multiple network cards

From: Robert Spielmann (des64NOSPAM_at_gmx.de)
Date: 11/27/03


Date: Thu, 27 Nov 2003 01:23:20 +0100

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!



Relevant Pages

  • RE: Default Route question when there are two nic cards
    ... The default route is tried last. ... There should only be one default gateway ... *every* applicable entry. ...
    (Fedora)
  • Multiple default routes on multihome host
    ... temporary situation while I switch an office network over from one ... I want packets from address A1 to be sent via gateway G1, ... Can I just have more than one default route? ...
    (freebsd-net)
  • Re: Running 2 PPPoE connections connecting to the same PPPoE server.
    ... multiple interface PPPoE route. ... one has knows how PPP works, and routing via gateway works. ... other at the time of PPP connection negotiation. ... packets. ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Ip forwarding
    ... Same IP subnets on different links is a bad idea. ... I deleted it and after many unsuccessful attempts to enter host route I had to settle for network route. ... So is the gateway address really needed to address the packets to the gateway? ...
    (comp.os.linux.networking)
  • Re: DSL works, almost
    ... > Destination Gateway Genmask Flags Metric Ref Use Iface ... > Using DHCPcd, I configure eth1 to have the uuu.vvv address, while ... You should only have 1 default route and that should typically ONLY lead ... it may be best to masquerade (update your iptables rules from dhcpcd ...
    (comp.os.linux.networking)