+ All Categories
Home > Documents > The Internet Protocol Suite:...

The Internet Protocol Suite:...

Date post: 02-May-2020
Category:
Upload: others
View: 3 times
Download: 0 times
Share this document with a friend
15
Communication Networks Winter 2019/20 Prof. Jochen Seitz 1 9.5 Internet Transport Layer The Internet Protocol Suite: Recapitulation The notation TCP/IP is a synonym for the complete Internet protocol suite. The relation to the ISO/OSI reference model is according to this: In the next slides, the Internet transport layer is introduced. Communication Networks - 9. The Internet 577 IGMP ICMP ARP TCP UDP Network Layer Transport Layer Session Layer Data Link Layer RARP IP Network Card 9.5 Internet Transport Layer Transmission Control Protocol (TCP) Connection Management Connection establishment between two „Sockets” (equals CEP in the T-SAP). Data transfer over a (virtual) connection. Secured connection release (all information have to be acknowledged). Multiplexing Several applications can utilize the services of one TCP entity Data Transfer Full duplex According to sequence Flow control using window mechanism Error control based on sequence numbers, checksum, acknowledgments, retransmissions Error Notification Communication Networks - 9. The Internet 578 577 578
Transcript

Communication Networks Winter 2019/20

Prof. Jochen Seitz 1

9.5 Internet Transport Layer

The Internet Protocol Suite: Recapitulation

• The notation TCP/IP is a synonym for the complete Internet protocol suite.

• The relation to the ISO/OSI reference model is according to this:

• In the next slides, the Internet transport layer is introduced.

Communication Networks - 9. The Internet 577

IGMP ICMP

ARP

TCP UDP

NetworkLayer

Transport Layer

Session Layer

Data Link Layer

RARP

IP

Network Card

9.5 Internet Transport Layer

Transmission Control Protocol (TCP)

• Connection Management

▪ Connection establishment between two „Sockets” (equals CEP in the T-SAP).

▪ Data transfer over a (virtual) connection.

▪ Secured connection release (all information have to be acknowledged).

• Multiplexing

▪ Several applications can utilize the services of one TCP entity

• Data Transfer

▪ Full duplex

▪ According to sequence

▪ Flow control using window mechanism

▪ Error control based on sequence numbers, checksum, acknowledgments, retransmissions

• Error Notification

Communication Networks - 9. The Internet 578

577

578

Communication Networks Winter 2019/20

Prof. Jochen Seitz 2

9.5 Internet Transport Layer

TCP: Addressing

• Applications identified through port numbers

• Port numbers up to 1024 reserved for frequently used applications(e.g. 20/21 for FTP, 23 for TELNET, 80 for HTTP, 443 for HTTPS)

• Socket: pair of IP address and port number → unique in the Internet if IP address is unique

• Example – FTP server of TU Ilmenau is addressable via socket 141.24.191.41:21

Communication Networks - 9. The Internet 579

Port21

Port21

Port400Port400

TCPTCP

IPIP

N2HN2H

TCPTCP

IPIP

N2HN2H

Internet

FTPServer

FTPUser A

Port400Port400

TCPTCP

IPIP

N2HN2H

FTPUser B

141.24.191.41 129.13.42.112 129.13.42.115

> telnet mailhost 25

Trying 129.13.3.161...

Connected to mailhost .

Escape character is '^]'.

220 mailhost ESMTP Sendmail 8.8.5/8.8.5;

Mon, 4 Aug 1997 17:02:51 +0200

HELP

214-This is Sendmail version 8.8.5

214-Topics:

214- HELO EHLO MAIL RCPT DATA

214- RSET NOOP QUIT HELP VRFY

214- EXPN VERB ETRN DSN

214-For more info use "HELP <topic>".

...

214 End of HELP info

> telnet walapai 13

Trying 129.13.3.121...

Connected to walapai.

Escape character is '^]'.

Mon Aug 4 16:57:19 1997

Connection closed by foreign host

9.5 Internet Transport Layer

TCP: Well-Known Ports

Communication Networks - 9. The Internet 580

• Many applications use TCP for data transmission

• In order to address the peer application entity, the according port number has to be chosen:

▪ 13: daytime

