Sie sind auf Seite 1von 29

Transport Layer

Pre-assessment Questions
1. What is the current version of IP? a. b. c. d. 2. IPv6 IPv5 IPv4 IPv3

Which of the following is the default address of the network? a. b. 127.0.0.1 255.255.255.255

c.
d.

255.255.255.0
0.0.0.0

NIIT

Transport Layer

Lesson 2B / Slide 1 of 29

Transport Layer

Pre-assessment Questions
3. Largest unit of a packet that network can transfer is __________ a. MTU b. ACK c. tracert d. ARP 4. Which of the following is not a dynamic protocol? a. b. c. d. BGP SMTP OSPF RIP

NIIT

Transport Layer

Lesson 2B / Slide 2 of 29

Transport Layer

Pre-assessment Questions
5. Which of the following is the loopback address in IPv6? a. b. c. d. 127.0.0.1 ::1 ::0 127::1

NIIT

Transport Layer

Lesson 2B / Slide 3 of 29

Transport Layer

Solutions
Ans 1. c. IPv4 Ans 2. d. 0.0.0.0 Ans 3. a. MTU Ans 4. b. SMTP Ans 5. b. ::1

NIIT

Transport Layer

Lesson 2B / Slide 4 of 29

Transport Layer

Objectives
In this section, you will learn about:

Basics of Transport Layer Transmission Control Protocol (TCP) User Datagram Protocol (UDP)

NIIT

Transport Layer

Lesson 2B / Slide 5 of 29

Transport Layer

Introduction to Transport Layer

The Transport layer is the second layer of the TCP/IP architecture as shown in the following figure:

TCP/IP Architecture Transport Layer

NIIT

Transport Layer

Lesson 2B / Slide 6 of 29

Transport Layer

Introduction to Transport Layer (Contd.)



It can deliver a data packet either reliably or unreliably. It breaks the data packets in smaller frames, numbers them and sends them to the destination node one by one.

NIIT

Transport Layer

Lesson 2B / Slide 7 of 29

Transport Layer

Protocols used in Transport Layer

The two most important protocols in the Transport layer are: Transmission Control Protocol (TCP) User Datagram Protocol (UDP) The following figure shows the position of the Transport Layer protocols in the TCP/IP protocol architecture:

TCP/IP Architecture Transport Layer Protocols

NIIT

Transport Layer

Lesson 2B / Slide 8 of 29

Transport Layer

Port Addressing

The port address distinguishes these processes for incoming packets. A port address in TCP/IP is 16-bit long and is represented as a single number. The combination of IP address and port numbers is known as Socket address. The following figure shows how transport layer delivers data between the Internet Layer and the Application Layer:

Transport Layer Protocols using port numbers for data communication

NIIT

Transport Layer

Lesson 2B / Slide 9 of 29

Transport Layer

Port Address (contd.)

The port numbers are divided into different ranges, which are:

Well Known Ports Registered Ports Dynamic Ports or Private Ports Ephemeral Ports

NIIT

Transport Layer

Lesson 2B / Slide 10 of 29

Transport Layer

Transmission Control Protocol (TCP)

The following figure shows the position of the Transmission Control Protocol (TCP) in the TCP/IP architecture:

TCP/IP Architecture Transmission Control Protocol (TCP)

NIIT

Transport Layer

Lesson 2B / Slide 11 of 29

Transport Layer

Transmission Control Protocol (TCP) (Contd.)



It is a stream transport protocol. It is a reliable protocol. All data packets are sequenced and acknowledged, and a connection is established for data communications through TCP. It is connection-oriented protocol. It is responsible for process-to-process communication.

NIIT

Transport Layer

Lesson 2B / Slide 12 of 29

Transport Layer

TCP Applications

Higher-layer applications that use the services of TCP include the following:

Telnet

File Transfer Protocol (FTP)


Simple Mail Transfer Protocol (SMTP) World Wide Web or HTTP applications e-mail applications such as SMTP, POP3, IMAP applications

NIIT

Transport Layer

Lesson 2B / Slide 13 of 29

Transport Layer

TCP Packet Format

The following figure shows the TCP segment format:

TCP segment format

NIIT

Transport Layer

Lesson 2B / Slide 14 of 29

Transport Layer

TCP Negotiation Process

The control field of the TCP headers establishes or terminates a basic TCP connection. Three flags used for this process are:

SYN

FIN
ACK

NIIT

Transport Layer

Lesson 2B / Slide 15 of 29

Transport Layer

TCP Negotiation Process (Contd.)

The following figure shows TCP protocols three-way handshake mechanism of data communication:

Three-way hand shake TCP protocol

NIIT

Transport Layer

Lesson 2B / Slide 16 of 29

Transport Layer

TCP Negotiation Process (Contd.)

