73
TDC 363 Introduction to LANs Greg Brewster DePaul University Routing Protocols and RIP TDC 363 1

Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

Embed Size (px)

Citation preview

Page 1: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

TDC 363Introduction to LANs

Greg BrewsterDePaul University

Routing Protocolsand RIP

TDC 363 1

Page 2: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

• Dynamic Routing• Distance Vector vs. Link State Protocols• RIPv1 & RIPv2• RIP Problems

– Slow Convergence– Routing Loops / Count to Infinity – Discontiguous Networks and Summarization

• Partial Solutions– Max Hops = 15 / Triggered Updates / Timers – Split Horizon– no auto-summary

Routing Protocols

TDC 363 2

Page 3: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates!

Routers use dynamic routing protocols to do this.

Dynamic Routing Protocols Routers exchange routing information packets with

other routers to learn about all possible routes to all destination subnets within a routing domain.

Routers choose least-cost route to each destination subnet and keep that route in their routing table.

Routing tables are dynamically updated when network topology changes (i.e. a link goes up/down).

TDC 363 3

Page 4: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 4© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Dynamic Routing Protocols The purpose of a dynamic routing protocol is to:

-Discover remote networks-Maintaining up-to-date routing information-Choosing the best path to destination networks based on some path metric (least cost routing).-Ability to find a new best path if the current path is no longer available

Page 5: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 5© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Routing Protocols Metrics Metric

A value used by a routing protocol to determine which routes are better than others.

Page 6: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 6© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Routing Protocols Metrics Metrics used in IP routing protocols

-Bandwidth-Cost-Delay-Hop count-Load-Reliability

Page 7: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 7© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Routing Protocols Metrics The Metric Field in the

Routing Table

Metric used for each routing protocol

-RIP - hop count-IGRP & EIGRP -Bandwidth (used by default), Delay (used by default), Load, Reliability-IS-IS & OSPF – Cost, Bandwidth (Cisco’s implementation)

Page 8: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 8© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Routing Protocols Metrics Load balancing

Routers will distribute packets equally among multiple equal-cost paths

Page 9: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 9© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Administrative Distance of a Route Purpose of a metric

It’s a calculated value used to determine the best path to a destination

Purpose of Administrative DistanceIt’s a numeric value that specifies the preference of a particular routing protocol

Page 10: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 10© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Administrative Distance of a Route Identifying the Administrative Distance (AD) in a

routing tableIt is the first number in the brackets in the routing table

Page 11: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 11© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Administrative Distance of a Route AD values of Dynamic Routing Protocols

Page 12: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 12© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Dynamic Routing Protocols Components of a routing protocol

AlgorithmUsed for collecting/processing routing information and best path determination

Routing protocol messagesThese are messages for discovering neighbors and exchange of routing information

Page 13: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

Types of Routing Protocols Interior Gateway Protocols (IGPs)

Routers within same Autonomous System or customer site exchange routing information about subnets within that AS or site (called the routing domain).

Objective: synchronize routing tables so that all routers contain correct routes to all subnets in AS.

Exterior Gateway Protocols (EGPs) Border routers in different AS exchange routing

information with each other. Objective: Gain information about how to reach

subnets in other Autonomous Systems.

TDC 363 13

Page 14: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 14© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Classifying Routing Protocols Types of routing protocols:

-Interior Gateway Protocols (IGP)-Exterior Gateway Protocols (EGP)

Page 15: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 15© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Classifying Routing Protocols Interior Gateway Protocol Types: Distance Vector &

Link State Routing ProtocolsDistance vector

– routes are advertised as vectorsof distance & direction.

– incomplete view of networktopology (only neighbors).

– periodic updates.Link state

– complete view of network topology is created.

– updates are not periodic.

Page 16: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 16© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

–Criteria used to compare routing protocols-Time to convergence -Scalability -Resource usage -Implementation & maintenance

Distance Vector protocol advantages: Lowest resource usage Easiest implementation and maintenance

