[openstack-dev] How does instance's tap device macaddress generate?

Andreas Scheuring scheuran at linux.vnet.ibm.com
Thu Jun 11 15:52:15 UTC 2015


Maybe this helps (taken from [1])

"Actually there is one way that the MAC address of the tap device
affects
proper operation of guest networking - if you happen to set the tap
device's MAC identical to the MAC used by the guest, you will get errors
from the kernel similar to this:


  kernel: vnet9: received packet with own address as source address"



[1] http://www.redhat.com/archives/libvir-list/2012-July/msg00984.html
-- 
Andreas 
(irc: scheuran)


On Thu, 2015-06-11 at 21:48 +0800, changzhi wrote:
> Hi, I know that neutron port's mac address was generated by
> neutron.conf and default value is "fa:16:3e" which from base_mac
> configuration. I don't know how the tap device's mac address generates
> and why tap device mac address was "fe:16:3e:xxx". I think that tap
> device mac address was generated by libvirt. 
> 
> 
> Thx
> changzhi
>  
>  
> ------------------ Original ------------------
> From:  "Radek Smigielski"<radek.smigielski at ymail.com>;
> Date:  Thu, Jun 11, 2015 07:26 PM
> To:  "OpenStack Development Mailing List (not for usage
> questions)"<openstack-dev at lists.openstack.org>; 
> 
> Subject:  Re: [openstack-dev] How does instance's tap device
> macaddress generate?
>  
> > On Thursday, 11 June 2015, 12:00:46, Neil Jerram
> <Neil.Jerram at metaswitch.com> wrote:
> > > On 11/06/15 10:47, changzhi wrote:
> >>  Hi, all.
> >>  I create a vm and it's neutron port's mac address is
> >>  "fa:16:3e:3f:02:ff". I see "fa:16:3e:3f:02:ff" inside 
> > vm when I run
> >>  "ifconfig eth0". Why does vm's tap device's mac address 
> > is
> >>  "fe:16:3e:3f:02:ff"? Why different between neutron port's mac 
> > address
> >>  and tap device's mac address? Does libvirt create instance tap
> device
> >>  and its mac address is generated randomly?
> >> 
> >>  Thx
> >>  zhi
> > 
> > There are two MAC addresses, one at each end of the link between
> the 
> > host and the VM.
> > 
> > -------------------+
> >   Host              |           +-------------------+
> >                     |           |             VM    |
> >      tap12345-CD ------------------- eth0           |
> >   fa:16:3e:56:71:42 |           | fa:16:3e:3f:02:ff |
> >                     |           |                   |
> >                     |           +-------------------+
> > -------------------+
> > 
> > I believe that both of these addresses are randomly generated,
> although 
> > I'm not sure exactly which components do that.
> > 
> > Does that help at all?
> > 
> > Thanks,
> >     Neil
> 
> 
> 
> In neutron.conf you've got base_mac option and "fa:16:3e" is the
> default value.
> 
> # Base MAC address. The first 3 octets will remain unchanged. If the
> # 4h octet is not 00, it will also be used. The others will be
> # randomly generated.
> # 3 octet
> # base_mac = fa:16:3e:00:00:00
> # 4 octet
> # base_mac = fa:16:3e:4f:00:00
> 
> 
> 
> 
> 
> Cheers,
> Radosław Śmigielski
> 
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe:
> OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> 
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




More information about the OpenStack-dev mailing list