1 of 45

WEEK-IV

TCP/IP NETWORKING MODEL

2 of 45

HISTORY LEADING TO TCP/IP

  • Networking protocols didn’t exist, including TCP/IP
  • Vendor specific networking protocols
  • IBM - Systems Network Architecture (SNA) in 1974
  • Multiple suppliers then use multiple network protocols
  • After 1980’s TCP/IP became common

3 of 45

4 of 45

Overview of the TCP/IP Networking Model

  • TCP/IP was designed and developed by the Department of Defense (DoD) in the 1960s and is based on standard protocols.
  • It stands for Transmission Control Protocol/Internet Protocol.
  • The TCP/IP model is a concise version of the OSI model.
  • It contains four layers, unlike the seven layers in the OSI model.
  • The number of layers is sometimes referred to as five or four.
  • The Physical Layer and Data Link Layer are referred to as one single layer as the ‘Physical Layer’ or ‘Network Interface Layer’ in the 4-layer reference.

5 of 45

What Does TCP/IP Do?

  • The main work of TCP/IP is to transfer the data of a computer from one device to another.
  • The main condition of this process is to make data reliable and accurate so that the receiver will receive the same information which is sent by the sender.
  • To ensure that, each message reaches its final destination accurately, the TCP/IP model divides its data into packets and combines them at the other end, which helps in maintaining the accuracy of the data while transferring from one end to another end.

6 of 45

What is the Difference between TCP and IP?

  • TCP and IP are different protocols of Computer Networks.
  • The basic difference between TCP and IP is in the transmission of data.
  • IP finds the destination of the mail and TCP has the work to send and receive the mail.
  • UDP is another protocol, which does not require IP to communicate with another computer.
  • IP is required by only TCP.

7 of 45

How Does the TCP/IP Model Work?

  • Whenever we want to send something over the internet using the TCP/IP Model, the TCP/IP Model divides the data into packets at the sender’s end and the same packets have to be recombined at the receiver’s end to form the same data, and this thing happens to maintain the accuracy of the data.
  • TCP/IP model divides the data into a 4-layer procedure, where the data first go into this layer in one order and again in reverse order to get organized in the same way at the receiver’s end.

8 of 45

Layers of TCP/IP Model

  1. Application Layer
  2. Transport Layer(TCP/UDP)
  3. Network/Internet Layer(IP)
  4. Data Link Layer (MAC)
  5. Physical Layer

9 of 45

TCP/IP Application layer

  • The application layer is the highest abstraction layer of the TCP/IP model that provides the interfaces and protocols needed by the users.
  • It combines the functionalities of the session layer, the presentation layer and the application layer of the OSI model.

10 of 45

The functions of the application layer are −

  • It facilitates the user to use the services of the network.
  • It is used to develop network-based applications.
  • It provides user services like user login, naming network devices, formatting messages, and e-mails, transfer of files etc.
  • It is also concerned with error handling and recovery of the message as a whole.

11 of 45

HTTP Overview

  • HTTP is a TCP/IP based communication protocol, that is used to deliver data (HTML files, image files, query results, etc.) on the World Wide Web.
  • It provides a standardized way for computers to communicate with each other. HTTP specification specifies how clients' request data will be constructed and sent to the server, and how the servers respond to these requests.

12 of 45

13 of 45

Features

  • HTTP is connectionless
  • HTTP is media independent
  • HTTP is stateless

HTTP Protocol Mechanism

HTTP works entirely through HTTP messages. There are two types of HTTP messages:

Request: These are messages sent by the client to the server to trigger an action

Response: These are messages sent by the server to the client in response to the request message

14 of 45

Client sends HTTP request messages to the server

Server receives the HTTP request

Server returns an HTTP response message to the client

Server does some processing for the request

Client receives the HTTP request

Fig: Request/Response Cycle

15 of 45

TCP/IP Transport Layer

  • The transport layer is responsible for error-free, end-to-end delivery of data from the source host to the destination host.
  • It corresponds to the transport layer of the OSI model.