Link State protocol advantages: Fastest time to convergence Greatest scalability

Page 17: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 17© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Distance Vector Routing Protocols

Page 18: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

Distance Vector Protocols In Distance-Vector routing protocols, each router

essentially sends a copy of its routing table to neighbor routers at regular intervals.

Each neighbor computes its own distance metric for each destination subnet and keeps the smallest metric route (least cost path) in its own table.

Examples: Routing Information Protocol (RIP) uses hop count

metric. Cisco (Enhanced) Interior Gateway Routing Protocol

(EIGRP, IGRP) may use bandwidth, delay, reliability, load and/or hop count as metrics. By default, bandwidth and delay are used in a combined metric.

TDC 363 18

Page 19: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

Distance Vector Protocols

Dynamic Share only with neighbors Share at regular intervals Share the distance vector: a router’s distance to all

other routers within the AS Routes are calculated based on the distance vectors

received from the neighbors. It is based on the Bellman-Ford algorithm. (Don’t worry

about the details of the algorithm) Cisco IGRP and EIGRP are examples. RIP (Routing Information Protocol) is an example

Encapsulated in UDP: sent to well known port 520.( RFC 1058 (RIPv1); RFC 1388 (RIPv2), RFC 2080 (RIPng for

IPv6)

TDC 363 19

Page 20: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

Classful vs. Classless Routing

In Classful Routing, we make the following assumptions: RIRs, ISPs only allocate Class A, Class B or Class C address blocks

to customers.

Internet backbone router table entries only use default masks.

Customers use only straight subnetting – that is, all subnets are the same size. All subnets of a particular network use the same mask.

Subnets from the same classful network must be physically contiguous – that is, they cannot be separated by another network.

Routing protocols only advertise network addresses and do not advertise subnet masks.

TDC 363 20

Page 21: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

Classless Routing In Classless Routing, the assumptions are:

RIRs and ISPs can allocate address blocks in any 2x size.

Internet backbone router table entries can use any mask. This is called CIDR (Classless InterDomain Routing).

Routers can use different masks on different subnets from the same network. This is called Variable Length Subnet Masks (VLSM).

Subnets from the same address block can be separated by other networks (not required to be contiguous).

Routing protocols advertise subnet mask along with network address

TDC 363 21

Page 22: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

Routing Protocols

Note: IGRP and EIGRP are Cisco proprietary protocols. All other protocols are public standards (RFCs).

TDC 363 22

Page 23: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

Time Line

TDC 363 23

Page 24: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

RIPv1 – Basic Operations Once every 30 seconds, each router sends RIP msg to

each neighbor router: Starts with <subnet> <hops> from routing table Adds 1 to each <hops> value. Sends resulting “distance vector” to all neighbors

When router receives RIP msg from neighbor router Rx For each <subnet> in RIP msg

If the received <hops> value is better than current entry in routing table for <subnet>, then update route table with new hop count and set Next Hop = Rx (the router this message came from).

TDC 363 24

Page 25: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

RIP v1 Message Format Each message exchanged between routers

using RIP version 1 protocol contains: Command field: Request or Response Address of source router A <Dest. Subnet>, <Hop Count> entry for

each subnet in the routing table of the source router Note: Depending on MTU, may need to send

several RIP messages to send all routing table information.

TDC 363 25

Page 26: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

RIP Update Algorithm Receive: a RIP message from neighbor router <Rx> on

interface <mx> (where <Hops> already incremented) For each entry <Net>, <Hops> in RIP msg:

If destination <Net> not in routing table Add Routing Table Entry: /* New destination */

Default subnet mask, Destination = <Net>, Distance = <Hops>, Next Hop = <Rx>, Interface = <mx>

Else If destination <Net> is in routing table If Next Hop = <Rx>, then

Update Routing Table Entry: /* update distance */ Distance = <Hops>

Else If Next Hop not <Rx>, and (<Hops>) < current table Hops

Update Routing Table Entry: /* found better path */ Destination = <Net>, Distance = <Hops>, Next Hop =

<Rx>, Interface = <mx>TDC 363 26

Page 27: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

Examples of RIP updates –by router B,

connected to A, C, E, F.

(FYI: Cisco routers increment hop counts before sending the

RIP message).

Routing Table for Router C

<Dest> <Hops>

RIP updates Routing Table for Router B

TDC 363 27

Page 28: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 28© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Network Discovery Router initial start up (Cold Starts)

-Initial network discoveryDirectly connected networks are initially placed in

routing table

Page 29: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 29© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Network Discovery Initial Exchange of Routing Information

–If a routing protocol is configured then

-Routers will exchange routing information

Routing updates received from other routers

-Router checks update for new informationIf there is new information:

-Metric is updated

-New information is

stored in routing table

Page 30: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 30© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Network Discovery Exchange of Routing Information

–Router convergence is reached when

-All routing tables in the network contain the same network information

–Routers continue to exchange routing information

-If no new information is found then Convergence is reached

Page 31: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 31© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Basic RIPv1 Configuration A typical topology suitable for

use by RIPv1 includes:-Three router set up -No PCs attached to LANs

-Use of 5 different IP subnets

Page 32: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 32© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Basic RIPv1 Configuration Router RIP Command

–To enable RIP enter:-Router rip at the global configuration prompt-Prompt will look like R1(config-router)#

Page 33: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 33© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Basic RIPv1 Configuration network command

– network <network>Enables RIP on all interfaces that belong to <network>RIP will advertise <network> in RIP updates sent to out these interfaces once every 30 seconds

Page 34: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 34© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Verification and Troubleshooting

Show ip Route

To verify and troubleshoot routing

-Use the following

commands:

-show ip route

-show ip protocols

-debug ip rip

Page 35: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 35© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Verification and Troubleshooting

show ip protocolscommand

-Displays routing protocol configured on router

Page 36: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 36© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Verification and Troubleshooting Debug ip rip command

-Used to display RIP routing updates as they are happening

Page 37: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 37© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Verification and Troubleshooting

Passive interface command

-Used to prevent a router from sending RIP updates out an interface

-Example:

Router(config-router)# passive-interface <interface>

Example: passive-interface Fa0/0

Page 38: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 38© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Summary: Commands used by RIP

Command Command’s purpose

Rtr(config)#router rip Enables RIP routing process

Rtr(config-router)#network Associates a network with a RIP routing process

Rtr#debug ip rip used to view real time RIP routing updates

Rtr(config-router)#passive-interface fa0/0 Prevent RIP updates from going out an interface

Rtr(config-router)#default-information originate Used by RIP to propagate default routes

Rtr#show ip protocols Used to display timers used by RIP

Page 39: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

RIP v1 Problems Several problems with the RIP version 1 protocol are

solved in RIP version 2: RIPv1 had no authentication mechanism to verify

identity of sending router RIPv1 has no method for interacting with Exterior

Gateway Protocols (such as BGP) RIPv1 messages carry no subnet mask, so, for

received <network>, the receiving router assumes: If incoming interface IP is in same classful network as

<network>, then uses mask of incoming interface. Otherwise, assumes default classful subnet mask.

RIPv1 messages cannot be used to advertise other Next Hops besides the source router.

TDC 363 39

Page 40: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

RIP version 2

Routing Information Protocol version 2: Adds Authentication Data entry to provide secure

identification of source router. Basically, it’s just a password, but better than RIPv1.

Adds Route Tag field to carry AS number information from BGP.

Adds Subnet Mask field to allow variable length subnetting on addresses in message

Adds Next-Hop Address field to allow one router to advertise routes through a different Next Hop router.

TDC 363 40

Page 41: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

Figure 13-15

RIP version 2Route Tag: Distinguish multiple domains running on the same wire/subnet. Carries

information such as AS #. It can be used to enable RIP to receive information from an

exterior routing protocol.

TDC 363 41

Page 42: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

RIPv2 Extensions

Subnet mask carried with route entry allow supports for classless and VLSM.

Authentication option for routing updates Next hop carried with each route Route tags for external use Respond/integrates with RIPv1 Uses multicast 224.0.0.9 instead of broadcast Still uses UDP/520: same as RIPv1

TDC 363 42

Page 43: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 43© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Configuring RIPv2

Enabling and Verifying RIPv2

Configuring RIP on a Cisco router

By default it is running RIPv1

Page 44: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 44© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Configuring RIPv2

Configuring RIPv2 on a Cisco router

-Requires using the version 2 command

-RIPv2 ignores RIPv1 updates

To verify RIPv2 is configured use the

show ip protocolscommand

Page 45: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

RIP Routing Problems(Either version)

Slow Convergence When there is a change in the network (i.e. link goes up or

down), it may take several minutes before that change is propagated to all routers

Routing Loops and Count to Infinity problem When links go down, RIP networks may temporarily

experience loops where data is sent uselessly in a cycle until its TTL expires.

Loops are eventually resolved, but it may take a few minutes.

Cannot handle discontiguous networks if auto-summarization is used.

45TDC 363 Greg Brewster, DePaul University

Page 46: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

Improving Slow Convergence RIP sets maximum hop count of 15

In both RIP protocols, maximum legal hop count is 15.

A hop count of 16 is used to indicate an unreachable network.

Triggered Updates When changes occur in the network (i.e. a link goes

up or down - that is, hop count changes to or from a value of 16), then a router will send out new table update immediately rather than waiting for the usual 30-second timer to expire.

46TDC 363 Greg Brewster, DePaul University

Page 47: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 47© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Routing Table Maintenance Triggered Updates

–Conditions in which triggered updates are sent

-Interface changes state

-Route becomes unreachable

-New route is placed in routing table

Page 48: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 48© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Routing Loops

Routing loops are

A condition in which a packet is continuously transmitted within a series of routers without ever reaching its destination.

Page 49: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 49© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Routing Loops

Count to InfinityThis is a routing loop whereby RIP routing packets loop, continuously increasing hop counts.

Page 50: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 50© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Routing Loops Setting a maximum

Distance Vector routing protocols set a specified metric value to indicate infinity

Once a router “counts to infinity” it marks the route as unreachable

Page 51: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

Partial Solutions for Loops

51

• Holddown Timers– When a route goes down, the router keeps it down

and ignores all advertisements received for that route for a holddown time.

• Split Horizon– When router A sends RIP messages to router B, it

does not include any Destinations where its “Next Hop” field is equal to router B’s address.

• Split Horizon with Poisoned Reverse– When router A sends RIP messages to router B, it will

send Hops=16 for any Destinations where its “Next Hop” field is currently set to router B’s address.

TDC 363 Greg Brewster, DePaul University

Page 52: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 52© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Routing Loops Preventing loops with holddown timers

-Holddown timers allow a router to not accept any changes to a route for a specified period of time.-Point of using holddown timersAllows routing updates to propagate through network with the most current information.

Page 53: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 53© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Routing Loops The Split Horizon Rule is used to prevent routing

loops

Split Horizon rule:

A router should not advertise a network through the interface from which the update came.

Page 54: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 54© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Routing Loops Split horizon with poison

reverse The rule states that once a router learns of an unreachable route through an interface, it will advertise it back as unreachable (hops = 16) through the same interface

Page 55: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

RIP uses 4 timers: Update Timer – time between RIP updates (def: 30 sec.) Invalid Timer – time since last update received before a

route is marked invalid. (def: 180 sec.). Invalid routes are advertised as unreachable, but still forward packets.

Holddown Timer – length of holddown state entered when received update indicates route is unreachable. (def: 180 sec.) During this time route updates are ignored and route is advertised as unreachable, but still forwards packets.

Flush Timer – time since last update received before a route is removed from the routing table. (def: 240 sec.)

RIP Configuration OptionsRIP Timers

55TDC 363 Greg Brewster, DePaul University

Page 56: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

Don’t mess with RIP timers unless you know what you’re doing. But you can change them.

RIP Configuration OptionsRIP Timers

56TDC 363 Greg Brewster, DePaul University

Page 57: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

RIP uses 4 timers: Update Timer – time between RIP updates (def: 30 sec.) Invalid Timer – time since last update received before a

route is marked invalid. (def: 180 sec.). Invalid routes are advertised as unreachable, but still forward packets.

Holddown Timer – length of holddown state entered when received update indicates route is unreachable. (def: 180 sec.) During this time route updates are ignored and route is advertised as unreachable, but still forwards packets.

Flush Timer – time since last update received before a route is removed from the routing table. (def: 240 sec.)

RIP Configuration OptionsRIP Timers

57TDC 363 Greg Brewster, DePaul University

Page 58: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

Don’t mess with RIP timers unless you know what you’re doing. But you can change them.

RIP Configuration OptionsRIP Timers

58TDC 363 Greg Brewster, DePaul University

Page 59: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

If you run RIP over a low-speed or dial-up link, you can suppress periodic RIP updates and only allow triggered updates. Configured in interface configuration mode.

RIP over Slow Links

59TDC 363 Greg Brewster, DePaul University

Page 60: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

Chapter 160© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Classful Versus Classless Routing

Classful Routing Protocol:• Does not support VLSM.• Routing updates sent do not include the subnet mask. • Subnets are not advertised to a different major network.• Discontiguous subnets are not visible to each other.• RIP Version 1 (RIPv1) is a classful routing protocol.

Classless Routing Protocol:• Supports VLSM.• Routing updates sent include the subnet mask. • Subnets can be advertised to a different major network.• Discontiguous subnets are visible to each other.• RIPv2, EIGRP, OSPF, IS-IS, and BGP are classless routing protocols.

Page 61: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

Chapter 161© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Routing Table Structure

Cisco displays routing table entries hierarchically under classful network entries called “parent routes”. If all subnets are same size, then routing table displays

common prefix length (/24) with parent route.

Page 62: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

Chapter 162© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Routing Table Structure If subnets are different sizes (VLSM), then routing table

displays default classful prefix length on parent route plus “variably subnetted”, then displays prefix length on each child route.

Page 63: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

Chapter 163© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Discontiguous Subnets - Classful Routing

Classful routing protocols do not support discontiguous networks. Discontiguous subnets are subnets of the same major

network that are separated by a different major network.• For example, RIPv1 has been configured on all three routers.• Routers R2 and R3 advertise 172.16.0.0 to R1.

• They cannot advertise the 172.16.1.0 /24 and 172.16.2.0 /24 subnets across a different major network because RIPv1 is classful.

• R1 therefore receives routes about 172.16.0.0 /16 from two different directions and it might make an incorrect routing decision.

Fa0/0R2 R1

172.16.1.0 /24R3

Fa0/0

172.16.2.0 /24

192.168.2.0 /24192.168.1.0 /24

RIPv1 update172.16.0.0

RIPv1 update172.16.0.0

Page 64: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

Chapter 164© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Discontiguous Subnets - Classless Routing

Classless routing protocols support discontiguous networks IF auto-summary is DISABLED.• For example, RIPv2 has been configured on all three routers.• Because of RIPv2, routers R2 and R3 can now advertise the

172.16.1.0 /24 and 172.16.2.0 /24 subnets across a different major network.

• R1 therefore receives routes with valid subnet information and can now make a correct routing decision.

Fa0/0R2 R1

172.16.1.0 /24R3

Fa0/0

172.16.2.0 /24

192.168.2.0 /24192.168.1.0 /24

RIPv2 update172.16.1.0/24

RIPv2 update172.16.2.0/24

R1 Routing Table: 172.16.1.0/24 172.16.2.0/24

Page 65: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

RIPv1 or RIPv2: Auto-SummaryCan‘t handle discontiguous networks

Routers R1 and R3 each advertise classful network 172.30.0.0/16 out serial interface.

Router R2 thinks that all subnetsof network 172.30.0.0/16 are reachable through either serial interface and does load balancing.

65TDC 363 Greg Brewster, DePaul University

Page 66: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

Chapter 166© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Route Summarization

Route Summarization is the process of combining a number of subnet routes into a single route when advertising them out a router interface. Summarizing routes reduces the size of the routing

messages and reduces the number of routing entries in the routing tables of the receiving routers. Automatic Summarization is the process of

automatically summarizing to single classful network route when the outgoing interface is on a different classful network.• Both RIPv1 and RIPv2, by default, have automatic summarization

enabled.

Page 67: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

RIPv2: Default behaviorAuto-summary is enabled

Routers R1 and R3 each advertise classful network 172.30.0.0/16 out serial interface.

Router R2 thinks that all subnetsof network 172.30.0.0/16 are reachable through either serial interface and does load balancing.

67TDC 363 Greg Brewster, DePaul University

Page 68: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

RIPv2, by default, has automatic summarization enabled to maintain compatibility with RIPv1.

But, you can turn off auto-summary in RIPv2 with the no auto-summary command.

RIPv2 Auto-Summary

68TDC 363 Greg Brewster, DePaul University

Page 69: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

If a router has multiple subnets in its routing table for a single classful network, N, RIPv2 advertises them as follows: If the outgoing interface connects to a subnet of the same classful

network N, then: RIPv2 advertises all subnets out this interface correctly, each

with its own mask. If the outgoing interface connects to a subnet of a different

classful network then: By default, RIPv2 performs automatic network summarization

and advertises the full classful network N out this interface. May cause incorrect routing to any discontiguous subnets.

If no auto-summary is configured, then RIPv2 correctly advertises each subnet individually with its own subnet mask.

RIPv2: Advertising Subnets

69TDC 363 Greg Brewster, DePaul University

Page 70: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

RIPv2: no auto-summaryAuto-summary is disabled

Routers R1 and R3 advertise all subnets correctly.

Router R2 receives advertisements for all 6 subnets of 172.30.0.0 and stores them in routing table for correct routing.

(config-router)# no auto-summary

70TDC 363 Greg Brewster, DePaul University

Page 71: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

But, summarization can be a good thing. It reduces the size of routing messages and routing tables. Can we use it responsibly?

Yes, after configuring no auto-summary, you can manually specify how subnets should be summarized by RIP out any interface.

Manual Summarization

71TDC 363 Greg Brewster, DePaul University

Page 72: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

RIPv2: no auto-summaryManual summarization configured on R1

Routers R1 advertises route 172.30.0.0/22 out interface S0/0/0.

Router R2 receives advertisements for 5 subnets of 172.30.0.0 and stores them in routing table for correct routing.

R1 (config-if)# ip summary-address rip 172.30.0.0 255.255.252.0

Can R3 configure one manual summarization for its172.30 subnets?

72TDC 363 Greg Brewster, DePaul University

Page 73: Introduction to LANs - JustAnswer · Routing Protocols Static routing is complex and not scalable. We want automatic routing table updates! Routers use dynamic routing protocolsto

ITE PC v4.0Chapter 1 73© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Summary

RoutingProtocol

DistanceVector

ClasslessRoutingProtocol

UsesHold-DownTimers

Use ofSplit

Horizon or

Split Horizon

w/Poison

Reverse

MaxHop

count= 15

AutoSummary

SupportCIDR

SupportsVLSM

Uses Authen-tication

RIPv1 Yes No Yes Yes Yes Yes No No No

RIPv2 Yes Yes Yes Yes Yes Yes Yes Yes Yes