How can my router have the same MAC as a computer in the LAN?

4

My ISP refused to give out a new IP when I switched from just having one computer in the LAN to using a router in spite of me doing a few releases and renews. So I tried an a little unorthodox solution, I changed the router's MAC to the same as the computer's. I was thinking that it wouldn't work to connect the computer later but at least I would have the WLAN for the time being. However, when I plugged the computer back in it still worked. Now I have a LAN where the router and a DHCP-client in the LAN have the same MAC. I'm scratching my head trying to figure out how this works.

Rick

Posted 2011-05-02T09:31:32.547

Reputation: 143

Answers

5

You set the MAC of the outbound WAN interface, which is not the same as the internal interface that you connect to your gateway with.

Try:

ping <gateway>; arp -a <gateway>

You will notice your router has two interfaces, one of which you configured to use the computers MAC. Only if you are on the same network segment you need to have different MACs - see Ignacio's answer.

Posipiet

Posted 2011-05-02T09:31:32.547

Reputation: 429

1

Network devices on the same segment must have unique MAC addresses. The router splits the LAN and WAN into two different segments.

Ignacio Vazquez-Abrams

Posted 2011-05-02T09:31:32.547

Reputation: 100 516

Oh, so the router and clients aren't part of the same segment. That would explain it. – Rick – 2011-05-02T09:37:03.273

The router's LAN ports and the router's WAN port are on separate segments. – Ignacio Vazquez-Abrams – 2011-05-02T09:37:50.170

1

Your router has at least two ports, one for the WAN (the "internet", so to say) and one for your (W)LAN, i.e. the internal network.

Both have two different MAC addresses. By assigning your router the MAC address of your computer, they don't have the same MAC in your LAN, but the router will "copy" the MAC address to its WAN port, therefore appearing to your ISP like it was your computer.

slhck

Posted 2011-05-02T09:31:32.547

Reputation: 182 472