Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter...

33
1 Routing with a distance vector protocol Introducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo Bruno (www.vincenzobruno.it) Released under Crative Commons License 3.0 By-Sa Cisco name, logo and materials are Copyright Cisco Systems Inc.

Transcript of Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter...

Page 1: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

1

Routing with a distance vector protocol

Introducing Routing and Switching in the Enterprise – Chapter 5.1

Copyleft 2012 Vincenzo Bruno (www.vincenzobruno.it)Released under Crative Commons License 3.0 By-SaCisco name, logo and materials are Copyright Cisco Systems Inc.

Page 2: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

Overview

Page 3: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

Hierarchical networks

● The organization must create a hierarchy to meet the different network requirements of each part of the company.

● Crucial information and services typically reside near the top of the hierarchy, in secured server farms or on storage area networks.

● Enterprise networks provide a high level of reliability and services. To ensure this, network professionals:

● Design networks to provide redundant links to use in case a primary data path fails.

● Deploy Quality of Service (QoS) to ensure critical data receives priority treatment.

● Use packet filtering to deny certain types of packets, maximize available bandwidth, and protect the network from attacks.

Page 4: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

Network topologies

● Star

● Extended star

● Partial mesh

● Full mesh

Page 5: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

Routing Table

Routing source information Destination

Network andSubnet mask

Administrative Distance and Metric

Next Hop

Exit Interface

Page 6: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

Stub network

● Network with only a single connection to a router

Static route is used in stub networks

Page 7: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

Static and dynamic routing

Page 8: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

Configure static routes

If an exit interface is disabled, static routes disappear from the routing table. The routing table reinstalls the routes when the interface is re-enabled.

Page 9: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

Recursive lookupStatic routes configured with a next hop interface require two steps to determine the exit interface. This is called a recursive lookup.

In a recursive loopkup:

1) The router search the destination network

2) It matches the next hop IP address of the static route to entries in its routing table to determine which interface to use.

Destination IP: 192.168.3.8

1) 2)

Page 10: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

Route summarization

● Summarizing several static routes as a single entry reduces the size of the routing table and makes the lookup process more efficient.

● A single static route summarizes multiple static routes if:

● The destination networks summarize into a single network address.

● All of the static routes use the same exit interface or next-hop IP address.

● Without summary routes, routing tables within Internet core routers become unmanageable. Enterprise networks encounter the same problem.

● Summary static routes are an indispensable solution for managing routing table size.

Page 11: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

Floating static route

● A floating static route has a higher administrative distance than the route learned from a dynamic routing protocol.

● For that reason, a floating static route does not display in the routing table.

● The floating static route entry appears in the routing table only if the dynamic information is lost.

● To create a floating static route, add an administrative distance value to the end of the ip route command:

● Router(config)#ip route 192.168.4.0 255.255.255.0 192.168.9.1 200

● The administrative distance specified must be greater than the AD assigned to the dynamic routing protocol.

● The router uses the primary route as long as it is active.

Page 12: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

Default route

● The command to create a default route is similar to the command used to create either an ordinary or a floating static route.

● The network address and subnet mask are both specified as 0.0.0.0, making it a quad zero route.

● The command uses either the next-hop address or the exit interface parameters.

● The zeroes indicate to the router that no bits need to match in order to use this route.

● As long as a better match does not exist, the router uses the default static route.

Page 13: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

Distance vector protocol

● A router running a distance vector protocol does not know the entire path to a destination;

● it only knows the distance to the remote network and the direction, or vector.

● Its knowledge comes through information from directly connected neighbors.

● Distance vector protocols calculate the best route based on the distance from a router to a network.

● An example of a metric used is hop count, which is the number of routers, or hops, between the router and the destination

Page 14: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

Distance vector protocol

● Distance vector protocols usually require less complicated configurations and management than link-state protocols

● Routers using distance vector protocols broadcast or multicast their entire routing table to their neighbors at regular intervals (slow)

