linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* what dictates p2p0 address?
@ 2012-11-21  8:40 George Nychis
  2012-11-21  9:36 ` Arend van Spriel
  2012-11-21  9:36 ` Arend van Spriel
  0 siblings, 2 replies; 3+ messages in thread
From: George Nychis @ 2012-11-21  8:40 UTC (permalink / raw)
  To: linux-wireless@vger.kernel.org

For an ad-hoc or Wifi-Direct interface, which usually seems to be
named p2p0, I'm finding that the MAC address mirrors the Wifi card's
MAC address for octets 2-6, but it seems as though octet 1 is dynamic.
 So, for example:

Wifi: 7c:d1:c3:e0:a6:81
p2p0: 0e:d1:c3:e0:a6:81

This is true across a bunch of devices that I own, but I can't seem to
find a definitive answer to how octet 1 is mutated to choose the p2p0
address.

Is this something chosen randomly, or is it a function of some other
part of the address?

- George

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: what dictates p2p0 address?
  2012-11-21  8:40 what dictates p2p0 address? George Nychis
@ 2012-11-21  9:36 ` Arend van Spriel
  2012-11-21  9:36 ` Arend van Spriel
  1 sibling, 0 replies; 3+ messages in thread
From: Arend van Spriel @ 2012-11-21  9:36 UTC (permalink / raw)
  To: George Nychis; +Cc: linux-wireless@vger.kernel.org

On 11/21/2012 09:40 AM, George Nychis wrote:
> For an ad-hoc or Wifi-Direct interface, which usually seems to be
> named p2p0, I'm finding that the MAC address mirrors the Wifi card's
> MAC address for octets 2-6, but it seems as though octet 1 is dynamic.
>   So, for example:
>
> Wifi: 7c:d1:c3:e0:a6:81
> p2p0: 0e:d1:c3:e0:a6:81
>
> This is true across a bunch of devices that I own, but I can't seem to
> find a definitive answer to how octet 1 is mutated to choose the p2p0
> address.

First dealing with your opening sentence. Not sure if you truly mean 
ad-hoc here. Do not use that term if you are actually talking about 
wifi-direct because it is a totally different beast.

The definitive, but unambiguous, answer is in the WFA spec:

"The P2P Device shall assign a P2P Interface Address, corresponding to 
the format as described in §7.1.3.3.1 of IEEE Std 802.11‑2007 [1], which 
is used to communicate with the P2P Group Owner or Clients within a P2P 
Group. A P2P Interface Address is not required to be globally unique and 
may be locally administered. A P2P Interface Address may be the same as 
the P2P Device Address provided the requirements for P2P Interface 
Address in this clause are satisfied."

Actually, the MAC address details are in 802 spec (free IEEE download) 
in paragraph 9.2. Your p2p0 address has locally administered bit set and 
fiddle some more bits.

> Is this something chosen randomly, or is it a function of some other
> part of the address?

Most likely, as you can see from the example, it is derived. This is 
done in the device (or the driver) so there is no single rule or 
implementation except the guidelines/requirements from the spec.

Gr. AvS


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: what dictates p2p0 address?
  2012-11-21  8:40 what dictates p2p0 address? George Nychis
  2012-11-21  9:36 ` Arend van Spriel
@ 2012-11-21  9:36 ` Arend van Spriel
  1 sibling, 0 replies; 3+ messages in thread
From: Arend van Spriel @ 2012-11-21  9:36 UTC (permalink / raw)
  To: George Nychis; +Cc: linux-wireless@vger.kernel.org

On 11/21/2012 09:40 AM, George Nychis wrote:
> For an ad-hoc or Wifi-Direct interface, which usually seems to be
> named p2p0, I'm finding that the MAC address mirrors the Wifi card's
> MAC address for octets 2-6, but it seems as though octet 1 is dynamic.
>   So, for example:
>
> Wifi: 7c:d1:c3:e0:a6:81
> p2p0: 0e:d1:c3:e0:a6:81
>
> This is true across a bunch of devices that I own, but I can't seem to
> find a definitive answer to how octet 1 is mutated to choose the p2p0
> address.

First dealing with your opening sentence. Not sure if you truly mean 
ad-hoc here. Do not use that term if you are actually talking about 
wifi-direct because it is a totally different beast.

The definitive, but unambiguous, answer is in the WFA spec:

"The P2P Device shall assign a P2P Interface Address, corresponding to 
the format as described in §7.1.3.3.1 of IEEE Std 802.11‑2007 [1], which 
is used to communicate with the P2P Group Owner or Clients within a P2P 
Group. A P2P Interface Address is not required to be globally unique and 
may be locally administered. A P2P Interface Address may be the same as 
the P2P Device Address provided the requirements for P2P Interface 
Address in this clause are satisfied."

Actually, the MAC address details are in 802 spec (free IEEE download) 
in paragraph 9.2. Your p2p0 address has locally administered bit set and 
fiddle some more bits.

> Is this something chosen randomly, or is it a function of some other
> part of the address?

Most likely, as you can see from the example, it is derived. This is 
done in the device (or the driver) so there is no single rule or 
implementation except the guidelines/requirements from the spec.

Gr. AvS


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-11-21  9:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-21  8:40 what dictates p2p0 address? George Nychis
2012-11-21  9:36 ` Arend van Spriel
2012-11-21  9:36 ` Arend van Spriel

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).