Lecture #5 THR
Lecture #5 THR
Lecture #5 THR
Lecture # 05
Agenda
Network Layer
Routing v/s Routed Protocols
Data Packets –
The user data is transferred in the inter-network by these data packets.
Routed protocols are those protocols which support such data traffic.
Examples of routed protocols are IPv4, IPv6 and AppleTalk.
Route Update Packets –
The information about the networks connected to all the routers is updated
to the neighbouring routers through route update packets. Routing protocols
are the ones that are responsible for sending them. Examples of routing
protocols are RIP(Routing Information Protocol), EIGRP(Enhanced Interior
Gateway Routing Protocol) and OSPF(Open Shortest Path First).
IGP – Interior Gateway Protocol
EGP – Exterior Gateway Protocol
RIP – Routing Information Protocol
IGRP – Interior Gateway Routing Protocol
OSPF – Open Shortest Path First
ISIS – Intermediate System to Intermediate System
EIGRP – Enhanced Interior Gateway Routing Protocol
BGP – Border Gateway Protocol
Fixed and Flooding Routing algorithms
Desirable Properties of Routing Algorithms:-
Fixed Routing
Flooding
Dynamic Routing
Random Routing
Flow-based Routing
Design Parameters of Routing Algorithms :
Advantages –
Simple
Works well in reliable network with stable load in reliable network
Same for virtual circuit and datagram
Disadvantages –
Lack of flexibility
Doesn’t react to failure or network congestion
Flooding
Requires no network information like topology, load condition ,cost of diff. paths
Every incoming packet to a node is sent out on every outgoing like except the one it
arrived on.
For Example in above figure
A incoming packet to (1) is sent out to (2),(3)
from (2) is sent to (6),(4) and from (3) it is sent to (4),(5)
from (4) it is sent to (6),(5),(3) , from (6) it is sent to (2),(4),(5),from (5) it is sent to
(4),(3)
Characteristics –
All possible routes between Source and Destination is tried. A packet will always get
through if path exists
As all routes are tried, the will be at least one route which is the shortest
All nodes directly or indirectly connected are visited
Limitations
Flooding generates vast number of duplicate packets
Suitable damping mechanism must be used
Hop-Count –
Advantages of Flooding :
Features –
• Updates of network are exchanged periodically.
• Updates (routing information) is always broadcast.
• Full routing tables are sent in updates.
• Routers always trust on routing information received from neighbor routers. This
is also known as routing on rumors.
Disadvantages –
• As the routing information are exchanged periodically, unnecessary traffic is
generated which consumes available bandwidth.
• As full routing tables are exchanged, therefore it has security issues. If an un-
authorized person enters the network, then the whole topology will be very easy
to understand.
• Also broadcasting of network periodically creates unnecessary traffic.
2. Link State Routing Protocol – These protocols know more about the Internetwork than any
other distance vector routing protocol. These re also known as SPF (Shortest Path First)
protocol. OSPF is an example of link state routing protocol.
Features –
• Hello messages, also known as keep-alive messages are used for neighbor discovery and
recovery.
• Concept of triggered updates are used i.e updates are triggered only when there is a
topology change .
• Only that much updates are exchanged which is requested by the neighbor router.
• Link state routing protocol maintains three tables namely:
Neighbor table- the table which contains information about the neighbors of the router only,
i.e, to which adjacency has been formed.
Topology table- This table contains information about the whole topology i.e contains both
best and backup routes to particular advertised network.
Routing table- This table contains all the best routes to the advertised network.
Advantages –
• As it maintains separate tables for both best route and the backup routes ( whole topology)
therefore it has more knowledge of the inter network than any other distance vector
routing protocol.
• Concept of triggered updates are used therefore no more unnecessary bandwidth
consumption is seen like in distance vector routing protocol.
• Partial updates are triggered when there is a topology change, not a full update like
distance vector routing protocol where whole routing table is exchanged.
3. Advanced Distance vector routing protocol – It is also
known as hybrid routing protocol which uses the concept
of both distance vector and link state routing protocol.
Enhanced Interior Gateway Routing Protocol (EIGRP) is an
example of this class if routing protocol. EIGRP acts as a link
state routing protocol as it uses the concept of Hello
protocol for neighbor discovery and forming adjacency.
Also, partial updates are triggered when a change occurs.
EIGRP acts as distance vector routing protocol as it learned
routes from directly connected neighbors.
Types of Routing
1. Static routing –
Static routing is a process in which we have to manually add routes in
routing table.
Advantages –
• No routing overhead for router CPU which means a cheaper router
can be used to do routing.
• It adds security because only administrator can allow routing to
particular networks only.
• No bandwidth usage between routers.
Disadvantage –
• For a large network, it is a hectic task for administrator to manually
add each route for the network in the routing table on each router.
• The administrator should have good knowledge of the topology. If a
new administrator comes, then he has to manually add each route so
he should have very good knowledge of the routes of the topology.
2- Default Routing
This is the method where the router is configured to send
all packets towards a single router (next hop). It doesn’t
matter to which network the packet belongs, it is
forwarded out to router which is configured for default
routing. It is generally used with stub routers. A stub router
is a router which has only one route to reach all other
networks.
Dynamic routing
Dynamic routing makes automatic adjustment of the routes according to the current state of
the route in the routing table. Dynamic routing uses protocols to discover network
destinations and the routes to reach it. RIP and OSPF are the best examples of dynamic
routing protocol. Automatic adjustment will be made to reach the network destination if
one route goes down.
1. The routers should have the same dynamic protocol running in order to exchange
routes.
2. When a router finds a change in the topology then router advertises it to all other
routers.
Advantages –
• Easy to configure.
• More effective at selecting the best route to a destination remote network and also for
discovering remote network.
Disadvantage –
• Consumes more bandwidth for communicating with other neighbors.
• Less secure than static routing.
Classification of Routing Algorithms
1. Adaptive Algorithms –
These are the algorithms which change their routing decisions whenever network
topology or traffic load changes. The changes in routing decisions are reflected in the
topology as well as traffic of the network. Also known as dynamic routing, these make
use of dynamic information such as current topology, load, delay, etc. to select routes.
Optimization parameters are distance, number of hops and estimated transit time.
(a) Isolated – In this method each, node makes its routing decisions using the the
information it has without seeking information from other nodes. The sending nodes
doesn’t have information about status of particular link. Disadvantage is that packet
may be sent through a congested network which may result in delay. Examples: Hot
potato routing, backward learning.
(b) Centralized – In this method, a centralized node has entire information about the
network and makes all the routing decisions. Advantage of this is only one node is
required to keep the information of entire network and disadvantage is that if central
node goes down the entire network is done.
(c) Distributed – In this method, the node receives information from its neighbors and
then takes the decision about routing the packets. Disadvantage is that the packet may
be delayed if there is change in between interval in which it receives information and
sends packet.
2. Non-Adaptive Algorithms
These are the algorithms which do not change their routing
decisions once they have been selected. This is also known as static
routing as route to be taken is computed in advance and
downloaded to routers when router is booted.
A distance-vector routing (DVR) protocol requires that a router inform its neighbors
of topology changes periodically. Historically known as the old ARPANET routing
algorithm (or known as Bellman-Ford algorithm).
Bellman Ford Basics – Each router maintains a Distance Vector table containing the
distance between itself and ALL possible destination nodes. Distances,based on a
chosen metric, are computed using information from the neighbors’ distance
vectors.
1. A router transmits its distance vector to each of its neighbors in a routing packet.
2. Each router receives and saves the most recently received distance vector from each of
its neighbors.
3. A router recalculates its distance vector when:
• It receives a distance vector from a neighbor containing different information than
before.
• It discovers that a link to a neighbor has gone down.
• The DV calculation is based on minimizing the cost to each destination
As a result, switch A and switch C will also receive the broadcast frame generated by switch
B. Also, switch C will also generate broadcast frame for switch B and switch A. This will result
in a loop which will consumes all the available bandwidth and can lead to shut down of a
network.
Multiple copies –
A device can receive multiple copies of the same frame if a frame arrives from different
network segments at the same time.
Example –
The smaller the value of AD, the more reliable
routing protocol is. For example if a router receives
an advertised route to a remote destination
network from OSPF and EIGRP, then the advertised
route of EIGRP will be considered as best route and
will be placed in the routing table as EIGRP has
lower AD.
Best path selection process by dynamic protocol – Route sources Default AD
If a router receives same advertised routes from
Connected interface 0
more than one source for a remote network, then
Static route 1
first AD value is check. The advertised route
External BGP 20
having least AD value will get preference. If the
EIGRP 90
AD value of the advertised routes are same, then
OSPF 110
metrics of advertised routes is check. The
RIP 120
advertised route with the least metric will be
External EIGRP 170
placed in the routing table. If both AD and metric
are same then load balancing is done i.e the Internal BGP 200
traffic will traverse through different routes. The 255 (This route is not
Unknown
used)
load balancing can be equal or unequal. In equal
load balancing, the same amount of traffic will
traverse through both routes one at a time while
different amount of traffic will traverse in
unequal load balancing.
Autonomous System (AS)
is a group of routers and networks working under a single administrative domain. It
is a 16 bit value which defines the routing domain of the routers. These numbers
range from 1 to 65535.
• TCP is the most commonly used unicast protocol. It is a connection oriented protocol that
relay on acknowledgement from the receiver side.
• HTTP stands for Hyper Text Transfer Protocol. It is an object oriented protocol for
communication.
There are three major protocols for unicast routing:
• Hello message (Type 1) – It is used by the routers to introduce itself to the other routers.
• Database description message (Type 2) – It is normally send in response to the Hello
message.
• Link-state request message (Type 3) – It is used by the routers that need information
about specific Link-State packet.
• Link-state update message (Type 4) – It is the main OSPF message for building Link-State
Database.
• Link-state acknowledgement message (Type 5) – It is used to create reliability in the OSPF
protocol.
Open shortest path first (OSPF) routing protocol –
• Open Shortest Path First (OSPF) is a unicast routing protocol developed by working group
of the Internet Engineering Task Force (IETF).
• It is a intradomain routing protocol.
• It is an open source protocol.
• It is similar to Routing Information Protocol (RIP)
• OSPF is a classless routing protocol, which means that in its updates, it includes the
subnet of each route it knows about, thus, enabling variable-length subnet masks. With
variable-length subnet masks, an IP network can be broken into many subnets of various
sizes. This provides network administrators with extra network-configuration
flexibility.These updates are multicasts at specific addresses (224.0.0.5 and 224.0.0.6).
• OSPF is implemented as a program in the network layer using the services provided by
the Internet Protocol
• IP datagram that carries the messages from OSPF sets the value of protocol field to 89
• OSPF is based on the SPF algorithm, which sometimes is referred to as the Dijkstra
algorithm
• OSPF has two versions – version 1 and version 2. Version 2 is used mostly
Distance Vector Routing –
Link State Routing –
• It is a dynamic routing algorithm in which
each router computes distance between itself
and each possible destination i.e. its •It is a dynamic routing algorithm in which
immediate neighbors. each router shares knowledge of its
• The router share its knowledge about the neighbors with every other router in the
whole network to its neighbors and network.
accordingly updates table based on its •A router sends its information about its
neighbors. neighbors only to all the routers through
• The sharing of information with the flooding.
neighbors takes place at regular intervals. •Information sharing takes place only
• It makes use of Bellman Ford Algorithm for whenever there is a change.
making routing tables. •It makes use of Dijkastra’s Algorithm for
• Problems – Count to infinity problem which making routing tables.
can be solved by splitting horizon. •Problems – Heavy traffic due to flooding
• – Good news spread fast and bad news of packets.
spread slowly. – Flooding can result in infinite looping
• – Persistent looping problem i.e. loop will be which can be solved by using Time to
there forever. leave (TTL) field.
References
https://en.wikipedia.org/wiki/Classful_network
TechNet – Microsoft
Classful network – Wikipedia
Questions?
??
?
?? ??
?? ? ??
? ?
? ?
?? ? ? ?
? ? ? ? ?
? ? ??
? ??? ? ? ?
? ? ?
? ?
? ? ???
??
?
?
? ? ??
? ?? ? ?
? ? ?
? ?