Concept of Routing in a Network
Broadband Faculty
Advanced Level Telecom Training Centre (ALTTC)
Bharat Sanchar Nigam Limited (BSNL)
Concept of Routing in a Network 2
Agenda
• Concept of Routing
• Routing Table Structure
• Routing Lookup
• Type of Routing – Static and Dynamic
• Routing Protocols
• Routing Metrics
• Administrative Distance
• Packet Flow
Concept of Routing in a Network 3
Basic Thumb Rule for DATA Communication
• It has to be a communication
• IT has to be as fast as possible.*
• It has to be secure .
IP Routing..
172.16.2.1 120.1.3.9
FDDI
TOKEN
RING
Ethernet Serial
DATA
DATA
4
Concept of Routing in a Network
What’s The Route?
• A route is the path information to guide IP packets to
be transferred.
(N,R1,M)
R1
Destination
network N
Other networks
How to get a route ?
----use the routing table.
5
Concept of Routing in a Network
IP Routing……..
6
Concept of Routing in a Network
08.00.39.00.2F.C4 08.00.39.00.2F.C2 172.16.2.3 172.16.3.4 DATA CRC
08.00.39.00.2F.C9 08.00.39.00.2F.CA 172.16.2.3 172.16.3.4 DATA CRC
Routing Table-R1
172.16.2.0/24 E0
10.10.10.0/24 S0
E0 E0
172.16.2.2
172.16.2.3
172.16.2.4
172.16.3.2
172.16.3.3
172.16.3.4
172.16.2.1 172.16.3.1
FE1
FE1
08.00.39.00.2F.C1
08.00.39.00.2F.C2
08.00.39.00.2F.C3
08.00.39.00.2F.C6
08.00.39.00.2F.C7
08.00.39.00.2F.C8
08.00.39.00.2F.C4 08.00.39.00.2F.C5
R1 R2
Routing Table-R2
172.16.3.0/24 E0
10.10.10.0/24 S1
10.10.10.1
10.10.10.2
08.00.39.00.2F.CA 08.00.39.00.2F.C9
c
c
c
c
IP Routing……..
7
Concept of Routing in a Network
08.00.39.00.2F.C8 08.00.39.00.2F.C5 172.16.2.3 172.16.3.4 DATA CRC
Routing Table-R1
172.16.2.0/24 FE0
172.16.3.0/24 10.10.10.2
FE0 EE0
172.16.2.2
172.16.2.3
172.16.2.4
172.16.3.2
172.16.3.3
172.16.3.4
172.16.2.1 172.16.3.1
FE1
08.00.39.00.2F.C1
08.00.39.00.2F.C2
08.00.39.00.2F.C3
08.00.39.00.2F.C6
08.00.39.00.2F.C7
08.00.39.00.2F.C8
08.00.39.00.2F.C4 08.00.39.00.2F.C5
R1 R2
Routing Table-R2
172.16.3.0/24 FE0
172.16.2.0/24 FE1
10.10.10.1
10.10.10.2
FE1
08.00.39.00.2F.CA 08.00.39.00.2F.C9
S
Code
c
S
c
Concept of Routing in a Network 8
IP Routing…….
• Direct Routing
– If the datagram is routed locally i.e. if the destination
is on the same subnet as the originator.
• Indirect Routing
– If the use of a forwarding device such as router is
invoked i.e. if the destination is remote
Concept of Routing in a Network 9
Routing basic
• A framed packet will be accepted by a router only if Data link
identifier in in destination address contains;
– Identification of the router’s interface or
– A broadcast identification
• Router strips off the frame and passes the enclosed packet to
the network layer.
• At network layer the destination IP address is examined.
Concept of Routing in a Network 10
Routing Basics
• If the destination network indicated by the address in the IP
header is directly attached to the router, it will forward the
packet directly to the destination station, after encapsulation.
• If the destination network indicated by the address in the IP
header is not directly attached to the router, it must use the
services of another router to forward the packet and let that
router determine the next hop.
Concept of Routing in a Network 11
Routing Basics
• For routing the router will do a route table look up.
• At a minimum, each route entry must contain two items.
– a destination address i.e. the address of the network the router
can reach.
– a pointer to the destination.
– the pointer will indicate the destination network directly
connected to the router or
– the address of another router on a directly connected network.
– a router one hop closer to the destination is called a next hop
router.
Concept of Routing in a Network 12
Type Of Routings
• Destination based Routing: The Conventional One
(Sink Tree Routing)
• Source Based Routing: The New Contender (Source
tree/Delivery Tree Routing)
Concept of Routing in a Network 13
Sink Tree v/s Source Tree
Concept of Routing in a Network 14
Route Table Updation
• Route table acquires information in two ways:
– Manually
• Static route entries
– Automatically
• Dynamic routing protocols
Concept of Routing in a Network 15
Dynamic Routing Protocol
Dynamic Routing Protocol
Distance Vector Link State
Algorithm- Bellman Ford
Metric - Hopcount
Dijkstra
Cost (10’8/BW)
Topology - Flat Hierarchical
RIP, IGRP OSPF, IS-IS
Concept of Routing in a Network 16
Static Routing
• Routes to destinations are set up manually.
• Network reachability is not dependent on the
existence and state of the network.
• Route may be up or down but static routes will
remain in the routing tables and traffic would still be
sent towards the route.
• Not suitable for large networks.
Concept of Routing in a Network 17
Default Routing
• When a router receives a packet and its table does
not contain the network number indicated in the
packet, it is forwarded to default router.
• The default router, too, may have a default router.
• If there is no route or default route at any stage, the
router will send a control message (through ICMP) to
the originating station.
Concept of Routing in a Network 18
Default Routing
• Refers to “last resort” outlet.
• Easiest form of routing for a domain connected to a
single exit point.
• Default router is indicated as 0.0.0.0 with no subnet
mask.
Concept of Routing in a Network 19
Static and Default Routes
Traffic to network 192.168.5.0 (Static Route).
All outgoing traffic from network 192.168.5.0 (Default Route).
R2
R1
WAN
192.168.5.0
Concept of Routing in a Network 20
Dynamic Routing
• Routes are learnt via an internal or external routing protocols
• Network reachability is dependent on the existence and state
of the network
• Routing decisions change to reflect the changes in topology
• Also known as Adaptive routing
– RIP & OSPF are routing protocols
Concept of Routing in a Network 21
Dynamic Routing
• Each router uses the update information to calculate its
own “shortest path” (distance in hops) to a network.
• Tables are updated only:
– If the received information indicates a shortest path to
the destination network.
– If the received information indicates a network that is
no longer reachable.
– If a new network is found
Concept of Routing in a Network 22
Router Table Lookup
• The router will match the most specific address
based on the following criterion.
• longest matching
• Administrative distance
• cost
Concept of Routing in a Network 23
Routing Protocol
• It is a language a router speaks with other routers to
share information about the reachability and status
of the network.
• Provides mechanisms for sharing routing
information.
• Allows the routers to communicate with other
routers to update and maintain routing tables.
Concept of Routing in a Network 24
Path Determination
A B
C
192.168.1.0 192.168.7.0
192.168.6.0
192.168.5.0
192.168.2.0
192.168.3.0
192.168.4.0
Routing Table of Router-A
Network Next Hop Router
192.168.1.0 Direct
192.168.2.0 Direct
192.168.3.0 Direct
192.168.4.0 B,C
192.168.5.0 B,C
192.168.6.0 B,C
192.168.7.0 B,C
•Networks192.168.4.0 to 192.168.7.0 can be reached via either router B or C,
which path is preferable?
•Metrics are needed to rank the alternatives.
Concept of Routing in a Network 25
Metrics
• A metric is a variable assigned to routes as a means of
ranking them.
• Different routing protocols use different, and sometimes
multiple metrics.
– RIP defines the “best” route as one with minimum
number of hops.
– IGRP defines the “best” route on a combination of
lowest bandwidth along the route and the total delay
of the route.
Concept of Routing in a Network 26
Metrics
• Hop Count
• Bandwidth
• Load
• Delay
• Reliability
Concept of Routing in a Network 27
Metrics
• Hop Count
– A hop count metric simply count router hops.
– From router-A it is 1 hop to network 192.168.5.0 if packets
are sent out interface 192.168.3.0 and 2 hops if sent out
192.168.1.0
A B
C
192.168.1.0 192.168.7.0
192.168.6.0
192.168.5.0
192.168.2.0
192.168.3.0
192.168.4.0
Metrics
• Bandwidth
– A bandwidth metric would choose a higher bandwidth
over a lower bandwidth.
– A packet from router A to C will follow path A-B-C.
A B
C
192.168.1.0 192.168.7.0
192.168.6.0
192.168.5.0
192.168.2.0
192.168.3.0
192.168.4.0
A-C: 10 mbps
A-B: 100 mbps
B-C: 100 mbps
28
Concept of Routing in a Network
Concept of Routing in a Network 29
Metrics
Speed Cost
Ethernet/802.3 10
Fast Ethernet 100Mbps 1
E1(2.048Mbps) 48
Metric=108/Interface Speed in bits per sec.
e.g. 100000000/2048000=48.828125
Concept of Routing in a Network 30
Metrics
• The term Least-Cost/Shortest is often used as a generic term
when speaking of router choices
– RIP chooses the lowest-cost path based on the hop count.
– RIP chooses the shortest path based on the hop count.
Concept of Routing in a Network 31
Dynamic Routing Protocols
• All dynamic routing protocols are built around an algorithm, which must
specify:
– A procedure for passing network reachability information about
networks to other routers
– A procedure for receiving reachability information from other routers
– A procedure for determining optimal routes based on the reachability
information it has and for recording this information in a route table
– A procedure for reacting to and advertising topology changes in an
network
Concept of Routing in a Network 32
Dynamic Routing Protocols
• Distance Vector Routing Protocols
– Distance vector algorithms are based on the work done of
R.E.Bellman, L.R.Ford and D.R.Fulkerson
– Often known as Bellman-ford or Ford-fulkerson algorithms
– Ex. RIP
• Link State Advertisement Protocols
– Built around a well known algorithm from graph theory,
E.W.Dijkstra’s shortest path algorithm
– Called as Shortest path first or Distributive database protocols
– Ex. OSPF
Concept of Routing in a Network 33
Distance Vector Routing Protocols
Concept of Routing in a Network 34
Distance Vector Routing Protocols
• Routes are advertised as vectors of <Distance, Direction>
– Distance is defined in terms of a metric
– Direction is defined in terms of next hop router
• Each router learns routes from its neighboring router’s
perspective and then advertises the routes from its own
perspective
• Sometimes referred to as “Routing By Rumor”
Concept of Routing in a Network 35
Distance Vector Routing Protocols
• Routing Information Protocol (RIP) for IP.
• Cisco’s Internet Gateway Routing Protocol (IGRP).
Concept of Routing in a Network 36
Routing Information Protocol
Router D has received two routes for
network 172.16.0.0, which is the best
route. It will run the bellman ford
algorithm on these information’s
I can reach network
172.16.0.0, 0 hops away
I can reach network
172.16.0.0, 1 hops away
I can reach network
172.16.0.0, 0 hops away
I can reach network
172.16.0.0, 2 hops away
Router D Decides to follow
this route as it is shorter in
hop count. This route is
entered in routing table
172.16.0.0
A
B C
D
Concept of Routing in a Network 37
Link state Routing Protocols
• Link State Routing protocols are built around well known algorithm from
graph theory E.W.Dijkstra shortest path algorithm.
• Examples of LSR are:
– Open Shortest Path First (OSPF)
– The ISO’s Intermediate System to Intermediate System (IS-IS) for IP
OSPF
172.16.0.0
A
B C
D
Network 172.16.0.0
connected with
Router A, Cost X
Network 172.16.0.0
connected with
Router A, Cost X
Network 172.16.0.0
connected with
Router A, Cost X
Network 172.16.0.0
connected with
Router A, Cost X
BW=2Mb
BW=2Mb
BW=2Mb
BW=64Kb
Router D can reach network 172.16.0.0 directly via A or
via C. Which one is best. It will run Dijkstra algorithm and
finds out that route via C is best as total cost 10’8/BW is
less for this route although it is longer than the direct
route.
Router D installs route via
C in its routing table
Cost X
38
Concept of Routing in a Network
Concept of Routing in a Network 39
Autonomous System
• Definition
– An autonomous system is an internetwork under a
common administration
Concept of Routing in a Network 40
Interior-Exterior Gateway Protocols
• Interior Gateway Protocols
– Routing Protocols which run within an Autonomous
System are IGPs
– IGPs discover paths between networks
• RIP/OSPF/IS-IS ……
• Exterior Gateway Protocols
– Routing Protocols that route between Autonomous
System are EGPs
– EGPs discover paths between autonomous systems
• BGP4
Concept of Routing in a Network 41
IGPs-EGPs
AS-2 AS-3
AS-1
IGP
IGP IGP
EGP
EGP
EGP
Concept of Routing in a Network 42
Administrative Distances
• Diversity of metrics poses problems in routers running more
than one routing protocol.
• Router may learn a route to the same destination from each
of the protocols
• Administrative distances are the route sources to determine
most preferred source
• Administrative distance is a measure of believability
Concept of Routing in a Network 43
Administrative Distances
• The administrative distance of various protocols is as below:
– Connected Interface - 0
– Static Route - 1
– External BGP - 20
– IGRP - 100
– OSPF - 110
– IS-IS - 115
– RIP - 120
– Internal BGP - 200
• The lower the administrative distance, the more believable the protocol.
Administrative Distance Example
– From R1 to R6:
• RIP (AD 120) will choose R1-R4-R6
• OSPF (AD 110) will choose R1-R2-R3-R5-R6
• EIGRP (AD 90) will choose R1-R2-R3-R5-R6
44
Concept of Routing in a Network
Route Redistribution
– Route Redistribution allows routes from one routing protocol to be
advertised into another routing protocol.
– The routing protocol receiving these redistributed routes usually
marks the routes as external.
– External routes are usually less preferred than locally-originated
routes.
– Routes will only be redistributed if they exist in the routing table.
– Routes that are simply in a topology database will never be
redistributed
45
Concept of Routing in a Network
Concept of Routing in a Network 46
Route Redistribution
Packet Received
Received ARP Reply
Send ICMP error
message
Discard original
Packet
Header & Checksum Valid
Route Found
Route table lookup on
Dest. Add.
YES
NO
Decrement TTL;
TTL>=0
YES
NO
YES
NO
If route available, search
MAC in ARP cache
Default route available
NO
YES
Send ARP request and
wait for a response
Build new packet with
MAC address and route
through port found in
routing table
MAC Address Found
YES
NO
Received ARP reply,
insert MAC and IP
address into ARP table
YES
NO
Concept of Routing in a Network 47
Flow Chart of a Packet
Concept of Routing in a Network 48

