Unit 3 Chapter I: Protocols and Layering: Layering Is A Structuring Technique To Organize Networking Software Design and
Unit 3 Chapter I: Protocols and Layering: Layering Is A Structuring Technique To Organize Networking Software Design and
Sending data through raw hardware is awkward and inconvenient - doesn't match
programming paradigms well.
May not be able to send data to every destination of interest without other assistance.
Why protocols?
Complexity requires multiple protocols, each of which manages a part of the problem.
A set of related protocols that are designed for compatibility is called a protocol suite.
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.
Layers are named and numbered; reference to ``layer n'' often means the nth layer of
the ISO 7-layer reference 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
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.
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::
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
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.
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:
Special IP addresses
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.
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.
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
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
o
o
o
Note:
o
o
o