TCP/IP Model in Data Communication
- The Core Protocols in The TCP/IP Suite
Internet Protocol suite (TCP/IP) is the standard network model and communication protocol stack used on the Internet and on most other computer networks. While other networking models exist, the TCP/IP suite is overwhelmingly the global standard for computer-to-computer communication.
The TCP/IP suite follows a client/server model, in which multiple client programs share the services of a common server program. Protocols in the suite define end-to-end data handling methods for everything from packetizing, addressing and routing to receiving. Broken down into layers the IPS includes the link layer, the internet layer, the transport layer, application layer and the physical layer. Each layer contains a number of protocols for communications. The suite is sometimes just called TCP/IP, because those are the predominant protocols in the model and were the first ones used. However, the IP suite involves many other protocols.
The following is a partial list of protocols in each layer:
- Application Layer Protocols: BGP, DHCP, DNS, FTP, HTTP, IMAP, LDAP, MGCP, MQTT, NNTP, NTP, POP, ONC/RPC, RTP, RTSP, RIP, SIP, SMTP, SNMP, SSH, Telnet, TLS/SSL, XMPP, more...
- Transport Layer Protocols: TCP, UDP, DCCP, SCTP, RSVP, more...
- Internet Layer Protocols: IP, IPv4, IPv6, ICMP, ICMPv6, ECN, IGMP, IPsec, OSPF, more...
- Link Layer Protocols: ARP, NDP, Tunnels, L2TP, PPP, MAC, Ethernet, DSL, ISDN, FDDI, more...
Please refer to [IETF: Core Protocols in the Internet Protocol Suite] for more details.
- Data Encapsulation in The OSI Model
The computer in the right picture needs to send some data to another computer. The Application layer is where the user interface exists, here the user interacts with the application he or she is using, then this data is passed to the Presentation layer and then to the Session layer. These three layer add some extra information to the original data that came from the user and then passes it to the Transport layer. Here the data is broken into smaller pieces (one piece at a time transmitted) and the TCP header is a added. At this point, the data at the Transport layer is called a segment.
Each segment is sequenced so the data stream can be put back together on the receiving side exactly as transmitted. Each segment is then handed to the Network layer for network addressing (logical addressing) and routing through the internet network. At the Network layer, we call the data (which includes at this point the transport header and the upper layer information) a packet.
The Network layer add its IP header and then sends it off to the Datalink layer. Here we call the data (which includes the Network layer header, Transport layer header and upper layer information) a frame. The Datalink layer is responsible for taking packets from the Network layer and placing them on the network medium (cable). The Datalink layer encapsulates each packet in a frame which contains the hardware address (MAC) of the source and destination computer (host) and the LLC information which identifies to which protocol in the prevoius layer (Network layer) the packet should be passed when it arrives to its destination. Also, at the end, you will notice the FCS field which is the Frame Check Sequence. This is used for error checking and is also added at the end by the Datalink layer.
If the destination computer is on a remote network, then the frame is sent to the router or gateway to be routed to the desination. To put this frame on the network, it must be put into a digital signal. Since a frame is really a logical group of 1's and 0's, the Physical layer is responsible for encapsulating these digits into a digital signal which is read by devices on the same local network.
There are also a few 1's and 0's put at the begining of the frame, only so the receiving end can synchronize with the digital signal it will be receiving.
- TCP and UDP Protocols Provide Delivery Services
There are two transport layer protocols above IP: the UDP and TCP. These transport protocols provide delivery services. UDP is a connectionless delivery transport protocol and used for message-based traffic where sessions are unnecessary. TCP is a connection-oriented protocol that employs sessions for ongoing data exchange. File transfer protocol (FTP) and Telnet are examples of applications that use TCP sessions for their transport. TCP also provides the reliability of having all packets acknowledged and sequenced. If data is dropped or arrives out-of-sequence, the stack's TCP layer will retransmit and resequence. UDP is an unreliable service, and has no such provisions. Applications such as the simple mail transport protocol (SMTP) and hyper text transfer protocol (HTTP) use transport protocols to encapsulate their information and/or connections. To enable similar applications to talk to one another, TCP/IP has what are called “well-known port numbers.” These ports are used as sub-addresses within packets to identify exactly which service or protocol a packet is destined for on a particular host.
TCP/IP serves as a conduit to and from devices, enabling the sharing, monitoring, or controlling those devices. A TCP/IP stack can have a tremendous effect on a device's memory resources and CPU utilization. Interactions with other parts of the system may be highly undesirable and unpredictable. Problems in TCP/IP stacks can render a system inoperable.
- TCP/IP Protocols Handle Data Communications
The packet's history begins when a user on one host sends a message or issues a command that must access a remote host. The application protocol associated with the command or message formats the packet so that it can be handled by the appropriate transport layer protocol, TCP or UDP.
Both TCP and UDP are protocols used for sending bits of data - known as packets - over the Internet. They both build on top of the Internet protocol (IP). In other words, whether you are sending a packet via TCP or UDP, that packet is sent to an IP address. These packets are treated similarly, as they are forwarded from your computer to intermediary routers and on to the destination.
TCP and UDP are not the only protocols that work on top of IP. However, they are the most widely used. The widely used term “TCP/IP” refers to TCP over IP. UDP over IP could just as well be referred to as “UDP/IP”, although this is not a common term.
Computers connected to the Internet communicate with each other through protocols that define the commands supported by a given service and specify the order of data transmission. Protocols are nothing more than common standards that define how data should be exchanged by networked computers. Internet Protocol (IP), Internet Control Message Protocol (ICMP), Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) are the protocols that regulate data transmission on the Internet.
In addition, To interconnect your TCP/IP network with other networks, you must obtain a unique IP network number. If hosts on your network are going to participate in the Internet Domain Name system (DNS), you must obtain and register a unique domain name.
Please refer to W3: The Internet Protocol Stack for more details.
- Application Layer - User Initiates Communication
Suppose the user issues an rlogin command to log in to the remote host. The rlogin command uses the TCP transport layer protocol. TCP expects to receive data in the form of a stream of bytes containing the information in the command. Therefore, rlogin sends this data as a TCP stream.
Not all application layer protocols use TCP, however. Suppose a user wants to mount a file system on a remote host, thus initiating the NIS+ application layer protocol. NIS+ uses the UDP transport layer protocol. Therefore, the packet containing the command must be formatted in a manner that UDP expects. This type of packet is referred to as a message.
[More to come ...]