Multiple MAC on a single (physical) interface

Frédéric Perrin frederic.perrin at resel.fr
Fri Feb 6 15:56:27 PST 2009


Le Vendredi 6 à 15:51, Nikos Vassiliadis a écrit :
> FreeBSD will then know that network 10.0.0.0/24 is attached to
> fxp0 and will use fxp0's IP and MAC address to do the ARP query...
>
> So, in short, if you use such a setup:
> fxp0   10.0.0.1/24 ether 00:00:00:01:01:01
> ngeth0 10.0.0.2/32 ether 00:00:00:02:02:02
> ngeth1 10.0.0.3/32 ether 00:00:00:03:03:03
> The IP address in use will be the 10.0.0.1 one
> and the MAC address will be the 00:00:00:01:01:01 one.

Yes indeed : if I do from another host :

$ arping [ngeth0 IP]

I get rl0's MAC as an answer, and doig 'tcpdump -i rl0 ether host
[ngeth0 MAC]' when ssh to my jail behind ngeth0, I don't see any
activity. If I manually add ngeth0's MAC to the other host arp cache,
ssh'ing to my jail works, and packets do have ngeth0's MAC.

I won't be able to work any further on this before next week. Thanks a
lot for your help, Nikos.

-- 
Fred

For the record, my network config looks like (minus lo0) :

% ifconfig 
rl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=8<VLAN_MTU>
	ether 00:1c:f0:f8:cd:d6
	inet6 fe80::21c:f0ff:fef8:cdd6%rl0 prefixlen 64 scopeid 0x1 
	inet 172.22.209.241 netmask 0xffffe000 broadcast 172.22.223.255
	inet6 2001:660:7302:3:21c:f0ff:fef8:cdd6 prefixlen 64 autoconf 
	media: Ethernet autoselect (100baseTX <full-duplex>)
	status: active
ngeth0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
	ether 00:00:39:56:f1:1a
	inet6 fe80::200:39ff:fe56:f11a%ngeth0 prefixlen 64 scopeid 0x4 
	inet 172.22.212.7 netmask 0xffffffff broadcast 172.22.212.7
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	ether 56:34:43:fd:04:57
	id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
	maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200
	root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
	member: ngeth0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
	        ifmaxaddr 0 port 4 priority 128 path cost 2000000
	member: rl0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
	        ifmaxaddr 0 port 1 priority 128 path cost 200000


More information about the freebsd-questions mailing list