● At any given moment, some routers may not have the most current information about the network → routing loops

● If a router learns more than one route to a destination, it calculates and advertises the route with the lowest metric

● RIP versions 1 and 2 are true distance vector protocols, whereas EIGRP is actually a distance vector protocol with advanced capabilities.

● RIPng, the newest version of RIP was specifically designed to support IPv6.

Page 15: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

Routing Information Protocol

● RIP was the first IP distance vector routing protocol to be standardized in a RFC (RFC1058 in 1988)

● The first version of RIP is now often called RIPv1 to distinguish it from the later improved version, RIPv2; and from the IPv6 version, RIPng.

● By default RIPv1 broadcasts its routing updates out all active interfaces every 30 seconds.

● RIPv1 is a classful routing protocol. It automatically summarizes subnets to the classful boundary and does not send subnet mask information in the update.

● Therefore RIPv1 does not support VLSM and CIDR.

Page 16: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

RIPv1 is classful

● Router(config)#interface fastEthernet 0/0

● Router(config­if)#ip address 172.16.1.1 255.255.255.0

● Router(config)#router rip

● Router(config­router)#network 172.16.1.0

● Router(config­router)#network 172.16.2.0

● Router#show running­config

● router rip

    network 172.16.0.0

Page 17: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

RIPv2 is classless

● RIPv2 is a classless routing protocol that supports VLSM and CIDR. A subnet mask field is included in v2 updates, which allows the use of discontiguous networks.

● RIPv2 also has the ability to turn off automatic summarization of routes.

● Both versions of RIP send their entire routing table out all participating interfaces in updates.

● RIP v1 broadcasts these updates to 255.255.255.255. This requires all devices on a broadcast network like Ethernet to process the data.

● RIP v2 multicasts its updates to 224.0.0.9.

● Multicasts take up less network bandwidth than broadcasts.

● RIPv2 has an authentication mechanism, RIPv1 does not.

Page 18: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

RIP v1 and v2 features

● RIPv2 shares many of the features found in RIPv1, such as:

● Hop-count metric

● 15-hop maximum

● TTL equals 16 hops

● Default 30-second update interval

● Route poisoning, poisoned reverse, split horizon, and holddowns to avoid loops

● Updates using UDP port 520

● Administrative distance of 120

● Message header containing up to 25 routes without authentication

Page 19: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

RIP steps● When a router starts up, each RIP-configured interface sends out

a request message.

● RIP-enabled neighbors send a response message with full routing table

● The receiving router evaluates each route entry based on:

● If a route entry is new, the receiving router installs the route in the routing table.

● If the route is already in the table and the entry comes from a different source, the routing table replaces the existing entry if the new entry has a better hop count.

● If the route is already in the table and the entry comes from the same source, it replaces the existing entry even if the metric is not better.

● The startup router then sends a triggered update out all RIP-enabled interfaces containing its own routing table.

Page 20: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

Configure RIP Version

● By default, RIPv2 sends and receives only version 2 updates.

● If a network must use both versions of RIP, the network administrator configures RIPv2 to send and receive both versions 1 and 2.

● By default, RIPv1 sends version 1 updates, but receives both versions 1 and 2.

● Commands:

● ip rip send version <1 | 2 | 1 2>

● ip rip receive version <1 | 2 | 1 2>

Page 21: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

Exercise

Page 22: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

Configure RIP

● By default, RIPv2 will summarize each network to be advertised to its classful boundary as the graphic shows.

● RIPv2 updates can be configured to be authenticated.

● RIPv2 propagates a default route to its neighbor routers as part of its routing updates.

● To accomplish this, create the default route and then add redistribute static to the RIPv2 configuration.

Page 23: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

Configure RIP Authentication

● key chain kal

● !--- Name a key chain. A key chain may contain more than one key for added security.

● !--- It need not be identical on the remote router.

● key 1

