* How does the linux kernel select the MAC address for TAP devices? @ 2014-06-16 8:00 Albert Krenz 2014-06-16 13:39 ` Vlad Yasevich 2014-06-17 10:25 ` Daniel Borkmann 0 siblings, 2 replies; 3+ messages in thread From: Albert Krenz @ 2014-06-16 8:00 UTC (permalink / raw) To: netdev As stated in the email subject: Where does the kernel get the used MAC-Adress for a newly create TAP device? Are they randomly generated or does it select one from a fixed pool of reserved MAC-Adresses? I have not found any official documentation about the selection of MAC-addresses for TAP-devices. Most sites like http://backreference.org/2010/03/26/tuntap-interface-tutorial/ state that the MAC addresses are auto-generated and can be changed. But they do not explain the generation rules. Does anyone know an official document (preferably from kernel.org) explaining the MAC selection process? Or is it only explained in the Source? ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How does the linux kernel select the MAC address for TAP devices? 2014-06-16 8:00 How does the linux kernel select the MAC address for TAP devices? Albert Krenz @ 2014-06-16 13:39 ` Vlad Yasevich 2014-06-17 10:25 ` Daniel Borkmann 1 sibling, 0 replies; 3+ messages in thread From: Vlad Yasevich @ 2014-06-16 13:39 UTC (permalink / raw) To: Albert Krenz, netdev On 06/16/2014 04:00 AM, Albert Krenz wrote: > As stated in the email subject: Where does the kernel get the used > MAC-Adress for a newly create TAP device? Are they randomly generated > or does it select one from a fixed pool of reserved MAC-Adresses? > > I have not found any official documentation about the selection of > MAC-addresses for TAP-devices. Most sites like > http://backreference.org/2010/03/26/tuntap-interface-tutorial/ state > that the MAC addresses are auto-generated and can be changed. But they > do not explain the generation rules. > > Does anyone know an official document (preferably from kernel.org) > explaining the MAC selection process? Or is it only explained in the > Source? Yes, it is explained in the source. In particular look at the function tun_net_init(). The default MAC is random. -vlad ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How does the linux kernel select the MAC address for TAP devices? 2014-06-16 8:00 How does the linux kernel select the MAC address for TAP devices? Albert Krenz 2014-06-16 13:39 ` Vlad Yasevich @ 2014-06-17 10:25 ` Daniel Borkmann 1 sibling, 0 replies; 3+ messages in thread From: Daniel Borkmann @ 2014-06-17 10:25 UTC (permalink / raw) To: Albert Krenz; +Cc: netdev On 06/16/2014 10:00 AM, Albert Krenz wrote: > As stated in the email subject: Where does the kernel get the used > MAC-Adress for a newly create TAP device? Are they randomly generated > or does it select one from a fixed pool of reserved MAC-Adresses? > > I have not found any official documentation about the selection of > MAC-addresses for TAP-devices. Most sites like > http://backreference.org/2010/03/26/tuntap-interface-tutorial/ state > that the MAC addresses are auto-generated and can be changed. But they > do not explain the generation rules. > > Does anyone know an official document (preferably from kernel.org) > explaining the MAC selection process? Or is it only explained in the > Source? See: drivers/net/tun.c +936 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-06-17 10:25 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-06-16 8:00 How does the linux kernel select the MAC address for TAP devices? Albert Krenz 2014-06-16 13:39 ` Vlad Yasevich 2014-06-17 10:25 ` Daniel Borkmann
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).