0% found this document useful (0 votes)
53 views23 pages

Unit 3 Chapter I: Protocols and Layering: Layering Is A Structuring Technique To Organize Networking Software Design and

This document covers three chapters on networking concepts: 1. Protocols and layering - Network software is organized into layers and protocols to simplify design. The OSI 7-layer model divides networking functions into logical layers. 2. Internetworking - Physical networks are connected by routers to form an internet. The TCP/IP protocol suite allows interoperability across different networks. IP addresses and classes are introduced. 3. ARP - The Address Resolution Protocol allows translation between IP addresses and physical addresses to enable packet delivery across networks.

Uploaded by

Mishal Dsouza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views23 pages

Unit 3 Chapter I: Protocols and Layering: Layering Is A Structuring Technique To Organize Networking Software Design and

This document covers three chapters on networking concepts: 1. Protocols and layering - Network software is organized into layers and protocols to simplify design. The OSI 7-layer model divides networking functions into logical layers. 2. Internetworking - Physical networks are connected by routers to form an internet. The TCP/IP protocol suite allows interoperability across different networks. IP addresses and classes are introduced. 3. ARP - The Address Resolution Protocol allows translation between IP addresses and physical addresses to enable packet delivery across networks.

Uploaded by

Mishal Dsouza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 23

UNIT 3

Chapter I: PROTOCOLS AND LAYERING


Need
Protocol suites
OSI model
Seven layers
Basis for layering
Chapter II: INTERNETWORKING
Concepts
Architecture
Introduction
Concepts
Internetworking
Physical network connection with routers
Internet architecture
Protocols for Internetworking
Layering and TCP/IP protocol
IP addresses
Virtual internet
IP Address Scheme
Classes
Computing the classes of an address
Dotted decimal notation
Authority for addresses
special IP addresses
Router and IP address

Chapter III: ARP(Address resolution protocol)


Protocol addresses and packet delivery
Address resolution
Techniques
table look up
Closed form computation
Message Exchange
ARP message delivery
ARP message format
Send,identify,cache and processing ARP
CHAPTER I: PROTOCOLS AND LAYERING
Introduction

LAN/WAN hardware can't solve all computer communication problems.

Software for LAN and WAN systems is large and complicated.

Layering is a structuring technique to organize networking software design and


implementation.

Why network software?

Sending data through raw hardware is awkward and inconvenient - doesn't match
programming paradigms well.

Equivalent to accessing files by making calls to disk controller to position read/write


head and accessing individual sectors.

May not be able to send data to every destination of interest without other assistance.

Network software provides high-level interface to applications.

Why protocols?

Name is derived from the Greek protokollen, the index to a scroll.

Diplomats use rules, called protocols, as guides to formal interactions.

A network protocol or computer communication protocol is a set of rules that specify


the format and meaning of messages exchanged between computers across a network
o Format is sometimes called syntax.
o Meaning is sometimes called semantic.

Protocols are implemented by protocol software

One or many protocols?

Computer communication across a network is a very hard problem.

Complexity requires multiple protocols, each of which manages a part of the problem.

May be simple or complex; must all work together Protocol suites.

A set of related protocols that are designed for compatibility is called a protocol suite.

A well-designed protocol suite


o Is efficient and effective - solves the problem without redundancy and makes
best use of network capacity.

o Allows replacement of individual protocols without changes to other


protocols.
Layered protocol design

Layering model is a solution to the problem of complexity in network Protocols.

Model suggests dividing the network protocol into layers, each of which solves part
of the network communication problem.

These layers have several constraints, which ease the design Problem.

Network protocol designed to have a protocol or protocols for each layer.

The ISO 7-layer reference model

International Organization for Standards (ISO) defined a 7-layer reference model as a


guide to the design of a network protocol suite.

Layers are named and numbered; reference to ``layer n'' often means the nth layer of
the ISO 7-layer reference model

The layers in the ISO model

Layer 7: Application
Application-specific protocols such as FTP and SMTP (electronic mail)
Layer 6: Presentation
Common formats for representation of data.
Layer 5: Session
Management of sessions such as login to a remote computer.
Layer 4: Transport

Reliable delivery of data between computers.


Layer 3: Network
Address assignment and data delivery across a physical network.
Layer 2: Data Link
Format of data in frames and delivery of frames through network interface.
Layer 1: Physical
Basic network hardware - such as RS-232 or Ethernet.
Layered software implementation

Software implemented from layered design has layered organization.

Software modules can be viewed as:

Layered software and stacks

Related modules from previous figure are called a protocol stack or simply a stack.

Two constraints:
o The software for each layer depends only on the services of the software
provided by lower layers.
o The software at layer n at the destination receives exactly the same protocol
message sent by layer n at the sender.

These constraints mean that protocols can be tested independently and can be replaced within
a protocol stack.

Messages and protocol stacks

On the sender, each layer:


o Accepts an outgoing message from the layer above.
o Adds a header and other processing.
o Passes resulting message to next lower layer.

On the receiver, each layer:


o Receives an incoming message from the layer below.
o Removes the header for that layer and performs other processing.
o Passes the resulting message to the next higher layer.

Protocol headers

The software at each layer communicates with the corresponding layer through
information stored in headers.

Each layer adds its header to the front of the message from the next higher layer.

Headers are nested at the front of the message as the message traverses the network

Control packets::

Protocol layers often need to communicate directly without exchanging data.


o Acknowledge incoming data
o Request next data packet

Layers use control packets


o Generated by layer n on sender
o Interpreted by layer n on receiver
o Transmitted like any other packet by layers n-1 and below

Techniques for reliable network communication


Model - reliable delivery of a block of data from one computer to another.
o Data values unchanged
o Data in order
o No missing data
o No duplicated data
Example - parity bit, checksum and CRC used to ensure data is Unchanged.
Out-of-order delivery:
Packets may be delivered out of order - especially in systems that include multiple
networks.
Out of order delivery can be detected and corrected through sequencing.
o Sender attaches sequence number to each outgoing packet.
o Received uses sequence numbers to put packets in order and detect missing packets
Duplicate delivery
Packets may be duplicated during transmission.
Sequencing can be used to...
o Detect duplicate packets with duplicated sequence numbers.
o Discard those duplicate packets.
Lost packets

Perhaps the most widespread problem is lost packets


Any error - bit error, incorrect length - causes receiver to discard packet
Tough problem to solve - how does the receiver decide when a packet has been lost?
Retransmission
Protocols use positive acknowledgment with retransmission to detect and correct lost
packets.
o Receiver sends short message acknowledging receipt of packets.
o Sender infers lost packets from missing acknowledgments.
o Sender retransmits lost packets.
Sender sets timer for each outgoing packet.
o Saves copy of packet.
o If timer expires before acknowledgment is received, sender can retransmit saved copy.
Protocols define upper bound on retransmission to detect unrecoverable network failure
Replay
Suppose two computers exchange data with packets numbered 1 to
5
Packet 4 encounters an extraordinary delay; computers use retransmission to deliver valid
copy of packet 4.
Two computers exchange data later on with packets numbered 1 to 10.
Initial `packet 4' can arrive during second session, so that the data from that old packet
(rather than the current `packet 4') is inserted into the data.
Protocols attach session number to each packet in a protocol session to differentiate packets
from different sessions
Flow control
Data overrun can occur when sender transmits data faster than receiver can process
incoming data.
Protocols use flow control mechanisms through which receiver can control rate of data
transmission.
o Stop-and-go
o Sliding window
Stop-and-go flow control
Receiver sends small control packet when it is ready for next packet.
Sender waits for control packet before sending next packet.
Can be very inefficient of network bandwidth if delivery time is large.
Sliding window:
Allows sender to transmit multiple packets before receiving an Acknowledgment.
Number of packets that can be sent is defined by the protocol and called the window.
As acknowledgments arrive from the receiver, the window is moved along the data packets;
hence ``sliding window''.
Example of sliding window:

Comparison of stop-and-go and sliding window:

