What's new

One single IP to two MAC adresses?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

MarcusVR

Occasional Visitor
Hi guys!

I have a RT-AC88u running Merlin's firmware. As I had some points where the signal wasn't so good, I bought a TP-Link repeater RE650. The combo is ok, and I have set fixed IPs to all my devices on the router. The question is that when a device connects through the repeater, its MAC adress is changed when transmitted to the router, losing its fixed IP.

Is there a way to specify that both the device MAC adresses should be connected in one single IP?

The question is that I'm using an Android app called Tasker to control some automation, and I really need to have a fixed IP to some devices, because I can't assign the same task to two different IPs.

Thanks in advance for any help!
 
If the MAC is being ‘changed’ by the repeater the repeater is set up wrong, or broken/has a serious bug!
My guess is you’ve set the repeater up as a router and are double NAT’ing, or have told the repeater to also be a DHCP server as well as the ASUS.

It is possible to do as you say with some manual additions to the config, but you really should fix the repeater.


Sent from my iPhone using Tapatalk
 
If the MAC is being ‘changed’ by the repeater the repeater is set up wrong, or broken/has a serious bug!
Not necessarily. Repeaters I've used in the past have worked this way, it's a limitation of the repeater design. There are ways around it but they can be non-standard and only work for devices from the same manufacturer.

Certain repeaters have the option to create virtual MAC addresses based on some formula, i.e.

https://kb.netgear.com/24806/How-ca...-Wi-Fi-Range-Extender-to-setup-an-Access-List
https://www.tp-link.com/us/faq-2019.html
 
Last edited:
Not necessarily. Repeaters I've used in the past have worked this way, it's a limitation of the repeater design. There are ways around it but they can be non-standard and only work for devices from the same manufacturer.

Certain repeaters have the option to create virtual MAC addresses based on some formula, i.e.

https://kb.netgear.com/24806/How-ca...-Wi-Fi-Range-Extender-to-setup-an-Access-List
https://www.tp-link.com/us/faq-927.html

Time to return that repeater and get one that works without virtual MACs then.
Maybe AiMesh is the answer here. Though not supported with Merlin.


Sent from my iPhone using Tapatalk
 
Time to return that repeater and get one that works without virtual MACs then.
Virtual MACs are a good thing (because they are fixed and uniquely identify the client). Without them all the devices attached to the repeater would appear to have the same MAC address as each other. I had a Belkin repeater that did this and Windows XP really freaked out when it saw all these "spoofed" IP addresses on the LAN.
 
I’m presuming the need for a virtual one is because ARP isn’t good enough when devices roam between the original AP and the repeater. But the solution is to architect the network properly to not rely on a mishmash of vendor AP/Repeaters.

For the average home, sure, users won’t notice, and that is the only place you could justify the use of a repeater that behaves this way.

For power users and commercial environments it will cause no end of issues - such as the one the OP is experiencing.


Sent from my iPhone using Tapatalk
 
I’m presuming the need for a virtual one is because ARP isn’t good enough when devices roam between the original AP and the repeater. But the solution is to architect the network properly to not rely on a mishmash of vendor AP/Repeaters.
IIRC when I looked at this years ago it was a limitation of the WiFi packet header format. The header record doesn't have any fields that lets it pass on the MAC address of the client. That's why I said it's a limitation of the repeater design, or perhaps more accurately, you're wanting repeaters to do something that the WiFi standard was never designed for.
 
I guess this is why WDS exists. It removes the need to have virtual MACs.


Sent from my iPhone using Tapatalk
 
Right now whats happening - when the device connects directly to the router you see its mac/ip combination When the device connects through the repeater, you see the ip address coming from the mac of the repeater. This is basic layer 2 networking. The main router will need to know where to forward the traffic to. The repeater will arp its mac for EVERY device that it handles layer 2. Every layer 2 switch will do this.

The DHCP server list should always show the correct combination.

WDS is useless and does not have any encryption.
 
I guess this is why WDS exists. It removes the need to have virtual MACs.
Apparently so according to the DD-WRT inspired Wikipedia entry:
The notable advantage of WDS over other solutions is that it preserves the MAC addresses of client frames across links between access points.[1]

Looking at the manual for the RE650 it sounds like the virtual MAC addresses are created automatically anyway. The implication from the FAQ is that most manufactures' repeaters do this nowadays.

Getting back to the OP: Devices attached to the repeater should now have a "secondary" MAC which doesn't change and can be assigned a fixed IP address as usual. Unfortunately I don't know of a way to get dnsmasq to allow two different MAC addresses to have the same IP address. I thought you might be able to force it with dhcp-host but that didn't work.
Code:
dnsmasq: duplicate dhcp-host IP address 192.168.1.10 at line 35 of /etc/dnsmasq.conf
@MarcusVR Are you sure there's no way you can setup your automation system to use two different IP addresses? Perhaps by duplicating the rules? Only one of the IP addresses will be active at a time. If the client device is in a fixed location then presumably it will always be connected to the same access point, so the MAC/IP will always be the same.
 
