Re: Network sharing without using NAT, possible?

From: xerces8
Date: Thu Nov 22 2007 - 06:52:16 EST


From: Mateus Interciso <p.zarnick@xxxxxxxxx>
Date: Wed, 21 Nov 2007 16:11:17 +0000 (UTC)

> On Wed, 21 Nov 2007 13:04:40 +0000, Mateus Interciso wrote:
> > I've setted up the bridge normally
> >
> > ifconfig eth0 down
> > ifconfig eth1 down
> > ifconfig eth0 0.0.0.0 up
> > ifconfig eth1 0.0.0.0 up
> > brctl addbr br0
> > brctl addif br0 eth0
> > brctl addif br0 eth1
> > brctl stp br0 on
> > ifconfig br0 10.100.0.1 netmask 255.255.255.0 up
> >
> > but I can't ping 10.100.0.1. :O
> > Am I missing something?
> >
> > Let me recall that the network setup now is like this:
> > [Internet]--->[Bridge]---->[Windows 2k3]=====[switch]====>computers
> >
> > Thanks.
> >
> > Mateus
> >
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-net" in
> > the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info
> > at http://vger.kernel.org/majordomo-info.html
>
> Maybe, if I explain a little more about the fisical network we have, it
> may be easier to understand(or find the problem)
>
> The bridge works like this
> |---(eth0)---|---->|---(NIC1)--|
> |---BRIDGE---| |---W2k3----|
> Internet--->|---(eth1)---| |---(NIC2)--|--->[D-Link Switch]===>LAN
>
> where NIC1 has the internet IP assigned by the ISP, and NIC2 has the
> internal IP 10.100.0.2, I would like to put the ip 10.100.0.1 on the
> bridge, so that I can access via ssh, and use internet there, so I can
> download ebtables to make the firewall, as well as other monithoring
> tools (like SNMP for instance). But when I put
> ifconfig br0 10.100.0.1 netmask 255.255.255.0 up
> it doesn't ping 10.100.0.2 for instance, am I missing something here?


Ah, it is simple then.

Set the linux br0 address to some other private range, for example
ifconfig br0 10._101_.0.1 netmask 255.255.255.0 up

Then set some routes on it:
to <NIC1_IP> over interface br0
(if it complains about IP address mismatch, write back and we will sort it out)

Well that's it ;-)

Regards,
David


-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html