▪ 20: FTP Data

▪ 21: FTP Control

▪ 25: SMTP (Simple Mail Transfer Protocol)

▪ 53: DNS(Domain Name Server)

▪ 80: HTTP(Hyper TextTransfer Protocol)

▪ 443: HTTPS(Hypertext Transfer Protocol Secure)

579

580

Communication Networks Winter 2019/20

Prof. Jochen Seitz 3

9.5 Internet Transport Layer

TCP: Connection Establishment

• The peer entities can establish a TCP connection in two modes:

▪ active (connect) or

▪ passive (listen/accept)

• Active Mode:

▪ A TCP connection is requested to a given socket.

• Passive Mode:

▪ An application tells TCP that it will accept incoming connections on the given port:

❖ From a certain source port (fully specified passive open) or

❖ From any source port (unspecified passive open).

❖ If there is an incoming connection, a new socket will be created serving as a connection end point.

• Remark: The TCP connection will then be established without any user interaction(e.g. no connect.indication).

Communication Networks - 9. The Internet 581

TCP: Connection ManagementData exchange in state„Estblshd“

Communication Networks - 9. The Internet 582

9.5 Internet Transport Layer

Clo

se PassiveC

lose

Act

iv

Co

nn

ecti

on

Est

ablis

hm

ent Closed

Listen

SYN rcvd SYN sent

Estblshd

FIN wait1

FIN wait2

Closed

Closing

Timed wait

Close wait

Last ACK

Connect;SYN

Close; -Listen; - Close; -

SYN; SYN+ACKRST+ACK; - Send

SYN; SYN+ACK(synchronous)

ACK; -SYN+ACK; ACK

Close; FIN Close; FIN FIN; ACK

FIN; ACK

Close; FIN

FIN; ACK

ACK; - ACK; -

ACK; -

FIN+ACK;ACK

(Timeout; -)

581

582

Communication Networks Winter 2019/20

Prof. Jochen Seitz 4

TCP: Packet Format

Communication Networks - 9. The Internet 583

9.5 Internet Transport Layer

0 31

PacketHeader

This bit is also called PSH (Push-Bit)in some references.

16

Source PortSource Port Destination PortDestination Port

Sequence NumberSequence Number

Piggyback AcknowledgementPiggyback Acknowledgement

4 bit TCPheaderlength

4 bit TCPheaderlength

6 bitunused

6 bitunused

URG

URG

ACK

ACK

EOM

EOM

RST

RST

SYN

SYN

FIN

FIN

WindowWindow

ChecksumChecksum Urgent PointerUrgent Pointer

Options (0 or more 32-bit-Words)Options (0 or more 32-bit-Words)

Data ...Data ...

9.5 Internet Transport Layer

TCP: Packet Format

• Source and Destination Port: identify the connection end points

• Sequence number: counts the bytes that are sent (and not the packets!)

• Piggyback acknowledgement: contains the number of the next byte that is expected

• TCP header length: contains the number of 32-bit-Words in the packet header

• URG: if set to 1, the Urgent Pointer is valid

• SYN: used for connection establishment

• ACK: signals the validity of the acknowledgment field

• FIN: used for connection release

• RST: used ot reset a TCP connection

• EOM (or PSH): signals the end of the complete transfer

• Window: used for flow control – number of bytes that may be sent

• Checksum: used for error control

• Urgent Pointer: relative pointer to important information in the data field

• Options: options of variable length (e.g. maximum segment size)

Communication Networks - 9. The Internet 584

583

584

Communication Networks Winter 2019/20

Prof. Jochen Seitz 5

9.5 Internet Transport Layer

TCP Connection Establishment in Detail

▪ Three Way Handshake❖Both SYNs have to be acknowledged

❖The receiver (B) must not send data before it receives an acknowledgment for its SYN

Communication Networks - 9. The Internet 585

Active OpenPassive OpenA B

A requests connection

B accepts and acknowledges

A accepts and starts data transfer

TCP Connection Establishment: Orphaned SYN

Communication Networks - 9. The Internet 586

9.5 Internet Transport Layer

Passive OpenA B

Old SYN is received

B accepts and acknowledges

