Chapter 16 Protocols and Layering

Download Report

Transcript Chapter 16 Protocols and Layering

Chapter 16 Protocols and
Layering
Network Communication
Protocol

an agreement that specifies the format and
meaning of messages computers exchange
 Network applications do not interact
directly with network hardware; they
interact with protocol software which
adheres to protocol.
Protocol Suites





Aka protocol family or protocol stack
a set of protocols that works well together. Eg.
TCP/IP, NetBuei, Novell IPX, AppleTalk, DecNet,
SNA.
Protocols from one stack cannot interact with
protocols from another stack.
A computer can run more than one protocol stack.
Type field in each frame identifies which stack
should handle the message
ISO 7-layer Reference Model

network communication divided into 7
logical categories (fig 16.1)

Layer 1: Physical Layer
– deals with the basic network hardware eg. Fiber,
twisted-pair copper, coax

Layer 2: Data Link layer
– specifies how to organize data into frames and to
transmit the frames eg. CSMA/CD, token passing,
checksum, CRC

Layer 3: Network layer protocols
– specify how address are assigned and how packets are
forwarded from one end of the network to the other end
(eg. IP, ARP, RARP)

Layer 4: Transport layer protocols
– specify how to reliably transfer data from one end to
the other (eg. TCP, UDP, RIP)

Layer 5: Session layer protocols
– specify how to establish a communication
session with a remote computer (eg. Password
authentication, RPC)

Layer 6: Presentation layer protocols
– specify how to represent data. Needed because
different computers may represent data
differently (eg. XDR).

Layer 7: Application layer protocols
– eg. Lpr, rcp, rlogin,rsh, ftp, telnet, smtp, DNS,
NFS, NIS, SNMP, bootp, ntp,tftp
3-layer network &
2
interface
model
 Bottom Layer
– the NIC board driver which is the software the controls the NIC
board. This software is usually NDIS or ODI compliant driver

Network Binding Interface
– an interface that allows a transport protocol stack to bind (attach,
or communicate) to a board driver eg. (Network Driver
Interface Specification (NDIS) for NetBEUI, TCP/IP, and
SPX/IPX).

Middle Layer
– transport protocol eg. TCP/IP, IPX/SPX, NetBEUI

Network API interface
– allows network applications in top layer to be written without
having to know details of transport protocols.

Top Layer
– network services eg. email application
Stacks and Layered Software

software in each layer talks to the layers
immediately adjacent to it (fig 16.2).
 Nested protocol headers
– data is prepended with additional header
information as it go down various layers prior
to network transmission (fig 16.4)
Layering Principle

Layer N software on the destination computer
must receive exactly the message sent by layer N
software on the sending computer
 Whatever transformation(adding headers or
encrypting data) a protocol at a given layer applies
before sending a frame must be completely
reversed when the frame is received by the same
layer software at the destination (fig 16.5).
 This simplifies protocol design and testing since
the protocol and be designed and tested
independent of the other layers
Sequencing

needed to reorder out-of-order packet deliveries
 The receiving side stores both the sequence number of
the last packet received in order as well as a list of
packets that were received out of order
 When a new packet arrives, the receiver checks the
sequence number of the packet to determine whether it
should be sent to the next protocol layer or to appended
it to the list of out-of-ordered packets.
 Other packets on this list is checked whether they can
be delivered. Duplicate packets (same sequence
number) are discarded
Retransmission of
Lost Packets

To guarantee reliable transfer (no data loss),
protocols use positive acknowledgment with
retransmission.
 Receiver sends an acknowledgement whenever
data is received successfully.
 If sender does not receive an acknowledgement
within a specified time (timeout), it retransmit the
packet and restarts the timer.
Flow Control

needed because transmitting computer may
be faster than receiving computer, causing
dropped packets
Flow Control Techniques

stop-and-go method
– transmitter waits for acknowledgement after a packet is sent and
before sending another packet
– prevents data overrun but is inefficient

sliding window
– sender and receiver uses a fixed window size, which is the
maximum amount of data that can be sent before an
acknowledgement arrives (fig. 16.6).
– Whenever an acknowledgement arrives, the transmitter adjusts
(slides) the window appropriately and continues to send new
data within the new window(fig. 16.7) .

Throughput can be increased dramatically
using sliding window.
 Tw = min (B, Tg x W)
– Where Tw is throughput using sliding window
protocol
– Tg is throughput using stop-and-go protocol
– B is underlying network bandwidth
Congestion Control

needed because network bottlenecks can occur
 packet switch(router) queues grow until packets start to
drop(discarded) due to limited buffer memory inside
routers.
 Congestion control techniques
– have packet switches (routers) inform senders to slow down
(source quench) via using smaller window size when congestion
occurs
– sender automatically slow down when packet transmission
timeout occurs and retransmission is needed.