The functions of the transport layer are :

  • It facilitates the communicating hosts to carry on a conversation.
  • It provides an interface for the users to the underlying network.
  • It can provide for a reliable connection.
  • It can also carry out error checking, flow control, and verification.

16 of 45

17 of 45

TCP Error Recovery Basics

  • TCP - Transmission Control Protocol, is a reliable network transfer protocol, one of the features of TCP is Error Recovery.
  • When a error occurs during data transmission, TCP can recover from it.
  • Fig 1, shows normal data transfer with no errors, Forward Acknowledgement is used to ask for the next part of the data.
  • TCP uses sequence numbers and acknowledgements to keep track of what has been sent.

18 of 45

19 of 45

  • Fig 2, show an error during transmission of data, the server uses Forward Acknowledgement to ask for the data that had the error (Data transfer 3), the client sends it again, if it was successfully transferred then using Forward Acknowledgement again the sequence is back on track and asks for Data transfer 4

20 of 45

Same-Layer and Adjacent-Layer Interaction

  • Each layer in TCP/IP models provides specific functionalities in the communication process.
  • To provide these functionalities, they interact with other layers on the same computer and layers on the remote computer.
  • The interaction process describes how layers interact with each other on the same computer and between two computers.
  • There are two types of interactions: the adjacent-layer interaction and the same-layer interaction.

21 of 45

The adjacent-layer interaction

  • The adjacent-layer interaction describes how layers on the same computer interacts.
  • On the same computer, if an application or hardware implemented in a layer wants to use a service available in the next layer, it requests the next layer to provide that service.
  • The software or hardware implemented in the lower layer provides the requested service.
  • A layer can request a service only from the lower layer.
  • It cannot request the higher layer to provide a service or a function.
  • For example, the presentation layer can request the session, transport, network, data link, and physical layers but it cannot request the application layer for a service or a function.

22 of 45

  • The application layer is the topmost layer.
  • Protocols and devices running in this layer can request a service or a function from all other layers.
  • The physical layer is the lowest layer.
  • Protocols and services running in this layer cannot request any other layer for a service or a function.
  • For an example: Web browsers use the HTTP protocol to get web content from the web servers.
  • The HTTP protocol works in the application layer.
  • The application layer does not provide error recovery but HTTP needs this functionality to work properly.
  • The TCP protocol provides error recovery.

23 of 45

  • The TCP protocol works in the transport layer.
  • The transport layer is a lower layer.
  • The application layer is a higher layer.
  • So, the HTTP protocol requests the TCP protocol to provide error recovery. The TCP protocol provides error recovery to the HTTP protocol.

24 of 45

The same-layer interaction

  • The same-layer interaction describes how layers on different computers interact.
  • Layers on different computers can communicate only with the same layers.
  • They cannot communicate with the different layers.
  • For example, the application layer of a computer can communicate only with the application layer of the other computer.
  • In the communication process, protocols and devices encrypt and encode data in such a way that it can be de-encrypted and decoded only by them.

25 of 45

  • For example, on the sender device, the transport layer breaks the data stream into segments and attaches a header to each data segment.
  • The header includes all the necessary information to join all segments.
  • But it can be read only by the transport layer.
  • On the receiver device, the transport layer reads header information from all segments and produces the original data stream back.

26 of 45

Same-layer interaction

Adjacent-layer interaction

It happens between different computers.

It happens on the same computer.

It happens between the same layers.

It happens between the different layers.

Services and devices use it to encode and decode data.

Services and devices use it to request other services to provide specific functions.

Differences between the adjacent-layer and same-layer interactions

27 of 45

TCP/IP Network Layer

  • A network layer is the lowest layer of the TCP/IP model.
  • A network layer is the combination of the Physical layer and Data Link layer defined in the OSI reference model.
  • It defines how the data should be sent physically through the network.
  • This layer is mainly responsible for the transmission of the data between two devices on the same network.
  • The functions carried out by this layer are encapsulating the IP datagram into frames transmitted by the network and mapping of IP addresses into physical addresses.
  • The protocols used by this layer are ethernet, token ring, FDDI, X.25, frame relay.

28 of 45

