Please enable JavaScript.
Coggle requires JavaScript to display documents.
What happens when my device tries to connect to the internet? - Coggle…
What happens when my device tries to connect to the internet?
Does my device have an IP address
No
First get an IP address either statically or dynamically via DHCP
DHCP(Dynamic Host Configuration Protocol)
DHCP ACK
the server sends this message in response to the client to acknowledge that the client can start using the network configuration that the server provided.
This would be a layer 2 and 3 unicast packet. Layer 2: Destination: Client MAC Source: Server MAC(if in the same LAN) if in the different LAN relays, the scenario would involve mac addresses of the middle routers. Layer 3: Destination: The new Ip address of the client, Source: The IP address of the server.
DHCP Request
This is sent by the client in response to the DHCP Offer that the client has accepted the given DHCP offer.
Here there can be multiple offers to the client and the client and choose to accept one. This message therefore will be broadcast and letting the other servers know that they can free up the lease which was reserved for the client.
Layer 3 broadcast: Destination: 255.255.255.255 and source: 0.0.0.0
Layer 2 broadcast: Destination: FF:FF:FF:FF:FF:FF Source: MAC address of the client
DHCP Offer
The server sends this response to the client.
The server sends the IP address of the client as well as the server, the DNS settings and other information such as the lease time and any other parameters that might be missing. The server also reserves the IP address for the client. A sort of temporary DHCP registration.
DHCP Discover
The client(our device) sends a
DHCP Discover
message to the server. It is a broadcast message mostly within the LAN, unless the server/router is configured to act as a relay and forward the message to the DHCP server.
client port: UDP 68 Server Port: UDP 67
Layer 3 broadcast: Destination IP: 255.255.255.255 Source IP: 0.0.0.0
Layer 2 broadcast: Destination: FF:FF:FF:FF:FF:FF Source: MAC of the device
It begins with DORA.
Yes
What application protocol do you want to use? This is basically saying what do you want to do with your device.
HTTP
I want to browse to "
http://www.iamnoob.com
"
Check the local cache to see if you have previously looked up the address recently, if not, a request to the recursive DNS server will be made.
Recursive DNS(usually the ISP). This will also have the recent entries, if the entry is found in the local cache, it will just send the IP found there. If the request is not found locally, then it makes recursive requests starting with the root DNS servers.
Root Servers
DNS (DOMAIN NAME SYSTEM)