Ch11 Transport

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 28

Chabot College

ELEC 99.05
Transport Layer (4)

CISCO NETWORKING ACADEMY

TCP/IP Protocol Suite (simplified)


Layer 7

Layer 4

FTP

HTTP

DNS

TFTP

:21

:80

:53

:69

TCP

UDP

(connection-oriented)

(connectionless)

ICMP
Layer 3

Layer 1 & 2
CISCO NETWORKING ACADEMY

ARP

Token Ring

IP

Ethernet

(includes Ping & Traceroute)

FDDI

Layer 3 - Network Layer


In Chapters 10 & 11, we covered Layer
3 protocols:
Internet Protocol (IP)
Used for addressing

Address Resolution Protocol (ARP)


Used to relate IP and MAC addresses

Internet Control Message Protocol (ICMP)


Used for ping and traceroute commands

CISCO NETWORKING ACADEMY

Layer 3 - IP, ARP, ICMP


Layer 7

Layer 4

FTP

HTTP

DNS

TFTP

:21

:80

:53

:69

TCP

UDP

(connection-oriented)

(connectionless)

ICMP
Layer 3

Layer 1 & 2
CISCO NETWORKING ACADEMY

ARP

Token Ring

IP

Ethernet

(includes Ping & Traceroute)

FDDI

Layer 3 Limitations
No way to assure delivery of packets.
No way to control traffic flow to prevent
hosts from being overwhelmed by
data arriving too fast.
No way to keep track of multiple
conversations between between pairs
of hosts running multiple applications.
(e.g. mail & web)
CISCO NETWORKING ACADEMY

Layer 4 - Transport Layer


Layer 4 addresses these limitations.

CISCO NETWORKING ACADEMY

Transport Layer Functions


Segments data from upper layer
applications.
Uses port numbers to direct data to/from
correct upper layer application (more
about ports in Semester 2).
Establishes end-to-end connection.
Optionally, provides flow control and data
reliability.
CISCO NETWORKING ACADEMY

Function: Data Segmentation

CISCO NETWORKING ACADEMY

Transport Layer Protocols


TCP/IP uses two protocols at Layer 4:
TCP and UDP.

CISCO NETWORKING ACADEMY

Layer 4 - TCP & UDP


Layer 7

Layer 4

FTP

HTTP

DNS

TFTP

:21

:80

:53

:69

TCP

UDP

(connection-oriented)

(connectionless)

ICMP
Layer 3

Layer 1 & 2
CISCO NETWORKING ACADEMY

ARP

Token Ring

IP

Ethernet

(includes Ping & Traceroute)

FDDI

TCP vs UDP
TCP - Transmission Control Protocol
connection-oriented, reliable (virtual circuit)
divides outgoing messages into segments
reassembles messages at the destination
re-sends anything not received
provides flow control
more overhead than UDP (less efficient)

CISCO NETWORKING ACADEMY

TCP vs UDP
UDP - User Datagram Protocol
connectionless, unreliable, does not
check message delivery
sends datagrams
does not reassemble incoming messages
provides no flow control
low overhead - faster than TCP

CISCO NETWORKING ACADEMY

TCP and UDP


A packet will use either TCP or UDP,
but not both.
Normally, the application makes this
choice for the user.

CISCO NETWORKING ACADEMY

TCP
FTP

HTTP

DNS

TFTP

:21

:80

:53

:69

TCP

UDP

(connection-oriented)

(connectionless)

IP

Ethernet
CISCO NETWORKING ACADEMY

UDP
FTP

HTTP

DNS

TFTP

:21

:80

:53

:69

TCP

UDP

(connection-oriented)

(connectionless)

IP

Ethernet
CISCO NETWORKING ACADEMY

Function: Direct Data to


Applications
Uses port numbers.
We will study ports further in Semester 2.

CISCO NETWORKING ACADEMY

Function: Establish Connection

CISCO NETWORKING ACADEMY

TCP is connection-oriented
TCP establishes a connection with
a host by using the three-way
handshake.
handshake

CISCO NETWORKING ACADEMY

TCP Code Bits


Six bits in the TCP header play an
important role in establishing, maintaining,
and terminating a connection:
ACK - Acknowledgement
PSH - Push Function

URG
ACK
PSH
RST
SYN
FIN

URG - Urgent Pointer

RST - Reset Request


SYN - Synchronization Request
FIN - End of Transmission Marker
CISCO NETWORKING ACADEMY

TCP Code Bits


To initiate a TCP three way
handshake, the code bits are set:

URG
ACK
PSH
RST
SYN
FIN

0 0 0 0 1 0

CISCO NETWORKING ACADEMY

An Example TCP Header

URG
ACK
PSH
RST
SYN
FIN

TCP - Transport Control Protocol


Source Port:
2352
Destination Port: 80 World Wide Web HTTP
Sequence Number: 102274726
Ack Number:
0
Offset:
7
Reserved:
%000000
Code:
%000010
Sync Sequence
Window:
8192
Checksum:
0x6711
Urgent Pointer:
0
TCP Options:

CISCO NETWORKING ACADEMY

An Example TCP Header

URG
ACK
PSH
RST
SYN
FIN

TCP - Transport Control Protocol


Source Port:
80 World Wide Web HTTP
Destination Port: 2352
Sequence Number: 2913145779
Ack Number:
102274727
Offset:
6
Reserved:
%000000
Code:
%010010
Ack is valid
Sync Sequence
Window:
17520
Checksum:
0x9640
Urgent Pointer:
0
TCP Options:

CISCO NETWORKING ACADEMY

An Example TCP Header

URG
ACK
PSH
RST
SYN
FIN

TCP - Transport Control Protocol


Source Port:
2352
Destination Port: 80 World Wide Web HTTP
Sequence Number: 102274727
Ack Number:
2913145780
Offset:
5
Reserved:
%000000
Code:
%010000
Ack is valid
Window:
8760
Checksum:
0xd035
Urgent Pointer:
0

CISCO NETWORKING ACADEMY

syn flood Attacks


Use vast numbers of TCP synchronization
requests to overwhelm a host.
%000010
Synch Sequence
Window:
8192
Checksum:
0x6711
Urgent Pointer:
0
TCP Options:

CISCO NETWORKING ACADEMY

URG
ACK
PSH
RST
SYN
FIN

Code:

Function: Flow Control


Used only by TCP.

CISCO NETWORKING ACADEMY

Windowing (TCP only)

CISCO NETWORKING ACADEMY

Window Size
Specifies number of octets a host is willing
to accept in the next TCP segment to be
sent.
Defines the amount of data that can be
transmitted without receiving an ack
(acknowledgement).

CISCO NETWORKING ACADEMY

Function: Reliability (PAR)


Positive Acknowledgement w/
Retransmission

Packet 5
not
received

CISCO NETWORKING ACADEMY

You might also like