Nav links

Saturday, 2 April 2016

Wireless bridge MAC address confusion


My desktop PC sits on the floor under my desk. Yes, I agree that its category is poorly named, but until it's silent and tiny I'll reserve my desk for useful things like solar-powered cars and cups of cocoa. It's connected to the internet via a TP-LINK TL-WR710N router operating as a wireless bridge. That is, a wireless router downstairs sends the signal through the air to my study, where the router collects it and pipes it via ethernet into my PC. It would be simpler to have a wireless dongle attached directly to the PC, but the tiny one I have is quite slow compared to the TP-LINK router, perhaps because the TP-LINK IS ALWAYS SHOUTING. Anyway, it did have one problem, a small identity crisis.

My PC needs to have a static IP so that my phone can contact it. Usually this would entail a few minutes of fiddling in the advanced DHCP settings of the wireless router to reserve a specific IP address for the MAC address of my PC. This router is a Virgin Media Super Hub (apparently a rebadged Netgear wireless router) which has a small quirk of not allowing an IP address to be reserved if the MAC address already has another IP address attached. Therefore you can't easily change these settings if you're on the device you want to set.

Now, because I'm using a wireless bridge, the TP_LINK router has a MAC address and my PC has a MAC address. Which will the Virgin router see? Looking at the attached devices it shows the MAC address of the TP-LINK (10:fe:* in the screenshot below). Bafflingly, that did not work when I tried to reserve it. My PC was given a different randomish IP address. Instead, I had to ignore the attached devices list and use the PC's MAC address (found via ipconfig / all).


Mysteriously this actually works. Looking at the IP Lease table you can see 192.168.0.7 is reserved for MAC address 1C:6F, but in the Attached Devices table you can see it has supposedly allocated that IP address to a different MAC address. 


Before I got this working I did try setting the IP address on the PC directly instead of using DHCP, but Windows eventually complained about the network for some uninvestigated reason. I prefer using DHCP with MAC reservations anyway for ease of administration, so was glad to have this sorted.