Você está na página 1de 27

Routing Basics

Mohd. Shahid
Objectives
1. What Is Routing?
2. Routed Protocol & Routing Protocol
3. Routing Requirements
4. Routing Information
5. Administrative Distance
6. Routing methods : Static, Dynamic, Default Routing.
7. Distance Vector
8. Loop Avoidance in Distance Vector.
9. Link State Routing protocol.
10. Routing Decisions
11. Routers Forward Traffic
12. Varieties of Routing protocols
13. Classful Routing Overview
14. Classless Routing Overview

Mohd. Shahid
What is Routing ?
The process of determining systematically how to forward messages
toward the destination node based on its address

• Routing occurs at layer 3


• Switching/bridging occurs at layer 2

3
Mohd. Shahid
What Is Routing?

 Routing is the process of forwarding (at L3) an item


from one location to another
 Routers forward traffic to a logical destination in a
computer network
 Routers perform two major functions:
 Building Route table
 Learning the logical topology of the network
 Forwarding
 Forwarding packets from an inbound interface to an outbound
interface

4
Mohd. Shahid
Routed Protocol & Routing Protocol
ROUTED PROTOCOLS are nothing more than data being
transported across the networks. Routed protocols include:
• IP
• Novell IPX
• DECnet

ROUTING PROTOCOLS are the software that allow routers to


dynamically advertise and learn routes, determine which routes are
available and which are the most efficient routes to a destination.
Routing protocols used by the Internet Protocol suite include:

• Routing Information Protocol (RIP and RIP II)


• Open Shortest Path First (OSPF)
• Intermediate System to Intermediate System (IS-IS)
• Interior Gateway Routing Protocol (IGRP)
• Enhanced Interior Gateway Routing Protocol (EIGRP)
• Border Gateway Protocol (BGP)
5
Mohd. Shahid
Routing Requirements

 Is the protocol suite active on this device?


 Is the destination network known to this device?
 Is there an entry in the routing table?
 Is the route currently available?

 Which outbound interface represents the best path?


 Lowest metric path is preferred
 Equal lowest metric paths are shared

6
Mohd. Shahid
Routing Information

 Most of the necessary information is


contained in the routing table
I 172.16.8.0 [100/118654] via 172.16.7.9, 00:00:23, Serial0

I -- How the route was learned (IGRP)


172.16.8.0 -- Destination logical network or subnet
[100 -- Administrative distance (trustworthiness factor)
/118654] -- Metric value (reachability)
via 172.16.7.9 -- Next-hop logical address (next router)
00:00:23 -- Age of entry (in hours:minutes:seconds)
Serial0 -- Interface through which the route was learned
and through which the packet will leave

7
Mohd. Shahid
Administrative Distance
 Administrative distance is a selection method for IP
routing protocols
 The lower the administrative distance, the more
trusted the learning mechanism
 Manually entered routes are preferred to dynamically
learned routes
 Routing protocols with sophisticated metrics are preferred
over protocols with simple metric structures

8
Mohd. Shahid
Administrative Distance
…Contd..
Route Source Default Distance
Connected interface 0
Static route out an interface 0
Static route to a next hop 1
EIGRP summary route 5
External BGP 20
Internal EIGRP 90
IGRP 100
OSPF 110
IS-IS 115
RIP v1, v2 120
EGP 140
External EIGRP 170
Internal BGP 200
Unknown 255
9
Mohd. Shahid
Routing Methods
 Static Routing
 Dynamic Routing

 Default Routing

10
Mohd. Shahid
Static routing

Static routing is the term used to refer to the manual method


used to set up routing. An administrator enters routes into the
router using configuration commands. This method has the
advantage of being predictable, and simple to set up. It is easy
to manage in small networks but does not scale well.

Syntax:
ip route <network> <mask> <Gateway IP / Interface>

Example:
ip route 172.16.1.0 255.255.0.0 172.16.1.234
ip route 202.148.224.0 255.255.255.128 s0/1

11
Mohd. Shahid
Default Routing

A default route is often called the 'route of last resort'. It is the last
route tried when all other routes fail because it has the fewest number
of network bits matching and is therefore less specific. A default route
is configured on a Cisco router with the following command:

CISCO 'ip route' command:

ip route 0.0.0.0 0.0.0.0 <next hop | exit interface>

12
Mohd. Shahid
Dynamic Routing
 Conceptually, the dynamic routing method has two parts:

1. The routing protocol that is used between neighboring routers to convey


information about their network environment.

2. The routing algorithm that determines paths through that network. The protocol
defines the method used to share the information externally, whereas the
algorithm is the method used to process the information internally.

