Introduction to TCPIP

   

Introduction to TCP/IP

In this section, we briefly discuss the protocols used in the TCP/IP stack, the addressing architecture, the Domain Name System (DNS), and the socket interface.

In the early 1960s, DARPA (Defense Advanced Research Project Agency) funded a project that connected universities and research agencies through a network called ARPANET. In 1983, the TCP/IP protocols replaced the original ARPANET NCP (Network Control Protocols). The TCP/IP protocols running this network were open, simple, and easy to use. This network has grown considerably into what is called "Internet." The Internet is a collection of networks running TCP/IP protocol suite.

In the '80s there were other networking protocol architectures ISOs OSI, IBMs SNA, and Digital's DECNET to name a few. However, none of these protocols were as simple and open as the TCP/IP protocol suite. This led to wide deployment, development, and support for the TCP/IP protocol suite.

The networking protocol architecture consists of various components:

  • Protocol stack This comprises various layers that communicate among themselves to efficiently transmit the packet.[2]

    [2] Packet is the unit of data.

  • Addressing The capability to uniquely identify a destination. In order to communicate with a global entity, it is necessary to uniquely identify the entity.

  • Routing The capability to efficiently determine the path a particular packet is to traverse to reach a destination.

Protocol Stack

The TCP/IP protocol stack consists of 4 layers as shown in Figure 2.1. Each layer in the stack has well-defined functions and capabilities. Each layer exports well-defined interfaces that the layers above and below it can use to communicate with it. The layered architecture has many advantages. In addition to simplifying the design of the protocol stack, it also simplifies its usage. The design is simplified as each layer interacts only with the layer immediately above and below it. Once the service the layer provides and its interfaces are identified, each layer can be designed independently. The usage is simplified as the complexities of the networking stack are hidden from the applications using the networking stack.

Figure 2.1. IP packets protected by IPSec in transport mode and tunnel mode.

graphics/02fig01.gif

The functionality of each layer is described below. The protocols that implement these services are described later.

Application Layer: The application layer provides the services for an application to send and receive data over the network. It also provides services such as name resolution (refer to DNS). Applications such as World Wide Web (WWW) browsers or e-mail clients use the services provided by the application layer to communicate with its peers, WWW servers and e-mail servers respectively. The application layer also defines the interface to the transport layer. This interface is operating-system dependent. The most popular interface is the socket interface. The socket interface is provided in all flavors of the UNIX operating system and on the Microsoft platforms.

Transport Layer: The transport layer is responsible for providing services to the application layer. In the TCP/IP protocol suite the transport layer provides the following services:

  1. Connection-oriented or connectionless transport: In a connection-oriented transport, once a connection is established between two applications, the connection stays until one of the applications gives up the connection voluntarily. The application specifies the destination only once, during the establishment of the connection. The best analogy for this is the telephone service. Once a call is established, it stays connected until one speaker disconnects. In connectionless transport, the application has to specify a destination for every single packet it sends.

  2. Reliable or unreliable transport: In case of reliable connection, if a packet is lost in the network for some reason (network overload, or some node going down), it is retransmitted by the transport layer. The transport layer is guaranteeing the reliable delivery of the packet to the destination. In the unreliable connection, the transport layer does not take up the responsibility of retransmission. It is up to applications to handle cases where a packet does not reach its destination because it was dropped in the network.

  3. Security: This service is new compared to other services offered by the transport layer. Security services such as authenticity, integrity, and confidentiality are not widely supported. However, in the future, security will be tightly integrated with the stack and will be available widely.

An application has to choose the services it requires from the transport layer. There are advantages and disadvantages in choosing different services. In addition, there may be limitations in the combination of services one can choose. Presently, it is invalid to choose connectionless reliable transport as TCP/IP does not implement such a protocol. The discussion of these is beyond the scope of this book.

Network Layer: The network layer provides connectionless service. The network layer is responsible for routing packets. Routing can be described as the process that determines the path a packet has to traverse to reach the destination. The devices that decide how to route a packet are called "routers"[3] . In order to route the packet, the network layer needs to identify each destination unambiguously. The network layer defines an addressing mechanism. The hosts should conform to the addressing mechanisms to make use of the services offered by the network layer. This is discussed in greater detail in the addressing section (see section on Addressing below).

[3] In this book we use the term "host" in the context of an end system. The host generates traffic but is not involved in any routing decisions. Routers, on the other hand, normally do not generate traffic but instead forward traffic. The term "gateways" normally refers to a router.

Data Link Layer: The data link layer is responsible for packet transmission on the physical media. The transmission is between two devices that are physically connected. Examples of data-link layers are Ethernet, Token Ring, and Asynchronous Transfer Mode (ATM).

As described above, each layer in the protocol stack is tasked with a specific function and the layering must be preserved. The application layer cannot talk to the network layer directly. It has to talk through the transport layer. Layering is also preserved between hosts as shown in Figure 2.2.

Figure 2.2. Communication between layers.

graphics/02fig02.gif

Data Flow

The data flow from source to destination is as shown in Figure 2.3.

Figure 2.3. Data flow.

graphics/02fig03.gif

For the purposes of the discussion, let us assume that the transport protocol is TCP and the network protocol is IP.

  1. An application on the source host sends the data that needs to be transmitted to the destination over the socket interface to the transport layer. The application identifies the destination it wishes to communicate with. The destination includes the host and an application on the host.

  2. The transport layer, in this case TCP, gets this data and appends a transport header, in this case a TCP header, to the payload, the data, and sends this down to the network layer. The fields in the TCP header help in providing the services requested by the application.

  3. The network layer receives the payload from the transport layer. This consists of the data and the TCP header. It appends an IP header to this payload. It then sends the payload plus IP header down to the data link layer. In addition, the network layer also identifies the neighbor the packet needs to be sent to en route to the destination.

  4. The data link layer then appends a data link header to the payload from the network layer. The data link layer identifies the physical address of the next hop the packet should be sent to and sends the packet.

  5. The data link layer on the next hop receives the packet, strips the data link header from the packet and sends the packet up to the network layer.

  6. The network layer looks at the network header and decides the next hop the packet needs to be sent to en route to the destination and invokes the data link layer.

  7. The data link layer appends the data link header to the payload and transmits the packet to the next hop.

  8. Procedures 6 and 7 are repeated till the packet reaches the destination.

  9. Upon reaching the destination, the data link layer strips the data link header from the packet and sends it up to the network layer.

  10. The network layer then strips the network header from the packet and sends it up to the transport layer.

  11. The transport layer then checks the transport header to guarantee that the application is being serviced properly, strips the transport header, identifies the application to which this packet is destined, and sends it up to the application.

  12. The application on the destination receives the data that was sent to it by the application on the source.

Network Layer

In the TCP/IP protocol suite, there are two network protocols IPv4 and IPv6. These protocols are discussed to an extent that provides good context to understand IP Security.

IPv4

IPv4 (Internet Protocol version 4) is the most prevalent network layer protocol today. It uses a simple addressing scheme and provides connectionless service. IPv4 has a very mature routing infrastructure.


   
Top


IPSec(c) The New Security Standard for the Internet, Intranets, and Virtual Private Networks
IPSec (2nd Edition)
ISBN: 013046189X
EAN: 2147483647
Year: 2004
Pages: 76

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net