A refuses B‘s connection

585

586

Communication Networks Winter 2019/20

Prof. Jochen Seitz 6

TCP Connection Establishment: Late SYN/ACK

Communication Networks - 9. The Internet 587

9.5 Internet Transport Layer

Active Open

Passive OpenA B

A requests connectionObsolete SYN/ACK arrives

A terminates „old“ connectionB accepts and acknowledgesnew connection

A acknowledges andstarts data transmission

9.5 Internet Transport Layer

TCP: Recognition of Duplicates

• TCP packets are numbered for the recognition of duplicates

• Possibly, a packet will be acknowledged several times

▪ No hint that the packet had been duplicated

• Sequence numbers must be chosen so that two packets that must have the same sequence number are a long time away from each other

• However:

▪ Packets might still be in transfer after their connection has been closed and might be accepted in a new connection

▪ When a system crashes the sequence numbers can get lost

• Solution:

▪ Clock-based initial sequence number

▪ Quiet Time

Communication Networks - 9. The Internet 588

587

588

Communication Networks Winter 2019/20

Prof. Jochen Seitz 7

TCP: Window Management1k = 1024

Communication Networks - 9. The Internet 589

9.5 Internet Transport Layer

Sender Receiver

Applicationwrites 2KB

Applicationwrites 3KB

Sender may transferup to 2KB

Sender isblocked

Buffer in Receiver0 4K

Empty

Full

2K

2K

2K1K

Application reads 2KB

9.5 Internet Transport Layer

TCP: Flow Control / Congestion Control

• Flow control is for the data flow between end systems

• Congestion control is concerned with preventing overload in the intermediate systems (e.g. routers)

• Flow control in TCP: Window mechanism and credit

▪ ACK field in the packet header acknowledges all lower byte sequence numbers

▪ Window field tells how many bytes the receiver can additionally accept

• Congestion control in TCP: Problem „congestion collapse”:Congestion situation → packet retransmissions due to timeouts → Congestion situation deteriorates!

• TCP: „slow start” and „multiplicative decrease”

▪ In case of a timeout, TCP reduces the congestion window to the half of the current sending window size (multiplicative decrease).

▪ After a congestion, the sending window will be set to 1 and duplicated for each successful transmission(slow start)

→ „slow start” mechanism prevents the sender from sending at a high rate

Communication Networks - 9. The Internet 590

589

590

Communication Networks Winter 2019/20

Prof. Jochen Seitz 8

TCP: Congestion Control

Communication Networks - 9. The Internet 591

9.5 Internet Transport Layer

Number of Transmissions

Tran

smis

sio

n W

ind

ow

(K

B)

0 2 4 6 8 10 12 14 16 18 20 22 24

0

4

8

12

16

20

24

28

32

36

40

44

Threshold

Threshold

Timeout

Example of TCP CongestionControlConnection 1 starts at t=0,

Connection 2 starts at t=6,

Connection 3 starts at t=12.

Communication Networks - 9. The Internet 592

9.5 Internet Transport Layer

0

20

40

60

80

100

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

TCP Congestion Control

Connection 1 Connection 2 Connection 3 Overall Throughput

591

592

Communication Networks Winter 2019/20

Prof. Jochen Seitz 9

9.5 Internet Transport Layer

TCP: Connection Release

• Acknowledged and numbered connection release▪ Late data packets can be identified to be able to release the connection only when all data

packets have been received.

Communication Networks - 9. The Internet 593

CloseA B

A requires connection release

B acknowledges and also requestsconnection release

A acknowledges B‘s connectionrelease. Once this packet arrives at B, the connection is terminated

9.5 Internet Transport Layer

User Datagram Protocol (UDP)

▪ Unreliable, connectionless, thus simpler and faster than TCP

▪ Demultiplexing of the received packets according to the port number

▪ Optional checksum

▪ Well-known ports:

❖ 13: daytime

❖ 53: domain name server

❖ 123: network time protocol

▪ Many multimedia applications (e.g. Voice over IP) use UDP instead of TCP because of performance reasons

Communication Networks - 9. The Internet 594

0 31

PacketHeader

Source PortSource Port Destination PortDestination Port

