The document discusses various layers and concepts in computer networks and internetworking. It covers the network layer and its responsibilities in delivering packets from source to destination. It then discusses services provided by the network layer to the transport layer, including connection-oriented and connectionless services. Various routing algorithms and concepts are covered such as distance vector routing, link state routing, hierarchical routing, flooding, shortest path algorithms, broadcast routing, and multicast routing.
Various routing algorithm are used for the purpose of deciding which route an incoming data packet needs to be transmitted on to reach destination efficiently.
These are the algorithms which change their routing decisions whenever network topology or traffic load changes
Various routing algorithm are used for the purpose of deciding which route an incoming data packet needs to be transmitted on to reach destination efficiently.
These are the algorithms which change their routing decisions whenever network topology or traffic load changes
In multicast communication, there is one source and a group of destination.
In multicasting, the router may forward the received packet through several of its interfaces.
The source address is a unicast address, but destination address is a group address.
E-Lins Technology provides an insight on routing. E-Lins Technology are the manufacturers and providers of the one of the best 3G/4G routers across the globe.
IOSR Journal of Computer Engineering (IOSR-JCE) is a double blind peer reviewed International Journal that provides rapid publication (within a month) of articles in all areas of computer engineering and its applications. The journal welcomes publications of high quality papers on theoretical developments and practical applications in computer technology. Original research papers, state-of-the-art reviews, and high quality technical notes are invited for publications.
2. Network layer
Network layer is responsible for getting the packets from source
to destination.
To deliver the packet, network layer must know about the
topology of network and choose appropriate path among it.
Every layer in protocol stack provides service to layer above it, in
this regard, network layer uses service provided by data link layer
and gives service to transport layer.
4. Services to
Transport Layer
Network layer provides two types of services to transport layer.
o Connection oriented service
o Connectionless service
Service provided by network layer need to meet following goal.
o Service should be independent of router technology.
o Transport layer should be shielded from number, type and
topology of routers present.
o Network address available at transport layer should use
uniform numbering plan.
5. Implementation
of
Connectionless
service
Connectionless communication is just packet switching where no
connection(path) establishment and release occur.
A message is broken into packets, and each packet is transferred
separately.The packets can travel different route to the
destination since there is no connection.
Here packets is called datagrams and network is called datagram
network.
7. Implementation
of
Connectionless
service
The algorithm that manages routing table and makes routing
decision is called routing algorithm.
IP (Internet Protocol) is dominant example of a connectionless
service.
Each packet carries destination IP address that router uses to
forward the packet individually.
8. Implementation
of
Connection-
oriented
service
In connection oriented service, a connection (path) from source to
destination must be established before any data packet can be
sent.
A virtual circuit, sometimes called a logical circuit, is a path
between two or more points that seems like a fixed physical path,
but actually is one path out of many possible physical paths that
can be arranged.
This connection is called virtual circuit and network is called virtual
circuit network.
10. Implementation
of
Connection-
oriented
service
In figure, router A assigns different connection identifier to each
outgoing packet of second connection.This process is called label
switching.
Example of connection oriented service is MPLS(Multiprotocol
label switching).
12. Routing
Algorithms
Main function of network layer is to route the packet from source
machine to destination machine.
Routing algorithm is part of network layer software responsible
for deciding which output line should be use to deliver the packet
to destination.
If network uses virtual circuit, decision of routing are made when
circuit is being set up.
If network uses datagram, then routing decision need to make for
each arriving packet.
Certain properties are desirable in routing algorithm like,
correctness, simplicity, robustness, fairness, stability, efficiency.
13. Routing
Algorithms
Correctness: The routing should be done properly and correctly so
that the packets may reach their proper destination.
Simplicity: The routing should be done in a simple manner so that
the overhead is as low as possible.With increasing complexity of
the routing algorithms the overhead also increases.
Robustness: Once a major network becomes operative, it may be
expected to run continuously for years without any failures.The
algorithms designed for routing should be robust enough to
handle hardware and software failures and should be able to cope
with changes in the topology and traffic without requiring all jobs
in all hosts to be aborted and the network rebooted every time
some router goes down.
Stability: The routing algorithms should be stable under all
possible circumstances.
Fairness: Every node connected to the network should get a fair
chance of transmitting their packets.This is generally done on a
first come first serve basis.
Efficiency: The routing algorithms should be optimal in terms of
throughput and minimizing mean packet delays. Here there is a
trade-off and one has to choose depending on his suitability.
14. Routing
Algorithms
Routing algorithms are grouped into two classes:
Adaptive algorithm.
Non adaptive algorithm.
Non adaptive algorithm do not change their routing decision on
base of current topology and traffic. Routes are computed in
advance and loaded into router.These procedure is also called
static routing.
Adaptive algorithm changes their routing decision to reflect
current topology and traffic.These algorithm are also called
dynamic routing algorithm.
15. Optimality
Principle
Optimality Principle says if a router J is on optimal path from
router I to K, then optimal path from router J to K also falls among
same route.
Set of optimal routes from all source to given destination forms a
tree routed at the destination. Such a tree is called sink tree.
(a) A network. (b) A sink tree for router B.
16. Shortest Path
Algorithm
Shortest path algorithm works on graph of network, each node in
graph represents router and each edge represents a
communication link.
To choose route between given source and destination, this
algorithm finds shortest path between them.
Number of hopes, geographical distance, delay are some of the
criteria on base of which, algorithm finds shortest path.
One of algorithm to find shortest path is given Dijkstra.
17. Shortest Path
Algorithm
In Dijkstra shortest path algorithm, each node is labelled with
distance from source and previous node.
Initially, when path are not known, all the node(router ) are
labelled with infinity.As the algorithm progress, labels may
change reflecting a better path.
A label may be tentative or permanent.
Initially all the labels are tentative, when it is found that the
tentative label represents shortest possible path from source, it is
made permanent.
23. Flooding
Flooding is also a routing technique in which every incoming
packet is sent to every out going line except the line from which it
arrived.
Flooding generates vast number of packet and some measures are
required to control this process.
One solution is hop count, every packet contains hop count, this
hop count decreases at each hop packet reach.
When the hop count of packet becomes zero, packets is discarded.
In this way number of packets are controlled while flooding.
Hop count should be initialize to the length of path from source to
destination.
If sender does not know about path length, it can be initialized
with diameter of network.
25. Flooding
Another solution to control the packet is to keep a record of which
packets have been flooded.
For this, sender inserts contains sequence number in packet and
every router keeps list of packets per source those have been
flooded.
if incoming packet’s sequence number is in list, it will not be
flooded.
Flooding is not practical for use, but it have some advantage.
oIt ensures that packet is delivered to every node, so it can be
used for broadcasting.
oIn military network, it makes sure that packet gets delivered if
the path exists.
oFlooding always chooses shortest path and gives minimum
delay(if overhead due to flooding is ignored).
26. Distance
Vector Routing
Distance vector routing is dynamic routing algorithm.
Distance vector routing is also called distributed bellman-ford
routing algorithm.
In Distance vector routing algorithm, each router maintains a
table (vector) that stores best known distance for each router in
network and link to use to reach there.
Router is assumed to know the distance to each of its neighbor.
Distance may be measured in term of number of hop, delay or
other metric.
These tables are updated by exchanging information with
neighbor routers
27. Distance
Vector Routing
Assume that delay is used as metric and router knows delay to
each of its neighbor.
Router measures delay to neighbor by sending ECHO packet,
receiver just timestamp the packet and sends back the packet as
fast as possible.
Once everyT msec, each router sends each neighbor the list of
estimated delay to each destination.
It also receive same list from each its neighbor.
Assume router A has receive list from B,C. router A knows delay to
its neighbor B and C, delay is AB andAC. BD is delay from B to D.
delay from A to D would be calculated like
AD = AB+BD
• Similarly distance to D is calculated using every neighbor and
minimum distance is chosen.
29. Count to
Infinity
problem
The settling of routes to best path across the network is called
convergence.
DVR has drawback, although it converges to correct answer but it
may do slowly.
React rapidly to positive news, leisurely to bad one.
Suppose router A has long route to destination X. but in next
exchange if router B report short path, router A will switch to B to
go to X.
31. LinkState
Routing
Link state routing is also a dynamic algorithm. It has following five
steps procedure.
1) Discover neighbor and learn network addresses.
2) Set the distance or cost metric to each of its neighbor.
3) Construct the packet which contains distance to its neighbor.
4) Send this packet to and receive packets from all other routers.
5) Compute the shortest path to every other router.
32. LinkState
Routing
Learning about the Neighbor
When a router a booted, first of all it learns who its neighbor are, this
goal is accomplished by sending HELLO packet on point-to – point line.
Receiver router is expected to send a reply giving its name.
33. LinkState
Routing
Setting Link Cost
• Link state routing requires each line to have a cost for finding shortest
path.
• Cost to neighbor can be calculated automatically, a common choice is
to make cost inverse of bandwidth.
• Other way to determine delay is to send a ECHO packet. Receiver
router will send it back immediately.
• By measuring RoundTripTime(RTT), dividing it by two, sending router
can get a estimated delay.
34. LinkState
Routing
Building State Packet
Once the information needed is collected, next step is to build the
packet containing all the data.
Packet start by identity of sender, sequence number, age and list of
neighbor along with distance to that neighbor.
Packets are build periodically or when some significant event occurs.
(a) A network. (b) The link state packets for this network.
35. LinkState
Routing
Distributing Link State Packets
All of the routers in network must get link state packet.
Flooding is used to distribute link state packets.
To keep check, each packet contains sequence number, sequence
number is incremented for every new packet sent from source router.
Routers keep information, source router, max sequence number seen.
When a new packet arrives at any routers, it checks its sequence
number against highest sequence number seen, if packet is having is
lower seq. number means its already flooded so it is discarded
otherwise it is flooded.
Age of each packet decrements once per second.When age reach to
zero, packet will be discarded.
Due to age, packet will not be for infinite period of time.
36. LinkState
Routing
There are few problem with algorithm. First is if sequence number
wrap around, confusion will occur. Solution is to use 32 bit sequence
number.
Second is if router ever crashes, it will lose track of sequence number
sent. So it will start from 0 and packet will be rejected as duplicate.
Third is if sequence number ever corrupted. For example in case of 1
bit error packet number 4 will be received as 65540. so all the packet
from 5 to 65540 will be rejected.
38. LinkState
Routing
Computing the New Routes
Once router has a full set of packet, it will construct entire network
graph.
Dijkstra algorithm can be used to construct shortest path to all
possible destination. this information is installed to routing table.
Compare to distant vector routing, link state requires more
memory and computation.
39. Hierarchical
Routing
As network grows, routing table grows in size. So not only router
memory, more CPU time to process the entry also requires.
At certain point , network may grow to point, where it is not
longer feasible to have entry for every other router.
Solution is to have hierarchical routing.
In hierarchical routing, routers are divided into regions. Each
routers knows all about destination within its own regions and
nothing about internal structure of other region.
42. Hierarchical
routing.
if there are 720 routers and they are divided into 24 regions, each
contains 30 routers then how many entry will be there in each router?
If three level hierarchy is chosen, 8 clusters each contains 9 regions
and each regions contains 10 routers, then number of entry will be
= 10 entry of each router in same region + 8 entry to route to other
region in same cluster + 7 entry for other clusters.
= 25 entries.
optimal number of levels for N router network is ln N.
43. Broadcast
Routing
In some application, hosts need to send messages to many or all other
host.
Sending a packet to all destination simultaneously is called
broadcasting.
One method is that source send a distinct packet to each destination. It
wastes bandwidth and slow.
Another is multi-destination routing.in this, each packet contains entire
list of destination.
When packet comes at router, it finds line for all destination.Then router
generates new copy of packet for each output line, that packet contains
only those list of destination that are to use that line.
Eventually after some hopes, each packet will carry only one destination
like normal packet.
Requires less bandwidth but much work from router.
One more method is flooding.
44. Broadcast
Routing
Reverse Path Forwarding
Router checks whether broadcast packet arrived on interface that is used to
send packets to source of broadcast.
If so, it’s likely that it followed best route and thus not a duplicate;
router forwards packet on all lines.
If not, packet discarded as likely duplicate.
46. Broadcast
Routing
SpanningTree Routing
Use spanning tree (sink tree) rooted at broadcast initiator.
No need for destination list.
Each router forwards packets on all lines on the spanning tree (except the
one the packet arrived on).
Efficient but needs to generate the spanning tree and routers must have that
information.
48. Multicast
Routing
Sending a message to group is called multicast. Routing
algorithm used is called multicast routing.
If group is dense, then broadcast using spanning tree is good
option. But broadcast will deliver the packets to some of member
that are not part of group.Which is waste of bandwidth.
Another option is to prune “broadcast spanning tree” by removing
links that do not leads to group member.This is called “multicast
spanning tree”.
Multicast spanning tree is used to deliver a packet to a group.
49. Multicast
Routing
(a) A network. (b) A spanning tree for the leftmost router.
(c) A multicast spanning tree for group 1. (d) A multicast spanning tree for group 2.
50. Multicast
Routing
Different ways of pruning spanning tree are possible.
One is if link state routing is used, each router knows about complete
topology of network including which host belong to which group.
Each router construct sink tree for each host in network, prunes that
tree for each of the group.
with distance vector routing, reverse path forwarding approach is
followed.Whenever router that is not part of group receives multicast
message for that group. It replies with PRUNE message.
In this way spanning tree is recursively pruned.
Disadvantage of multicast spanning tree is that routers requires lots of
work and memory.
For n groups and m nodes, at each router, for each group m pruned
trees must be stored.Total m*n tress need to be stored.
51. Multicast
Routing
Another approach is core based tree, that computes single
spanning tree for group.
Here all the routers agrees on point called root(called core).
Tree is build by sending a packet from each member to root. tree
is union of path traced by these packets.
To send packet to group, sender sends packets to core, then core
forwards packet to all the member.
53. Multicast
Routing
For performance optimization, packet is not necessary to reach to
core before multicast.
Disadvantage of shared tree is that it is not optimal for all sources.
Advantage is that it saves memory and computation. Each router
keeps only one tree per group.
54. Routing for
Mobile host
Mobile host are those that are not stationary, they moves from
one location to another hence their network also keeps changing.
One approach is, in which when mobile host moves to new
location, acquires new address, there will not be any association
between old address and new address. In this model, old
connection will not work on new address.
For example, host can do surfing, but mail or any connection
orient service will lost the connection.And connection need to be
establish again.
In this case, network layer mobility is required to solve problem.
55. Routing for
Mobile host
Basic idea used in internet and cellular network is that mobile host
tells host at a home location where it is now.The host which act on
behalf of mobile host is called home agent.
Home agent accepts packets on behalf of mobile host and
forwards to it.
56. Routing in ad
hoc Networks
An Ad hoc network is a decentralized type of network.
The network is ad hoc because it does not rely on a pre existing
infrastructure, such as routers in wired networks or access points in
managed (infrastructure) wireless networks. Instead,
each node participates in routing by forwarding data for other nodes, so
the determination of which nodes forward data is made dynamically on the
basis of network connectivity.
AODV (Ad hoc on-demand distance vector) routing algorithm is one of the
most popular algorithm for ad hoc network.
57. Ad hoc
Networks
Infrastructure-based Networks
traditional cellular systems (base station infrastructure)
Space divided into cells
A base station is responsible to communicate with hosts in its cell
Mobile hosts can change cells while communicating
58. Ad hoc
Networks
Mobile Ad Hoc Networks (MANET)
Host movement frequent
Topology change frequent
No pre existing infrastructure.
A
B A
B
60. Routing in ad
hoc Networks
AODV
Route discovery
InAODV, routes to destination is computed on demand.When
someone wants to send packets to that destination.
at any time, topology of network is defined by graph of connected
nodes.
Range of
A’s Broadcast
61. Routing in ad
hoc Networks
(a) Range of A's broadcast.
(b) After B and D have received A's broadcast.
(c) After C, F, and G have received A's broadcast.
(d) After E, H, and I have received A's broadcast.
Shaded nodes are new recipients. Arrows show possible reverse routes.
62. Routing in ad
hoc Networks
Route Maintenance
In ad hoc network, nodes can be moved out of range any time.
To deal with the problem, algorithm periodically send “hello”
packet to each neighbor.
If neighbor does not reply, means that neighbor is no longer
connected, so all the routes that goes through that are removed
from routing table.
Other neighbors are also informed about the same, they also
remove route.
To save battery life and bandwidth, router will keep information
only about the routes which are in use. Other routes learned
during broadcast are timed out after some time.
63. Congestion
When too many packets are presents in network, network will not
able to deliver all the packet or packets are delayed.This situation
is called congestion.
Goodput is rate at which useful packets are delivered by network.
64. General
principles of
congestion
control
Solutions of congestion control are divided into two groups.
open loop
closed loop
open loop approach are based on good design, they design policies
such that congestion does not occur,
Closed loop solution are reactive.They monitor the network to find
whether congestion has occurred or not. If it has take place then it
steps to correct the situation.
1. monitor the system to detect when and where congestion occur.
2. pass the information to places where action can be taken.
3. adjust system operation to correct the problem.
65. General
principles of
congestion
control
To monitor network, various metrics are used like percentage of
packet discarded, average queue length, number of packets time
out, average delay of packet etc.
If congestion is detected, information about it sent from point
where congestion occurs to the source of the traffic.
As the source receives the congestion notification, it will take
action to reduce the congestion.One option is source cuts down
the sending rate.
Closed loop algorithms are further divided into two group.
Explicit feedback algorithm
Implicit feedback algorithm
66. Congestion
Prevention
Policies
Policies that affects congestion are listed below.
Data Link Layer Policies
Retransmission Policy
Out of order caching policy
Acknowledgment policy
Flow control policy
Network Layer Policies
Virtual circuit versus datagram
Packet queueing and service policy
Packet discard policy
Routing algorithm
Packet lifetime management
Transport Layer Policies
Retransmission Policy
Out of order caching policy
Acknowledgment policy
Flow control Policy
Timeout Determination
67. TrafficShaping
One of main reason of congestion is that the burst of traffic comes
suddenly. If hosts are made to transmit at uniform rate,
congestion could be avoided.
One of the open loop approach is to forcing the host to send the
traffic at predictable and uniform rate.This approach is a called
traffic shaping.
For traffic shaping in virtual circuit, agreement between sender
and carrier is made regarding traffic rate send by sender.
If sender follows agreement, carrier will deliver all the packet on
time.
To keep check on sender, carrier monitor traffic flow, this
monitoring is called traffic policing.
For datagram subnet, other approach need to follow.
74. Token Bucket
Algorithm
Time till the data can be sent in burst(means in one bunch) with maximum
speed is called burst time.
If token bucket if full, then burst time S can be calculated
S= C/(M-p)
C= bucket capacity in bytes
M= maximum speed of sender
p=restricted speed
• data that send during burst time is = capacity of bucket+ token arrived during
burst time
M*S = C bytes+ (p*S) bytes
76. Congestion
Control in
Virtual Circuit
Subnet
One of technique to control congestion in virtual subnet is
admission control.
In this approach, once congestion is detected, no more virtual
circuits are allowed to set up until congestion gets over.
Another approach allows virtual circuit to establish, but it carefully
avoids congested path.
77. Congestion
Control in
Virtual Circuit
Subnet
Another strategy in virtual circuit subnet is, whenVC is
established, sender gives details volume and shape of traffic and
other parameter and subnet reserves resources so congestion will
unlikely to occur.
79. Hop by Hop
Choke Packets
A choke packet that affects each
hop it passes through.
80. LoadShedding
When none of the approach work, finally router stats discarding
packet.This Is called load shedding.
Instead of randomly discarding packets, if packets are discarded
on base of application, less retransmission will occur.
For example in case of file transfer, old packet worth more so
newer should be discarded.While in case of multimedia transfer,
new packets worth more.
To implement intelligent dropping policy requires support from
sender. Sender will mark packet with priority.
Packets with lower priority will be discarded first.
81. Internetworking
Internet is interconnected network. Using internet host in one
network can communicate host in another network.
A computer network is a group of computer systems and other
computing hardware devices that are linked together through
communication channels to facilitate communication and resource-
sharing among a wide range of users.
There are various types of network like LAN, MAN,WAN, ad hoc
network, ATM etc.
Different types of network varies from each other mainly due to
protocol suite and technology used by network and various other
parameters.
84. Internetworking
Problem: Networks with different protocol stacks → how to let
them talk to each other?
Non solution:Why not enforce all networks to run same protocol
stack?
Solution:Construct some gateways that connect different kinds of
networks.
Repeaters or hubs at physical layer: operate on bits, do not
understand protocols, just regenerate signals.
Bridges or switches at data link layer: operate on frames,
examine MAC addresses, do minor protocol translation, e.g.
Ethernet to 802.11.
Multiprotocol router at network layer: operate on packets,
translate between different packet formats, possibly split up
packets.
87. Advantage &
Disadvantage
Virtual Circuit:
Advantage: resources can be reserved & QoS can be guaranteed.
Disadvantage:
Table space required in each router to store info aboutVC.
No alternate route to avoid congestion that occurs while circuit is
active.
Affected by path failure.
Datagram:
Advantage:
Multiple routes available to avoid congestion.
This approach can be used over the subnet which does not supportVC.
Disadvantage:
longer header.
for every packet, route needs to decided.
91. Internetwork
Routing
How routing is performed?
Interior gateway protocol, exterior gateway protocol.
Autonomous System(AS): In the internet, every network works
independent of other network, it is called autonomous system.
Difference between Inter-network routing & Intra-network
Routing.
quality of service.
rules of some of the countries.
cost of routing
92. Fragmentation
Each network has put limit on maximum packet size due to various
reason like hardware, operating system, protocol, international standard
etc.
InTCP/IP, IP packet has maximum payload size 65535 bytes.
ATM network has limitation of 53 byte packet.
PROBLEM?
large packet need to pass through network having small packet size.
• Solution: Fragmentation
fragmentation is to break large packet into small packets.
94. Fragmentation
Transparent Fragmentation Issues:
Exit gateway need to know about all the packets that were part of
same big packet.
all the small packets that belongs to same big packet need to travel
through same exit gateway.
repeated work of fragment and reassemble.
Non-transparent Fragmentation Issues:
All the host should have capability of reassembly.
Small packets increase overhead because each packet carries header.
102. CIDR
(Classless Inter
Domain
Routing)
Networks are not assigned according to classA,B,C.
Networks are created with varying network bits. For example. If ISP
is having one IP address block of 8192 addresses starting at
194.24.0.0.
If university1 requires 2040 address, means host address should be 11
bit long.
So address space will be 194.24.0.0 to 194.24.7.255 with 21 bit
network mask.There will be one network consist of 2040 host and 21
bit long network id.
If university2 requires 1012 address, host address requires 10 bit,
network address will be of 22 bits.
So address space 194.24.8.0 to 194.24.11.0 with 22 bit subnet mask
will be allotted to univetsiry2.
105. Internet
10.0.0.1
10.0.0.4
10.0.0.3
10.0.0.2
Web servera
b
c
NAT
204.1.1.10
Connection request to port 80
from ‘c‘ to <web server>
source 10.0.0.4, port 1025.
10.0.0.4, port 1025
mapped to
204.1.1.10, port 2000
Connection request from ‘c’ forwarded to <web
server> source 204.1.1.10, port 2000.
Request received and accepted.
OutgoingWebClientThrough
NAT
Index
Inside IP Inside
Port
Out IP
… … … …
2000 10.0.0.4 1025 204.1.1.10
2001 10.0.0.2 1026 204.1.1.10
Connection request to port 80 from ‘c‘
to <web server> source 10.0.0.2,
port 1026.
10.0.0.2, port 1026
mapped to
204.1.1.10, port 2001
Connection request from ‘a’ forwarded to <web
server> source 204.1.1.10, port 2001.
106. Internet
10.0.0.1
10.0.0.4
10.0.0.3
10.0.0.2
Web servera
b
c
NAT
Response sent to 204.1.1.10,
port 2000.
Translate 204.1.1.10, port
2000 to 10.0.0.4 port 1025
NAT
Index
Inside IP Inside
Port
Out IP
… … … …
2000 10.0.0.4 1025 204.1.1.10
2001 10.0.0.2 1026 204.1.1.10
Response sent to 204.1.1.10,
port 2001.
Translate 204.1.1.10, port
2001 to 10.0.0.2 port 1026
107. NAT
(Network
Address
Translation)
Objection against NAT.
NAT violates the rules that every IP address uniquely identifies the
machine.
Mapping in NAT is set up by outgoing packet, incoming packet
cannot be accepted until after outgoing.
NAT is dependent on header format ofTCP, if header format will
change it will not able to work.
If source uses any other protocol other thanTCP/UDP, then also NAT
will fail.
NAT keeps the information about every connection passing through
it.This is property of connection oriented, but NAT also keeps the
state information of connection less.
108. Internet
Control
Protocols
ICMP (Internet Control Message Protocol)
Operation of network is monitor by router.When some undesired event
occur during packet processing, it is reported to sender by ICMP.
110. Internet
Control
Protocols
DHCP (Dynamic Host Configuration Protocol)
DHCP is used to assign IP address dynamically to the host.
Whenever computer is started, it has Ethernet address, but no IP address.
To get IP address, computer broadcast request to get IP address, this
request is done using DHPC DISCOVER packet.
This packet must reach to DHCP server.
When DHCP server will get a request, it will allocate IP address from pool
of IP address.
The packet that DHCP give as reply with IP address is called DHCP OFFER
packet.
111. OSPF
(OpenShortest
Path First)
Internet is made up of different Autonomous systems. Each of the ASes
is operated by different organization, can use different interior gateway
protocol.
Original interior gateway protocol was Distance vector protocol but it
was not working well for larger AS.
So distance vector was replaced by link state routing protocol, then IETF
work on successor, which was OSPF( open shortest path first).
There are some of the requirement that need to be satisfy by OSPF.
• protocol need to support routing according to type of service required,
need to support various distance metrics, need to be dynamic, support
load balancing, distribute load among multiple lines etc.
112. OSPF
(OpenShortest
Path First)
OSPF works on graph representationAS.Then it computes shortest path
based on arcs weights.
Connection between two routers are shown using two arcs, one in each
direction. Connection between network and router are shown using single
arc from router to network.
113. OSPF
(OpenShortest
Path First)
When router boots, it send HELLO packets to its neighbor and on the LAN.
OSPF works by exchanging information between adjacent router.
Adjacent here is not neighbor.
One router is selected as designated router(DR) and this is said to be
adjacent to all other router in LAN.A backup designated router is also
selected to use in case of DR router crash.
During normal operation, each router periodically sends LINK STATE
UPDATE packet to adjacent router.These packets are also acknowledge
by LINK STATE ACK packet.
There are two more type of packets.
DATABASE DESCRIPTION
LINK STATE REQUEST
114. OSPF
(OpenShortest
Path First)
If AS is large, it can be divided in number of arears, each area is non
overlapping.
Every AS has area 0 (area zero), backbone area. Every other area is
connected with backbone area.
Each router in area have same link state database and calculates shortest
path to all the other router in the area.
Router that is connected with two or more area will have database of both
the area.
During normal operation, three types of routes are required.
1. intra-area 2. inter-area 3. inter AS
In case of inter-area routing, packet will first go from source area to
backbone, backbone area to destination area, from there to destination.
116. BGP
(Border
Gateway
Protocol)
Within single autonomous system (AS), interior gateway protocols are used
like OSPF.
Between ASes, exterior gateway protocol like BGP is used.
Exterior gateway protocol is used to convey routing information between
ASes.
Intra-domain (AS) routing protocol need to look at how packet can be
transfer efficiently between source and destination.
Inter-domain (AS) routing protocol need to look at the efficient path
between AS and politics.
Examples of routing constraints:
1.No commercial traffic on educational network
2.Never put Iraq on route starting at Pentagon
3.Choose cheaper network
4.Choose better performing network
5.Don’t go from Apple to Google to Apple
117. BGP
(a) A set of BGP routers. (b) Information sent to F.
118. BGP
Pair of BGP router communicate with each other by establishing
TCP connection.
Instead of maintaining cost to each destination, each BGP router
keeps track of exact path used.
After all the paths come in from the neighbor to F, it examines all
the path, choses the best.
BGP solves count to infinity problem. If router G crashes, F
receives paths from all the neighbor are BCD, IFGCD, EFGCD.
Here F can see that remaining two path pass through G, so it will
choose BCD.
119. BGP
From point of BGP router, networks are divided into three categories.
stub network: which have only one connection to BGP graph.
multi-connected network: which have multiple connection which BGP
graph.This network may be used as transit network if it allows.
Transit network: such a backbone network.These type of network are
willing to handle third party packets.
120. BGP
AS 1 and AS 5 are stub
networks
AS 2 is a multi-connected
network
AS 3 and AS 4 are transit
networks