Home > Computers & Networking > Introduction to TCP/IP > Internet Protocol

TCP/IP - Introduction UDP-TCP

An Introduction to TCP/IP ...page 3

5. Internet Protocol


(i) Connectionless Datagram Delivery:

The Internet Protocol (IP) formally specifies the format to Internet packets, called Datagrams, and informally embodies the ideas of connectionless delivery.

IP provides three important definitions. First, the IP protocol defines the basic unit of data transfer used throughout a TCP/IP Internet. Thus it specifies the exact format of all data as it passes across a TCP/IP Internet. Second, IP software performs the routing function, choosing a path over which data will be sent. Third, in addition to the precise, formal specification of data formats and routing, IP includes a set of rules that embody the idea of unreliable packet delivery.

As shown above, the IP datagram is divided into header and data areas. Among other information, the datagram header contains the source and destination IP addresses, fragmentation control, precedence, and a checksum used to catch transmission errors. Besides fixed-length fields, each datagram header can contain an options field. The options field is a variable length, depending on the number and type of options used as well as the size of the data area allocated for each option. Intended to help monitor and control the Internet, options allow one to specify or record routing information, or to gather timestamps as the datagram traverses an Internet.

(ii) Routing IP Datagrams:

IP routing consists of deciding where to send a datagram based on its destination IP address. Direct delivery is possible if the destination machine lies on a network to which the sending machine attaches. If the sender cannot reach the destination directly, the sender must forward the datagram to a router. The general paradigm is that hosts send indirectly routed datagrams to the nearest router; the datagrams travel through the Internet from router to router until they can be delivered directly across one physical network.

The above figure depicts an example of a singly homed host that must route datagrams. The host must choose to send a datagram either to route R1 or to route R2, because each router provides the best path to some destinations.

Direct and Indirect Delivery:

The routing can be divided into two forms: direct delivery and indirect delivery. Direct delivery, the transmission of a datagram from one machine across a single physical network directly to another, is the basis on which all Internet communication rests. Two machines can engage in direct delivery only if they both attach directly to the same underlying physical transmission system. Indirect delivery occurs when the destination is not on a directly attached network, forcing the sender to pass the datagram to a router for delivery.

Routing with IP Addresses:

When IP software looks up a route, the algorithm produces the IP address of the next machine to which the datagram should be sent; IP passes the datagram and next hop address to network interface software. Transmission of a datagram from one machine to next always involves encapsulating the datagram in a physical frame, mapping the next hop internet address to a physical address, and sending the frame using the underlying hardware.

The Internet routing algorithm is a table driven and uses only IP addresses. Although it is possible for a routing table to contain a host-specific destination address, most routing tables contain only network addresses, keeping routing tables small. Using a default route can also help keep a routing table small, especially for hosts that can access only one router.

(iii) Error and Control Messages (ICMP):

The Internet Control Message Protocol allows router to send error or control messages to other routers or hosts; ICMP provides communication between the Internet Protocol software on one machine and the Internet Protocol software on another. ICMP includes source quench messages that retard the rate of transmission, redirect messages that request a host to change its routing table, and echo request/reply messages that hosts can use to determine whether a destination can be reached. An ICMP message travels in the data area of an IP datagram and has three fixed-length fields at the beginning of the message: an ICMP message type field, a code field, and an ICMP checksum field. The message type determines the format of the rest of the message as well as its meaning.

When a datagram causes an error, ICMP can only report the error condition back to the original source of the datagram; the source must relate the error to an individual application program or take other action to correct the problem.

6. Protocol Layering

Protocols are the standards that specify how data is represented when being transferred from one machine to another. Protocols specify how the transfer occurs, how errors are detected, and how acknowledgements are passed. To simplify protocol design and implementation, communication stacks are segregated into layers that can be solved independently. Each layer is assigned a separate protocol.

The idea of layering is fundamental because it provides a conceptual framework for protocol design.

ISO 7-Layer Reference Model:

7 Application layer

Application Layer is responsible for managing the communication between the applications.

6 Presentation Layer

Presentation Layer provides common operations on the structure of data being exchanged.

  • Syntax Conversion
  • Encryption
  • Compression

5 Session Layer

Session Layer provides the control structure for managing communications.

  • Establishing
  • Managing
  • Terminating sessions. (Connections)

4 Transport Layer

Transport Layer provides reliable transparent data transfer between end points. (there may be more than two end points).

  • Provide error recovery and flow control.

3 Network Layer

Network Layer makes the upper layers independent of the data transmission, switching technologies, and topology of the network.

  • Determine which path (or paths) in the network that a given unit of data will take (routing).

2 Link Layer

Link Layer provides reliable transfer across the physical links.

  • Establishes the beginning and end of blocks of data (with synchronization when necessary)
  • Error detection and possibly correction;
  • Flow control.

1 Physical Layer

Physical Layer provides transmission of unstructured bits across the physical medium.

  • Electrical
  • Optical
  • Mechanical

The TCP/IP Model:

The TCP/IP model does not exactly match the OSI model. There is no universal agreement regarding how to describe TCP/IP with a layered model but it is generally agreed that there are fewer levels than the seven layers of the OSI model. The layers of the TCP/IP model are defined as follows:

Application Layer

In TCP/IP the Application Layer also includes the OSI Presentation Layer and Session Layer. In this document an application is any process that occurs above the Transport Layer. This includes all of the processes that involve user interaction. The application determines the presentation of the data and controls the session. In TCP/IP the terms socket and port are used to describe the path over which applications communicate. There are numerous application level protocols in TCP/IP, including Simple Mail Transfer Protocol (SMTP) and Post Office Protocol (POP) used for e-mail, Hyper Text Transfer Protocol (HTTP) used for the World-Wide-Web, and File Transfer Protocol (FTP). Most application level protocols are associated with one or more port number.

Transport Layer

In TCP/IP there are two Transport Layer protocols. The Transmission Control Protocol (TCP) guarantees that information is received as it was sent. The User Datagram Protocol (UDP) performs no end-to-end reliability checks.

Internet Layer

In the OSI Reference Model the Network Layer isolates the upper layer protocols from the details of the underlying network and manages the connections across the network. The Internet Protocol (IP) is normally described as the TCP/IP Network Layer. Because of the Inter-Networking emphasis of TCP/IP this is commonly referred to as the Internet Layer. All upper and lower layer communications travel through IP as they are passed through the TCP/IP protocol stack.

Network Access Layer

In TCP/IP the Data Link Layer and Physical Layer are normally grouped together. TCP/IP makes use of existing Data Link and Physical Layer standards rather than defining its own. Most RFCs that refer to the Data Link Layer describe how IP utilizes existing data link protocols such as Ethernet, Token Ring, FDDI, HSSI, and ATM. The Physical Layer typically defines the characteristics of the hardware that carries the communication signal. This describes attributes such as pin configurations, voltage levels, and cable requirements.

TCP/IP - Introduction UDP-TCP
     Home                                                Copyright 2003-2016 TutorialsWeb.com                                   Disclaimer                                           Sitemap