semester 1 module 11 tcp/ip transport and application layers

53
1 11 TCP/IP Transport and Application Layers Andres, Wen-Yuan Li ao Department of Computer Science an d Engineering De Lin Institute of Technology [email protected] http://www.cse.dlit.edu.tw/~andre s

Upload: jorden-cortez

Post on 03-Jan-2016

27 views

Category:

Documents


0 download

DESCRIPTION

Semester 1 Module 11 TCP/IP Transport and Application Layers. Andres, Wen-Yuan Liao Department of Computer Science and Engineering De Lin Institute of Technology [email protected] http://www.cse.dlit.edu.tw/~andres. Overview. Describe the functions of the TCP/IP transport layer - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Semester 1 Module 11  TCP/IP Transport and Application Layers

1

Semester 1 Module 11 TCP/IP Transport and

Application Layers

Andres, Wen-Yuan Liao

Department of Computer Science and Engineering

De Lin Institute of [email protected]

http://www.cse.dlit.edu.tw/~andres

Page 2: Semester 1 Module 11  TCP/IP Transport and Application Layers

2

Overview

Describe the functions of the TCP/IP transport layer

Describe flow control Explain how a connection is established

between peer systems Describe windowing Describe acknowledgment

Page 3: Semester 1 Module 11  TCP/IP Transport and Application Layers

3

Identify and describe transport layer protocols Describe TCP and UDP header formats Describe TCP and UDP port numbers List the major protocols of the TCP/IP

application layer Provide a brief description of the features and

operation of well-known TCP/IP applications

Page 4: Semester 1 Module 11  TCP/IP Transport and Application Layers

4

Outline

TCP/IP Transport Layer The Application Layer

Page 5: Semester 1 Module 11  TCP/IP Transport and Application Layers

5

Introduction to transport layer

It establishes a logical connection between the endpoints of the network.

It provides transport services from the source host to the destination host (end-to-end transport services).

Transport services segment and reassemble several upper-layer applications onto the same transport layer data stream.

Page 6: Semester 1 Module 11  TCP/IP Transport and Application Layers

6

Reliable transportation Ensure that segments delivered will be acknowledged

to the sender. Provide for retransmission of any segments that are

not acknowledge. Put segments back into their correct sequence

numbers at the destination. Provide congestion avoidance and control.

Flow control Sliding window

Page 7: Semester 1 Module 11  TCP/IP Transport and Application Layers

7

Flow control

Flow control avoids the problem of a transmitting host overflowing the buffers in the receiving host.

TCP provides the mechanism for flow control by allowing the sending and receiving host to communicate.

The two hosts then establish a data-transfer rate that is agreeable to both.

Page 8: Semester 1 Module 11  TCP/IP Transport and Application Layers

8

Page 9: Semester 1 Module 11  TCP/IP Transport and Application Layers

9

Session establishment, maintenance, and termination overview

Multiple applications can share the same transport connection in the OSI reference model.

This is referred to as the multiplexing of upper-layer conversations.

Numerous simultaneous upper-layer conversations can be multiplexed over a single connection.

Page 10: Semester 1 Module 11  TCP/IP Transport and Application Layers

10

Page 11: Semester 1 Module 11  TCP/IP Transport and Application Layers

11

The connection is established and the transfer of data begins after all synchronization has occurred.

The first handshake requests synchronization. The second handshake acknowledge the initial

synchronization request, as well as synchronizing connection parameters in the opposite direction.

The third handshake segment is an acknowledgment used to inform the destination that both sides agree that a connection has been established.

After the connection has been established, data transfer begins.

Page 12: Semester 1 Module 11  TCP/IP Transport and Application Layers

12

Page 13: Semester 1 Module 11  TCP/IP Transport and Application Layers

13

Congestion occurs during data transfering A high-speed computer might be capable of generating traf

fic faster than a network can transfer it. If many computers simultaneously need to send datagrams

to a single destination, that destination can experience congestion (no single source caused the problem).

At the end of data transfer The sending host sends a signal that indicates the end of t

he transmission. The receiving host at the end of the data sequence acknow

ledges the end of transmission The connection is terminated.

Page 14: Semester 1 Module 11  TCP/IP Transport and Application Layers

14

Page 15: Semester 1 Module 11  TCP/IP Transport and Application Layers

15

Three-way handshake

The two hosts must synchronize their initial sequence numbers to establish a connection.

Synchronization occurs through an exchange of segments that carry a synchronize (SYN) control bit and the initial sequence numbers.

The synchronization requires each side to send its own initial sequence number and to receive a confirmation of exchange in an acknowledgment (ACK) from the other side.

Each side must receive the initial sequence number from the other side and respond with an ACK.

Page 16: Semester 1 Module 11  TCP/IP Transport and Application Layers

16

Three-way handshake sequence is as follows: The sending host (A) initiates a connection by sending a S

YN packet to the receiving host (B) indicating its INS = X: A - > B SYN, seq of A = X

B receives the packet, records that the seq of A = X, replies with an ACK of X + 1, and indicates that its INS = Y. The ACK of X + 1 means that host B has received all octets up to and including X and is expecting X + 1 next:

B - > A ACK, seq of A = X, SYN seq of B = Y, ACK = X + 1 A receives the packet from B, it knows that the seq of B =

Y, and responds with an ACK of Y + 1, which finalizes the connection process:

A - > B ACK, seq of B = Y, ACK = Y + 1

Page 17: Semester 1 Module 11  TCP/IP Transport and Application Layers

17

Page 18: Semester 1 Module 11  TCP/IP Transport and Application Layers

18

Windowing Data packets must be delivered to the recipient in the sa

me order. An easy solution is to have a recipient acknowledge the r

eceipt of each packet before the next packet is sent. If a sender had to wait for an ACK after each packet was

sent, throughput would be low. Therefore, most connection-oriented, reliable protocols a

llow multiple packets to be sent before an ACK is received.

The number of data packets the sender can transmit before it receives an ACK is known as the window size, or window.

TCP uses expectational ACKs. This means that the ACK number refers to the next packet that is expected.

Page 19: Semester 1 Module 11  TCP/IP Transport and Application Layers

19

Page 20: Semester 1 Module 11  TCP/IP Transport and Application Layers

20

Windowing refers to the fact that the window size is negotiated dynamically in the TCP session.

Windowing is a flow-control mechanism. Windowing requires the source device to receive an

ACK from the destination after a certain amount of data is transmitted.

The destination host reports a window size to the source host.

This window specifies the number of packets that the destination host is prepared to receive.

Page 21: Semester 1 Module 11  TCP/IP Transport and Application Layers

21

With a window size of three, the source device can send three bytes to the destination.

The source device must then wait for an ACK. If the destination receives the three bytes, it sends an

acknowledgment to the source device, which can now transmit three more bytes.

If the destination does not receive the three bytes, because of overflowing buffers, it does not send an acknowledgment.

Because the source does not receive an acknowledgment, it knows that the bytes should be retransmitted, and that the transmission rate should be decreased.

Page 22: Semester 1 Module 11  TCP/IP Transport and Application Layers

22

Page 23: Semester 1 Module 11  TCP/IP Transport and Application Layers

23

In Figure, the sender sends three packets before it expects an ACK.

If the receiver can handle only two packets, the window drops packet three, specifies three as the next packet, and indicates a new window size of two.

The sender sends the next two packets, but still specifies a window size of three.

This means that the sender will still expect a three-packet ACK from the receiver.

The receiver replies with a request for packet five and again specifies a window size of two.

Page 24: Semester 1 Module 11  TCP/IP Transport and Application Layers

24

Page 25: Semester 1 Module 11  TCP/IP Transport and Application Layers

25

Acknowledgment

Positive acknowledgment with retransmission is one technique that guarantees reliable delivery of data.

Positive acknowledgment requires a recipient to communicate with the source and send back an ACK when the data is received.

The sender keeps a record of each data packet, or TCP segment, that it sends and expects an ACK.

The sender also starts a timer when it sends a segment and will retransmit a segment if the timer expires before an ACK arrives.

Page 26: Semester 1 Module 11  TCP/IP Transport and Application Layers

26

Figure shows a sender that transmits data packets 1, 2, and 3.

The receiver acknowledges receipt of the packets with a request for packet 4.

When the sender receives the ACK, it sends packets 4, 5, and 6.

If packet 5 does not arrive at the destination, the receiver acknowledges with a request to resend packet 5.

The sender resends packet 5 and then receives an ACK to continue with the transmission of packet 7.

Page 27: Semester 1 Module 11  TCP/IP Transport and Application Layers

27

Page 28: Semester 1 Module 11  TCP/IP Transport and Application Layers

28

Transmission Control Protocol (TCP)

The following are the definitions of the fields in the TCP segment: Source port – Number of the port that sends data Destination port – Number of the port that receiv

es data Sequence number – Number used to ensure the

data arrives in the correct order Acknowledgment number – Next expected TCP

octet

Page 29: Semester 1 Module 11  TCP/IP Transport and Application Layers

29

HLEN – Number of 32-bit words in the header Reserved – Set to zero Code bits – Control functions, such as setup and

termination of a session Window – Number of octets that the sender will a

ccept Checksum – Calculated checksum of the header

and data fields Urgent pointer – Indicates the end of the urgent

data

Page 30: Semester 1 Module 11  TCP/IP Transport and Application Layers

30

Option – One option currently defined, maximum TCP segment size

Data – Upper-layer protocol data

Page 31: Semester 1 Module 11  TCP/IP Transport and Application Layers

31

Page 32: Semester 1 Module 11  TCP/IP Transport and Application Layers

32

User Datagram Protocol (UDP)

The following are the definitions of the fields in the UDP segment: Source port – Number of the port that sends data Destination port – Number of the port that

receives data Length – Number of bytes in header and data Checksum – Calculated checksum of the header

and data fields Data – Upper-layer protocol data

Page 33: Semester 1 Module 11  TCP/IP Transport and Application Layers

33

Page 34: Semester 1 Module 11  TCP/IP Transport and Application Layers

