[Nottingham] NIC MACs aliases & IP aliases

Martin martin at ml1.co.uk
Wed May 13 14:50:09 UTC 2009


Mark O'Shea wrote:
> On Fri, May 08, 2009 at 06:30:36PM +0100, Martin wrote:
>> Tried that so that I can have multiple MACs behind one physical NIC to a 
>> network and...
>>
>> The ARP doesn't work :-(
>>
> echo 1 > /proc/sys/net/ipv4/conf/tap0/proxy_arp
> plus for tap1.                                                                  

Nice idea but no beer...

I also tried that with 'forwarding', and also both for the br0 device 
also. All no go.

So...?


Is the problem that I'm bridging multiple taps together rather than 
bridging eth devices? The examples elsewhere all have multiple eths 
bridged with the eths in promisc mode and an IP address given to the 
bridge (br0) device... Whereas I'm connecting one eth to multiple taps 
to have multiple IPs with unique MACs.

Or should I be using tun devices instead? (But they're at ISO level 3 
rather than level 2...)

Or does this need a vde switch...?!


So, I have:


network --- eth0 --- br0 --- tap0
(switch)              |
                       |
                        ----- tap1

eth0, br0, tap0, tap1 are all in the same host.


Using:



tunctl -t tap0
tunctl -t tap1

brctl addbr br0
brctl addif br0 eth0
brctl addif br0 tap0
brctl addif br0 tap1

ifconfig eth0 0.0.0.0 up
ifconfig tap0 192.168.128.127/24 up 

ifconfig tap1 192.168.128.126/24 up
 

echo 1 >/proc/sys/net/ipv4/conf/eth0/proxy_arp 


echo 1 >/proc/sys/net/ipv4/conf/tap0/proxy_arp 

echo 1 >/proc/sys/net/ipv4/conf/tap1/proxy_arp 




This gives:



route

Kernel IP routing table 

Destination     Gateway         Genmask         Flags Metric Ref    Use 
Iface
192.168.128.0   *               255.255.255.0   U     5      0        0 
tap1
192.168.128.0   *               255.255.255.0   U     5      0        0 
tap0
link-local      *               255.255.0.0     U     5      0        0 
tap1
link-local      *               255.255.0.0     U     5      0        0 
tap0
loopback        *               255.0.0.0       U     0      0        0 
lo
default         192.168.128.254 0.0.0.0         UG    5      0        0 tap1


But

arp -a

shows no HWtype or HWaddress for anything.


Anyone with any ideas before I guess further?

Cheers,
Martin

-- 
----------------
Martin Lomas
martin at ml1.co.uk
----------------



More information about the Nottingham mailing list