Re: Mulitple VLANs containing the same ip subnet NATed on same box

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/8/06, Grant Taylor <gtaylor@xxxxxxxxxxxxxxxxx> wrote:
Geoff Karl wrote:
> I know this is not a normal request, but I would like to connect two
> vlans into the same box that have the same subnet on them, and then
> NAT them out to the Internet.
>
> We don't need to make any connections inbound to them, but only
> provide outbound access.
>
> Any suggestions on how to do this?

Bridge the two VLAN interfaces together and assign your internal IP to the bridge interface.  Then you will do standard NATing between your external interface and your bridge interface.  By the way, inbound access will be just as easy as outbound.

> If I can't do it with routing then I could use something like
> user-mode Linux, or other virtualization software.

I don't think you need any thing as complicated as UML.

You could even do this with 1 network interface with everything being VLANs.

I.e.

eth0.0001       VLAN for workstations
eth0.0002       VLAN for workstations
eth0.0003       VLAN for internet access

eth0.0001 and eth0.0002 are bridge together yielding bri0

bri0            internal interface
eth0.0003       external interface

NAT between bri0 and eth0.0003.

If you ever added a second internet service provider, put them on eth0.0004 and update your routing.



Grant. . . .


Thanks for the reply Grant.

What would happen if workstations on the "workstations" vlan had the
same ip addresses?  Can i bridge two networks that have the same ip
addresses without getting errors.

Geoff
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux