Top Banner
Dynamic Routing Dynamic routing performs the same function as static routing except it is more robust. Static routing allows routing tables in specific routers to be set up in a static manner so network routes for packets are set. If a router on the route goes down the destination may become unreachable. Dynamic routing allows routing tables in routers to change as the possible routes change. There are several protocols used to support dynamic routing including RIP and OSPF. Routing cost Counting route cost is based on one of the following calculations: Hop count - How many routers the message must go through to reach the recipient. Tic count - The time to route in 1/18 seconds (ticks). Dynamic routing protocols do not change how routing is done. They just allow for dynamic altering of routing tables. There are two classifications of protocols: 1. IGP - Interior Gateway Protocol. The name used to describe the fact that each system on the internet can choose its own routing protocol. RIP and OSPF are interior gateway protocols. 2. EGP - Exterior Gateway Protocol. Used between routers of different systems. There are two of these, the first having the same name as this protocol description: 1. EGP - Exterior Gateway Protocol 2. BGP - Border Gateway Protocol. The daemen "routed" uses RIP. The daemon "gated" supports IGP's and EGP's. Route Discovery Methods Distance vector - Periodically sends route table to other routers. Works best on LANs, not WANs. Link-state - Routing tables are broadcast at startup and then only when they change. OSPF uses link-state. Routing Information Protocol (RIP) The RIP RFC is 1058. The routing daemon daemon adds a routing policy to the system. If there are multiple routes to a destination, it chooses the best one. The RIP message can con contain information on up to 25 routes. The RIP message contains the following components: 1. Command 2. Version - Normally 1 but set to 2 for RIP version 2.
25

Dynamic Routing - · PDF fileDynamic Routing Dynamic routing ... The name used to describe the fact that each system on ... RIP (Routing Information Protocol) is a classful,

Mar 22, 2018

Download

Documents

trinhminh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Dynamic Routing -  · PDF fileDynamic Routing Dynamic routing ... The name used to describe the fact that each system on ... RIP (Routing Information Protocol) is a classful,

Dynamic Routing Dynamic routing performs the same function as static routing except it is more robust. Static routing allows routing tables in specific routers to be set up in a static manner so network routes for packets are set. If a router on the route goes down the destination may become unreachable. Dynamic routing allows routing tables in routers to change as the possible routes change. There are several protocols used to support dynamic routing including RIP and OSPF.

Routing cost

Counting route cost is based on one of the following calculations:

• Hop count - How many routers the message must go through to reach the recipient. • Tic count - The time to route in 1/18 seconds (ticks).

Dynamic routing protocols do not change how routing is done. They just allow for dynamic altering of routing tables. There are two classifications of protocols:

1. IGP - Interior Gateway Protocol. The name used to describe the fact that each system on the internet can choose its own routing protocol. RIP and OSPF are interior gateway protocols.

2. EGP - Exterior Gateway Protocol. Used between routers of different systems. There are two of these, the first having the same name as this protocol description:

1. EGP - Exterior Gateway Protocol 2. BGP - Border Gateway Protocol.

The daemen "routed" uses RIP. The daemon "gated" supports IGP's and EGP's.

Route Discovery Methods

• Distance vector - Periodically sends route table to other routers. Works best on LANs, not WANs.

• Link-state - Routing tables are broadcast at startup and then only when they change. OSPF uses link-state.

Routing Information Protocol (RIP)

The RIP RFC is 1058. The routing daemon daemon adds a routing policy to the system. If there are multiple routes to a destination, it chooses the best one. The RIP message can con contain information on up to 25 routes. The RIP message contains the following components:

1. Command 2. Version - Normally 1 but set to 2 for RIP version 2.

Page 2: Dynamic Routing -  · PDF fileDynamic Routing Dynamic routing ... The name used to describe the fact that each system on ... RIP (Routing Information Protocol) is a classful,

3. family - Set to 2 for IP addresses. 4. IP address - 32 bit IP address 5. Metrics - Indicate the number of hops to a given network, the hop count.

RIP sends periodically broadcasts its routing table to neighboring routers. The RIP message format contains the following commands:

• 1 - request • 2 - reply • 3 & 4 - obsolete • 5 - poll entry • 6 - Asks for system to send all or part of routing table

When the daemon "routed" starts, it sends a request out all its interfaces for other router's routing tables. The request is broadcast if the network supports it. For TCP/IP the address family in the message is normally 2, but the initial request has address family set to 0 with the metric set to 16. Regular routing updates are sent every 30 seconds with all or part of the route table. As each router sends routing tables (advertises routes to networks its NICs interface to) routes are determined to each network. Drawbacks of RIP:

• RIP has no knowledge of subnet addressing • It takes a long time to stabilize after a router or link failure. • Uses more broadcasting than OSPF requiring more network bandwidth.

RIP Version 2

Defined by RFC 1388. It passes further information in some of the fields that are set to 0 for the RIP protocol. These additional fields include a 32 bit subnet mask and a next hop IP address, a routing domain, and route tag. The routing domain is an identifier of the daemon the packet belongs to. The route tags supports EGPs.

Open Shortest Path First (OSPF)

OSPF (RFC 1257) is a link state protocol rather than a distance vector protocol. It tests the status of its link to each of its neighbors and sends the acquired information to them. It stabilizes after a route or link failure faster than a distance vector protocol based system. OSPF uses IP directly, not relying on TCP or UDP. OSPF can:

• Have routes based on IP type of service (part of IP header message) such as FTP or Telnet.

• Support subnets. • Assign cost to each interface based on reliability, round trip time, etc. • Distribute traffic evenly over equal cost routes.

Page 3: Dynamic Routing -  · PDF fileDynamic Routing Dynamic routing ... The name used to describe the fact that each system on ... RIP (Routing Information Protocol) is a classful,

