0

I have my laptop connected to internet through my mobile phone's hotspot . Now on doing

ipconfig /all

in cmd , it shows the same address for DHCP and DNS servers (supposedly my phone is expected to work as both) . But when i do

arp -a

the physical address for the dns doesn't match with the one mentioned as WiFi Mac Address in my phone .

Can you please help me understand how this is working actually .

Edit:

Laptop's private IP - 192.168.43.18

Gateway , DHCP and DNS - 192.168.43.1

arp cache -

    Internet Address      Physical Address      Type

  192.168.43.1          ce-56-3f-**-**-**     dynamic
  192.168.43.255        ff-ff-ff-ff-ff-ff     static
  224.0.0.22            01-00-5e-**-**-*1     static
  224.0.0.251           01-00-5e-**-**-*2     static
  224.0.0.252           01-00-5e-**-**-*3     static
  239.255.255.250       01-00-5e-**-**-*4     static
  255.255.255.255       ff-ff-ff-ff-ff-ff     static

WLAN mac - 5C-87-69-69-69-69

also the WiFi Mac Address as mentioned in my About Phone is completely different from any of these .

1 Answer 1

1

Very rough overview, as this is basically an introduction into networking principles, and there's plenty of places online to read up on details.

Networking uses layers. The MAC address is used in layer 2, when devices in a networking segment (e.g., all WLAN devices connected to a Access Point (AP), or all LAN devices connected to the same Router via inbuilt or external switches or hubs) talk to each other. The IP address is used in layer 3, when TCP or UDP packets are sent between devices, throughout the whole internet.

DHCP works both on layer 2 and layer 3, because it is the service that gets layer 3 up and running when all you have is layer 2 broadcasts. DNS works on layer 3.

DHCP works like this: some device gets connected to a networking segment. It does a layer 2 broadcast "hello, I am new here, please give me an IP address, and tell me where everything is". The DHCP server for this networking segment answers "hello new device, your IP address is 192.168.3.42, your gateway to the internet is 192.168.3.1, please use 8.8.8.8 as a DNS server". The new device can then do with that information whatever it wants (but usually it will use it).

ARP bridges layer 2 and layer 3. When you need the MAC address for an IP address in some network segment you are connected to, you send out an ARP broadcast ("hello, who has IP address 192.168.3.41?") and the device with that address answers ("it's me, MAC address 00:11:22:33:44:55, who has IP address 192.168.3.41"). That information is cached, so you don't have to ask all the time, and arp shows this cache.

A Phone Hotspot is actually a complicated thing, your phone acts as AP, DHCP server, and also potentially DNS proxy.

So if your laptop received your phone's address as the DNS server through the DHCP settings, then that's where your laptop will go for DNS information. Your phone in turn will relay that information to its DNS server (which usually belongs to your ISP).

So to debug what is actually going on, you'll need to edit your question and

  • write down the IP address of your laptop, the gateway, and the DNS server. These will be private IP addresses (192.168.. or 10...*), you can put them in the question.
  • if the IP address of the gateway is identical to the DNS server, then yes, your phone acts as a DNS proxy. If they are not identical, then something else is going on.
  • write down the output of the arp cache. The MAC addresses can identify your devices, so change them as required (but in such a way that they are consistent).
  • the MAC address of your laptop's WLAN interface. This is the "physical address" in ipconfig /all. Again, change as required.
  • Normally you should have now exactly two devices in the network segment that contains the hotspot and your laptop, namely the MAC address of your phone with the IP address of the gateway and the DNS server, and the MAC address of your laptop with the IP address of your laptop. If you have anything else, then for example your phone's DNS proxy is listening on another "virtual internal" device, so then you need to go have a look at your phone (which you can do if you rooted it).

This looks all as it should be: In the networking segment that contains your phone hotspot and your laptop, the phone hotspot is 192.168.43.1 and ce-56-3f-**-**-**, acting as gateway, DHCP server and DNS proxy. Your laptop is 192.168.43.18 and 5C-87-69-69-69-69. 192.168.43.255 and ff-ff-ff-ff-ff-ff are the broadcast addresses for this LAN segment, and all the rest are multicast addresses.

Whatever is mentioned in "About Phone" is something else, likely the MAC address of your phone in the network segment between your phone and your ISP.

1
  • thanks for the overview , i have edited the question , pls tell if i missed anything .
    – abhi gang
    Apr 5, 2021 at 9:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .