Wednesday, November 25, 2009

DHCP Continued.....What happens when your DSL modem connects to internet????

Lets go little in deep and dig what is happening when you try to connect to internet using a DSL modem.

For more understanding, I would recommend to spend few minutes to read the next paragraph, and then go ahead and watch the rest of the page about what is happening deep inside wire.


 Let me walk through the STEP BY STEP path taken by the dsl router before it opens for a full fledged internet access:

•    Firstly the modem will start sending DHCP request and wait for the DCHP offer from the server.

•    In the mean time the Ethernet card(MAC) will not be silent and it will keep on be flooding packets for knowing the MAC address for the immediate port.

•    Secondly there is one more thing happening at this time, the DSL modem will send an IGMPv2 join message to the ISP.

Before I complicate the process with introducing two new protocols let me explain the fact that the DSL modem does hell lot of background process before it acquires an IP for it.

•    The Netbios-ns protocol will use UDP: 137 and registers itself with the layer-2 network with the host name(Here if I connect my laptop with modem then the name would be my_laptop_kalyan, nothing but the name I gave for my laptop in windows).
•    Along side this, the SSDP (sinple service discovery protocol will get the services given by ISP, the main thing to be noted here is that the protocol does not need a defined static IP for this communication, it does with out IP), SSDP provides a mechanism which network clients can use to discover network services. Clients can use SSDP with little or no static configuration.

Ahh !!! Now we can see a reply from the dhcp server………..

•    The DHCP server will send dhcp offer containing the ip-address for the client.
•    The address will be registered and once again the ARP will be resolved for knowing MAC addresses(remember we can see frequent arp requests flowing in card, just because of the arp timeouts).

I hope I have explained the process at least to some level of accuracy, please feel free to comment and correct mistakes……. 

                  !!!!!!!!!Now lets go ahead and see how the packets look !!!!!!!!!!!!

1.    As soon as you turn on your modem you can see the DHCP REQUEST being sent for an ip address to the nearest DHCP Server(located most probably at your ISP).

Let’s go deep into the wire and see what happens at this stage,


Above we can infer,

1.    Ip address of client 0.0.0.0 unknown and that of dest:255.255.255.255 as broadcast.
2.    Dhcp sends an request from client using UDP Port: 68(src) and Port: 67(dst)
3.    dhcp msg type: Request
4.    There are many parameters requested by the boot protocol to the dhcp server, some of the main items to be kept in mind are,
1.    subnet mask
2.    domain name
3.    dns server
4.    nbns server
5.    vebdor specific information
6.    Static route


No comments:

Post a Comment