• Uses multicasting.

Costs for specific hops can be set by administrators. Adjacent routers swap information instead of broadcasting to all routers.

Border Gateway Protocol (BGP)

Described by RFC 1267, 1268, and 1497. It uses TCP as a transport protocol. When two systems are using BGP, they establish a TCP connection, then send each other their BGP routing tables. BGP uses distance vectoring. It detects failures by sending periodic keep alive messages to its neighbors every 30 seconds. It exchanges information about reachable networks with other BGP systems including the full path of systems that are between them.

Routed vs. Routing Protocols A routing protocol sends and receives routing information packets to and from other routers.

A routed protocol can be routed by a router, which means that it can be forwarded from one router to another.

A routed protocol contains the data elements required for a packet to be sent outside of its host netowkr or network segment. In other words, a routed protocol can be routed.

Protocols used to communicate routing information between routers within an autonomous system are Interior Gateway Protocols (IGP), which are routing protocols, but not routed protocols.

Examples of routed protocols are IP and IPX, and examples of routing protocfols are RIP and IGRP.

As far as the CCNA exam goes, there are three types of routing: static, dynamic, and default.

• Static routes - are fixed routes that are manually entered by the administrator into the router's configuration. • Dynamic routing - is the process by which a network adapts automatically to the changes in topology or traffic as those changes occur. • Default routes - are very much like static route. The administrator enters the default route, and it becomes the default path the router uses to forward packets for which it knows no other route to use. Without a default route, packets with unknown destinations are dripped.

A static route is configured on the router with a command like this: ip route [destination_network] [mask] [next_hop_address or exit interface] [administrative-

Page 4: Dynamic Routing -  · PDF fileDynamic Routing Dynamic routing ... The name used to describe the fact that each system on ... RIP (Routing Information Protocol) is a classful,

distance] [permanent] Example: RouterA(config)#ip route 192.168.1.0 255.255.255.0 192.168.1.1 3

Using the previous command example the key elements of the static router configuration command are:

• ip route: This is the command used to designate a static route. • destination address: in this example, 209.220.93.243 is the IP address of the destination network. • submet mask: 192.169.1.0 is a Class C IP address and is using the default subnet mask for Class C addresses, 255.255.255.0 • next hop: Following the subnet mask is the address of the next hop router, 192.168.1.1 • administrative distance: This is a number between 0 and 255 that indicates how well the route can be trusted. The higher the number, the lower the trust. • permanent: if the interface is shut down or the router cannot communicate to the next hop router, the route is automatically discarded from the routing table. Choosing the permanent option keeps the entry in the routing table no matter what happens.

Static routing has the following benefits:

• No overhead on the router CPU • No bandwidth usage between routers • Security (because the administrator only allows routing to certain networks)

Static routing has the following disadvantages:

• The administrator must really understand the internetwork and how each router is connected to configure the routes correctly. • If on network is added to the internetwork, the administrator must add a route to it on all routers. • It's not feasible in large networks because it would be a full-time job.

Routers use a series of calculations and metric-based decisions to determine the most efficient and economical router for a packet to use to reach its destination. In general, these calculations and decisions are embedded in an algorithm.

Here are some of the metrics used to determine the better route:

• Bandwidth: Maximum throughput speed in bits-per-second. • Cost: A arbitrary value assigned by the administrator for the crossing and intersection of networks. • Delay (latency): A group of factors such as congestion or distance. • Hop Count: The number of routers a packet passes through to reach its destination. • Load: The measure of traffic that flows through a router.

Page 5: Dynamic Routing -  · PDF fileDynamic Routing Dynamic routing ... The name used to describe the fact that each system on ... RIP (Routing Information Protocol) is a classful,

• MTUs (maximum transmission unit): The largest message size allowed on all routes to the destination. • Reliability: A value representing the amount of downtime for a network. • Ticks: A measurement of delay, based on the clock in a personal computer, where one tick is 1/18 of a second. It's used as part of the metric in IPX (Novell) RIP.

For the CCNA exam, you should remember that a distance-vector algorithm is concerned primarily with hop count, or the number of routers that a packet must pass through to reach its destination. RIP and IGRP use distance-vector algorighms. In each of these routing protocols, the routing table lists a remote network and also the number of hops required to get to it.

RIP uses a maximum hop count of 15 and IGRP uses a maximum hop count of 255. Both are distance-vector routing protocols and interior routing protocols.

Three mechanisms used with distance-vector protocols to control routing (count to infinity) loops are split horizon, route poisoning, and hold-downs.

RIP (Routing Information Protocol) is a classful, distance-vector routing protocol. As such, it uses information provided to it by its neighboring routers to maintain information in a routing table about the cost, in terms of hops and other metrics, of a particular route. For the CCNA exam focus on adding RIP statements to the router.

The IGRP router command requires an autonomous system number to be assigned to the network entries included in the command.

An IPX network address is an 80-bit number that is made up of a 32-bit network ID and the 48-bit MAC address. Because an IPX address includes the MAC address of a node, there's no need for ARP translations on an IPX network.

Novell encapsulations and their Cisco equivalents:

Interface Cisco Command Word

Ethernet novell-ehter

Token Ring sap

FDDI snap

Serial hdlc

Novell Frame Types and Their Cisco Equivalents:

Novell Cisco

Ethernet_802.2 sap

Page 6: Dynamic Routing -  · PDF fileDynamic Routing Dynamic routing ... The name used to describe the fact that each system on ... RIP (Routing Information Protocol) is a classful,

Ethernet_802.3 novell-ether (default)

Ethernet_snap snap

Ethernet_II arpa

FDDI_snap snap (default)

FDDI_raw novell-fddi

FDDI_802.2 sap

Token-Ring sap (default)

Token-Rint_snap snap

Cisco Commands used to Monitor Router Operations:

Command Action

Privileged Exec Mode

You must be in this mode to use the remaining commands in this table.

ping Verifies that a network connection is reachable.

show ipx traffic Displays IPX traffic statistics.

show ipx route Displays all IPX entries in the routing table or just one entry if the network value is entered.

show ipx interface Displays a detailed view of an interface's IPX settings.

show ipx servers Lists the IPX servers discovered through SAP advertisements.

debug ipx sap Displays messages regarding SAP updates.

debug ipx routing Displays messages about each routing update.

Back

Page 7: Dynamic Routing -  · PDF fileDynamic Routing Dynamic routing ... The name used to describe the fact that each system on ... RIP (Routing Information Protocol) is a classful,

CCNA Routing

Layer-3 devices are generically called routers. Routers basically have two functions:

1. To find a layer-3 path to a destination network 2. To move packets from one interface to another to get a packet to its destination

In order to accomplish the first function, a router will need to:

- Learn about routers it is connected to in order to learn the networks that they know about - Find locations of destination network numbers - Choose a best path to each destination - Maintain the most up-to-date routing information about how to reach destination networks

Types of Routes

A router can learn a route via one of two methods: static and dynamic. A static route is a route that is manually configured on the router. Dynamic routes are routes that a router learns by running a routing protocol. Routing protocols will learn about routes from other neighboring routers running the same routing protocol.

Administrative Distance

Administrative distance ranks the IP routing protocols, assigning a value, or weight, to each protocol. Distances can range from 0 to 255. A smaller distance is more believable by a router, with the best distance being 0 and the worst, 255.

Static Route Configuration

Router(config)# ip route destination_network_# [subnet_mask] IP_address_of_next_hop_neighbor [administrative_distance] or Router(config)# ip route destination_network_# [subnet_mask] interface_to_exit [administrative_distance]

Default Route Configuration

A default route is a special type of static route.Where a static route specifies a path a router should use to reach a specific destination, a default route specifies a path the router should use if it doesn't know how to reach the destination.

Router(config)# ip route 0.0.0.0 0.0.0.0 IP_address_of_next_hop_neighbor [administrative distance] Or Router(config)# ip route 0.0.0.0 0.0.0.0 interface_to_exit [administrative_distance]

Page 8: Dynamic Routing -  · PDF fileDynamic Routing Dynamic routing ... The name used to describe the fact that each system on ... RIP (Routing Information Protocol) is a classful,

Dynamic Routing Protocols

Dynamic routing protocols learn about destination networks from neighboring routers. Dynamic routing protocols fall under one of three categories: distance vector, link state, and hybrid. Because of the differences between the various routing protocol types, each has advantages and disadvantages.

Distance Vector Protocols

Distance vector protocols are the simplest. Distance vector routing protocols use the distance and direction (vector) to find paths to destinations. Most distance vector protocols use the Bellman-Ford algorithm for finding paths to networking destinations. Some examples of IP routing protocols that are distance vector are RIPv1 and IGRP. Distance vector protocols periodically use local broadcasts with a destination IP address of 255.255.255.255 to share routing information.

Processing Updates

When a distance vector protocol receives a routing update, it performs these steps:

1. Increment the metrics of the incoming routes in the advertisement (for IP RIP, add 1 to the hop count). 2. Compare the network numbers in the routing update from the neighbor to what the router has in its routing table. 3. If the neighbor's information is better, place it in the routing table and remove the old entry. 4. If the neighbor's information is worse, ignore it. 5. If the neighbor's information is exactly the same as the entry already in the table, reset the timer for the entry in the routing table (in other words, the router already learned about this route from the same neighbor). 6. If the neighbor's information is a different path to a known destination network, but with the same metric as the existing network in the routing table, the router will add it to the routing table along with the old one. This assumes you have not exceeded the maximum number of equal-cost paths for this destination network number.

The six steps are generally referred to as the Bellman-Ford algorithm.

Link State Protocols

Link state protocols use an algorithm called the Shortest Path First (SPF) algorithm, invented by Dijkstra, to find the best path to a destination. Examples of link state protocols include IP's OSPF. Whereas distance vector protocols use local broadcasts to disseminate routing information, link state protocols use multicasts. A distance protocol will send out its routing table religiously on its periodic interval whether there are changes or not. Link state protocols are smarter. They multicast what is called a Link State Advertisement (LSA), which is a piece of routing information that contains who originated the advertisement and what the network number is. LSAs are typically generated only when there are changes in the network. link state routers

Page 9: Dynamic Routing -  · PDF fileDynamic Routing Dynamic routing ... The name used to describe the fact that each system on ... RIP (Routing Information Protocol) is a classful,

send out only incremental updates. Advantage that link state protocols have over distance vector protocols is that they support route classless routing [VLSM].

Hybrid Protocols

A hybrid protocol takes the advantages of both distance vector and link state protocols and merges them into a new protocol. Typically, hybrid protocols are based on a distance vector protocol but contain many of the features and advantages of link state protocols. Examples of hybrid protocols include RIPv2, EIGRP.

Problems with Distance Vector Protocols

Problem: Convergence

The term convergence, in routing terms, refers to the time it takes for all of the routers to understand the current topology of the network. Link state protocols tend to converge very quickly, while distance vector protocols tent to converge slowly.

Solution: Triggered Updates

You actually have two solutions that you can use in order to speed convergence: change the periodic timer interval and/or use triggered updates.

Problem: Routing Loops

A routing loop is a layer-3 loop in the network. Basically, it is a disagreement about how to reach a destination network. Packet Loops in the Network. Solution: Maximum Hop Count: IP RIP set a hop count limit of 15, by default, and IGRP allows a hop count of 100.

Solution: Split Horizon

Split horizon is used with small routing loops. Split horizon states that if a neighboring router sends a route to a router, the receiving router will not propagate this route back to the advertising router on the same interface.

