Download Transport Layer Week 3

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Net bias wikipedia , lookup

Distributed firewall wikipedia , lookup

CAN bus wikipedia , lookup

Asynchronous Transfer Mode wikipedia , lookup

Wake-on-LAN wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

Network tap wikipedia , lookup

Computer network wikipedia , lookup

IEEE 1355 wikipedia , lookup

Airborne Networking wikipedia , lookup

List of wireless community networks by region wikipedia , lookup

Deep packet inspection wikipedia , lookup

TCP congestion control wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

UniPro protocol stack wikipedia , lookup

Internet protocol suite wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Transcript
Transport Layer
Transport Layer Overview

Transport layer is layer 4 of the OSI model.
Refer to the previous graphic used
Transport Layer




It responds to service requests from the
session layer and issues service requests to
the network layer.
The transport layer provides transparent
transfer of data between hosts.
It is responsible for end-to-end error recovery
and flow control.
It ensures complete data transfer.
Transport Layer


In the IP protocol Stack this function is
achieved by the connection oriented
Transmission Control Protocol (TCP) or the
datagram type User Datagram Protocol
(UDP).
The purpose of the Transport layer is to
provide transparent transfer of data between
end users, thus relieving the upper layers
from any concern with providing reliable and
cost-effective data transfer.
Transport Layer

Optional services that can be provided at
layer 4 are:
 Connection Oriented. This is normally easier to
deal with than Connectionless models, so where
the Network layer only provides a connectionless
service, often a connection oriented service is
built on top of that in the Transport layer.
Connection vs Connectionless

Connectionless describes communication between
two network end points in which a message can be
sent from one end point to another without prior
arrangement. The device at one end of the
communication transmits data to the other, without
first ensuring that the recipient is available and
ready to receive the data. The device sending a
message simply sends it addressed to the intended
recipient. If there are problems with the
transmission, it may be necessary to resend the
data several times. The Internet Protocol (IP) and
User Datagram Protocol (UDP) are connectionless
protocols.

Searchnetworking.com
Connection vs Connectionless

The other method of transmitting data is the
connection-oriented approach, in which the devices
use a preliminary protocol to set up an end-to-end
connection before any data can be sent.
Connection-oriented protocol service is sometimes
called a "reliable" network service, because it
guarantees that data will arrive in the proper
sequence. For connection-oriented communications,
each end point must be able to transmit so that it
can communicate. Transmission Control Protocol
(TCP) is a connection-oriented protocol.

SearchNetworking.com
Transport Layer

Optional services that can be provided at
layer 4 are:
 Same Order Delivery. The Network layer doesn't
generally guarantee that packets of data will
arrive in the same order that they were sent, but
often this is a desirable feature, so the Transport
layer provides it. The simplest way of doing this is
to give each packet a number, and allow the
receiver to reorder the packets.
Transport Layer

Optional services that can be provided at layer 4
are:
 Error 'Free' Data. The underlying network may well be
noisy, and the data received may not always be the same
as the data sent. The Transport layer can fix this: typically
by providing a checksum of the data which detects if there
has been a glitch of some kind. Of course, error free is
impossible, but it is possible to substantially reduce the
numbers of undetected errors. This layer may also
retransmit packets which have gone missing en route.
Transport Layer

Optional services that can be provided at
layer 4 are:
 Flow Control. The amount of memory on a
computer is limited, and without flow control a
larger computer might flood a computer with so
much information that it can't hold it all before
dealing with it. Nowadays, this is not a big issue,
as memory is cheap while bandwidth is
comparatively expensive, but in earlier times it
was more important.
Transport Layer

Optional services that can be provided at
layer 4 are:
 Byte Orientation. Rather than dealing with things
on a packet-by-packet basis, the Transport layer
may add the ability to view communication just as
a stream of bytes. This is nicer to deal with.
Transport Layer

Optional services that can be provided at
layer 4 are:
 Ports. Ports are essentially ways to address
