GeekPolice Tech TutorialsLog in


Basic TCP/IP Principles


Basic TCP/IP Principles

Basic TCP/IP Principles

To communicate across the same network, the two computers must be configured to form similar information packets made up of data bits that can be placed on a network, received by the correct destination computer, interpreted, and then can return the requested information.

To communicate across multiple networks, such as when communicating with another computer across the Internet, the packet must be formed in a manner that will be understood by all of the computers that will receive and forward the information packet. There must also be a unique identifier for the source computer, and a unique identifier for the destination computer to ensure that the communications reaches the correct destination computer.

When two computers communicate across the Internet, any number of computers, called routers, must receive the data packet, read the addressing information, and determine if the destination computer is local to that router or if the packet needs to be transmitted to another router for delivery to the destination computer.

This routing of information requires that all computers follow the same set of rules for creating and handling packets, but have the flexibility to support a number of different transmission needs, such as different maximum frame sizes.

Each router along the path must be able to read the addressing information, there must be a way to secure the data being transported so that only the destination computer can receive and interpret the information being sent by the source computer.

TCP/IP is the suite of protocols used to communicate on the Internet. Each protocol of the TCP/IP protocol suite is associated with a layer of the seven-layer OSI communications model, which is an International Organization for Standardization standard. The seven layers are the Physical layer, Data Link layer, Network layer, Transport layer, Session Layer, Presentation Layer, and the Application layer.

Each layer of the protocol stack has a particular function when communications occurs between two computers:

Physical layer.
The Physical layer (Layer 1) is typically implemented in hardware and is responsible for placing data bits on and receiving bits from the communications media, such as coaxial cable.

Data Link layer.
The Data Link layer (Layer 2) is responsible for converting data packets that are received from the network layer and encoding them into bits. It is also responsible for accepting bits from the physical layer and converting them into data packets. The data packets that are formed into groups of bits are known as frames. This layer is divided into two sub-layers: the Media Access layer (MAC) and the Logical Link Control layer (LLC). The MAC sub-layer controls how a computer on a network gains access to the data, and permission to transmit that data on the network. The LLC sub-layer manages frame synchronization, error checking, and flow control.

Network layer.
The Network layer (Layer 3) provides routing and switching capabilities, and creates logical paths between two computers to create virtual circuits. This layer is responsible for routing, forwarding, addressing, internetworking, error handling, congestion control, and packet sequencing. When packets are received from the Transport layer, the Network layer is responsible for ensuring that the packet is small enough to be a valid packet on the underlying network. If the packet is too large, this layer breaks the packet into several packets, and on the receiving computer, this layer places the packets in the proper sequence to reassemble the packet. If the interconnecting devices cannot handle the amount of traffic being generated, this layer also provides congestion control.

Transport layer.
The Transport layer (Layer 4) transfers data between end systems or hosts, and is responsible for end-to-end error recovery and flow control between the two end systems. This layer ensures complete data transfer between the two systems.

Session layer.
The Session layer (Layer 5) establishes, manages, and terminates connections between applications on two computers. The session layer sets up, coordinates, and terminates all interchanges between applications on both computers. This layer manages session and connection coordination.

Presentation layer.
The Presentation layer (Layer 6) provides a heterogeneous operating environment by translating from the application's data format to the underlying network's communications format. This layer is also known as the syntax layer.

Application layer.
The Application layer (Layer 7) support end-user and application processes. Communication partners and quality of service levels are identified, user authentication and privacy considered, and any constraints on data syntax identified.

Just to make your life a little more interesting, the folks at DARPA (Defense Advanced Research Projects Agency) who invented the Internet and its hugely popular networking protocol, TCP/IP, also have their own four-layer network model that describes how network switching works.

Application layer.
The Application layer is the top layer. Protocols, such as Domain Name System (DNS), File Transfer Protocol (FTP), Simple Mail Transfer Protocol (SMTP), or HTTP use the TCP/IP protocol suite to identify and communicate with other computers. The application typically has the name of the destination computer and relies on another service that operates at the Application layer to identify the IP address of the destination.

Once the IP address of the destination is known, a request (in the form of a packet) is formed, containing detailed information. This is passed to the next lower layer in the DARPA model.

Transport layer.
When a request from the Application layer is received by the Transport layer, the Application layer request includes information that determines which of these Transport layer protocols will be used.

UDP provides connectionless, unreliable communications, whereas TCP provides connection-oriented, reliable delivery of the information to the destination.

A request is formed and passed to the next lower layer in the DARPA model.

Internet layer.
The Internet layer is responsible for routing packets between networks. IP is a routable protocol that provides the functions necessary to deliver a package of bits from a source to a destination. The request that is formed at this level is a packet of bits known as a datagram. IP provides for transmitting datagrams from sources to destinations, and for fragmentation and reassembly of long datagrams, if necessary, for transmission through "small packet" networks.

A request is formed and passed to the next lower layer in the DARPA model.

Network Interface layer.
The Network Interface layer is used for communicating with other computers. When a packet is sent from the source computer to the destination computer, the Internet layer determines whether the system is on the local network or on a remote network.

If the destination is local, the Network Interface layer uses the ARP protocol to determine the media access control (MAC) address of the destination computer's network interface card, creates a frame header, uses the information passed down from the Internet layer as the payload, creates a preamble, and then pushes the completed packet on to the wire. A frame header is control information added by protocols at this layer. The payload is the packet presented to this layer from the Internet layer.

If the destination is remote, the Network Interface layer uses the ARP protocol to determine the MAC address of the designated default gateway, creates a frame header, uses the information in the datagram as the payload, creates a preamble, and then pushes the completed packet on to the wire, where the default gateway sends the packet to an upstream router.

What is TCP/IP Protocol Suite

What is IP Protocol

What is a Network?

 Did you find this tutorial helpful? Don’t forget to share your views with us.
remove_circleSimilar topics


No Comment.
Permissions in this forum:
You cannot reply to topics in this forum