Tcil_Concept of Routing_n_protocols.pptx

  • 1.
    Concept of Routingin a Network Broadband Faculty Advanced Level Telecom Training Centre (ALTTC) Bharat Sanchar Nigam Limited (BSNL)
  • 2.
    Concept of Routingin a Network 2 Agenda • Concept of Routing • Routing Table Structure • Routing Lookup • Type of Routing – Static and Dynamic • Routing Protocols • Routing Metrics • Administrative Distance • Packet Flow
  • 3.
    Concept of Routingin a Network 3 Basic Thumb Rule for DATA Communication • It has to be a communication • IT has to be as fast as possible.* • It has to be secure .
  • 4.
    IP Routing.. 172.16.2.1 120.1.3.9 FDDI TOKEN RING EthernetSerial DATA DATA 4 Concept of Routing in a Network
  • 5.
    What’s The Route? •A route is the path information to guide IP packets to be transferred. (N,R1,M) R1 Destination network N Other networks How to get a route ? ----use the routing table. 5 Concept of Routing in a Network
  • 6.
    IP Routing…….. 6 Concept ofRouting in a Network 08.00.39.00.2F.C4 08.00.39.00.2F.C2 172.16.2.3 172.16.3.4 DATA CRC 08.00.39.00.2F.C9 08.00.39.00.2F.CA 172.16.2.3 172.16.3.4 DATA CRC Routing Table-R1 172.16.2.0/24 E0 10.10.10.0/24 S0 E0 E0 172.16.2.2 172.16.2.3 172.16.2.4 172.16.3.2 172.16.3.3 172.16.3.4 172.16.2.1 172.16.3.1 FE1 FE1 08.00.39.00.2F.C1 08.00.39.00.2F.C2 08.00.39.00.2F.C3 08.00.39.00.2F.C6 08.00.39.00.2F.C7 08.00.39.00.2F.C8 08.00.39.00.2F.C4 08.00.39.00.2F.C5 R1 R2 Routing Table-R2 172.16.3.0/24 E0 10.10.10.0/24 S1 10.10.10.1 10.10.10.2 08.00.39.00.2F.CA 08.00.39.00.2F.C9 c c c c
  • 7.
    IP Routing…….. 7 Concept ofRouting in a Network 08.00.39.00.2F.C8 08.00.39.00.2F.C5 172.16.2.3 172.16.3.4 DATA CRC Routing Table-R1 172.16.2.0/24 FE0 172.16.3.0/24 10.10.10.2 FE0 EE0 172.16.2.2 172.16.2.3 172.16.2.4 172.16.3.2 172.16.3.3 172.16.3.4 172.16.2.1 172.16.3.1 FE1 08.00.39.00.2F.C1 08.00.39.00.2F.C2 08.00.39.00.2F.C3 08.00.39.00.2F.C6 08.00.39.00.2F.C7 08.00.39.00.2F.C8 08.00.39.00.2F.C4 08.00.39.00.2F.C5 R1 R2 Routing Table-R2 172.16.3.0/24 FE0 172.16.2.0/24 FE1 10.10.10.1 10.10.10.2 FE1 08.00.39.00.2F.CA 08.00.39.00.2F.C9 S Code c S c
  • 8.
    Concept of Routingin a Network 8 IP Routing……. • Direct Routing – If the datagram is routed locally i.e. if the destination is on the same subnet as the originator. • Indirect Routing – If the use of a forwarding device such as router is invoked i.e. if the destination is remote
  • 9.
    Concept of Routingin a Network 9 Routing basic • A framed packet will be accepted by a router only if Data link identifier in in destination address contains; – Identification of the router’s interface or – A broadcast identification • Router strips off the frame and passes the enclosed packet to the network layer. • At network layer the destination IP address is examined.
  • 10.
    Concept of Routingin a Network 10 Routing Basics • If the destination network indicated by the address in the IP header is directly attached to the router, it will forward the packet directly to the destination station, after encapsulation. • If the destination network indicated by the address in the IP header is not directly attached to the router, it must use the services of another router to forward the packet and let that router determine the next hop.
  • 11.
    Concept of Routingin a Network 11 Routing Basics • For routing the router will do a route table look up. • At a minimum, each route entry must contain two items. – a destination address i.e. the address of the network the router can reach. – a pointer to the destination. – the pointer will indicate the destination network directly connected to the router or – the address of another router on a directly connected network. – a router one hop closer to the destination is called a next hop router.
  • 12.
    Concept of Routingin a Network 12 Type Of Routings • Destination based Routing: The Conventional One (Sink Tree Routing) • Source Based Routing: The New Contender (Source tree/Delivery Tree Routing)
  • 13.
    Concept of Routingin a Network 13 Sink Tree v/s Source Tree
  • 14.
    Concept of Routingin a Network 14 Route Table Updation • Route table acquires information in two ways: – Manually • Static route entries – Automatically • Dynamic routing protocols
  • 15.
    Concept of Routingin a Network 15 Dynamic Routing Protocol Dynamic Routing Protocol Distance Vector Link State Algorithm- Bellman Ford Metric - Hopcount Dijkstra Cost (10’8/BW) Topology - Flat Hierarchical RIP, IGRP OSPF, IS-IS
  • 16.
    Concept of Routingin a Network 16 Static Routing • Routes to destinations are set up manually. • Network reachability is not dependent on the existence and state of the network. • Route may be up or down but static routes will remain in the routing tables and traffic would still be sent towards the route. • Not suitable for large networks.
  • 17.
    Concept of Routingin a Network 17 Default Routing • When a router receives a packet and its table does not contain the network number indicated in the packet, it is forwarded to default router. • The default router, too, may have a default router. • If there is no route or default route at any stage, the router will send a control message (through ICMP) to the originating station.
  • 18.
    Concept of Routingin a Network 18 Default Routing • Refers to “last resort” outlet. • Easiest form of routing for a domain connected to a single exit point. • Default router is indicated as 0.0.0.0 with no subnet mask.
  • 19.
    Concept of Routingin a Network 19 Static and Default Routes Traffic to network 192.168.5.0 (Static Route). All outgoing traffic from network 192.168.5.0 (Default Route). R2 R1 WAN 192.168.5.0
  • 20.
    Concept of Routingin a Network 20 Dynamic Routing • Routes are learnt via an internal or external routing protocols • Network reachability is dependent on the existence and state of the network • Routing decisions change to reflect the changes in topology • Also known as Adaptive routing – RIP & OSPF are routing protocols
  • 21.
    Concept of Routingin a Network 21 Dynamic Routing • Each router uses the update information to calculate its own “shortest path” (distance in hops) to a network. • Tables are updated only: – If the received information indicates a shortest path to the destination network. – If the received information indicates a network that is no longer reachable. – If a new network is found
  • 22.
    Concept of Routingin a Network 22 Router Table Lookup • The router will match the most specific address based on the following criterion. • longest matching • Administrative distance • cost
  • 23.
    Concept of Routingin a Network 23 Routing Protocol • It is a language a router speaks with other routers to share information about the reachability and status of the network. • Provides mechanisms for sharing routing information. • Allows the routers to communicate with other routers to update and maintain routing tables.
  • 24.
    Concept of Routingin a Network 24 Path Determination A B C 192.168.1.0 192.168.7.0 192.168.6.0 192.168.5.0 192.168.2.0 192.168.3.0 192.168.4.0 Routing Table of Router-A Network Next Hop Router 192.168.1.0 Direct 192.168.2.0 Direct 192.168.3.0 Direct 192.168.4.0 B,C 192.168.5.0 B,C 192.168.6.0 B,C 192.168.7.0 B,C •Networks192.168.4.0 to 192.168.7.0 can be reached via either router B or C, which path is preferable? •Metrics are needed to rank the alternatives.
  • 25.
    Concept of Routingin a Network 25 Metrics • A metric is a variable assigned to routes as a means of ranking them. • Different routing protocols use different, and sometimes multiple metrics. – RIP defines the “best” route as one with minimum number of hops. – IGRP defines the “best” route on a combination of lowest bandwidth along the route and the total delay of the route.
  • 26.
    Concept of Routingin a Network 26 Metrics • Hop Count • Bandwidth • Load • Delay • Reliability
  • 27.
    Concept of Routingin a Network 27 Metrics • Hop Count – A hop count metric simply count router hops. – From router-A it is 1 hop to network 192.168.5.0 if packets are sent out interface 192.168.3.0 and 2 hops if sent out 192.168.1.0 A B C 192.168.1.0 192.168.7.0 192.168.6.0 192.168.5.0 192.168.2.0 192.168.3.0 192.168.4.0
  • 28.
    Metrics • Bandwidth – Abandwidth metric would choose a higher bandwidth over a lower bandwidth. – A packet from router A to C will follow path A-B-C. A B C 192.168.1.0 192.168.7.0 192.168.6.0 192.168.5.0 192.168.2.0 192.168.3.0 192.168.4.0 A-C: 10 mbps A-B: 100 mbps B-C: 100 mbps 28 Concept of Routing in a Network
  • 29.
    Concept of Routingin a Network 29 Metrics Speed Cost Ethernet/802.3 10 Fast Ethernet 100Mbps 1 E1(2.048Mbps) 48 Metric=108/Interface Speed in bits per sec. e.g. 100000000/2048000=48.828125
  • 30.
    Concept of Routingin a Network 30 Metrics • The term Least-Cost/Shortest is often used as a generic term when speaking of router choices – RIP chooses the lowest-cost path based on the hop count. – RIP chooses the shortest path based on the hop count.
  • 31.
    Concept of Routingin a Network 31 Dynamic Routing Protocols • All dynamic routing protocols are built around an algorithm, which must specify: – A procedure for passing network reachability information about networks to other routers – A procedure for receiving reachability information from other routers – A procedure for determining optimal routes based on the reachability information it has and for recording this information in a route table – A procedure for reacting to and advertising topology changes in an network
  • 32.
    Concept of Routingin a Network 32 Dynamic Routing Protocols • Distance Vector Routing Protocols – Distance vector algorithms are based on the work done of R.E.Bellman, L.R.Ford and D.R.Fulkerson – Often known as Bellman-ford or Ford-fulkerson algorithms – Ex. RIP • Link State Advertisement Protocols – Built around a well known algorithm from graph theory, E.W.Dijkstra’s shortest path algorithm – Called as Shortest path first or Distributive database protocols – Ex. OSPF
  • 33.
    Concept of Routingin a Network 33 Distance Vector Routing Protocols
  • 34.
    Concept of Routingin a Network 34 Distance Vector Routing Protocols • Routes are advertised as vectors of <Distance, Direction> – Distance is defined in terms of a metric – Direction is defined in terms of next hop router • Each router learns routes from its neighboring router’s perspective and then advertises the routes from its own perspective • Sometimes referred to as “Routing By Rumor”
  • 35.
    Concept of Routingin a Network 35 Distance Vector Routing Protocols • Routing Information Protocol (RIP) for IP. • Cisco’s Internet Gateway Routing Protocol (IGRP).
  • 36.
    Concept of Routingin a Network 36 Routing Information Protocol Router D has received two routes for network 172.16.0.0, which is the best route. It will run the bellman ford algorithm on these information’s I can reach network 172.16.0.0, 0 hops away I can reach network 172.16.0.0, 1 hops away I can reach network 172.16.0.0, 0 hops away I can reach network 172.16.0.0, 2 hops away Router D Decides to follow this route as it is shorter in hop count. This route is entered in routing table 172.16.0.0 A B C D
  • 37.
    Concept of Routingin a Network 37 Link state Routing Protocols • Link State Routing protocols are built around well known algorithm from graph theory E.W.Dijkstra shortest path algorithm. • Examples of LSR are: – Open Shortest Path First (OSPF) – The ISO’s Intermediate System to Intermediate System (IS-IS) for IP
  • 38.
    OSPF 172.16.0.0 A B C D Network 172.16.0.0 connectedwith Router A, Cost X Network 172.16.0.0 connected with Router A, Cost X Network 172.16.0.0 connected with Router A, Cost X Network 172.16.0.0 connected with Router A, Cost X BW=2Mb BW=2Mb BW=2Mb BW=64Kb Router D can reach network 172.16.0.0 directly via A or via C. Which one is best. It will run Dijkstra algorithm and finds out that route via C is best as total cost 10’8/BW is less for this route although it is longer than the direct route. Router D installs route via C in its routing table Cost X 38 Concept of Routing in a Network
  • 39.
    Concept of Routingin a Network 39 Autonomous System • Definition – An autonomous system is an internetwork under a common administration
  • 40.
    Concept of Routingin a Network 40 Interior-Exterior Gateway Protocols • Interior Gateway Protocols – Routing Protocols which run within an Autonomous System are IGPs – IGPs discover paths between networks • RIP/OSPF/IS-IS …… • Exterior Gateway Protocols – Routing Protocols that route between Autonomous System are EGPs – EGPs discover paths between autonomous systems • BGP4
  • 41.
    Concept of Routingin a Network 41 IGPs-EGPs AS-2 AS-3 AS-1 IGP IGP IGP EGP EGP EGP
  • 42.
    Concept of Routingin a Network 42 Administrative Distances • Diversity of metrics poses problems in routers running more than one routing protocol. • Router may learn a route to the same destination from each of the protocols • Administrative distances are the route sources to determine most preferred source • Administrative distance is a measure of believability
  • 43.
    Concept of Routingin a Network 43 Administrative Distances • The administrative distance of various protocols is as below: – Connected Interface - 0 – Static Route - 1 – External BGP - 20 – IGRP - 100 – OSPF - 110 – IS-IS - 115 – RIP - 120 – Internal BGP - 200 • The lower the administrative distance, the more believable the protocol.
  • 44.
    Administrative Distance Example –From R1 to R6: • RIP (AD 120) will choose R1-R4-R6 • OSPF (AD 110) will choose R1-R2-R3-R5-R6 • EIGRP (AD 90) will choose R1-R2-R3-R5-R6 44 Concept of Routing in a Network
  • 45.
    Route Redistribution – RouteRedistribution allows routes from one routing protocol to be advertised into another routing protocol. – The routing protocol receiving these redistributed routes usually marks the routes as external. – External routes are usually less preferred than locally-originated routes. – Routes will only be redistributed if they exist in the routing table. – Routes that are simply in a topology database will never be redistributed 45 Concept of Routing in a Network
  • 46.
    Concept of Routingin a Network 46 Route Redistribution
  • 47.
    Packet Received Received ARPReply Send ICMP error message Discard original Packet Header & Checksum Valid Route Found Route table lookup on Dest. Add. YES NO Decrement TTL; TTL>=0 YES NO YES NO If route available, search MAC in ARP cache Default route available NO YES Send ARP request and wait for a response Build new packet with MAC address and route through port found in routing table MAC Address Found YES NO Received ARP reply, insert MAC and IP address into ARP table YES NO Concept of Routing in a Network 47 Flow Chart of a Packet
  • 48.
    Concept of Routingin a Network 48