CN ppt4 NetworkLayer
CN ppt4 NetworkLayer
CN ppt4 NetworkLayer
Routing Algorithms
Congestion Control
Quality of Service
Internetworking
Network Layer of the Internet
Source to destination delivery of individual packets
across multiple links
Getting to the destination may require making many
hops at intermediate routers along the way
To achieve its goals, the network layer must know
about the topology of the network (i.e., the set of all
routers and links) and choose appropriate paths
through it, even for large networks
It must also take care when choosing routes to avoid
overloading some of the communication lines and
routers while leaving others idle.
Deal with problems that arise when source and
destination are in different networks due to
differnces
Store-and-forward packet switching
Connectionless service – datagrams
Connection-oriented service – virtual circuits
Comparison of virtual-circuits and datagrams
Individual packets sent by hosts are forwarded by routers
(a) A network. (b) The link state packets for this network.
Distributing the Link State Packets
trickiest part of the algorithm is distributing the link state
packets
All routers must get all the link state packets quickly and
reliably
If different routers are using different versions of the topology,
the routes they compute can have inconsistencies such as
loops, unreachable machines, and other problems.
use flooding to distribute link state packets to all routers
To keep flood in check, each packet contains a sequence
number
Routers keep track of all the (source router, sequence) pairs
seen
When a new link state packet comes in, it is checked against
the list of packets already seen. If it is new, it is forwarded on
all lines except the one it arrived on. If it is a duplicate, it is
discarded.
If a packet with a sequence number lower than the highest
one seen so far ever arrives, it is rejected as being obsolete
as the router has more recent data.
above method has a few problems which are managed
First, what if the sequence numbers wrap around ?
The solution here is to use a 32-bit sequence number.
With one link state packet per second, it would take 137
years to wrap around
Second, if a router ever crashes, it will lose track of its
sequence number. If it starts again at 0, the next packet it
sends will be rejected as a duplicate.
Third, if a sequence number is ever corrupted and 65,540
is received instead of 4 (a 1-bit error), packets 5 through
65,540 will be rejected as obsolete, since the current
sequence number will be thought to be 65,540.
The solution to all these problems is to include the age of
each packet and decrement it once per second. When the
age hits zero, the information from that router regarding
the packet is discarded.
Computing the New Routes
Once a router has accumulated a full set of link state
packets, it can construct the entire network graph
because every link is represented.
Now Dijkstra‟s algorithm can be run locally to
construct
the shortest paths to all possible destinations
Non-Transparent Fragmentation
Advantages
Drawbacks
Fragmentation when the elementary data size is 1 byte. (a)Original packet,
containing 10 data bytes. (b)Fragments after passing through a network with
maximum packet size of 8 payload bytes plus header. (c)Fragments after passing
through a size 5 gateway.
the strategy used in the modern Internet – follows the original
solution of getting rid of fragmentation in the network. The
process is called path MTU discovery
IP address formats.
Special IP addresses.
Network numbers are managed by a nonprofit corporation called
ICANN (Internet Corporation for Assigned Names and Numbers)
In turn, ICANN delegates parts of the address space to various
regional authorities, which give out IP addresses to ISPs and other
companies.
This is the process by which a company is allocated a block of IP
addresses
Problem : University – CS Department - /16 addresses
Few years later – EE Dept, Arts Dept want internet
How to allocate – buy new addresses ?
The solution is to allow the block of addresses to be split into
several parts for internal use as multiple networks, while still acting
like a single network to the outside world. This is called subnetting
and the networks (such as Ethernet LANs) that result from dividing
up a larger network are called subnets
Splitting an IP prefix into separate networks with subnetting.
problem that remains: routing table explosion
Routers in organizations at the edge of a network, such as a
university – few entries
Routers in ISPs and backbones in the middle of the Internet –
millions of entries
Goal - reduce routing table sizes
Solution - we combine multiple small prefixes into a single
larger prefix. This process is called route aggregation. The
resulting larger prefix is sometimes called a supernet
With aggregation, IP addresses are contained in prefixes of
varying sizes. The same IP add r ess that one router treats as
1 0
part of a /22 (a block containing 2 addresses) may be treat e d
1 2
by another router as part of a larger /20 (which contains 2
addresses). It is up to each router to have the corresponding
prefix information.
This design works with subnetting and is called CIDR (Classless
Inter-Domain Routing),
University First address Last address How many Prefix
Cambridge 194.24.0.0 194.24.7.255 2048 194.24.0.0/21
Edinburgh 194.24.8.0 194.24.11.255 1024 194.24.8.0/22
(Available) 194.24.12.0 194.24.15.255 1024 194.24.12.0/22
Oxford 194.24.16.0 194.24.31.255 4096 194.24.16.0/20