Home of RF and Wireless Vendors and Resources

One Stop For Your RF and Wireless Need

TCP IP model layers | Functions of TCP IP networking layers

This article on TCP IP networking layers describe functions of TCP IP model layers viz. physical layer, data link, networking layer (IP), transport layer (TCP, UDP) and application layer. The comparison between OSI layers vs TCP IP networking layers have been described.

The OSI(Open system Interconnection) is developed for defining seven layers which makes two different vendors systems communicate. TCP IP is used for internet applications mainly. The figure describes how TCP IP layers map to OSI layers.

OSI and TCP IP model layers
Figure-1 : OSI layers vs TCP IP model layers

In OSI layers, control is passed from one layer to the next, starting at the Layer 7, application layer in one station, proceeding to the succeeding bottom layer and so on till information reaches Layer 1.Then the information transmitted over the channel to the next station's Layer 1 and transmitted to succeeding layers till information delivered to Layer 7. Each Layer in the OSI model does the job for the previous layer and also adds prefixes information termed as "header". The data link layer adds suffixes called cyclic redundancy check as "trailer" which is used for error detection. The brief functionality of each OSI layer is mentioned below. Let us understand functions of OSI layers and TCP IP layers.

Functions of OSI and TCP IP layers

All the applications for user reside at this layer. It includes FTP, Telnet, e-mail etc.

It formats and encrypts data to be sent across a network. Its basic task is to make application layer and network layer talk to each other by processing the data. It provides independence to the application processes from differences in data representation by way of syntax conversion.

It Provides control mechanism to connect two applications running on different machines. It covers basic function to establish, to maintain and to release connections.

It assures reliable data communication between two hosts. It is responsible for error recovery and flow control between two hosts. It also does multiplexing and de multiplexing functionalities for transmitting and receiving host respectively.

The main function is switching and routing of the packet. It adds logical addressing to do this. It also takes care of error handling, congestion control and packet sequencing.

Data Link:
It takes care of errors in the physical layer. It provides flow control and also does frame synchronization. ARQ is implemented to take care of retransmission in case of erroneous packets. In latest today's technologies it provides Medium Access Control functionality, hence known as MAC. MAC takes care of resource assignment to the end devices wanted to seek connection to the network for various applications (voice, data, etc.)

It mainly takes care of bit stream transmission over physical medium (cable, air etc.). It provides the hardware means of sending and receiving data through cable or wireless medium. Some wireless standards viz. wlan, wimax, zigbee, LTE defines physical layer specifications which takes care of forward error correction and modulation-demodulation functionalities as well as making the information suitable to be transmitted. Following figure mentions logical structure of the layered protocols inside a computer on an internet. This figure is taken from RFC 1180 to describe the concept.

RFC1180 describes logical structure of protocols inside a typical internet enabled device as mentioned below.
Ethernet Cable--ENET Card--ARP/IP--TCP/UDP--Network Applications
As mentioned etnernet cable is connected directly with Ethernet card which has upper layer ARP or IP. This has upper layer TCP or UDP and above all applications are running.

Every device has its own Ethernet address which is 6 bytes and listens for Ethernet frames with that destination address. An IP address is 4 bytes. Ethernet uses CSMA/CD. CSMA/CD means that all devices communicate on a single medium in which only one can transmit at a time and they can all receive simultaneously.

If two devices try to transmit at the same instant, the transmit collision is detected and both devices wait a random period of time before trying to transmit again. An Ethernet frame contains the destination address, source address, type field, and data.

Data flow across TCP IP model layers

Let us understand data flow communication between TCP IP model layers of Host-A and Host-B. Let us assume host A is transmitting packet and Host B is receiving it.

• As mentioned above all the hosts receive the packets and each will compare destination address in the Ethernet header with its' own Ethernet or MAC address of 6 bytes and accept the same if it matches otherwise does not pay attention.

• Next it will check for type field(2 byte long), if it is 0x806 then the packet will be passed to ARP module and if it is 0x800 it will be passed to IP module. ARP module responds to hosts seeking for Ethernet address based on their logical (IP) address.

• After packet is received by IP layer it will decide where the packet need to be routed based on routing table and destination IP address embedded in received packet's IP header. IP header is usually 20 bytes.

• If the host is the final end system then IP module checks for protocol field (1 byte long) in the IP header. If it is 0x06 then the packet is passed to the TCP module and if it is 0x11 then the packet is passed to the UDP module.

• Above the TCP or UDP there is application layer, where so many applications will be usually running. Information to each application will be passed based on 'destination port number' field (16 bit long) embedded inside the TCP or UDP header. TCP utilizes 'sequence number field' (32 bit long) for reassembly of all the IP data grams received at irregular time instants in irregular orders. For example FTP has dedicated port address 23 and Telnet has dedicated port address 21, which is used to deliver the data to each.

Comparison between OSI layers vs TCP IP networking layers

Following table mentions comparison between OSI layers and TCP IP networking layers.

OSI layers vs TCP IP networking layers

TCP IP protocol stack development community

• Internet Architecture Board (IAB), www.iab.org/
• Internet Engineering Task Force (IETF), www.ietf.org/
• Internet Society, www.isoc.org/
• The Internet Corporation of Assigned Names and Numbers (ICANN), www.icann.org/
• Internet Research Task Force (IRTF), www.irtf.org/
• World Wide Web Consortium (W3C), www.w3.org/

TCPIP References

• RFC 1180, A TCP IP Tutorial
• RFC793, TCP
• RFC826, ARP
• RFC768,UDP

TCP IP layers related links

• Circuit Switching vs Packet switching   • LAN vs WAN vs MAN   • What is an IP address   • What is MAC Address   • What is Hub   • What is Switch   • What is Bridge  • What is Router   • What is Gateway   • Firewall basics   • TCP-IP Packet format   • ARP Protocol format  

Difference between useful networking terminologies

Difference between OSI and TCPIP layers
Difference between TCP UDP
IPV4 vs IPV6
Difference between Internet and Intranet

RF and Wireless Terminologies

Share this page

Translate this page