Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Mar 2013 10:37:22 -0400
From:      Ryan Stone <rysto32@gmail.com>
To:        Pablo Ribalta Lorenzo <rlp@semihalf.com>
Cc:        Barney Cordoba <barney_cordoba@yahoo.com>, freebsd-net <freebsd-net@freebsd.org>
Subject:   Re: vlan with modified MAC fails to communicate
Message-ID:  <CAFMmRNwfwhkP%2B8jrxjj5ou9jnuoHdeArk8wJdipLVS3mMrNC=g@mail.gmail.com>
In-Reply-To: <51559F9B.3060608@semihalf.com>
References:  <1364561838.74177.YahooMailClassic@web121605.mail.ne1.yahoo.com> <51559F9B.3060608@semihalf.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Mar 29, 2013 at 10:05 AM, Pablo Ribalta Lorenzo <rlp@semihalf.com>wrote:

> Thanks for your answer Barney,
>
> I'm going to extend a little bit the explanation of the issue as it may be
> too brief.
>
> First of all, ifconfig shows me this (mge being the NIC):
>
> mge1: flags=8843<UP,BROADCAST,**RUNNING,SIMPLEX,MULTICAST> metric 0 mtu
> 1500
>         options=8000b<RXCSUM,TXCSUM,**VLAN_MTU,LINKSTATE>
>         ether 00:01:01:58:31:30
>         inet 192.168.126.9 netmask 0xffffff00 broadcast 192.168.126.255
>         media: Ethernet autoselect (1000baseT <full-duplex,master>)
>         status: active
> vlan1: flags=8843<UP,BROADCAST,**RUNNING,SIMPLEX,MULTICAST> metric 0 mtu
> 1500
>         ether 00:01:01:58:31:30
>         media: Ethernet autoselect (1000baseT <full-duplex,master>)
>         status: active
>         vlan: 100 parent interface: mge1
>
>
> Once I set up the ip for vlan1, I'm able to ping outside:
>
> #ifconfig vlan1 inet 172.18.0.254
>
> #ping 172.18.0.1
> PING 172.18.0.1 (172.18.0.1): 56 data bytes
> 64 bytes from 172.18.0.1: icmp_seq=0 ttl=64 time=2.511 ms
> ^C
> --- 172.18.0.1 ping statistics ---
> 1 packets transmitted, 1 packets received, 0.0% packet loss
>
>
> I change MAC address for vlan1 :
> #ifconfig vlan1 ether 00:0d:01:58:51:30
>
> mge1: flags=8843<UP,BROADCAST,**RUNNING,SIMPLEX,MULTICAST> metric 0 mtu
> 1500
>         options=8000b<RXCSUM,TXCSUM,**VLAN_MTU,LINKSTATE>
>         ether 00:01:01:58:31:30
>         inet 192.168.126.9 netmask 0xffffff00 broadcast 192.168.126.255
>         media: Ethernet autoselect (1000baseT <full-duplex,master>)
>         status: active
> vlan1: flags=8843<UP,BROADCAST,**RUNNING,SIMPLEX,MULTICAST> metric 0 mtu
> 1500
>         ether 00:0d:01:58:51:30
>         inet 172.18.0.254 netmask 0xffff0000 broadcast 172.18.255.255
>         media: Ethernet autoselect (1000baseT <full-duplex,master>)
>         status: active
>         vlan: 100 parent interface: mge1
>
> And here is where the problems start, as I'm not able to contact with
> vlan1 from the outside unless:
>
> - Restore the MAC address to be 00:01:01:58:31:30 again
> - Set up promisc mode
>
> As I said, since I was able to see this issue in other platforms and with
> more mature drivers than my 'mge',
> I don't know if this is the expected behavior, or my NIC driver is missing
> something to be able to deal
> with this situation.
>
> However thanks for your hint, I feel I need a little bit of perspective in
> this issue.


>From a quick glance at if_vlan.c, it doesn't do anything intelligent when
you change its MAC address.  I also don't know of any ethernet driver in
FreeBSD that allows you to use multiple unicast MACs at once (I have some
patches for ixgbe, but they aren't ready for prime-time).  If you really
want to have a different MAC on your vlan interface from its parent you
will have to put the parent into promiscuous mode.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFMmRNwfwhkP%2B8jrxjj5ou9jnuoHdeArk8wJdipLVS3mMrNC=g>