Pseudo-Interface is returning wrong mac address

2 messages, 2 authors, 2017-02-06 · open the first message on its own page

Pseudo-Interface is returning wrong mac address

From: Shaaa <hidden>
Date: 2017-02-03 05:56:33

Hi,

I am trying to setup macvlans on a centos7 box. The plan is to have
10.1.1.1/24 on the *main* interface, and then a 10.1.1.10/32 on a
macvlan interface. Output below:

2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP qlen 1000
    link/ether 01:0d:26:9d:cd:16 brd ff:ff:ff:ff:ff:ff
    inet 10.1.1.1/24 brd 10.1.1.1.255 scope global ens33
       valid_lft forever preferred_lft forever
8: peth1@ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
noqueue state UNKNOWN qlen 1000
    link/ether 02:1a:11:ed:22:ac brd ff:ff:ff:ff:ff:ff
    inet 10.1.1.10/32 scope global peth1
       valid_lft forever preferred_lft forever


The problem is whenever I do arping 10.1.1.10 from another another
host on the network, the mac address of ens33 is returned as opposed
to peth0. I am not entirely sure whether this is intended behaviour or
whether it is a bug, but from what I have gathered, the mac of peth0
should be returned.

I am running the following:
centos 7.3.1611
kernel 3.10.0-514.2.2.el7.x86_64
iproute.x86_64, package version: 3.10.0-74.el7

Please advise.

Re: Pseudo-Interface is returning wrong mac address

From: Michal Kubecek <hidden>
Date: 2017-02-06 12:18:44

On Fri, Feb 03, 2017 at 05:56:31AM +0000, Shaaa wrote:
I am trying to setup macvlans on a centos7 box. The plan is to have
10.1.1.1/24 on the *main* interface, and then a 10.1.1.10/32 on a
macvlan interface. Output below:

2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP qlen 1000
    link/ether 01:0d:26:9d:cd:16 brd ff:ff:ff:ff:ff:ff
    inet 10.1.1.1/24 brd 10.1.1.1.255 scope global ens33
       valid_lft forever preferred_lft forever
8: peth1@ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
noqueue state UNKNOWN qlen 1000
    link/ether 02:1a:11:ed:22:ac brd ff:ff:ff:ff:ff:ff
    inet 10.1.1.10/32 scope global peth1
       valid_lft forever preferred_lft forever


The problem is whenever I do arping 10.1.1.10 from another another
host on the network, the mac address of ens33 is returned as opposed
to peth0. I am not entirely sure whether this is intended behaviour or
whether it is a bug, but from what I have gathered, the mac of peth0
should be returned.
Yes, it's intentional and it's not specific to macvlan; you can observe
similar effect whenever you connect two interfaces to the same segment.
By default, linux kernel responds to an ARP query for any local address
on any interface (sometimes called "ARP flux"). This behaviour can be
changed via sysctl, see arp_ignore and arp_filter in
Documentation/networking/ip-sysctl.txt

Michal Kubecek
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help