No IP address given to router until after cloning MAC address from another computer

5,916

It is common for an ADSL/DSL modem to learn the MAC address of the connected device and only work for that MAC address. Usually, this is done when the modem powers up. In other cases the MAC address is registered an upstream server run by the ISP.

In some cases, the memorized MAC address expires after some time. I would expect this occurs when the DHCP lease expires. The MAC address may be memorized on the ISP's DHCP server, rather than the modem. (Your modem will be registered with them as an authorized device.) In this case, the first device to ask for an address after the lease expires will be allowed to register. I expect this is what you encountered. You could verify this by disconnecting your computer until the lease expires and connecting a different device.

I believe that some ISPs use a DHCP server which tracks leases based on the ADSL/DSL modem's identification. The lease then tracks the MAC address, assigned IP address, and lease expriration time for each modem. Normally, the DHCP server would track MAC addresses, the assigned IP address, and expiration time. In both cases additional information provided in the DHCP request such as the device's name may also be tracked.

Many Home/Office routers can be configured to clone the MAC address of a connected computer. This allows them to take over an existing DHCP lease. Resetting the DIR-120 to factory settings would have cleared any cloned MAC address preventing you from regaining a lease tied to a cloned MAC address.

You may be able to switch MAC addresses by triggering a DHCP release before disconnecting the computer. This should end the existing lease, allowing you to obtain a new lease using a new MAC address. Obtaining a lease with a new MAC address will likely get you a new IP address. DHCP renewals usually don't change the IP address.

Share:
5,916

Related videos on Youtube

Jiddo
Author by

Jiddo

Updated on September 18, 2022

