Protocols and Layering - CS

candleberryinfamousNetworking and Communications

Oct 26, 2013 (3 years and 7 months ago)

108 views

Protocols and Layering

Chapter 16

Protocol Suites


Divide and conquer


Avoid duplication of effort


Abstraction


Protocol stacks


ISO


TCP/IP


ATM


The Need for Multiple Protocols


Complex data communication systems
require a set of cooperative protocols
called a
protocol family

or

suite
to
accommodate


Hardware failure


Network congestion


Packet delay or loss


Data corruption


Data duplication or inverted arrivals

The Conceptual Layers of Protocol
Software


http://www.calvin.edu/~lave/figure
-
10.1.pdf



http://www.calvin.edu/~lave/figure
-
10.2.pdf



http://www.calvin.edu/~lave/figure
-
10.3.pdf


The ISO Stack


Application


Presentation


Session


Transport


Network


Data
-
Link


Physical

Physical


Basic network hardware


How many volts does it take to represent a 1?


How is the initial connection established?



Data Link Layer


Framing


How are the bits organized into frame?


Bit stuffing


Error detection


Flow control


Routing within your network

Network Layer


Addressing


Routing beyond your local network

Transport Layer


End
-
to
-
end reliability

Session Layer


Remote terminal access


Dialogue control

Presentation Layer


Commonly used services


Compression

Application Layer


Electronic mail


Ssh


Sftp


Etc


X.25 and its Relation to the ISO
Model


Most recognized protocols associated with
the ISO model


A network operates much like a telephone
system.


Each host attaches to a packet switch
using a serial communication line.


The connection between a host and a switch
is a miniature network with its own procedure

X.25 (continued)


Physical Layer


Voltage and current


Data Link Layer


Frame format and boundaries


Error detection and acknowledgements


Network Layer


Destination address and forwarding


Responds to network congestion

X.25 (continued)


Transport Layer


End
-
to
-
end reliability


Double check


Session Layer


This layer handles remote terminal access


Presentation Layer


Compression


Application Layer

The TCP/IP 5
-
Layer Reference
Model


Did not arise from a standards body, but
from research


ISO model has been “stretched” to handle
TCP/IP, but was not designed originally
for internetworking


Four layers built on a fifth layer of
conventional hardware

TCP/IP (continued)


http://www.calvin.edu/~lave/figure
-
10.5.pdf



Application Layer


Each application chooses the style of transport
needed and passes data in the required form


Transport Layer


Provides end
-
to
-
end communication


Divides data into packets


May provide reliability

TCP/IP (continued)


Internet Layer


Handles communication from one machine to
another possibly on another network


Network Interface Layer


Responsible for accepting IP datagrams and
transmitting them over a particular network

Locus of Intelligence


A TCP/IP internet is a relatively simple
packet delivery system to which intelligent
hosts attach


Intelligent hosts and routers attach to a not
so bright network


In a telephone style network, not so bright
hosts connect to an intelligent network

The Layering Principle


Layer N software on the destination
computer must receive the exact message
sent by layer N software on the sending
computer.


Exceptions:


TTL


time to live


http://www.calvin.edu/~lave/figure
-
10.6.pdf


Layering in a TCP/IP Environment


http://www.calvin.edu/~lave/figure
-
10.7.pdf



At the internet layer we do not have
identity between what is sent and what is
received


TTL


Destination address

Layering in the Presence of
Network Substructure


In some cases routers are directly
connected by serial lines


How do the protocols used on these serial
lines fit into the TCP/IP layering scheme?


It depends on how the set of point
-
to
-
point connections is viewed


A set of independent physical networks


Collectively as a single physical network

Physical Link = Network


Each link is assigned a unique network
number


The two hosts that share the link have a
unique IP address for that connection


Routes are added to the IP routing table
as for any other network


A software module at the internet layer
controls the link hardware

Physical Link = Network
(continued)


Main disadvantage


Proliferates network numbers and increases
the size of routing tables


Both
Serial Line IP

(SLIP) and the
Point to

Point

Protocol (PPP) treat each serial line
as a separate network

All Connections Collectively Treated
As One Network


Only one IP network number is needed for
all point
-
to
-
point connections


Add a new intranet forwarding layer
between the network layer and the
hardware devices


http://www.calvin.edu/~lave/figure
-
10.8.pdf



Interface 2 has an intranet routing table

Two Important Boundaries


First, between the internet layer and the
network layer


Internet layer and above


IP addresses


Network layer and below


Hardware addresses


For example, protocols such as ARP
belong in the network interface layer

Two Important Boundaries
(continued)


Second, between software that is part of
the OS and software that is not


Between the application layer and the
transport layer


http://www.calvin.edu/~lave/figure
-
10.9.pdf


The Disadvantage of Layering


Strict layering results in extremely
inefficient software


Transport layer should choose the largest
packet size that will allow one packet to travel
in one frame


Strict layering would not allow that
information to propagate upward


Usually, implementors relax strict layering

Multiplexing and Demultiplexing


Extra bits encode the message type,
originating program, and protocols used.


All messages are eventually placed in
network frames.


http://www.calvin.edu/~lave/figure
-
10.10.pdf



http://www.calvin.edu/~lave/figure
-
10.11.pdf


Techniques Protocols Use


Sequencing


Duplicate packets


Out of order packets


Lost packets


Positive acknowledgement with retransmission


ACK


Timers


Replay


Multiple sessions

Techniques Protocols Use (contd)


Flow control


Stop
-
and
-
wait


Sliding window protocol


Congestion avoidance


Most packet loss results from congestion


Reduce the window size after having to
resend

The Art of Protocol Design


Note the term “Art”


Adjust the window? By how much?


Too little


Too much


Setting timers


For how long?


Too long


Not long enough