Internet Protocol

  • It is a protocol defined in the TCP/IP model used for sending the packets from source to destination.
  • The main task of IP is to deliver the packets from source to the destination based on the IP addresses available in the packet headers.

29 of 45

Internet Protocol and Postal Service

Internet Protocol

  • It is a protocol defined in the TCP/IP model used for sending the packets from source to destination.
  • The main task of IP is to deliver the packets from source to the destination based on the IP addresses available in the packet headers.

Postal Service

  • A postal service is a system used to send mail (letters and packages) from one place to another. Today people can send mail nearly anywhere in the world.

30 of 45

Internet Protocol Addressing Basics

  • IP defines addresses for several important reasons.
  • First, each device that uses TCP/IP—each TCP/IP host—needs a unique address so that it can be identified in the network. IP also defines how to group addresses together, just like the postal system groups addresses based on postal codes (or ZIP codes).
  • The figure, illustrates the basics, which shows the familiar web server Larry and web browser Bob; but now, instead of ignoring the network between these two computers, part of the network infrastructure is included.

31 of 45

TCP/IP Network: Three Routers with IP Addresses Grouped

  • First, the figure above shows some sample IP addresses.
  • Each IP address has four numbers, separated by periods.
  • For example, IP address 1.1.1.1 and 2.2.2.2 is the style of number and is called as a dotted-decimal notation (DDN).
  • The figure also shows three groups of addresses. In this example, all IP addresses that begin with 1 must be on the upper left, as shown in shorthand in the figure as 1.__.__.__.

32 of 45

  • All addresses that begin with 2 must be on the right, as shown in shorthand as 2.__.__.__.
  • Finally, all IP addresses that begin with 3 must be at the bottom of the figure.
  • The figure also introduces icons that represent IP routers.
  • Routers are networking devices that connect the parts of the TCP/IP network together for the purpose of routing (forwarding) IP packets to the correct destination.
  • Routers do the equivalent of the work done by each post office site: They receive IP packets on various physical interfaces, make decisions based on the IP address included with the packet, and then physically forward the packet out some other network interface.

33 of 45

IP ROUTING BASICS

 

  • The TCP/IP network layer using the IP protocol provides a service of forwarding IP packets from one device to another.
  • Any device with an IP address can connect to the TCP/IP network and send packets.
  • This basic IP routing example is used for understanding the perspective.
  • NOTE: The term IP host refers to any device, regardless of size or power that has an IP address and connects to any TCP/IP network.
  • The figure repeats the familiar case in which web server Larry wants to send part of a web page to Bob, but now with details related to IP.

34 of 45

Basic Routing Example

  • On the lower left, note that server Larry has the familiar application data, HTTP header, and TCP header ready to send.
  • In addition, the message now contains an IP header. The IP header includes a source IP address of Larry’s IP address (1.1.1.1) and a destination IP address of Bob’s IP address (2.2.2.2).
  • Step 1 - begins with Larry being ready to send an IP packet. Larry’s IP process chooses to send the packet to some router—a nearby router on the same LAN—with the expectation that the router will know how to forward the packet.

35 of 45

(This logic is much like a user or me sending all our letters by putting them in a nearby mailbox.)

  • Larry doesn’t need to know anything more about the topology or the other routers.
  • At Step 2, Router R1 receives the IP packet, and R1’s IP process makes a decision.
  • R1 looks at the destination address (2.2.2.2), compares that address to its known IP routes, and chooses to forward the packet to Router R2.
  • This process of forwarding the IP packet is called IP routing (or simply routing).
  • At Step 3, Router R2 repeats the same kind of logic used by Router R1.
  • R2’s IP process will compare the packet’s destination IP address (2.2.2.2) to R2’s known IP routes and make a choice to forward the packet to the right, on to Bob.

36 of 45

TCP/IP LINK LAYER (DATA LINK PLUS PHYSICAL)

 

  • The TCP/IP model’s original link layer defines the protocols and hardware required to deliver data across some physical network.
  • he term link refers to the physical connections, or links, between two devices and the protocols used to control those links.
  • Just like every layer in any networking model, the TCP/IP link layer provides services to the layer above it in the model.
  • When a host’s or router’s IP process chooses to send an IP packet to another router or host, that host or router then uses link-layer details to send that packet to the next host/router.
  • As each layer provides a service to the layer above it, it is necessary to understand about the IP logic related to above figure