34

TCP and UDP port numbers

Both TCP and UDP use port numbers to pass information to the upper layers.

Port numbers are used to keep track of different conversations crossing the network at the same time.

Internet Assigned Numbers Authority (IANA). Numbers below 1024 are considered well-known ports numbers. Numbers above 1024 are dynamically assigned ports numbers. Registered port numbers are those registered for vendor-specific

applications. Most of these are above 1024.

Page 35: Semester 1 Module 11  TCP/IP Transport and Application Layers

35

Page 36: Semester 1 Module 11  TCP/IP Transport and Application Layers

36

End systems use port numbers to select the proper application.

The source host dynamically assigns originating source port numbers.

Page 37: Semester 1 Module 11  TCP/IP Transport and Application Layers

37

Page 38: Semester 1 Module 11  TCP/IP Transport and Application Layers

38

Outline

TCP/IP Transport Layer The Application Layer

Page 39: Semester 1 Module 11  TCP/IP Transport and Application Layers

39

Introduction to the TCP/IP application layer

Page 40: Semester 1 Module 11  TCP/IP Transport and Application Layers

40

DNS The Domain Name System (DNS) is a system used on

the Internet for translating names of domains and their publicly advertised network nodes into IP addresses.

A domain name is a string of characters, number, or both.

There are more than 200 top-level domains on the Internet. .us – United States .uk – United Kingdom .edu – educational sites .com – commercial sites .gov – government sites .org – non-profit sites .net – network service

Page 41: Semester 1 Module 11  TCP/IP Transport and Application Layers

41

FTP and TFTP

FTP is a reliable, connection-oriented service that uses TCP to transfer files between systems. FTP first establishes a control connection between the

client and the server. Then a second connection is established, which is a

link between the computers through which the data is transferred.

Data transfer can occur in ASCII mode or in binary mode.

Page 42: Semester 1 Module 11  TCP/IP Transport and Application Layers

42

TFTP is a connectionless service that uses User Datagram Protocol (UDP). TFTP is designed to be small and easy to implement. It lacks most of the features of FTP. It cannot list directories and currently has no

provisions for user authentication. TFTP is used on the router to transfer configuration

files and Cisco IOS images and to transfer files between systems.

Page 43: Semester 1 Module 11  TCP/IP Transport and Application Layers

43

HTTP

Hypertext Transfer Protocol (HTTP). Hypertext Markup Language (HTML). Client-server application. A Web browser presents data in multimedia

formats on Web pages that use text, graphics, sound, and video.

Hyperlinks make the World Wide Web easy to navigate.

Uniform Resource Locator (URL).

Page 44: Semester 1 Module 11  TCP/IP Transport and Application Layers

44

Page 45: Semester 1 Module 11  TCP/IP Transport and Application Layers

45

SMTP

Simple Mail Transfer Protocol (SMTP) The SMTP protocol transports email messages

in ASCII format using TCP. Collecting mail -> POP3(port 110) and IMAP4.

(port 143) Sending mail -> SMTP (port 25).

Page 46: Semester 1 Module 11  TCP/IP Transport and Application Layers

46

Page 47: Semester 1 Module 11  TCP/IP Transport and Application Layers

47

SNMP

The Simple Network Management Protocol (SNMP) is an application layer protocol that facilitates the exchange of management information between network devices.

SNMP enables network administrators to manage network performance, find and solve network problems, and plan for network growth.

SNMP uses UDP as its transport layer protocol.

Page 48: Semester 1 Module 11  TCP/IP Transport and Application Layers

48

An SNMP managed network consists of the following three key components: Network management system (NMS) –

NMS executes applications that monitor and control managed devices.

The bulk of the processing and memory resources required for network management are provided by NMS.

One or more NMSs must exist on any managed network.

Page 49: Semester 1 Module 11  TCP/IP Transport and Application Layers

49

Managed devices – Network nodes that contain an SNMP agent and that reside

on a managed network. They collect and store management information and make t

his information available to NMSs using SNMP. Sometimes called network elements, can be routers, acces

s servers, switches, and bridges, hubs, computer hosts, or printers.

Agents – Agents are network-management software modules that re

side in managed devices. An agent has local knowledge of management information

and translates that information into a form compatible with SNMP.

Page 50: Semester 1 Module 11  TCP/IP Transport and Application Layers

50

Managed device network node An SNMP agent reside in it. It collects and stores management information for NMS. routers, access servers, switches, bridges, hubs, computer

hosts, printers.

Agents software modules It translates information into a form compatible with SNMP.

Page 51: Semester 1 Module 11  TCP/IP Transport and Application Layers

51

Page 52: Semester 1 Module 11  TCP/IP Transport and Application Layers

52

Telnet

Terminal emulation Telnet operation uses none of the processing power

from the transmitting computer. It transmits the keystrokes to the remote host and

sends the resulting screen output back to the local monitor.

A Telnet client is referred to as a local host. A Telnet server uses special software called a

daemon, is referred to as a remote host.

Page 53: Semester 1 Module 11  TCP/IP Transport and Application Layers

53

Good luck in your exams !