Message LengthMessage Length ChecksumChecksum

Data ...Data ...

16

593

594

Communication Networks Winter 2019/20

Prof. Jochen Seitz 10

9.5 Internet Transport Layer

Stream Control Transmission Protocol (SCTP)

• SCTP is a compromise of TCP and UDP:

▪ Connection-oriented: SCTP associations

▪ Reliable and in-sequence transport (if required)

▪ Message-based multi-streaming

❖Message = group of bytes

❖Multi-streaming= transmitting several streams in parallel

▪ Provides flow control mechanism

▪ Segmentation and blocking

• SCTP association:

▪ Assembled of multiple streams

▪ A stream is a unidirectional connection

Communication Networks - 9. The Internet 595

SCTP Packet

Communication Networks - 9. The Internet 596

9.5 Internet Transport Layer

IPHeader

CommonHeader Chunk 1 Chunk 2 Chunk n

• Source Port Number (2 Bytes)

• Destination Port Number (2 Bytes)

• Verification Tag (4 Bytes)

• Checksum (4 Bytes)

• Source Port Number (2 Bytes)

• Destination Port Number (2 Bytes)

• Verification Tag (4 Bytes)

• Checksum (4 Bytes)

• Chunk Header:

o Type

o Flags

o Length

• Chunk Content

• Chunk Header:

o Type

o Flags

o Length

• Chunk Content

595

596

Communication Networks Winter 2019/20

Prof. Jochen Seitz 11

InstitutionDepartment

Station

Logical Addresses in the Internet

• Addressing using logical names:

▪ Easy to remember

▪ Services might be easily ported to other stations

• Structure of a logical name

▪ Globally unique

▪ Hierarchical Structure

▪ Divided into domains

Communication Networks - 9. The Internet 597

9.6 Application-oriented Addressing

Country

• example

▪ ikmcip1.e-technik.tu-ilmenau.de

• Required:

▪ Mapping logical name → IP address

▪ Originally: file (hosts.txt) was copied every night from a server

▪ Problem: increasing number of hosts made this impossible

9.6 Application-oriented Addressing

DNS Name Space

▪ Name space is structured into zones

Communication Networks - 9. The Internet 598

Countries General Categories(mostly used within the USA)

us de se ... uk net org gov mil edu com

tu-ilmenau

e-technik

ikmcip1

nasa

...www

Planned or already realized zones(top level domains):• app – smart phone apps• farm – farming• info – information • red – for persons favoring red• singles – for online dating• vodka – as the name suggests• work – ???

Planned or already realized zones(top level domains):• app – smart phone apps• farm – farming• info – information • red – for persons favoring red• singles – for online dating• vodka – as the name suggests• work – ???

ac co

Top Level Domains

597

598

Communication Networks Winter 2019/20

Prof. Jochen Seitz 12

9.6 Application-oriented Addressing

DNS – Resource Records

• Quintupel that describes the network resources:▪ Domain_name

▪ Time_to_live

▪ Class

▪ Type❖A (IP address of the station)

❖MX (Mail exchange)

❖HINFO (CPU and operating system in ASCII)

❖CNAME (Canonical Name)

❖ ...

▪ Value

Communication Networks - 9. The Internet 599

DNS – Example

Communication Networks - 9. The Internet 600

9.6 Application-oriented Addressing

Domain_name Time_to_live Class Type Value

cs.vu.nl 86400 IN TXT „Faculteit Wiskunde en Informatica”

cs.vu.nl 86400 IN TXT „Vrije Universiteit Amsterdam”

cs.vu.nl 86400 IN MX 1. zephyr.cs.vu.nl

cs.vu.nl 86400 IN MX 2. top.cs.vu.nl

flits.cs.vu.nl 86400 IN HINFO Sun Unix

flits.cs.vu.nl 86400 IN A 130.37.16.112

flits.cs.vu.nl 86400 IN A 192.31.231.165

flits.cs.vu.nl 86400 IN MX 1. flits.cs.vu.nl

flits.cs.vu.nl 86400 IN MX 2. zephyr.cs.vu.nl

www.cs.vu.nl 86400 IN CNAME star.cs.vu.nl