The following figure shows TCP protocols four-way handshake mechanism of data communication:

Four-way hand shake TCP protocol

NIIT

Transport Layer

Lesson 2B / Slide 17 of 29

Transport Layer

TCP Ports
Port
7 9 11 20 21 23 25 53 80

Protocol
Echo Discard Users FTP, Data FTP, Control TELNET SMTP DNS HTTP

Description
Echoes a received data packets back to the sander Discards any data packets that is received Active users File transfer protocol data connection File transfer protocol control connection Terminal network Simple Mail Transfer Protocol Domain Name Server Hypertext Transfer Protocol
List of TCP Ports

NIIT

Transport Layer

Lesson 2B / Slide 18 of 29

Transport Layer

Demonstration - Analyzing TCP Packets


Problem Statement Analyze TCP data packets on the network with the help of Ethereal, a protocol analyzer.

NIIT

Transport Layer

Lesson 2B / Slide 19 of 29

Transport Layer

Solution
1. 2. Generate and capture TCP packets Analyze TCP packets

NIIT

Transport Layer

Lesson 2B / Slide 20 of 29

Transport Layer

User Datagram Protocol (UDP)

The following figure shows the position of the User Datagram Protocol (UDP) in the TCP/IP protocol architecture:

TCP/IP Architecture User Datagram Protocol (UDP)

NIIT

Transport Layer

Lesson 2B / Slide 21 of 29

Transport Layer

User Datagram Protocol (UDP) (Contd.)



It is connectionless protocol. It is responsible for process-to-process communication. It is a simple and unreliable transport protocol. It is a process-to-process protocol that adds the port addresses, checksum error control and data length information to the data packets from the upper layer. It is a suitable transport protocol for multicasting and broadcasting.

NIIT

Transport Layer

Lesson 2B / Slide 22 of 29

Transport Layer

UDP Applications

Higher-layer applications that use the services of UDP include the following:

Network File system (NFS)


NIIT

Applications that includes flow and error control such as Trivial File Transfer Protocol (TFTP)
Simple Network Management Protocol (SNMP) Domain Name system (DNS) Routing updating protocols such as Routing Information Protocol (RIP) An application that requires simple communication with little flow and error control
Transport Layer Lesson 2B / Slide 23 of 29

Transport Layer

UDP Packet Format

The following figure shows the format of UDP header format:

UDP Header format

NIIT

Transport Layer

Lesson 2B / Slide 24 of 29

Transport Layer

UDP Ports
Port
7 9 11 53 67 68 69 161 123

Protocol
Echo Discard Users Nameserver Bootps Bootpc TFTP SNMP NTP

Description
Echoes a received data packets back to the sander Discards any data packets that is received Active users Domain Name Service Server port to download bootstrap information Client port to download bootstrap information Trivial File Transfer Protocol Simple Network Management Protocol Network Time protocol
List of UDP Ports

NIIT

Transport Layer

Lesson 2B / Slide 25 of 29

Transport Layer

Demonstration - Analyzing UDP Packets


Problem Statement Analyze UDP data packets on the network with the help of Ethereal, a protocol analyzer.

NIIT

Transport Layer

Lesson 2B / Slide 26 of 29

Transport Layer

Solution
1. 2. Generate and capture UDP packets Analyze UDP packets

NIIT

Transport Layer

Lesson 2B / Slide 27 of 29

Transport Layer

Summary
In this lesson, you learned: The protocols of the transport layer deliver data between the Application Layer and the Internet Layer. User Datagram Protocol (UDP) is unreliable, connectionless Datagram protocol. Transmission Control Protocol (TCP) is a reliable, connection-oriented bytestream protocol. A 16-bit port address represented as a single number is known as port number. In the TCP/IP protocol architecture the port numbers are integers between 0 and 65535. The Well-known port numbers are in the range from 0 through 1023. The registered port numbers are in the range from 1024 through 49151. The Dynamic port numbers are in the range from 49152 through 65535. Ephemeral port numbers are unique port numbers assigned to client processes.
NIIT Transport Layer Lesson 2B / Slide 28 of 29

Transport Layer

Summary (Contd.)

All data packets are sequenced and acknowledged, and a connection is established for data communications through TCP. The unit of data transfer between two devices using TCP is a segment. The exchange of control information is known as handshake. Each application-layer protocol that uses the services of TCP is associated with a unique port number, called TCP port. Each application-layer protocol that uses the services of UDP is associated with a unique port number, called UDP port. Higher layer applications that use UDP must address problems related to flow control and reliability. The User Datagram Protocol (UDP) supports network applications that need to transport data between computers. Each datagram sent by UDP is an independent datagram.

NIIT

Transport Layer

Lesson 2B / Slide 29 of 29

Das könnte Ihnen auch gefallen