multiple entities in the same location. For
example, the first line of a postal address is a kind
of port, and distinguishes between different
occupants of the same house. Computer
applications will each listen for information on
their own ports, which is why you can use more
than one network-based application at the same
time.
Transport Layer & The Internet



Two most common transport services are UDP and
TCP.
TCP is the more complicated, providing a
connection and byte oriented stream which is almost
error free, with flow control, multiple ports, and same
order delivery.
UDP is a very simple 'datagram' service, which
provides limited error reduction and multiple ports.
TCP stands for Transport Control Protocol, while
UDP stands for User Datagram Protocol.
In-Depth TCP



Definition from Wikipedia:
Transmission Control Protocol (TCP) is a
connection-oriented, reliable delivery bytestream transport layer protocol currently
documented in IETF RFC 793.
In the TCP/IP model, TCP provides an
interface between a network layer below and
an application layer above. Applications send
streams of 8-bit bytes to TCP for delivery
onto the network.
In-Depth TCP

TCP connections contain three phases:




connection establishment
data transfer
connection termination.
A 3-way handshake is used to establish a
connection. A four-way handshake is used to
tear-down a connection. During connection
establishment, parameters such as sequence
numbers are initialized to help ensure
ordered delivery and robustness.
In-Depth TCP – Connection
Establishment

While it is possible for a pair of end hosts to
initiate a connection between themselves
simultaneously, typically one end opens a
socket and listens passively for a connection
from the other.
In-Depth TCP – Data Transfer

During the data transfer phase, a number of
key mechanisms determine TCP's reliability
and robustness. These include using
sequence numbers for ordering received TCP
segments and detecting duplicate data,
checksums for segment error detection, and
acknowledgements and timers for detecting
and adjusting to loss or delay.
In-Depth TCP – Connection
Termination

The connection termination phase uses a
four-way handshake, with each side of the
connection terminating independently.
Therefore, a typical teardown requires a pair
of FIN and ACK segments from each TCP
endpoint.
TCP Ports



TCP uses the notion of port numbers to identify
sending and receiving applications.
Each side of a TCP connection has an associated
16-bit unsigned port number assigned to the
sending or receiving application.
Ports are categorized into three basic categories:
well known, registered and dynamic/private. The
well known ports are assigned by the Internet
Assigned Numbers Authority (IANA) and are
typically used by system-level or root processes.
TCP Ports


Well known applications running as servers
and passively listening for connections
typically use these ports. Some examples
include: FTP (21), TELNET (23), SMTP (25)
and HTTP (80).
Registered ports are typically used by end
user applications as source ports when
contacting servers, but they can also identify
named services that have been registered by
a third party.
TCP/IP Introduction

TCP and IP were developed by a Department
of Defense (DOD) research project to
connect a number different networks
designed by different vendors into a network
of networks (the "Internet"). It was initially
successful because it delivered a few basic
services that everyone needs (file transfer,
electronic mail, remote logon) across a very
large number of client and server systems.
TCP/IP Introduction

Several computers in a small department can
use TCP/IP on a single LAN. The IP
component provides routing from the
department to the enterprise network, then to
regional networks, and finally to the global
Internet. On the battlefield a communications
network will sustain damage, so the DOD
designed TCP/IP to be robust and
automatically recover from any node or
phone line failure.
TCP/IP In-Depth




Like other protocols, composed of layers:
IP - is responsible for moving packet of data from node
to node. IP forwards each packet based on a four byte
destination IP address. The Internet authorities assign
ranges of numbers to different organizations. The
organizations assign groups of their numbers to
departments.
TCP - is responsible for verifying the correct delivery of
data from client to server. Data can be lost in the
intermediate network. TCP adds support to detect errors
or lost data and to trigger retransmission until the data is
correctly and completely received.
Sockets - is a name given to the package of subroutines
that provide access to TCP/IP on most systems.
TCP/IP In-Depth