Solution: Route Poisoning

Whereas split horizon is used to solve small routing loop problems, distance vector protocols use two mechanisms to deal with large routing loop problems: route poisoning and hold down timers. Route poisoning is a derivative of split horizon. When a router detects that one of its connected routes has failed; the router will poison the route by assigning an infinite metric to it. In IP RIP, the route is assigned a hop count of 16 (15 is the maximum), thus making it an unreachable network.

Page 10: Dynamic Routing -  · PDF fileDynamic Routing Dynamic routing ... The name used to describe the fact that each system on ... RIP (Routing Information Protocol) is a classful,

When a router advertises a poised route to its neighbors, its neighbors break the rule of split horizon and send back to the originator the same poisoned route, called a poison reverse. This ensures that everyone received the original update of the poisoned route.

Hold-Down Timers

In order to give the routers enough time to propagate the poisoned route and to ensure that no routing loops occur while propagation is occurring; the routers implement a hold-down mechanism. During this period, the routers will freeze the poisoned route in their routing tables for the period of the hold-down timer, which is typically three times the interval of the routing broadcast update. 180 Sec's

RIP (Routing Information Protocol)

IP RIP (Routing Information Protocol) comes in two different versions: 1 and 2. Version 1 is a distance vector protocol. Version 2 is a hybrid protocol. RIPv1 uses local broadcasts to share routing information. These updates are periodic in nature, occurring, by default, every 30 seconds, with a hold-down period of 180 seconds. Both versions of RIP use hop count as a metric, which is not always the best metric to use. RIPv1 is a classful protocol. Another interesting feature is that RIP supports up to six equal-cost paths to a single destination. The default is actually four paths, but this can be increased up to a maximum of six.

RIPv2

One major enhancement to RIPv2 pertains to how it deals with routing updates. Instead of using broadcasts, RIPv2 uses multicasts. And to speed up convergence, RIPv2 supports triggered updates-when a change occurs, a RIPv2 router will immediately propagate its routing information to its connected neighbors. A second major enhancement that RIPv2 has is that it is a classless protocol. RIPv2 supports variable-length subnet masking (VLSM), which allows you to use more than one subnet mask for a given class network number.

Configuring IP RIP

Router(config)# router rip Router(config-router)# network IP_network_# Specifying RIP Version 1 and 2 Router(config)# router rip Router(config-router)# version 1|2 Troubleshooting IP RIP show ip protocols show ip route debug ip rip debug ip rip

IGRP (Interior Gateway Routing Protocol)

Page 11: Dynamic Routing -  · PDF fileDynamic Routing Dynamic routing ... The name used to describe the fact that each system on ... RIP (Routing Information Protocol) is a classful,

The Interior Gateway Routing Protocol (IGRP) is a Cisco-proprietary routing protocol for IP. Like IP RIPv1, it is a distance vector protocol. However, it scales better than RIP because of these advantages:

- It uses a sophisticated metric based on bandwidth and delay. - It uses triggered updates to speed-up convergence. - It supports unequal-cost load balancing to a single destination. IGRP uses a composite metric, which includes bandwidth, delay, reliability, load, and MTU, when choosing paths to a destination. By default, the algorithm uses only bandwidth and delay

Configuring IP IGRP

Router(config)# router igrp autonomous_system_# Router(config-router)# network IP_network_#

Unlike RIP, IGRP understands the concept of an autonomous system and requires you to configure the autonomous system number in the routing process. For routers to share routing information, they must be in the same AS.

Load Balancing

With RIP, you don't need to configure anything to enable equal-cost load balancing; and RIP doesn't support unequal-cost load balancing. IGRP supports both equal- and unequal-cost paths for load balancing to a single destination. Equal-cost paths are enabled by default, where IGRP supports up to six equal-cost paths (four by default) to a single destination in the IP routing table. IGRP, however, also supports unequal-cost paths, but this feature is disabled by default.

The variance feature allows you to include equal- and unequal-cost IGRP routes in the routing table.

Router(config-router)# variance multiplier Troubleshooting IP IGRP show ip protocols show ip route debug ip igrp events debug ip igrp transactions

OSPF(Open Shortest Path First)

The Open Shortest Path First (OSPF) protocol is a link state protocol that handles routing for IP traffic. Because it is based on an open standard, OSPF is very popular in many corporate networks today and has many advantages, including these:

- It will run on most routers, since it is based on an open standard. - It uses the SPF algorithm, developed by Dijkstra, to provide a loop-free topology. - It provides fast convergence with triggered, incremental updates via Link State Advertisements

Page 12: Dynamic Routing -  · PDF fileDynamic Routing Dynamic routing ... The name used to describe the fact that each system on ... RIP (Routing Information Protocol) is a classful,

(LSAs). - It is a classless protocol and allows for a hierarchical design with VLSM and route summarization.

Given its advantages, OSPF does have its share of disadvantages:

- OSPF maintains three types of tables. So it requires more memory to hold the adjacency (list of OSPF neighbors), topology (a link state database containing all of the routers and their routes), and routing tables. - It requires extra CPU processing to run the SPF algorithm, which is especially true when you first turn on your routers and they are initially building the adjacency and topology tables. - For large networks, it requires careful design to break up the network into an appropriate hierarchical design by separating routers into different areas. - It is complex to configure and more difficult to troubleshoot.

Hierarchical Design: Areas

