You are on page 1of 2

Protocol Layers

Network Protocols
n

n
n

ISO OSI 7-layer model


TCP/IP suite
l TCP/UDP
l IP
l Ethernet/Token Ring
l ICMP
n

Network communication is divided up into seven layers


l

Each layer deals with one particular aspect of the


communication

Each layer uses a set of routines provided by the layer


below it

Each layer ignores lower-level (and higher-level) details and


problems

Each layer takes a message passed down to it by a higher


layer, adds some header information, and passes the message
on to a lower layer
l

Each layer has the illusion of peer-to-peer communication

Eventually the message reaches the bottom layer, and get


physically sent across the network

ISO OSI protocol summary


ISO OSI 7-layer protocol scheme

Application layer provides network access to application


programs
l

Presentation layer provides freedom from machine-dependent


representations - maintains structured information - arrays, records,
etc: translates between machine presentations if necessary,
encryption/decryption, compression/decompression

Session layer provides communication/synchronization between


processes, Not required in connectionless communication

Transport layer accepts messages of arbitrary length between


hosts, error control for out-of-sequence and missing packets

ISO OSI protocol summary (cont.)


n

Network layer provides switching and routing needed to (1)


establish, maintain, and terminate switched connections, and
(2) transfer data (packets) between end systems
l

Data link layer reliably transfers packets (broken up into


frames) over a communication link, error correction within
frame/ flow control
l

Examples: IP (connectionless), X.25 (connectionoriented)

Examples: Ethernet

Physical layer converts 1s and 0s into electrical or optical


signals, and transmits frames of bits across a wire / cable
l

Examples: RS-232-C (serial communication lines),


X.21

Examples: telnet, ftp, email (SMTP)

Example: Remote Procedure Call (RPC)

Examples: TCP (connection-oriented), UDP


(connectionless)

TCP/IP Protocol suite


n

Upper layers
l ftp file transfer protocol
n Sends files from one system to another under user
command
n Handles both text and binary files
n Supports userids and passwords
l telnet remote terminal protocol
n Lets a user at one terminal log onto a remote host
l smtp simple mail transfer protocol
n Transfers mail messages between hosts
n Handles mailing lists, forwarding, etc.
n Does not specify how mail messages are created
l dns domain name service
n Maps names into IP addresses
n A domain may be split into subdomains
n Name severs are usually replicated to improve reliability

TCP
n

TCP Transmission Control Protocol


l Connection-oriented (3-way handshake)
l On transmit side, breaks message into packets, assigns sequence
numbers, and and sends each packet in turn
n Sends to a particular IP address and port
n Flow control doesnt send more packets than receiver is
prepared to receive
l On receive side, receives packets, reassembles them into messages
n Computes a checksum for each packet and compares it to
checksum sent, discards packet if checksums dont agree
n Reorders out-of-order packets
l Reliable
n Packets must be acknowledged
n If sender doesnt receive an acknowledgment after a short period,
it retransmits that packet
l Congestion control dont overwhelm the network

IP
n

IP Internet Protocol

Ethernet
n
n

Network is a bus broadcast to anyone who cares to listen


Every Ethernet device (everywhere in the world!) has a unique address
l The Institute of Electrical and Electronics Engineers (IEEE)
allocates addresses to manufacturers, who build a unique address
into each Ethernet device
Transmission Carrier Sense Multiple Access with Collision Detection
(CSMA/CD)
l Carrier sense: listen before broadcasting, defer until channel is
clear, then broadcast
l Collision detection: listen while broadcasting
n If two hosts transmit at same time collision the data gets
garbled
n Each jams network (short jammed signal is issued), then waits a
random (but increasing) amount of time, and tries again

ICMP
n

A part of IP that is less widely known is the Internet Control Message


Protocol (ICMP)
l

Allows gateways and hosts to exchange bootstrapping information,


report errors, and test the liveliness of the network

Some useful programs using ICMP:


l

traceroute
/usr/contrib/bin/traceroute
n Displays route taken to reach destination, time for each hop
n Sends multiple (?) 20-byte packets

ping
/usr/sbin/ping
n Tests that destination is up and reachable
n Sends ICMP echo request to destination
n Destination sends ICMP echo reply
n Sends 64-byte packets repeatedly

Connectionless

Unreliable
n Packets may be lost, duplicated, or delivered out of order

Forward packet from sender through some number of gateways


(routers) until it reaches the final destination
n A gateway accepts a packet from one network and forwards it to a
host or gateway on another network

Destination has specific Internet address, which is composed of two


parts:
n network part network the host is on
n address part specific host on network

Routing is dynamic each gateway chooses the next gateway to


send the packet to
n Gateways send each other information about network congestion
and gateways which are down

Token Ring
n
n

n
n

Devices are joined in a ring


Transmission
l unique message (token) is circulated in the ring
l Token is free when no device is transmitting
l To transmit, a host waits for a free token, attaches its message to
it, sent the token status to busy, and sends it on
l Destination removes the message, sets the token status to free,
and sends it on
Advantage: not sensitive to load
Disadvantage: complexity token maintenance is complex

You might also like