TCP/IP Protocol

TCP/IP Protocol

TCP - It stands for Transmission control protocol & works on the 4th layer of OSI model. Every device using this protocol has an ip address which is 4 octets.

There are two kind of protocol the first one is routable protocol & the second once is non-routable protocol. Let's discuss the non routable protocol first, in a non routable protocol each machine in the network talks to each other which creates unwanted traffic & bandwidth utilization. Visualise the case if each machine connecting to internet talks to each other, this don't looks fisible even on paper so this leads to the formation of a routable protocol now what a routable protocol is, In routable protocol there are sub networks & each sub network has a router which acts as a boundary & There are machines behind the routers. The machines can communicate with each other within the network but if a machine needs to communicate to a machine which is present in another network they communicate through routers. so, basically routable protocol divides huges network into smaller sub networks.

IP is all about how computer discovers each other in a network. So, once they finds each other they do need to communicate & this communication happens using Transmission control protocol (TCP).
The actual talking between two computers is done by this protocol.

Windowing - This is the process of how one computer send a data to the other computer. When the computer 1 send a data to computer 2 the data is divided into packets. First Computer 1 sends a packet say packet 1 to computer 2 once this packet is received by computer 2 it will send an acknowledgement back to computer 1. When computer 1 receives the acknowledgement it now knows that it can communicate to Computer 2. Now, when computer 1 will send 2 packets to computer 2 which is 2,3. Computer 2 will receive this packet & acknowledge back to computer 1 for packet number 3. Now, computer 1 knows that the connection is even better. so, it doubles the package & now it sends 4 packages at once i.e. packet number 4,5,6,7 again after receiving packet number 7 Computer 2 send an acknowledgement to computer 1 for packet number 7. This process continues & computer 1 doubles the packets each time.so, the packet sending sequence goes like this - 1,2,4,8,16,32,64,128,256......
So, suppose if there is a problem in packet sending computer 1 is sending 128 packets to computer 2 & only say 4 packets are received by computer 2 so, here suppose the 2 packets names are Packet 127 & 128 so, now once computer 2 receives packet 128 it will send an acknowledgment to computer 1 that the last packet it received was packet number 128. Now, what computer 1 will do is - it will start again by sending once packet i.e. packet number 129. Computer 2 receives this packet & sends back the acknowledgement to computer 1 then computer 1 will start sending 2 packets which is packet number 130, 131 once these packets are received & acknowledged by computer 2 it will again send 4 packages, then 8 then 16 then 32 & the process continues. So, every time there is a problem computer 1 will come down to 1 packet & then start expanding the window.

Router - Each router are assigned with a public ip address so, the clients behind this router connect to the internet using the public ip address of the router.
The Router are build with NAT so, when a client having an internal ip address makes a request for a website the router transfers the request to the internet & when the server replies the reply is received by the router & then using NAT they are forwarded to the client which made the request. Here NAT make sure that each device connecting to the internet does not need it own ip address.

Default Gateway are routers which connects multiple sub networks.

DHCP - The ip address assigned to the client machine are with a lease period. Suppose the lease period is of 4 days then the client connect with the DHCP server in 2 days & ask if it can keep the ip address after that it again connect with the DHCP server in 1 day to verify this. then it connects again in 12hr - then 6 hrs - then 3hrs - then 1hr 30 min & so on, so basically the communication done is always within 50% of the lease time left.


Subnet Masking - Each TCP/IP address is made up of 4 octets so, there are two things that can be created with the ip address the number of sub networks & the number of host in the network.

When we need to calculate the number of sub networks we need to move from right to left & when we calculate the number of host in a network we move from left to right.

The formula for calculating the subnet is 2^n and for calculating the number of host its 2^n-2.

Subet classes :-

A Class - 255.0.0.0
B Class - 255.255.0.0
C Class - 255.255.255.0

No comments:

Post a Comment