Areas are used to provide hierarchical routing. Basically, areas are used to control when and how much routing information is shared across your network. In flat network designs, such as IP RIP, if a change occurs on one router, perhaps a flapping route problem, it affects every router in the entire network. With a correctly designed hierarchical network, these changes can be contained within a single area. OSPF implements a two-layer hierarchy: the backbone (area 0) and areas off of the backbone. Through a correct IP addressing design, you should be able to summarize routing information between areas. By performing this summarization, the routers have a smaller topology database (they know only about links in their own area and the summarized routes) and their routing tables are smaller (they know only about their own area's routes and the summarized routes).

Metric Structure

Unlike RIP, which uses hop count as a metric, OSPF uses cost. Cost is actually the inverse of the bandwidth of a link: the faster the speed of the connection, the lower the cost. The most preferred path is the one with the lowest cost. By using cost as a metric, OSPF will choose more intelligent paths than RIP. OSPF supports load balancing of up to six equal-cost paths to a single destination. The default measurement that Cisco uses in calculating the cost metric is: cost = 10 ^8/(interface bandwidth).

Router Identities

Each router in an OSPF network needs a unique ID. The ID is used to provide a unique identity to the OSPF router. This is included in any OSPF messages the router generates. The router ID is chosen according to one of the two following criteria:

- The highest IP address on its loop back interfaces (this is a logical interface on a router) - The highest IP address on its active interfaces

Page 13: Dynamic Routing -  · PDF fileDynamic Routing Dynamic routing ... The name used to describe the fact that each system on ... RIP (Routing Information Protocol) is a classful,

It is highly recommended that you use a loop back interface because it is always up and thus the router can obtain a router ID.

Finding Neighbors

OSPF learns about its neighbors and builds its adjacency and topology tables by sharing LSAs. There are different types of LSAs. When learning about the neighbors that a router is connected to, as well as keeping tabs on known neighbors, OSPF routers will generate hello LSAs every 10 seconds. When a neighbor is discovered and an adjacency is formed with the neighbor, a router expects to see hello messages from the neighbor. If a neighbor is not seen within the dead interval time, which defaults to 40 seconds, the neighbor is declared dead. When this occurs, the router will advertise this information, via an LSA message, to other neighboring OSPF routers. In order for two routers to become neighbors, the following must match on each router:

- The area number and its type - The hello and dead interval timers

Let's assume that you turned on all your routers simultaneously on a segment. In this case, the OSPF routers will go through three states called the exchange process:

1. Down state the new router has not exchanged any OSPF information with any other router. 2. Init state A destination router has received a new router's hello and adds it to its neighbor list (assuming that certain values match). Note that communication is only unidirectional at this point. 3. Two-Way state the new router receives a unidirectional reply to its initial hello packet and adds the destination router to its neighbor database. Once the routers have entered a two-way state, they are considered neighbors. At this point, an election process takes place to elect the designated router (DR) and the backup designated router (BDR).

Designated and Backup Designated Routers

An OSPF router will not form adjacencies to just any router. Instead, a client/server design is implemented in OSPF. For each network multi-access segment, there is a DR and a BDR as well as other routers. When an OSPF router comes up, it forms adjacencies with the DR and the BDR on each multi-access segment that it is connected to. Any exchange of routing information is between these DR/BDR routers and the other OSPF neighbors on a segment (and vice versa). An OSPF router talks to a DR using the IP multicast address of 224.0.0.6. The DR and the BDR talk to all routers using the 224.0.0.5 multicast IP address.

The OSPF router with the highest priority becomes the DR for the segment. If there is a tie, the router with the highest router ID will become the DR. By default, all routers have a priority of 1 (priorities can range 0-255). If the DR fails, the BDR is promoted to DR and another router is elected as the BDR. OSPF uses incremental updates. This means that whenever changes take place, only the change is shared with the DR, which will then share this information with other routers on the segment. OSPF routers share information about their connected routes with the

Page 14: Dynamic Routing -  · PDF fileDynamic Routing Dynamic routing ... The name used to describe the fact that each system on ... RIP (Routing Information Protocol) is a classful,

DR, which includes the link-state type, the ID of the advertising router, the cost of the advertised link, and the sequence number of the link.

Configuring OSPF

Router(config)# router ospf process_ID Router(config-router)# network IP_address wildcard_mask area area_#

Note that process ID do not need to match between different routers and that they have nothing to do with autonomous system numbers.

A wildcard mask is 32 bits in length. A 0 in a bit position means there must be a match, and a 1 in a bit position means the router doesn't care. Actually, a wildcard mask is an inverted subnet mask, with the 1's and 0's switched.

Class A: 0.255.255.255.255 Class B: 0.0.255.255 Class C: 0.0.0.255

Loopback Interfaces

A loopback interface is a logical, virtual interface on a router. By default, the router doesn't have any loopback interfaces, but they can easily be created. Here are some reasons you might want to create a loopback interface:

- To assign a router ID to an OSPF router - To use for testing purposes, since this interface is always up

To create a loopback interface, use the following command:

Router(config)# interface loopback port_# Router(config-if)# ip address IP_address subnet_mask

Troubleshooting OSPF

• show ip protocols • show ip route • show ip ospf interface • show ip ospf neighbor • debug ip ospf adj • debug ip ospf events • debug ip ospf packet

EIGRP (Enhanced Interior Gateway Routing Protocol)

Page 15: Dynamic Routing -  · PDF fileDynamic Routing Dynamic routing ... The name used to describe the fact that each system on ... RIP (Routing Information Protocol) is a classful,

The Enhanced Interior Gateway Routing Protocol (EIGRP) is a Cisco-proprietary routing protocol for IP. It's actually based on IGRP, with many enhancements built into it. These characteristics include:

- Fast convergence - Loop-free topology - VLSM and route summarization - Multicast and incremental updates - Routes for multiple routed protocols (Supports IP, IPX, APPLE TALK)

Characteristics of EIGRP

Both offer load balancing across six paths (equal or unequal).

- They have similar metric structures. - EIGRP has faster convergence (triggered updates and saving a neighbor's routing table locally). - EIGRP has less network overhead, since it uses incremental updates.

EIGRP and IGRP use the same metric structure. Both can use bandwidth, delay, reliability, and MTU when computing a best metric path to a destination. By default, only bandwidth and delay are used in the metric computation. One interesting point about these protocols is that if you have some routers in your network running IGRP and others running EIGRP, and both sets have the same autonomous system number, routing information will automatically be shared between the two.

EIGRP uses the Diffusing Update Algorithm (DUAL) to update the routing table. This algorithm can enable very fast convergence by storing a neighbor's routing information in a local topology table. If a primary route in the routing table fails, DUAL can take a backup route from the topology table and place this into the routing table without necessarily having to talk to other EIGRP neighboring routers to find an alternative path to the destination.

Interaction with Other EIGRP Routers

EIGRP uses hello packets to discover and maintain neighbor relationships, much as OSPF does. EIGRP generates hello packets every 5 seconds on LAN, point-to-point, and multipoint connections with speeds of at least T1/E1 speeds. Otherwise, hellos are generated every 60 seconds. The dead interval period is three times the hello interval. EIGRP uses the multicast address of 224.0.0.10 for the destination in the hello packets.

For EIGRP routers to become neighbors, the following information must match:

- The AS number - The K-values (these enable/disable the different metric components)

Page 16: Dynamic Routing -  · PDF fileDynamic Routing Dynamic routing ... The name used to describe the fact that each system on ... RIP (Routing Information Protocol) is a classful,

When two routers determine whether they will become neighbors, they go through the following process:

1. The first router generates a Hello with configuration information. 2. If the configuration information matches, the second router responds with an Update message with topology information. 3. The first router responds with an ACK message, acknowledging the receipt of the second's ACK. 4. The first router sends its topology to the second router via an Update message. 5. The second router responds back with an ACK.

At this point, the two routers have converged.

Here are the message types for which an EIGRP router expects an ACK back:

- Update Contains a routing update - Query Asks a neighboring router to validate routing information - Reply Responds to a query message

If an EIGRP router doesn't receive an ACK from these three packet types, the router will try a total of 16 times to resend the information. After this, the router declares the neighbor dead. When a router sends a hello packet, no corresponding ACK is expected.

Configuring EIGRP

Setting up EIGRP is almost as simple as configuring IGRP:

Router(config)# router eigrp autonomous_system_# Router(config-router)# network IP_network_#

You must specify the AS number when configure EIGRP. Even though EIGRP is classless, you must configure it as a classful protocol when specifying your network numbers with the network command.

Troubleshooting EIGRP

- show ip protocols - show ip route - show ip eigrp neighbors - show ip eigrp topology - show ip eigrp traffic - debug ip eigrp

Siby.T.R I am working as a technical consultant

Page 17: Dynamic Routing -  · PDF fileDynamic Routing Dynamic routing ... The name used to describe the fact that each system on ... RIP (Routing Information Protocol) is a classful,

i am a free land technical consultant i am interested to learn and publish my thoughts in ccna and system administration side. i hope u will be enjoying my articles if u are a technical person or a technical student or willing to accept technical things.

Thanks&Regards Siby

ROUTING PROTOCOLSROUTING PROTOCOLSROUTING PROTOCOLSROUTING PROTOCOLS

ID:0217358ID:0217358ID:0217358ID:0217358

· These protocols that filter network traffic. · They have many routes between them. · It depends on the router to choose the best path i.e maintain routing table. · It can do different number of functions like hop number, bandwidth, latency, average error rates, current network traffic etc.

· There are different types of protocols of routing. · Routing information protocols (RIP) · Interior gateway routing protocol (IGRP) · Open shortest path first (OSPF) · Exterior gateway protocol (EGP) · Enhanced interior gateway routing protocol (EIGRP) · Border gateway protocol (BGP) · Intermediate system-to-intermediate system (IS-IS)

Routing fundamentals

· The network layer has two types of protocols like routing protocols and routed protocols. · In routing protocols router share information with each other. Protocols like RIP, IGRP, EIGRP, and OSPF. · In routed protocols any of the network protocols address a host and a destination on to the given network. Protocols like IP, IPX, and NetBEUI.

Page 18: Dynamic Routing -  · PDF fileDynamic Routing Dynamic routing ... The name used to describe the fact that each system on ... RIP (Routing Information Protocol) is a classful,

· Another thing is that basically there are two types of routing. · Dynamic routing. · Static routing. · Default routing.

Dynamic routing

· In dynamic routing monitor network can change their routing tables. · They knows everything about the internet work. · They can do security concerns for the path selections. · Different factors can be involved in dynamic routing. They are as follows. · Bandwidth · Delay · Load · Reliability · Hop count · Ticks · Cost

Dynamic update

· The knowledge is contained in the updates. · When the router send the updates. · It tells us the location of the recipients updates. · It is send by two different methods · Broadcast method · Event - driven.

Default routing

· In this technique they are defined by system administrator and define the path that is taken if there is no route known for destination.

Static routing

· In this type of routing system administrator can sets manual routes for the network. · This type of configuration can reduce overheads of dynamic routing. · It allows the internet work administrator to specify the information about the network.

Routing protocols technique

Page 19: Dynamic Routing -  · PDF fileDynamic Routing Dynamic routing ... The name used to describe the fact that each system on ... RIP (Routing Information Protocol) is a classful,

· Basically there are three types of routing protocols technique. · Distance- vector examples are (RIP, IGRP) · Link -state examples are (OSPF, BGP, EGP) · Hybrid examples are (IS-IS, EIGRP)

Distance -vector:-

· In this technique it use distance -vector algorithm which uses a direction to any link in the interconnection network to determine the best route. · Each router periodically send information to he neighbour on the cost to get to distance node. · The main problem with distance -vector is that it updates the network step by step so it requires more bandwidth to process the information.

Problems with distance -vector

· Different types of problems are. · Routing loops · Counting to infinity · Solutions · setting infinity values · split horizon · hold-down timers · same neighbour problem · different neighbour better metric · different neighbour poorer metric

Link state:-

· It maintains a complex database on the topology of the network. · It uses the link state algorithm (LSA) to advertise the routing information from routers. · Each router builts up a topological database with themselves at the top of the tree. · Routers keep communicating with neighbours at latest state.

Problem with link-state

· It requires more processing power to communicate with each other. · It requires more memory to store LSA and topological database. · Link state updates · Scaling · It initially sends up high demand for updates.

Hybrid routing

Page 20: Dynamic Routing -  · PDF fileDynamic Routing Dynamic routing ... The name used to describe the fact that each system on ... RIP (Routing Information Protocol) is a classful,

· It uses a combination of both balance and hybrid routing. · It uses distance -vector technique for more accurate metrics to determine the best path. · It reports routing information when change occurs in topology - link-state. · Intermediate system-to-intermediate system (IS-IS). · Enhance interior gateway routing protocol (EIGRP).

The last chapter explained what a router needs to know to correctly switch packets to their

respective destinations and how that information is put into the route table manually. This

chapter shows how routers can discover this information automatically and share that

information with other routers via dynamic routing protocols. A routing protocol is the language

a router speaks with other routers in order to share information about the reachability and

status of networks.

Dynamic routing protocols not only perform these path determination and route table update

functions but also determine the next-best path if the best path to a destination becomes

unusable. The capability to compensate for topology changes is the most important advantage

dynamic routing offers over static routing.

Obviously, for communications to occur the communicators must speak the same language.

There are eight major IP routing protocols from which to choose; if one router speaks RIP and

another speaks OSPF, they cannot share routing information because they are not speaking the

same language. Subsequent chapters examine all the IP routing protocols in current use, and

even consider how to make a router "bilingual," but first it is necessary to explore some

characteristics and issues common to all routing protocols—IP or otherwise.

Routing Protocol Basics

All dynamic routing protocols are built around an algorithm. Generally, an algorithm is a step-

by-step procedure for solving a problem. A routing algorithm must, at a minimum, specify the

following:

• A procedure for passing 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, compensating for, and advertising topology changes in an

internetw_ork

A few issues common to any routing protocol are path determination, metrics, convergence,

and load balancing.

Path Determination

Page 21: Dynamic Routing -  · PDF fileDynamic Routing Dynamic routing ... The name used to describe the fact that each system on ... RIP (Routing Information Protocol) is a classful,

All networks within an internetwork must be connected to a router, and wherever a router has

an interface on a network that interface must have an address on the network. This address is

the originating point for reachability information.

Figure 4.1 shows a simple three-router internetwork. Router A knows about networks

192.168.1.0, 192.168.2.0, and 192.168.3.0 because it has interfaces on those networks with

corresponding addresses and appropriate address masks. Likewise, router B knows about

192.168.3.0, 192.168.4.0, 192.168.5.0, and 192.186.6.0; router C knows about 192.168.6.0,

192.168.7.0, and 198.168.1.0. Each interface implements the data link and physical protocols of

the network to which it is attached, so the router also knows the state of the network (up or

down).

Figure 4.1 Each router knows about its directly connected networks from its assigned

addresses and masks.

At first glance, the information-sharing procedure seems simple. Look at router A:

1. Router A examines its IP addresses and associated masks and deduces that it is attached

to networks 192.168.1.0, 192.186.2.0, and 192.168.3.0.

2. Router A enters these networks into its route table, along with some sort of flag

indicating that the networks are directly connected.

3. Router A places the information into a packet: "My directly connected networks are

192.168.1.0, 192.186.2.0, and 192.168.3.0."

4. Router A transmits copies of these route information packets, or routing updates, to

routers B and C.

5. Routers B and C, having performed the same steps, have sent updates with their directly

connected networks to A. Router A enters the received information into its route table,

along with the source address of the router that sent the update packet. Router A now

knows about all the networks, and it knows the addresses of the routers to which they

are attached.

This procedure does seem quite simple. So why are routing protocols so much more

complicated than this? Look again at Figure 4.1.

• What should router A do with the updates from B and C after it has recorded the

information in the route table? Should it, for instance, pass B's routing information

packet to C and pass C's packet to B?

• If router A does not forward the updates, information sharing may not be complete. For

instance, if the link between B and C does not exist, those two routers would not know

about each other's networks. Router A must forward the update information, but this

step opens a whole new set of problems.

• If router A hears about network 192.168.4.0 from both router B and router C, which

router should be used to reach that network? Are they both valid? Which one is the best

path?

Page 22: Dynamic Routing -  · PDF fileDynamic Routing Dynamic routing ... The name used to describe the fact that each system on ... RIP (Routing Information Protocol) is a classful,

• What mechanism will be used to ensure that all routers receive all routing information

while preventing update packets from circulating endlessly through the internetwork?

• The routers share certain directly connected networks (192.168.1.0, 192.168.3.0, and

192.168.6.0). Should the routers still advertise these networks?

These questions are almost as simplistic as the preceding preliminary explanation of routing

protocols, but they should give you a feel for some of the issues that contribute to the

complexity of the protocols. Each routing protocol addresses these questions one way or

another, as will become clear in following sections and chapters.

Metrics

When there are multiple routes to the same destination, a router must have a mechanism for

calculating the best path. A metric is a variable assigned to routes as a means of ranking them

from best to worst or from most preferred to least preferred. Consider the following example

of why metrics are needed.

Assuming that information sharing has properly occurred in the internetwork of Figure 4.1,

router A might have a route table that looks like Table 4.1.

Table 4.1 A rudimentary route table for router A of Figure 4.1.

Network Next-Hop

Router

192.168.1.0 Directly

connected

192.168.2.0 Directly

connected

192.168.3.0 Directly

connected

192.168.4.0 B, C

192.168.5.0 B, C

192.168.6.0 B, C

192.168.7.0 B, C

This route table says that the first three networks are directly connected and that no routing is

needed from router A to reach them, which is correct. The last four networks, according to this

table, can be reached via router B or router C. This information is also correct. But if network

192.168.7.0 can be reached via either router B or router C, which path is the preferable path?

Metrics are needed to rank the alternatives.

Page 23: Dynamic Routing -  · PDF fileDynamic Routing Dynamic routing ... The name used to describe the fact that each system on ... RIP (Routing Information Protocol) is a classful,

Different routing protocols use different, and sometimes multiple, metrics. For example, RIP

defines the "best" route as the one with

Hop Count

A hop count metric simply counts router hops. For instance, from router A it is 1 hop to

network 192.168.5.0 if packets are sent out interface 192.168.3.1 (through router B) and 2 hops

if packets are sent out 192.168.1.1 (through routers C and B). Assuming hop count is the only

metric being applied, the best route is the one with the fewest hops, in this case, A-B.

But is the A-B link really the best path? If the A-B link is a DS-0 link and the A-C and C-B links are

T-1 links, the 2-hop route may actually be best because bandwidth plays a role in how

efficiently traffic travels through the network.

Bandwidth

A bandwidth metric would choose a higher-bandwidth path over a lower-bandwidth link.

However, bandwidth by itself still may not be a good metric. What if one or both of the T1 links

are heavily loaded with other traffic and the 56K link is lightly loaded? Or what if the higher-

bandwidth link also has a higher delay?

Load

This metric reflects the amount of traffic utilizing the links along the path. The best path is the

one with the lowest load.

Unlike hop count and bandwidth, the load on a route changes, and therefore the metric will

change. Care must be taken here. If the metric changes too frequently, route flapping—the

frequent

Delay

Delay is a measure of the time a packet takes to traverse a route. A routing protocol using delay

as a metric would choose the path with the least delay as the best path. There may be many

ways to measure delay. Delay may take into account not only the delay of the links along the

route but also such factors as router latency and queuing delay. On the other hand, the delay of

a route may be not measured at all; it may be a sum of static quantities defined for each

interface along the path. Each individual delay quantity would be an estimate based on the type

of link to which the interface is connected.

Reliability

Reliability measures the likelihood that the link will fail in some way and can be either variable

or fixed. Examples of variable-reliability metrics are the number of times a link has failed or the

Page 24: Dynamic Routing -  · PDF fileDynamic Routing Dynamic routing ... The name used to describe the fact that each system on ... RIP (Routing Information Protocol) is a classful,

number of errors it has received within a certain time period. Fixed-reliability metrics are based

on known qualities of a link as determined by the network administrator. The path with highest

reliability would be selected as best.

Cost

This metric is configured by a network administrator to reflect more- or less-preferred routes.

Cost may be defined by any policy or link characteristic or may reflect the arbitrary judgment of

the network administrator.

The term cost is often used as a generic term when speaking of route choices. For example, "RIP

chooses the lowest-cost path based on hop count." Another generic term is shortest, as in "RIP

chooses the shortest path based on hop count." When used in this context, either lowest-cost

(or highest-cost) and shortest (or longest) merely refer to a routing protocol's view of paths

based on its specific metrics.

Convergence

A dynamic routing protocol must include a set of procedures for a router to inform other

routers about its directly connected networks, to receive and process the same information

from other routers, and to pass along the information it receives from other routers. Further, a

routing protocol must define a metric by which best paths may be determined.

A further criteria for routing protocols is that the reachability information in the route tables of

all routers in the internetwork must be consistent. If router A in Figure 4.1 determines that the

best path to network 192.168.5.0 is via router C and if router C determines that the best path to

the same network is through router A, router A will send packets destined for 192.168.5.0 to C,

C will send them back to A, A will again send them to C, and so on. This continuous circling of

traffic between two or more destinations is referred to as a routing loop.

The process of bringing all route tables to a state of consistency is called convergence. The time

it takes to share information across

Figure 4.2 shows an internetwork that was converged, but now a topology change has

occurred. The link between the two left-most routers has failed; both routers, being directly

connected, know about the failure from the data link protocol and proceed to inform their

neighbors of the unavailable link. The neighbors update their route tables accordingly and

inform their neighbors, and the process continues until all routers know about the change.

Figure 4.2 Reconvergence after a topology change takes time. While the internetwork is in an

unconverged state, routers are susceptible to bad routing information.

Notice that at time t2 the three left-most routers know about the topology change but the three

right-most routers have not yet heard the news. Those three have old information and will

Page 25: Dynamic Routing -  · PDF fileDynamic Routing Dynamic routing ... The name used to describe the fact that each system on ... RIP (Routing Information Protocol) is a classful,

continue to switch packets accordingly. It is during this intermediate time, when the

internetwork is in an unconverged state, that routing errors may occur. Therefore convergence

time is an important factor in any routing protocol. The faster a network can reconverge after a

topology change, the better.

Load Balancing

Recall from Chapter 3, "Static Routing," that load balancing is the practice of distributing traffic

among multiple paths to the same destination in order to use bandwidth efficiently. As an

example of the usefulness of load balancing, consider Figure 4.1 again. All the networks in

Figure 4.1 are reachable from two paths. If a device on 192.168.2.0 sends a stream of packets

to a device on 192.168.6.0, router A may send them all via router B or router C. In both cases,

the network is 1 hop away. However, sending all packets on a single route probably is not the

most efficient use of available bandwidth. Instead, load balancing should be implemented to

alternate traffic between the two paths. As noted in Chapter 3, load balancing can be equal cost

or unequal cost and per packet or per destination.