I have my RaspberryPi3 (latest Raspbian) connected via WiFi to my WLAN router
mac=XX:XX:XX:XX:XX:A5. However, when I perform
the following, I get quite different results for the MAC.
# ifconfig wlan0 wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.198 netmask 255.255.255.0 broadcast 192.168.1.255 ... ether ZZ:ZZ:ZZ:ZZ:ZZ:c9 txqueuelen 1000 (Ethernet) ... # arp -ni wlan0 Address HWtype HWaddress Flags Mask Iface 192.168.1.1 ether XX:XX:XX:XX:XX:A5 C wlan0 # iw wlan0 info Interface wlan0 ... addr ZZ:ZZ:ZZ:ZZ:ZZ:c9 # iw wlan0 link Connected to XX:XX:XX:XX:XX:a7 (on wlan0) ... # iwconfig wlan0 ... Mode:Managed Frequency:2.412 GHz Access Point: XX:XX:XX:XX:XX:a7 # iw --version iw version 4.9
The iw man pages, doesn't say much.
- As for
ifconfig, it shows my own adapter MAC (
- As for
arp, it shows the correct WLAN router MAC (
- But for
iw wlan link, it shows a third MAC! (
- And for
iwconfig wlan0, it also show that 3rd MAC.
Q. What is that mysterious 3rd MAC address representing?
Thanks to the info provided by @mtak we need to look at what is going on in the different OSI layers. Most IP discovery operations take place on the Network Layer (
L3), whereas the MAC "stuff" happen on the Data Link layer (
L2) and below (Physical).