Skip to contentSkip to conversation

Netmap on a single host?

DISCUSSION Martin Fandel 2 participants 2 messages Jan 10, 2011

lore
Share & tools
lore
#0 lore raw

Hi,

does the module NETMAP work on a single host environment? I have the following environment. It works perfectly by using two NETMAP systems. Here is an little connection flow overview:

Endhost 1: 10.10.10.10/32 <-> Gateway 1: 10.10.10.1/32 <---> Line Gateway 1: 192.168.1.1/32 <---> Line Gateway 2: 192.168.1.2/32 <---> Gateway 2: 10.10.10.1/32 <-> Endhost 2: 10.10.10.10/32

If Enhost 1 want to connect to Endhost 2, the host connects to 10.30.10.0/24, which is the netmap'ped net for Gateway 2. If Endhost 2 wants to connect to Endhost 1, the host connects to 10.20.10.0/24, which is the netmap'ped net for Gateway 1.

The NETMAP solution works, but I can't migrate the two gateway hosts to one single host. Does anybody know how to manage this? I'm a little bit confused. I've it tried this way, but I can't get it working:

SingleHostGateway:

eth0 > vlan trunk to cisco
eth0.1 > vlan 1 for endhost 1 with the ip 10.10.10.1 eth0.2 > vlan 2 for endhost 2 with the ip 10.10.10.1

If I'm applying the iptables-Rules to this construct, it seems that it is not possible to set the Rules for single interfaces?!? Or that the Linux Routing can't do it.

Maybe someone of you guys can help me? That would be very nice.

Thanks a lot!

Regards,

Martin

Signature · 2 lines
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit 
gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
#1 lore raw

Hi,

Quoted 3 lines

If I'm applying the iptables-Rules to this construct, it seems that it is not possible to set the Rules for single interfaces?!? Or that the Linux Routing can't do it.

You can use Linux Containers to have two separate network stacks on one box. It'd allow what you want to do.

http://lxc.sourceforge.net/
http://www.ibm.com/developerworks/linux/library/l-lxc-containers/
http://en.opensuse.org/LXC
http://wiki.archlinux.org/index.php/Linux_Containers
http://nigel.mcnie.name/blog/a-five-minute-guide-to-linux-containers-for-debian
http://sunoano.name/ws/public_xhtml/linux_containers.html
http://sysadmin-cookbook.rot13.org/#lxc
http://code.google.com/p/coreemu/wiki/Namespaces

best regards,
Marek Kierdelewicz