Apparently so according to the DD-WRT inspired Wikipedia entry:


Looking at the manual for the RE650 it sounds like the virtual MAC addresses are created automatically anyway. The implication from the FAQ is that most manufactures' repeaters do this nowadays.

Getting back to the OP: Devices attached to the repeater should now have a "secondary" MAC which doesn't change and can be assigned a fixed IP address as usual. Unfortunately I don't know of a way to get dnsmasq to allow two different MAC addresses to have the same IP address. I thought you might be able to force it with dhcp-host but that didn't work.
Code:
dnsmasq: duplicate dhcp-host IP address 192.168.1.10 at line 35 of /etc/dnsmasq.conf
@MarcusVR Are you sure there's no way you can setup your automation system to use two different IP addresses? Perhaps by duplicating the rules? Only one of the IP addresses will be active at a time. If the client device is in a fixed location then presumably it will always be connected to the same access point, so the MAC/IP will always be the same.

It is possible, I’ve done it before

As a special case, it is possible to include more than one hardware address. eg: --dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.2 This allows an IP address to be associated with multiple hardware addresses, and gives dnsmasq permission to abandon a DHCP lease to one of the hardware addresses when another one asks for a lease. Beware that this is a dangerous thing to do, it will only work reliably if only one of the hardware addresses is active at any time and there is no way for dnsmasq to enforce this. It is, for instance, useful to allocate a stable IP address to a laptop which has both wired and wireless interfaces.


Sent from my iPhone using Tapatalk
 
As a special case, it is possible to include more than one hardware address. eg: --dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.2 This allows an IP address to be associated with multiple hardware addresses, and gives dnsmasq permission to abandon a DHCP lease to one of the hardware addresses when another one asks for a lease. Beware that this is a dangerous thing to do, it will only work reliably if only one of the hardware addresses is active at any time and there is no way for dnsmasq to enforce this. It is, for instance, useful to allocate a stable IP address to a laptop which has both wired and wireless interfaces.
Excellent. I thought I remembered it was possible with dhcp-host, where I went wrong was splitting it into two separate statements :rolleyes:.
 
the answer to the question/thread is yes, as long as its the same system. A wifi router has multiple MACs, but both the wifi and LAN will have the same IP. On a PC you can do the same with bridging/bonding.

For your automation, 2 different devices cannot have the same IP, it will not work, but you can assign static IPs via DHCP from the router.
 
is it not possible to not use dhcp and assign the devices a static ip adres on the device itself, outside of the dhcp range?
seems much easier than the multiple mac option

Verstuurd vanaf mijn SM-G955F met Tapatalk
 
is it not possible to not use dhcp and assign the devices a static ip adres on the device itself, outside of the dhcp range?
seems much easier than the multiple mac option

Verstuurd vanaf mijn SM-G955F met Tapatalk
You can assign a static address to the device mac itself as a dhcp reservation. Or you can just hard code the address into the device instead of using dhcp and make sure it's not part of the reservation and does not get handed out to other clients.

Either way, wireless settings and arp table will now note show the mac of the device, they will show the mac of the switch used to access the device. Only the dhcp table or arp table on the repeater will show the mac/ip combination of the device.
 
@agilani You appear to have missed the whole discussion earlier in this thread about how his TP-Link repeater creates virtual MAC addresses. The solution is in post #11.
 
Firstly, a lot of thanks to everyone for the lessons and the tips. I learned a lot reading the answers!

It is possible, I’ve done it before

As a special case, it is possible to include more than one hardware address. eg: --dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.2 This allows an IP address to be associated with multiple hardware addresses, and gives dnsmasq permission to abandon a DHCP lease to one of the hardware addresses when another one asks for a lease. Beware that this is a dangerous thing to do, it will only work reliably if only one of the hardware addresses is active at any time and there is no way for dnsmasq to enforce this. It is, for instance, useful to allocate a stable IP address to a laptop which has both wired and wireless interfaces.


Sent from my iPhone using Tapatalk

@JDB, could you please explain what I should do to implement this solution? I understood the mechanics of the solution, but I don't know how to implement...
 
Firstly, a lot of thanks to everyone for the lessons and the tips. I learned a lot reading the answers!



@JDB, could you please explain what I should do to implement this solution? I understood the mechanics of the solution, but I don't know how to implement...


Hi, it's been a while since I did it! From memory...

I created the /jffs/configs/dnsmasq.conf.add file to simply put the 1 liner;
Code:
dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.2

So that's the 2 MAC's followed by the IP you want them both to have.

Then reboot.

This assumes you are running Merlin and have the jffs partition enabled.
 
Thanks a lot, @JDB!

Thanks also @EventPhotoMan, but I don't find ASUS routers for sale here in Brazil, I must import them as I did with mine, and the taxes are so high. This, allied to the exchange rates make a RT-AC88U cost almost US$ 650.00 here... :(
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top