The routing tables on dynamic routers are updated automatically based on the
exchange of routing information with other routers. The most common dynamic
routing protocols are :

 • Distance vector routing protocols


 • Link state routing protocols

13
Mohd. Shahid
Distance Vector Algorithm

 known also as Distributed Bellman-Ford or RIP


(Routing Information Protocol)
 Every node maintains a routing table
 all available destinations

 the next node to reach to destination

 the number of hops to reach the destination

 Periodically send table to all neighbors to maintain


topology

14
Mohd. Shahid
Distance Vector (Tables)

1 2
A B C
Dest. Next Metric … Dest. Next Metric … Dest. Next Metric …
A A 0 A A 1 A B 3
B B 1 B B 0 B B 2
C B 3 C C 2 C C 0

15
Mohd. Shahid
Distance Vector (Update)

B broadcasts the new routing


information to his neighbors

Routing table
is updated (A, 1) (A, 1)
(B, 0) (B, 0)
(C, 1) (C, 1)

1 1
A B C
Dest. Next Metric … Dest. Next Metric … Dest. Next Metric …
A A 0 A A 1 A B 3 2
B B 1 B B 0 B B 1
C B 3 2 C C 1 C C 0

16
Mohd. Shahid
Distance Vector (New Node)
broadcasts to update
tables of C, B, A with
new entry for D

(A, 1) (A, 2)
(B, 0) (B, 1)
(C, 1) (C, 0)
(D, 2) (D, 1) (D, 0)

1 1 1
A B C D
Dest. Next Metric … Dest. Next Metric … Dest. Next Metric …
A A 0 A A 1 A B 2
B B 1 B B 0 B B 1
C B 2 C C 1 C C 0
D B 3 D C 2 D D 1

17
Mohd. Shahid
Distance Vector (Broken Link)

Starting point -- routers converged Network 10.4.0.0 detected down by router C

18
Mohd. Shahid
Distance Vector (Broken Link)

Router B advertises its old Incorrect routing information


information about 10.4.0.0 causes routing loops

19
Mohd. Shahid
Three modifications to the distance vector protocol have been developed in
an attempt to reduce the chance of routing loops:

Split horizon -- Prevents loops between adjacent routers.


Rule: Never advertise a route out of the interface through which you learned
it!

Poison reverse -- Prevents larger loops.


Rule: Once you learn of a route through an interface, advertise it as
unreachable back through that same interface!

Hold down timer -- Prevents incorrect route information from entering


routing tables.
Rule: After a route is advertised as down, do not listen to routing updates on
that route for a specific period of time!
Each of the above mechanisms may be used in combination with the others.
Indeed, Cisco supports both split horizon and poison reverse
20
Mohd. Shahid
Link-state algorithms

When applying link-state algorithms, each node uses as its fundamental data a map
of the network in the form of a graph. To produce this, each node floods the entire
network with information about what other nodes it can connect to, and each node
then independently assembles this information into a map. Using this map, each
router then independently determines the least-cost path from itself to every other
node using a standard shortest paths algorithm such as Dijkstra's algorithm. The
result is a tree rooted at the current node such that the path through the tree from
the root to any other node is the least-cost path to that node. This tree then serves
to construct the routing table, which specifies the best next hop to get from the
current node to any other node

21
Mohd. Shahid
Routing Decisions
 Routing protocols maintain a loop-free, single path to
each destination network
 Routes are advertised with a reachability factor
referred as a metric
 The path to the destination network is represented by
the sum of the metrics associated with all intermediate
links
 The routing process uses the metric value to select a
preferred path to each destination
 Multiple paths can be used if metric values
are equal

22
Mohd. Shahid
Routers Forward Traffic
 Routing protocols maintain neighbor relationships with adjacent
(connected) routers
 Neighboring routers and routing protocols exchange frames containing
either:
 Hello packets
 Routing update packets
 Routing tables contain routes learned from neighboring routers
 Routers forward traffic to the destination network by passing
packets to the next-hop logical device (router) in the delivery
path

23
Mohd. Shahid
Varieties of Routing protocols
 Classful Routing protocols
 Classless Routing protocols

24
Mohd. Shahid
Classful Routing Overview

 Classful routing protocols are a consequence of the


distance vector method of route calculation
 RIPv1
 IGRP

 Routing masks are not carried within the periodic


routing updates
 Within a network, consistency of masks is assumed

25
Mohd. Shahid
Classless Routing Overview
 Classless routing protocols include the routing mask
with the route advertisement
 OSPF
 EIGRP

 RIPv2

 IS-IS

 BGP

 Summary routes can be manually controlled within


the network

26
Mohd. Shahid
Thank You

27
Mohd. Shahid

Você também pode gostar