[Bridge] pinging other side (normal bridge ok, anonymous bridge not ok)

Alexis Huxley ahuxley at gmx.net
Wed Oct 15 00:21:13 PDT 2008


After Richard Voigt's clarification, I came back to this article and
it made a lot more sense to me.

> Adding a dummy device to a bridge doesn't do much for you. The dummy
> device never has any incoming packets, and any outgoing packets are
> discarded.

Understood; plumbing dummy0 into br0 doesn't create a virtual cable.

> The veth driver might be more useful for you. If you have the veth
> module buillt (CONFIG_VETH), you can create an interface pair using:
> $ ip link add name veth0 type veth peer name veth1
> This gives you a pair of ethernet devices (veth0 and veth1) set up so
> that a packet sent out on any one is received on the other. With this,
> you can make one of these a bridge port and give the other end the IP
> address.
>
> One page describing how to use veth for network namespace is:
> http://lxc.sourceforge.net/network/configuration.php

Yes, this is exactly what I need! I tried:

	ifconfig dummy0 down      #  current holder of IP 192.168.1.42
	ip link add name veth0 type veth peer name veth1
	ifconfig veth0 192.168.1.42 up
	ping 192.168.1.42         #  just checking :-)
	brctl addif br0 veth1
	iptables -A INPUT -i veth0 -j ACCEPT
	ping 192.168.1.43

but the ping still did not work. I also ACCEPTed traffic on veth1 and
br0 but no difference. I'll flush all tables and do some more reading
and gooling, but that must all wait till this evening. 

Many thanks for all the help!

Alexis

PS I fully understand that doing it this way is pointless in one way,
   but on the other hand it both helps me to start from a point I
   am familiar with (sticking two physical cables into a physical
   hub) and at the same time I learn something ... even if I do need
   a bit of help! :-) I'm sure in a couple of weeks I'll throw it all 
   out and do it the normal way! :-)



More information about the Bridge mailing list