To insure that all types of systems from all
vendors can communicate, TCP/IP is
absolutely standardized on the LAN.
However, larger networks based on long
distances and phone lines are more volatile.
In the US, many large corporations would
wish to reuse large internal networks based
on IBM's SNA. In Europe, the national phone
companies traditionally standardize on X.25.
Addressing

Each technology has its own convention for
transmitting messages between two
machines within the same network. On a
LAN, messages are sent between machines
by supplying the six byte unique identifier (the
"MAC" address).
IP Addressing

On top of these local or vendor specific
network addresses, TCP/IP assigns a unique
number to every workstation in the world.
This "IP number" is a four byte value that, by
convention, is expressed by converting each
byte into a decimal number (0 to 255) and
separating the bytes with a period. For
example, Microsoft’s web server IP address
is 207.46.156.220.
IP Addressing


An organization begins by registering a name or
address with a company that provides services,
requesting assignment of a network number. It is still
possible for almost anyone to get assignment of a
number for a small "Class C" network in which the
first three bytes identify the network and the last
byte identifies the individual computer.
Larger organizations can get a "Class B" network
where the first two bytes identify the network and
the last two bytes identify each of up to 64 thousand
individual workstations. Yale's Class B network is
130.132, so all computers with IP address
130.132.*.* are connected through Yale.
IP Addressing & DNS



The only way for your system to know what
www.microsoft.com is in an actual address is to use
DNS. This is Domain Name System, and serves as
a look-up table for name resolution.
Definition from wikipedia.com: The Domain Name
System stores information about host and domain
names on the Internet. Most importantly, it provides
an IP address for each host name, and lists the mail
exchange servers accepting e-mail for each domain.
The DNS is a vital part of the Internet, because IP
addresses are needed for routing but host names
and domain names are used by humans, for
example in URLs and email addresses.
How DNS Works


A domain name consists of two or more parts
separated by periods. The rightmost label is the toplevel (for example, the top-level domain for
www.wikipedia.org is org). Each label to the left
specifies a subdivision or subdomain (for example,
wikipedia.org is a subdomain of org and
www.wikipedia.org is a subdomain of wikipedia.org).
In theory, this subdivision can be up to 127 levels
deep, and each label can be up to 63 characters
long, as long as the whole domain name is no
longer than 254 characters.
DNS Records





A Record (address record) maps a host name to its
IP address
CNAME Record (canonical name record) makes
one domain name an alias of another
MX Record (mail exchange record) maps a domain
name to a list of mail exchange servers for that
domain
PTR Record (pointer record) maps a host name to
the canonical name of that host; it is used for
reverse DNS lookup
NS Record (name server record) maps a domain
name to a list of DNS Servers for that domain
Addressing & Network Paths

Every time a message arrives at an IP router, it
makes an individual decision about where to send it
next. There is concept of a session with a preselected path for all traffic. Consider a company with
facilities in New York, Los Angeles, Chicago and
Atlanta. It could build a network from four phone
lines forming a loop (NY to Chicago to LA to Atlanta
to NY). A message arriving at the NY router could go
to LA via either Chicago or Atlanta. The reply could
come back the other way.
Addressing & Network
Paths/Routing

How does the router make a decision
between routes? There is no correct answer.
Traffic could be routed by the "clockwise"
algorithm (go NY to Atlanta, LA to Chicago).
The routers could alternate, sending one
message to Atlanta and the next to Chicago.
More sophisticated routing measures traffic
patterns and sends data through the least
busy link.
Addressing & Network
Paths/Routing


If one phone line in this network breaks down, traffic can still
reach its destination through a roundabout path. After losing the
NY to Chicago line, data can be sent NY to Atlanta to LA to
Chicago. This provides continued service though with degraded
performance. This kind of recovery is the primary design feature
of IP.
The loss of the line is immediately detected by the routers in NY
and Chicago, but somehow this information must be sent to the
other nodes. Otherwise, LA could continue to send NY messages
through Chicago, where they arrive at a "dead end." Each
network adopts some Router Protocol which periodically updates
the routing tables throughout the network with information about
changes in route status