0

I am connecting my pc through mobile hotspot(2 different mobile phones with different ISP). Suppose I connect to one hotspot I get IP address as X (for eg) and if I connect to another hotspot from other phone I get the same IP i.e X. (I am talking about private)

I see this information on cmd when i type ipconfig. Also I get gateway IP different which is understandable. But why am I getting same private IP ?

1

The OS remembers the last DHCP lease it has received – every time you connect to the network, it tries to refresh the same lease (if it's still valid), and then it tries to request a new lease for the same address that it previously had. (The router doesn't have to honor this, but many routers actually do.)

However, as far as I know, Windows does not store the leases separately for each Wi-Fi SSID – instead, it only remembers one lease per network adapter. So when you connect to network B, Windows will still try to refresh a lease that it got from network A, requesting the same address as it had before.

Note that private address assignment is not done by your ISP – it is done by the router, which is the mobile phone that's providing the "hotspot". (Yes, the phone really provides DHCP and everything.)

3
  • really ?? "phone provides DHCP and everything" is the last note correct ? just confirming because its surprising for me (I am new to networking). Also, give some article link if you have on this. I want to really learn more on this topic more. Thanks for your answer by the way.. – BISMUTH OP May 7 at 17:27
  • What makes it surprising? – user1686 May 7 at 18:18
  • haha, It was surprising because of my lack of knowledge. Thank you brother for the information you provided, It cleared all other doubts I had. – BISMUTH OP May 8 at 13:21
1

Private IP addressing can often be between the same range. For instance the 192.168.1.0 /24 is almost always the default subnet used for home routers. It really depends on how the network administrator decided to configure the network you are connecting to as well as the DHCP server. In your case, it was just probably pure hazard that you got exactly the same IP for both of the networks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.