
Here is the same network. This time Alice and Bob want to communicate over the internet via a WhatsApp call.
- Alice has to know Bob's number to call him. An Initial connection is made to Bob.
- Alice wants to confirm if Bob is there or not.
- Usually whenever someone is talking we acknowledge we can hear them by saying hmm, okay, yes, got you etc. Bob acknowledges this.
- However, Alice is speaking a lot and Bob needs to process this so he needs to tell Alice to slow down.
- What if Alice was speaking a lot but Bob couldn't hear and some of it was lost? Bob is asking for this information again from Alice.
This is the normal communication between two people on a phone call.
How Computers communicate over internet
- Computers/Servers will have NICs which have IP Addresses that represent these devices. However, this just identifies the device and not the application. Another parameter is required to identify the application.
- Applications are identified via "Ports". Applications will be running on different ports. Websites usually run on Webservers which are on port 80 or 443. But Application WhatsApp may be on port x.
- IP Allows us to reach the host, but Port allows us to reach this exact application. So we always need to know what is the port associated with this application. This port level information is added by the Transport Layer. This builds the TCP Header
- TCP then checks if the other party is there or not. This is connection building process. Packets will be sequenced. This number is added in the TCP Header.
- Bob get's this connection request from Alice and sends a reply back acknowledging that he is there and which sequence number to start from.
- Alice then sends packet 2,3,4 etc. If David misses lets say packet 3, but got packet 1,2,4 then David's Transport Layer knows there is a problem. David's Transport Layer WILL NOT send this information to David's WhatsApp application unless it receives all the information, from packet 1-4.
- If we have a case where the 1st packet is missing from David to Alice, then Alice can send the packet again. Known as retransmission. This is after Alice had first initiated the communication.
- Remember that SRC/DST IP and SRC/DST MAC is still required for communication.
Tip
From Layer 3 Perspective, Transport/Application header part is considered Data. From layer 2 Perspective, IP header, Transport Header, Application Header, is all considered data. Layer 2 then has only Frame and Data which flows over Ethernet cabling. De-Encapsulated where needed and forwarded where needed until it reaches the end destination.
Comments