37 of 45

  • In that example, host Larry’s IP logic chooses to send the IP packet to a nearby router (R1), with no mention of the underlying Ethernet.
  • The Ethernet network, which implements link-layer protocols, must then be used to deliver that packet from host Larry over to router R1.
  • The figure shows four steps of what occurs at the link layer to allow Larry to send the IP packet to R1.

Larry Using Ethernet to Forward an IP Packet to Router R1

38 of 45

TCP/IP MODEL AND TERMINOLOGY

.

  • Comparing the Original and Modern TCP/IP Models - The original TCP/IP model defined a single layer—the link layer—below the Internet layer.
  • The functions defined in the original link layer can be broken into two major categories: functions related directly to the physical transmission of data functions indirectly related to the physical transmission of data.
  • For example, in the four steps shown in the above diagram - Steps 2 and 3 were specific to sending the data, but Steps 1 and 4 encapsulation and de-encapsulation—were only indirectly related.
  • Today, most documents use a more modern version of the TCP/IP model, as shown in figure. 

39 of 45

Link versus Data Link and Physical Layers

  • Comparing the two, the upper layers are identical, except a name change from Internet to Network.
  • The lower layers differ in that the single link layer in the original model is split into two layers to match the division of physical transmission details from the other functions. 

40 of 45

DATA ENCAPSULATION TERMINOLOGY

  • In the TCP/IP Protocol Suite, HTTP, TCP, IP and Ethernet do their jobs.
  • Each layer adds its own header (and for data-link protocols, also a trailer) to the data supplied by the higher layer.
  • The term encapsulation refers to the process of putting headers and sometimes trailers, around some data.
  • The process by which a TCP/IP host sends data can be viewed as a five-step process.
  • The first four steps relate to the encapsulation performed by the four TCP/IP layers, and the last step is the actual physical transmission of the data by the host.

41 of 45

  • In the five-layer TCP/IP model, one step corresponds to the role of each layer.
  • The steps are summarized in the following list:

Step 1. Create and encapsulate the application data with any required application layer headers. For example, the HTTP OK message can be returned in an HTTP header, followed by part of the contents of a web page.

Step 2. Encapsulate the data supplied by the application layer inside a transport layer header. For end-user applications, a TCP or UDP header is typically used.

Step 3. Encapsulate the data supplied by the transport layer inside a network layer (IP) header. IP defines the IP addresses that uniquely identify each computer.

42 of 45

Step 4. Encapsulate the data supplied by the network layer inside a data link layer header and trailer. This layer uses both a header and a trailer.

Step 5. Transmit the bits. The physical layer encodes a signal onto the medium to transmit the frame.

  • The numbers in the figure below corresponds to the five steps in this list, graphically showing the same concepts.
  • Note that because the application layer does not need to add a header, the figure does not show a specific application layer header.

43 of 45

Five Steps of Data Encapsulation in TCP/IP

44 of 45

NAMES OF TCP/IP MESSAGES

 

  • Ultimately, it is necessary to remember the terms segment, packet and frame and the meaning of each.
  • Each term refers to the headers and trailers defined by a particular layer and the data encapsulated following that header.
  • Each term refers to a different layer:
  • segment for the transport layer
  • packet for the network layer
  • frame for the link layer

The figure shows each layer along with the associated term.

45 of 45

  • The letters LH and LT stand for link header and link trailer, respectively, and refer to the data link layer header and trailer.
  • The figure shows the encapsulated data as simply “data.” When focusing on the work done by a particular layer, the encapsulated data typically is unimportant.
  • For example, an IP packet can have - a TCP header after the IP header, an HTTP header after the TCP header, and data for a web page after the HTTP header and everything after the IP header is just called data.
  • So, when drawing IP packets, everything after the IP header is typically shown simply as data.

Perspectives on Encapsulation and “Data”