ftp.cs.vu.nl 86400 IN CNAME zephyr.cs.vu.nl

laserjet IN A 192.31.231.216

IN HINFO „HP Laserjet IIISi” Proprietary

599

600

Communication Networks Winter 2019/20

Prof. Jochen Seitz 13

DNS – Name Servers

Communication Networks - 9. The Internet 601

9.6 Application-oriented Addressing

deint com edu gov mil org net jp us ...

sun

eng

yale

cs eng

ai linda

robot

acm ieee

jack jill

ac

keio

cs

pc24

co

nec

csl

tu-bs

cs

ibr

faxe

yahoo

www

General Categories Country-specific Categories

9.6 Application-oriented Addressing

DNS – Request to Name Server

• Each zone defines a primary and one or more secondary name servers

• Requests may be answered recursively or non-recursively

▪ recursive:

▪ non-recursive:

Communication Networks - 9. The Internet 602

Name Name

InfoInfo

Name

Name

Info

Info

etc.

601

602

Communication Networks Winter 2019/20

Prof. Jochen Seitz 14

DNS – Examples

Name Resolution for a Web Server: Name Resolution for an E-Mail Address:

Communication Networks - 9. The Internet 603

9.6 Application-oriented Addressing

http://www.nasa.gov/ IP address for

www.nasa.gov ?

198.116.142.34 http 198.116.142.34

mail [email protected] MX-Data for ieee.org ?

gemini.ieee.org, IP address 199.172.136.14,

SMTP

smtp 199.172.136.14

Requests for Comments

• Postel, Jon (1980): User Datagram Protocol. (RFC 768).

• Postel, Jon (1981): Transmission Control Protocol. (RFC 793).

• Postel, Jon (1994): Domain Name System Structure and Delegation. (RFC 1591).

• Klensin, John C. (2003): Role of the Domain Name System (DNS). (RFC 3467).

• Stewart, Randall R. (2007): Stream Control Transmission Protocol. (RFC 4960).

• Allman, Mark; Paxson, Vern; Blanton, Ethan (2009): TCP Congestion Control. (RFC 5681).

• Duke, Martin; Braden, Robert; Eddy, Wesley M.; Blanton, Ethan; Zimmermann, Alexander (2015): A Roadmap for Transmission Control Protocol (TCP) Specification Documents. (RFC 7414).

• Hoffman, Paul; Sullivan, Andrew; Fujiwara, Kazunori (2015): DNS Terminology. (RFC 7719).

• Blanchet, Marc; Liman, Lars-Johan (2015): DNS Root Name Service Protocol and Deployment Requirements. (RFC 7720).

• Zimmermann, Alexander; Eddy, Wesley M.; Eggert, Lars (2016): Moving Outdated TCP Extensions and TCP-Related Documents to Historic or Informational Status. (RFC 7805).

• Eggert, Lars; Fairhurst, Godred; Shepherd, Greg (2017): UDP Usage Guidelines. (RFC 8085).

Communication Networks - 9. The Internet 604

References

603

604

Communication Networks Winter 2019/20

Prof. Jochen Seitz 15

References

References

• Casad, Joe (2017): Sams Teach Yourself TCP/IP in 24 Hours. Sixth edition. Indianapolis: Pearson Education Inc.

• Comer, Douglas (2014): Internetworking with TCP/IP. Sixth edition. Upper Saddle River: Pearson Education Inc.

• Comer, Douglas (2015): Computer Networks and Internets. Sixth edition. Boston, Massachusetts: Pearson.

• Halsall, Fred (2005): Computer Networking and the Internet. 5th edition. Harlow, England: Addison-Wesley.

• Kurose, James F.; Ross, Keith W. (2017): Computer Networking. A Top-Down Approach. 7th edition. Hoboken, New Jersey: Pearson.

• Peterson, Larry L.; Davie, Bruce S. (2012): Computer Networks. A Systems Approach. 5th edition. Amsterdam: Morgan Kaufmann (The Morgan Kaufmann series in networking).

• Tanenbaum, Andrew S.; Wetherall, David J. (2011): Computer Networks. 5th edition. Boston: Pearson Prentice Hall.

Communication Networks - 9. The Internet 605

605


Recommended