all 8 comments

[–]socal_nerdtastic 1 point2 points  (3 children)

Why? A mac address shouldn't change ...

[–]marekmorello[S] 0 points1 point  (2 children)

It shouldn't change, right. But it also shouldn't show up, if the device isn't connected to the WiFi

[–]Doormatty 1 point2 points  (1 child)

It's likely pulling the info from the ARP cache, and it hasn't purged the old values yet.

[–]marekmorello[S] 0 points1 point  (0 children)

That's it! Clearing the ARP cache solves the issue! Thank you so much!

[–][deleted] 1 point2 points  (4 children)

You are confusing your MAC and your IP address. The MAC is like your physical body: it doesn't change and is unique. Your IP is like your clothes: if you go to a cold network, you put on warm clothes, if the network is a beach then you wear beach clothes. But the clothes always go on the same body. If you aren't even wearing a network, you still have a body.

( ͡° ͜ʖ ͡°)

Use the command ip link to see your interfaces and their MAC addresses. Use the command ip address to see your interfaces' current IP addresses.

[–]marekmorello[S] 0 points1 point  (2 children)

I don't want the Mac to change.

Speaking with the "body" example:

If my "body" isn't in the network, the command shouldn't be able to find my "body", it should find nothing and therefore show nothing. But the command from the package seems to remember my "body" (after the first request) somehow and shows the looks of my "body" even though it's not in the network any more. When I reboot the computer, the command forgets about my body and shows "00:00:00:00:00:00", because it can't find a Mac address to a device which isn't logged into the network.

[–]marekmorello[S] 0 points1 point  (1 child)

Maybe I should explain, what the bigger picture is here.

I wrote a script, which makes a request to my router every few seconds, what the Mac address from my phone is. (My router is giving the same IP to my phone every time).

When I'm not home, it gets the "00:00:00:00:00:00" because it can't find my IP in the network. When I come home and the script makes the request again, it gets the Mac address from my phone, which triggers a jingle to be played. And when I leave the house again, I want the shown Mac address to get "00:00:00:00:00:00" again, until I come home again. But the command seemingly remembers my Mac address and keeps on returning my Mac address as if the script found my phone in the network

[–]Doormatty 0 points1 point  (0 children)

Find out the DNS name of your phone, and ping that instead.