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

Srinivas M.A. srinivas.aji at gmail.com
Mon Oct 13 15:43:38 PDT 2008


Hi,

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.

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

On Tue, Oct 14, 2008 at 1:58 AM, Alexis Huxley <ahuxley at gmx.net> wrote:
> Hi, if I set up a bridge, assign an IP address to it, remove the
> IP from a real interface (in my case dummy0, but the same situation
> might apply to an physically unconnected eth1 NIC), plumb that real
> interface into the bridge and plumb one end of a virtual cross-over
> cable (tap0 <-> eth0-in-a-VM) into the bridge too, like this:
>
>        brctl addbr br0
>        ifconfig br0 192.168.1.42 up
>        ifconfig dummy0 0.0.0.0
>        brctl addif br0 dummy0
>        brctl addif br0 tap0
>
> then I can now ping the other side, from both sides. Good.
>
> Actually, dummy0 is superfluous; I might just as well not use it
> in the above lines.
>
> However, purely because I want my bridge to behave like a physical
> bridge/hub/switch which I am used to not having an IP address, I would
> like to use an *anonymous* bridge instead based on a command sequence
> like this:
>
> brctl addbr br0
> ifconfig dummy0 192.168.1.42 up
> brctl addif br0 dummy0
> brctl addif br0 tap0
>
> But all attempts to do this have fail: I cannot ping the other side
> from either side.


More information about the Bridge mailing list