Comments

  • Jiddo
    Jiddo almost 2 years

    This problem had me occupied most of the day until I finally solved it just a little while ago. Unfortunately I still don't understand why the problem surfaced in the first place or why my final "solution" worked. I'm hoping that someone can help me shed some light on this.

    We have an ADSL connection and use a D-Link DSL-320B modem. We have a D-Link DIR-120 router connected to this modem. This has worked perfectly fine up until today when we disconnected the router and connected a computer (call it A) directly to the modem because it was getting an unusable connection through the router for some reason. We later also performed a factory reset on the DIR-120 router.

    Unfortunately, after the above steps the router did not receive any IP address (through DHCP) from the ADSL connection anymore. During my attempts to debug this I noticed that my laptop (call it B) didn't get any IP address either (when connected directly to the modem). I noticed the following syslog entries repeating over and over while trying to connect:

    Jun 2 19:30:12 jiddo-laptop dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3 Jun 2 19:30:12 jiddo-laptop dhclient: DHCPOFFER of 80.70.144.221 from 80.70.144.254 Jun 2 19:30:12 jiddo-laptop dhclient: DHCPREQUEST of 80.70.144.221 on eth0 to 255.255.255.255 port 67 Jun 2 19:30:28 jiddo-laptop dhclient: last message repeated 2 times

    At this point computer A could still get a connection just fine tho (when connected directly to the modem).

    I then tried to change the MAC address of the router to an arbitrary one (a copy of computer B's MAC address but with the last digit increased by one). The router still did not get assigned any IP address.

    Finally I tried making the router clone the MAC address of a third computer (call it C). C has never been connected directly to the modem. Doing this worked. After cloning the MAC address of computer C the router is immediately assigned an IP address and the internet connection works as it did prior to all this.

    Now, my question is, why would computer B and the original MAC address of the router not be able to get an IP address while two other computers worked just fine? Why would changing to an arbitrary MAC address not work while cloning the MAC address of another computer did? Could the router's MAC address have been blocked by the ISP for some reason (and what could cause this)?

    I found this question, but my situation seems more like a blacklisting of some MAC addresses rather then allowing just a single MAC address.

    Does anyone have any experience or knowledge of this sort of situation?

    • Bon Gart
      Bon Gart about 12 years
      At what point did you perform a factory reset on the ADSL modem? Do you own the ADSL modem, or did you get it from your ISP? And if you did get it from your ISP, what does their tech support say, since the problem is with their equipment?
    • Jiddo
      Jiddo about 12 years
      We never performed a factory reset on the ADSL modem, only on the router. Both the modem and the router are our own. We did get a modem from the ISP when we signed up with them, but it broke a LONG time ago and we decided to just buy our own one. (The ISP one wasn't special in any way except that we got a discount and that it was really bad quality. :p) I haven't spoken with their support yet. I'm assuming they will be difficult to reach during the weekend and we have in fact solved the problem.
    • Bon Gart
      Bon Gart about 12 years
      Well, you should either post the solution as an answer (it is actually encouraged to answer your own questions if possible), or remove the question altogether. But, since it is your own modem, I wouldn't call the ISP, since they would be reticent to assist you with equipment they did not own.
    • Jiddo
      Jiddo about 12 years
      No, I'm afraid you misunderstood me. The problem has been solved, but the question is not on how to solve the problem (since we already managed that), but rather why the problem existed in the first place and why the solution worked. And I don't have the answer to that.
    • barlop
      barlop about 12 years
      @BonGart His post was very well written and clear. Read it carefully. It's a very good question
    • barlop
      barlop about 12 years
      Try the whirlpool forum, it's quite specialised on that kind of networking, and most users there would understand your question and some might have an intelligent comment on it
    • Bon Gart
      Bon Gart about 12 years
      @barlop I don't see it as well written. At no point was there a mention of a factory reset of the modem. At no point was the MAC address of computer A cloned to the router (since that MAC address worked), the fictional address might not have worked because arbitrarily changing the last digit could have made it not Hex, the "solution" seems a temporary bandaid and not an very good one (so the problem still exists) and I disagree with the "answer" that got posted. Oh, and why would you need to pipe in to tell me what Jiddo already did, that I misunderstood?
    • Jiddo
      Jiddo about 12 years
      @Bon Gart: I tried writing it to the best of my abilities, including as much relevant information as I found reasonable. I didn't mention a factory reset of the modem because we never performed one. (In hindsight that might have been a good idea, but it didn't cross my mind at the time.) The MAC address of computer A was never cloned because that computer was mostly unavailable during the troubleshooting and I didn't know its MAC by heart. I made sure that the arbitrary MAC chosen was still valid. I agree that the current solution is not optimal. If a better answer is posted I'll accept it.
    • Bon Gart
      Bon Gart about 12 years
      @Jiddo I only mentioned my personal opinion of how the question was written, because someone ELSE piped in with nothing relevant to say on the topic, other than to criticize me and praise you. I had not felt it necessary to mention it up to that point because I did not consider it relevant. I still don't. However, your phrasing of "perfectly fine up until today" implied that you had all the equipment you were testing with right there with you, and there's no reason why I would think you had to rely on memory for any MAC addresses.
    • Bon Gart
      Bon Gart about 12 years
      Everything that you went through is unusual, but what is MORE unusual is the fact that everything was NORMAL for a long period of time BEFORE this all started happening. There is no mention of what occurred to make this START to happen, and that implies hardware failure... which typically requires hardware replacement.
  • Jiddo
    Jiddo about 12 years
    Thanks. That is certainly some useful information in there. I can certainly imagine the ISP having memorized the MAC address. I doubt that the modem did that since I did reboot both the router and modem simultaneously at one point, which didn't help. That still leaves why using a completely new and unknown MAC address would help, unless the existing lease or MAC cache just happened to expire at the same time as I decided to try that.
  • Jiddo
    Jiddo about 12 years
    This answer gives me a lot of interesting pointers to procedures that I could try in order to debug and attempt to solve similar problems if they were ever to return. Thanks!
  • Bon Gart
    Bon Gart about 12 years
    @BillThor This is not common in any way with ADSL service. This is common with CABLE broadband. The Cable broadband modem remembers the MAC address of the last device that was connected to it and received an internet connection from it, and needs to be power cycled or reset if you change devices. I find no evidence out there that this ever happens with ADSL service. Can you post some links to articles or anything that backs up what you propose?
  • BillThor
    BillThor about 12 years
    @BonGart I believe I've had to recycle ADSL modems as well as cable modems. I don't work with them much as I am in a suburban area with high cable penetration.
  • Bon Gart
    Bon Gart about 12 years
    @BillThor most ADSL modems actually come with router software as part of the firmware, just hard coded to pass out one internal IP address to whatever device is connected (instead of acting like a wide open router), as opposed to how a cable modem will pass the external IP address right to the device connected to the internet port. There are even some ADSL modems that you can change this behavior, to enable you to connect them to a simple switch, thus not requiring a router at all. They don't typically need to be cycled after connecting a different device because of this.
  • BillThor
    BillThor about 12 years
    @BonGart Good to know.