Transmission times:
For stop-and-go, each packet takes 2L time to deliver (where L is the latency, or network
delivery time).
Sliding window can improve by number of packets in window:
Tw = Tg * W
(Tw is sliding window throughput, Tg is stop-and-go throughput)
Transmission time also limited by network transmission rate:
Tw = min(B, Tg * W)
(B is maximum network bandwidth)
Network congestion
Network congestion arises in network systems that include multiple Links.
If input to some link exceeds maximum bandwidth, packets will queue up at connection to
that link.


Eventually, packets will be discarded and packets will be retransmitted.
Ultimately, network will experience congestion collapse.
Problem related to, but not identical to, data overrun.
Avoiding and recovering from network congestion:
Protocols attempt to avoid congestion and recover from network collapse by monitoring the
state of the network and taking appropriate action.
Can use two techniques:
o Notification from packet switches.
o Infer congestion from packet loss.
Packet loss can be used to detect congestion because modern networks are reliable and
rarely lose packets through hardware failure.
Sender can infer congestion from packet loss through missing acknowledgments.
Rate or percentage of lost packets can be used to gauge degree of congestion

CHAPTER-2: INTERNETWORKING
Motivation
There are many different LAN and WAN technologies
In real world, computers are connected by many different technologies.
Any system that spans a large organization must accommodate multiple technologies.
Universal service:
Telephones are useful because any telephone can reach any other telephone.
Universal service among computers greatly increases the usefulness of each computer.
Providing universal service requires interconnecting networks employing different
technologies.
Internetworking:
Internetworking is a scheme for interconnecting multiple networks of dissimilar
technologies.
Uses both hardware and software
o Extra hardware positioned between networks

o Software on each attached computer


System of interconnected networks is called an internetwork or an internet.
Routers
A router is a hardware component used to interconnect networks.
A router has interfaces on multiple networks.
Networks can use different technologies.

Router forwards packets between networks.


Transforms packets as necessary to meet standards for each network.
Internet architecture
An internetwork is composed of arbitrarily many networks interconnected by routers.

Routers can have more than two interfaces


Routers in an organization
Would be possible to interconnect all networks in an organization with a single router.
Most organizations use multiple routers
o Each router has finite capacity; single router would have to handle all traffic
across entire organization.
o Because internetworking technology can automatically route around failed
components, using multiple routers increases reliability.
Virtual network:
Internetworking software builds a single, seamless virtual network out of multiple
physical networks.
o Universal addressing scheme
o Universal service
All details of physical networks hidden from users and application programs.

A protocol suite for internetworking


