Showing posts with label TCP/IP. Show all posts
Showing posts with label TCP/IP. Show all posts

Tuesday, 13 December 2011

Network Protocols

Transmission Control Protocol (TCP):
TCP is the transport layer of the protocol and serves to ensure a reliable, verifiable data exchanged between hosts on a network. TCP breaks data into pieces, wraps the pieces with the information needed to identify it as a piece of the original message, and allow the pieces to be reassembled at the receiving end of the communications link. The wrapped and bundled pieces are called Datagrams (or segments).


  • Source port and Destination port ensure that data is sent back and forth to the correct application process running on each machine.
  • Segment Number allows datagrams to be rebuilt in the correct order in the receiving device, and checksum allows the protocol to check whether the data sent is same as data received.
  • Acknowledgement number indicates that the data was received successfully, and Offset specifies the length of the header in 32-bit chunks.
  • Reserved specifies variables that are set aside for future use, it must contain ZEROS, and Flags , these are six one-bit fields that indicate various things, like whether segment is end of higher-layer message, acknowledgement number is significant, sender is requesting that a virtual circuit, data in the segment is urgent.
  • Window provides a way to increase the number of segments transmitted before the sender excepts an acknowledgement, and Urgent gives the location where the urgent data ends.
  • Options and Padding communicates various parameters of TCP virtual circuit, like maximum segment size, and it also ensures that the header ends on a 32-bit boundary so that the offset field makes sense as a whole number.
Internet protocol (IP) :
The network layer portion of the DoD model is called the Internet layer. The main protocol at this layer is the Internet Protocol (IP). IP is considered connectionless; i.e; it does not swap control information in order to establish an end to end connection before starting a transmission. This is known as best effort transmission. and if a packet is lost in transmission, IP must rely on TCP to determine it the data did not arrive successfully.




Address Resolution Protocol (ARP) :

The network layer protocol, ARP, associates the physical hardware address of a network node to its already known IP address. Using ARP, an IP process construct a table that maps ip addresses to mac addresses of nodes on LAN. When a node needs to send a packet to a known IP address on local sub-net, it first checks the ARP cache to see it the physical address information is already present. If so, that address is used and network traffic is reduced.


Internet Control Message Protocol (ICMP) :
It works at the network layer and provides the functions used for Network layer management and control. Routers send ICMP messages to respond to undeliverable datagrams by placing an ICMP message in an IP datagram and then sending the datagram back to the original source. The PING command.

ICMP EXAMPLE





User Datagram Protocol (UDP) :
It is a transport layer connectionless protocol that does not provide the reliability services with TCP but provides best effort transmission services to application protocols.It gives applications a direct interface with IP and the ability to address a specific application protocol running on a host via a port number without setting up an end-to-end connection.

TCP/IP Model

Because TCP/IP is so central to working with the Internet and intranets, you should understand it in details. TCP/IP uses the Department of Defense (DoD) model, which describes communications in only four layers.

DoD model:
In late 1960s, Advanced Research Projects Agency (ARPA) carried out a research project to connect a number different networks designed by different vendors into a network of networks (the "Internet"). And the model proposed for transmission of data was known as DoD model, it describes the communication in four layers: 
  • The Network Access Layer is responsible for delivering data over the particular hardware media in use. Different protocols are selected from this layer, depending on the type of physical network.
  • The Internet Layer is responsible for delivering data across a series of different physical networks that interconnect a source and destination machine. Routing protocols are most closely associated with this layer, as is the IP Protocol, the Internet's fundamental protocol. 
  • The Host-to-Host Layer handles connection rendezvous, flow control, retransmission of lost data, and other generic data flow management. The mutually exclusive TCP and UDP protocols are this layer's most important members.
  • The Process Layer contains protocols that implement user-level functions, such as mail delivery, file transfer and remote login.
TCP/IP was first proposed in 1973 and was split into separate protocols, TCP and IP, in 1978. In 1983, TCP/IP became the official transfer mechanism for all connections tp ARPAnet, replacing the earlier Network Control Protocol. We will study different protocols of TCP/IP model in details in later posts.

DoD model is theoretically comparable with OSI model :