[Nottingham] NIC MACs aliases & IP aliases

Martin martin at ml1.co.uk
Fri Mar 27 14:26:27 UTC 2009

Martin wrote:
> OK folks,
> likely a rather silly question...
> Just as you can have IP aliases for a NIC...
> Can multiple MACs be spoofed for a single NIC?
> For example, can one NIC port be made to appear to be multiple physical 
> ports to a network switch?

Wow! What an interesting one this has turned out to be...

Thanks for the comments so far.

 From my searchings, interesting snippets are:

VETH - a daemon that creates a virtual ethernet card

VDE - Virtual Distributed Ethernet

(HURD anyone?...)

And as ever, I'm wondering if I'm trying to come up with too flexible a 

One 'trick' that looks to be good is to use the kernel TUN/TAP and 
bridging modules to set up:

tap0 ---|
         br0 --- eth0
tap1 ---|

so that eth0 just looks/behaves like the port on a network switch 
connected to two (virtual) physical devices tap0 and tap1 (and as many 
others as you wish). Looks ideal for fail-over and whatever else...

So... Will it work and how do you set it up?

I'm guessing:

tunctl -t tap0 (to create tap0 with unique MAC)
tunctl -t tap1 (to create tap1 with unique MAC)

brctl addbr br0
brctl addif br0 eth0
brctl addif br0 tap0
brctl addif br0 tap1
brctl stp br0 off

...and then ifup them with an IP address and add routing.

One grey bit... Is there any difference between tap and tun other than 
in name?



Martin Lomas
martin at ml1.co.uk

More information about the Nottingham mailing list