The TCP/IP Internet Protocols or, simply, TCP/IP is the mostly widely used
internetworking protocol suite.
First internetworking protocol suite
Internet concept (originally called catenet developed in conjunction with TCP/IP
Initially funded through ARPA
Picked up by NSF
Described in Where Wizards Stay Up Late
Internetworking protocols
Others include IPX, VINES, AppleTalk
TCP/IP is by far the most widely used
Vendor and platform independent
Used in the Internet - 20 million computers in 82 countries
TCP/IP layering
OSI 7-layer model does not include internetworking
TCP/IP layering model includes five layers

Layer 5: Application
Corresponds to ISO model layers 6 and 7; used for communication among applications.
Layer 4: Transport
Corresponds to layer 4 in the ISO model; provides reliable delivery of Data.
Layer 3: Internet
Defines uniform format of packets forwarded across networks of different technologies and
rules for forwarding packets in routers.
Layer 2: Network
Corresponds to layer 2 in the ISO model; defines formats for carrying packets in hardware
frames.
Layer 1: Hardware
Corresponds to layer 1 in the ISO model; defines basic networking hardware.
Hosts, routers and protocol layers
A host computer or host is any system attached to an internet that runs applications.
Hosts may be supercomputers or toasters.
TCP/IP allows any pair of hosts on an internet communicate directly.
Both hosts and routers have TCP/IP stacks.
o Hosts typically have one interface and don't forward packets
o Routers don't need layers 4 and 5 for packet forwarding
Introduction
One key aspect of virtual network is single, uniform address format.
Can't use hardware addresses because different technologies have different address
formats.
Address format must be independent of any particular hardware address format.
Sending host puts destination internet address in packet.
Destination address can be interpreted by any intermediate router.
Routers examine address and forward packet on to the destination.
TCP/IP addresses
Addressing in TCP/IP is specified by the Internet Protocol (IP)
Each host is assigned a 32-bit number
Called the IP address or Internet address
Unique across entire Internet

IP address hierarchy
Each IP address is divided into a prefix and a suffix
o Prefix identifies network to which computer is attached
o Suffix identifies computer within that network
Address format makes routing efficient
Network and host numbers
Every network in a TCP/IP internet is assigned a unique network number.
Each host on a specific network is assigned a host number or host address that is
unique within that network.
Host's IP address is the combination of the network number (prefix) and host address
(suffix).
Porperties of IP addresses
Network numbers are unique
Host addresses may be reused on different networks; combination of network number
prefix and host address suffix will be unique.
Assignment of network numbers must be coordinated globally; assignment of host
addresses can be managed locally.
Designing the format of IP addresses
IP designers chose 32-bit addresses
Allocate some bits for prefix, some for suffix
o Large prefix, small suffix - many networks, few hosts per network.
o Small prefix, large suffix - few networks, many hosts per network.
Because of variety of technologies, need to allow for both large and small networks.
Classes of addresses
Designers chose a compromise - multiple address formats that allow both large and
small prefixes.
Each format is called an address class
Class of an address is identified by first four bits.

Using IP address classes


Class

A, B and C are primary classes


Used for ordinary host addressing
Class D is used for multicast, a limited form of broadcast
o Internet hosts join a multicast group
o Packets are delivered to all members of group
o Routers manage delivery of single packet from source to all members of
multicast group.
o Used for mbone (multicast backbone)
Class E is reserved
Dotted decimal notation
Class A, B and C all break between prefix and suffix on byte boundary.
Dotted decimal notation is a convention for representing 32-bit internet addresses in
decimal.
Convert each byte of address into decimal; display separated by periods (``dots'').

Bucknell's IP addresses
Bucknell has a single Class B network: 134.82.0.0
All hosts at Bucknell have 134.82 prefix:
o 134.82.7.4 - coral
o 134.82.56.108 - leo
o 134.82.131.3 - charcoal
Suffix bytes are used to determine local network and host through
sub-netting
Address classes at a glance
While dotted decimal makes separating network address from host
address easier, determining class is not so obvious
Look at first dotted decimal number, and use this table:

Networks and hosts in each class


Classing scheme does not yield equal number of networks in each Class.
Class A:
o First bit must be 0
o 7 remaining bits identify Class A net
o 27 (= 128) possible class A nets

Internet address allocation


Addresses in the Internet are not used efficiently
Bucknell is typical, using 2,000-3,000 out of possible 2^16
Large organizations may not be able to get as many addresses in the Internet as they
need.
Example - UPS needs addresses for millions of computers
Solution - set up private internet and allocate addresses from entire 32-bit address
space.
Example
Select address class for each network depending on expected number of hosts
Assign network numbers from appropriate classes
Assign host suffixes to form internet addresses for all hosts

Special IP addresses

Berkeley broadcast address


First BSD implementation (Berkeley Software Distribution) of UNIX used all 0s for
broadcast instead of all 1s
This non-standard implementation spread with BSD UNIX
Still in common use today
Routers and IP addressing
IP address depends on network address
What about routers - connected to two networks?
IP address specifies an interface, or network attachment point, not a computer.
Router has multiple IP addresses - one for each interface

Multi-homed hosts
Hosts (that do not forward packets) can also be connected to multiple networks.
Can increase reliability and performance.
Multi-homed hosts also have one address for each interface.

CHAPTER 3: ARP(ADDRESS RESOLUTION PROTOCOL)


Introduction
Upper levels of protocol stack use protocol addresses
Network hardware must use hardware address for eventual delivery
Protocol address must be translated into hardware address for delivery; will discuss
three methods
Address translation
Upper levels use only protocol addresses
o "Virtual network" addressing scheme
o Hides hardware details
Translation occurs at data link layer
o Upper layer hands down protocol address of destination
o Data link layer translates into hardware address for use by hardware layer
Address resolution
Finding hardware address for protocol address:
o address resolution
o Data link layer resolves protocol address to hardware address
Resolution is local to a network

Network component only resolves address for other components on same network.

A resolves protocol address for B for protocol messages from an application on A sent
to an application on b.
A does not resolve a protocol address for F
o Through the internet layer, A delivers to F by routing through
R1 and R2.
o A resolves R1 hardware address
Network layer on A passes packet containing destination protocol address F for
delivery to R1.

Address resolution techniques


Association between a protocol address and a hardware address is called a binding.
Three techniques:
o Table lookup
Bindings stored in memory with protocol address as key
Data link layer looks up protocol address to find hardware address
o Closed-form computation
Protocol address based on hardware address
Data link layer derives hardware address from protocol address
o Dynamic
Network messages used for "just-in-time" resolution
Data link layer sends message requesting hardware address; destination responds with
its hardware address.
Table lookup
Use a simple list containing IP address and hardware address for each host on net.
Search on IP address and extract corresponding hardware address

Note that all IP addresses have same prefix; can save space by dropping prefix.
Sequential search may be prohibitively expensive (O(n2))
Can use indexing or hashing for O(n) lookup
o Indexing - use hostid part of IP address as list (array) index

o Hashing - use hashing function on hostid to generate list index.


Closed-form computation
If hardware technology uses small, configurable hardware address, network
administrator can choose hardware address based on IP address.
Example - hardware uses one octet address that can be configured
Simply choose hardware address to be hostid
Now, any host can determine hardware address as:
hardware_address = ip_address & 0xff
Dynamic resolution
Use network to resolve IP addresses
Message exchange with other computer(s) returns hardware address to source.
Two designs:
o Server-based - computer sends message to server to resolve address.
List of servers
Broadcast to locate servers
o Distributed - all computers participate; destination provides hardware address
to host.
Dynamic resolution techniques
Server-based - centralized, easier to manage, used on non-broadcast media (e.g.,
ATM)

Distributed - requires no dedicated computers, no administration

ARP
IP uses distributed resolution technique
Address Resolution Protocol (ARP) - part of TCP/IP protocol suite
Two-part protocol
o Request from source asking for hardware address
o Reply from destination carrying hardware address
ARP message exchange
ARP request message dropped into hardware frame and broadcast
Uses separate protocol type in hardware frame (ethernet = 806)
Sender inserts IP address into message and broadcast
Every other computer examines request
Computer whose IP address is in request responds
o Puts hardware address in response
o Unicasts to sender
Original requester can then extract hardware address and send IP packet to
destination.
ARP example

ARP message contents


Maps protocol address to hardware address
Both protocol address and hardware address sizes are variable
o Ethernet = 6 octets
o IP = 4 octets
Can be used for other protocols and hardware types
ARP message format

HARDWARE ADDRESS TYPE = 1 for Ethernet


PROTOCOL ADDRESS TYPE = 0x0800 for IP
OPERATION = 1 for request, 2 for response
Contains both target and sender mappings from protocol address to hardware address.
o Request sets hardware address of target to 0
o Target can extract hardware address of sender (saving an ARP request)
o Target exchanges sender/target in response

Sending an ARP message


Sender constructs ARP message
ARP message carried as data in hardware frame encapsulation

Caching ARP responses


Using ARP for each IP packet adds two packets of overhead for each IP packet.
Computer caches ARP responses.
o Flushes cache at system startup.
o Entries discarded periodically.
Cache searched prior to sending ARP request.
Identifying ARP frames
Uses separate frame type
Ethernet uses type 0x0806

Processing ARP messages


Receiver extracts sender's hardware address and updates local ARP table
Receiver checks operation - request of response
Response:
o Adds sender's address to local cache
o Sends pending IP packet(s)
Request:

o
o
o
Note:
o
o
o

If receiver is target, forms response


Unicasts to sender
Adds sender's address to local cache
Target likely to respond "soon".
Computers have finite storage for ARP cache.
Only target adds sender to cache; others only update if target already in cache.

Layering and address resolution


Address resolution (ARP) is a network interface layer function
Protocol addresses used in all higher layers
Hides ugly details and allows generality in upper layers

You might also like