● !--- This is the Identification number of an authentication key on a key chain.

● !--- It need not be identical on the remote router.

● key-string 234

● !--- The actual password or key-string. It needs to be identical to the key-string on the remote router.

● interface Serial0

● ip address 141.108.0.10 255.255.255.252

● ip rip authentication key-chain kal

● !--- Enables authentication on the interface and configures. The key chain that will be used.

● router rip

● version 2

Page 24: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

Disable auomatic summarization

● Unlike RIPv1, with RIPv2 the automatic summarization feature can be disabled.

● When disabled, RIPv2 will report all subnets with subnet mask information.

● This is done to ensure a more accurate routing table.

● To accomplish this, add the no auto-summary command to the RIPv2 configuration.

● Router(config­router)#no auto­summary

Page 25: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

Disable routing updates

● Another issue to consider is the broadcast nature of RIP updates.

● RIP immediately begins to send advertisements out all interfaces that belong to that network.

● These updates may not be needed on all portions of a network. For example, an Ethernet LAN interface passes these updates to every device on its network segment, which produces unnecessary traffic and makes the network less secure.

● The passive­interface command, issued in interface mode, disables routing updates on specified interfaces.

● Router(config­router)#passive­interface interface­type interface­number

Page 26: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

passive-interface command

Page 27: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

Routing Loops

● A network running RIP needs time to converge. Some routers may contain incorrect routes in their routing tables until all routers have updated and have the same view of the network.

● Erroneous network information may cause routing updates and traffic to loop endlessly as they count to infinity.

● In the RIP routing protocol, infinity occurs when the hop count is 16.

● Routing loops negatively affect network performance. RIP contains several features designed to combat this impact. These features are often used in combination:

● Poisoned reverse

● Split horizon

● Holddown timer

● Triggered updates

Page 28: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

Poisoned reverse

● Is a network update that explicitly indicates that a network is unreachable

● Poisoned reverse sets the metric for a route to 16, making it unreachable.

● Because RIP defines infinity as 16 hops, any network further away than 15 hops is unreachable.

● If a network is down, a router changes the metric for that route to 16 so that all other routers see it as unreachable.

● This feature prevents the routing protocol from sending information via poisoned routes.

Page 29: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

Split horizon

● Split horizon prevents the formation of loops.

● When multiple routers advertise the same network routes to each other, routing loops may form.

● Split horizon dictates that a router receiving routing information on an interface cannot send an update about that same network back out the same interface.

Page 30: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

Holddown timer

● The holddown timer stabilizes routes.

● The holddown timer refuses to accept route updates with a higher metric to the same destination network for a period after a route goes down.

● If, during the holddown period, the original route comes back up or the router receives route information with a lower metric, the router installs the route in the routing table and immediately begins to use it.

● The default holddown time is 180 seconds, six times the regular update period. The default can be changed.

● However, any holddown period increases the convergence time and has a negative impact on network performance.

Page 31: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

Triggered update● When a route fails, RIP does not wait for the next periodic

update.

● Instead, RIP sends an immediate update, called a triggered update.

● It advertises the failed route by increasing the metric to 16, effectively poisoning the route.

● This update places the route in holddown status while RIP attempts to locate an alternate route with a better metric.

Page 32: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

Verifying RIP

● The show ip protocols and show ip route commands are important for verification and troubleshooting on any routing protocol.

● The following commands specifically verify and troubleshoot RIP:

● show ip rip database: Lists all the routes known by RIP

● debug ip rip or debug ip rip {events}: Displays RIP routing updates as sent and received in real time

● The output of this debug command displays the source address and interface of each update, as well as the version and the metric.

Page 33: Routing with a distance vector protocol - HLCShlcs.it/files/HCNA/3/Modulo 3 Chapter 5.1.pdfIntroducing Routing and Switching in the Enterprise – Chapter 5.1 Copyleft 2012 Vincenzo

End of lesson