CCNA Routing
Layer-Three units are usually known as routers. Routers principally have two features:
1. To discover a layer-Three path to a vacation spot community 2. To transfer packets from one interface to a different to get a packet to its vacation spot
In order to perform the primary perform, a router might want to:
– Learn about routers it’s linked to as a way to be taught the networks that they learn about – Find places of vacation spot community numbers – Choose a finest path to every vacation spot – Maintain essentially the most up-to-date routing details about attain vacation spot networks
Types of Routes
A router can be taught a route by way of one in every of two strategies: static and dynamic. A static route is a route that’s historically configured on the router. Dynamic routes are routines {that a} router learners by operating a routing protocol. Routing protocols will study routes from different neighboring routers operating the identical routing protocol.
Administrative Distance
Administrative distance ranks the IP routing protocols, assigning a worth, or weight, to every protocol. Distances can vary from Zero to 255. A smaller distance is extra plausible by a router, with one of the best distance being Zero and the worst, 255.
Static Route Configuration
Router (config) # ip route destination_network_ # [subnet_mask] IP_address_of_next_hop_neighbor [administrative_distance] Egypt Router (config) # ip route destination_network_ # [subnet_mask] interface_to_exit [administrative_distance]
Default Route Configuration
A default route is a particular sort of static route.Where a static route specifics a path a router ought to use to achieve a particular vacation spot, a default route specifics a path the router ought to use if it doesn’t know attain the vacation spot.
Router (config) # ip route 0.0.0.Zero 0.0.0.Zero IP_address_of_next_hop_neighbor [administrative distance] Or Router (config) # ip route 0.0.0.Zero 0.0.0.Zero interface_to_exit [administrative_distance]
Dynamic Routing Protocols
Dynamic routing protocols study vacation spot networks from neighboring routers. Dynamic routing protocols fall beneath one in every of three classes: distance vector, hyperlink state, and hybrid. Because of the variations between the varied routing protocol sorts, every has benefits and downsides.
Distance Vector Protocols
Distance vector protocols are the only. Distance vector routing protocols use the space and course (vector) to seek out paths to locations. Most distance vector protocols use the Bellman-Ford algorithm for locating paths to networking locations. Some examples of IP routing protocols which can be distance vector are RIPv1 and IGRP. Distance vector protocols periodically use native broadcasts with a vacation spot IP handle of 255.255.255.255 to share routing data.
Processing Updates
When a distance vector protocol receives a routing replace, it performs these steps:
1. Increase the metrics of the incoming routes within the commercial (for IP RIP, add 1 to the hop depend). 2. Compare the community numbers within the routing replace from the neighbor to what the router has in its routing desk. 3. If the neighbor's data is best, place it within the routing desk and take away the outdated entry. 4. If the neighbor's data is worse, ignore it. 5. If the neighbor's data is precisely the identical because the already already within the desk, reset the timer for the entry within the routing desk (in different phrases, the router already discovered about this route from the identical neighbor). 6. If the neighbor's data is a special path to a identified vacation spot community, however with the identical metric as the present community within the routing desk, the router will add it to the routing desk together with the outdated one. This assumes you haven’t exceeded the utmost variety of equal-cost paths for this vacation spot community quantity.
The six steps are usually known as the Bellman-Ford algorithm.
Link State Protocols
Link state protocols use an algorithm known as the Shortest Path First (SPF) algorithm, invented by Dijkstra, to seek out one of the best path to a vacation spot. Examples of hyperlink state protocols embrace IP's OSPF. Whereas distance vector protocols use native broadcasts to distribute routing data, hyperlink state protocols use multicasts. A distance protocol will ship out its routing desk religiously on its periodic interval whether or not there are modifications or not. Link state protocols are smarter. They are multicast what is named a Link State Advertisement (LSA), which is a chunk of routing data that incorporates who printed the commercial and what the community quantity is. LSAs are usually generated solely when there are modifications within the community. hyperlink state routers ship out solely incremental updates. Advantage that hyperlink state protocols have over distance vector protocols is that they help route classless routing [VLSM].
Hybrid Protocols
A hybrid protocol takes some great benefits of each distance vector and hyperlink state protocols and merges them into a brand new protocol. Typically, hybrid protocols are based mostly on a distance vector protocol however include most of the options and benefits of hyperlink state protocols. Examples of hybrid protocols embrace RIPv2, EIGRP.
Problems with Distance Vector Protocols
Problem: Convergence
The time period convergence, in routing phrases, refers back to the time it takes for all the routers to grasp the present topology of the community. Link state protocols are likely to converge in a short time, whereas distance vector protocols tent to converge slowly.
Solution: Triggered Updates
You even have two options that you need to use as a way to pace convergence: change the periodic timer interval and / or use triggered updates.
Problem: Routing Loops
A routing loop is a layer-Three loop within the community. Basically, it’s a disagreement about attain a vacation spot community. Packet Loops within the Network. Solution: Maximum Hop Count: IP RIP set a hop depend restrict of 15, by default, and IGRP permits a hop depend of 100.
Solution: Split Horizon
Split horizon is used with small routing loops. Split horizon states that if a neighboring router sends a path to a router, the receiving router is not going to propagate this route again to the promoting router on the identical interface.
Solution: Route Poisoning
Whereas cut up horizon is used to resolve small routing loop issues, distance vector protocols use two mechanisms to take care of massive routing loop issues: route poisoning and maintain down timers. Route poisoning is a spinoff of cut up horizon. When a router detects that one in every of its linked routines has failed; the router will poison the route by assigning an infinite metric to it. In IP RIP, the route is assigned a hop depend of 16 (15 is the utmost), so making it an unreachable community.
When a router publishes a poised path to its neighbors, its neighbors break the rule of cut up horizon and ship again to the originator the identical poisoned route, known as a poison reverse. This ensures that everybody acquired the unique replace of the poisoned route.
Hold-Down Timers
In order to offer the routers ample time to propagate the poisoned route and to make sure that no routing loops happen whereas propaganda is happening; the routers implement a hold-down mechanism. During this era, the routers will freeze the poisoned route of their routing tables for the interval of the hold-down timer, which is usually thrice the interval of the routing broadcast replace. 180 Sec's
RIP (Routing Information Protocol)
IP RIP (Routing Information Protocol) is available in two completely different variations: 1 and a pair of. Version 1 is a distance vector protocol. Version 2 is a hybrid protocol. RIPv1 makes use of native broadcasts to share routing data. These updates are periodic in nature, occurring, by default, each 30 seconds, with a hold-down interval of 180 seconds. Both variations of RIP use hop depend as a metric, which isn’t at all times one of the best metric to make use of. RIPv1 is a classful protocol. Another fascinating characteristic is that RIP helps as much as six equal-cost paths to a single vacation spot. The default is definitely 4 paths, however this may be elevated as much as a most of six.
RIPv2
One main enhancement to RIPv2 pertains to the way it offers with routing updates. Instead of utilizing broadcasts, RIPv2 makes use of multicasts. And to hurry up convergence, RIPv2 helps triggered updates-when a change happens, a RIPv2 router will instantly propagate its routing data to its linked neighbors. A second main enhancement that RIPv2 has is that it’s a classless protocol. RIPv2 helps variable-length subnet masking (VLSM), which lets you use multiple subnet masks for a given class community quantity.
Configuring IP RIP
Router (config) # router rip Router (config-router) # community IP_network_ # Specifying RIP Version 1 and a pair of Router (config) # router rip Router (config-router) # model 1 | 2 Troubleshooting IP RIP present ip protocols present ip route debug ip rip debug ip rip
IGRP (Interior Gateway Routing Protocol)
The Interior Gateway Routing Protocol (IGRP) is a Cisco-proprietary routing protocol for IP. Like IP RIPv1, it’s a distance vector protocol. However, it scales higher than RIP due to these benefits:
– It makes use of a classy metric based mostly on bandwidth and delay. – It makes use of triggered updates to speed-up convergence. – It helps unequal-cost load balancing to a single vacation spot. IGRP makes use of a composite metric, which incorporates bandwidth, delay, reliability, load, and MTU, when selecting paths to a vacation spot. By default, the algorithm makes use of solely bandwidth and delay
Configuring IP IGRP
Router (config) # router igrp automous_system_ # Router (config-router) # community IP_network_ #
Unlike RIP, IGRP understands the idea of an autonomous system and requires you to configure the autonomous system quantity within the routing course of. For routers to share routing data, they have to be in the identical AS.
Load Balancing
With RIP, you do not want to configure something to allow equal-cost load balancing; and RIP doesn’t help unequal-cost load balancing. IGRP helps each equal- and unequal-cost paths for load balancing to a single vacation spot. Equal-cost paths are enabled by default, the place IGRP helps as much as six equal-cost paths (4 by default) to a single vacation spot within the IP routing desk. IGRP, nonetheless, additionally helps unequal-cost paths, however this characteristic is disabled by default.
The variance characteristic lets you embrace equal- and unequal-cost IGRP routes within the routing desk.
Router (config-router) # variance multiplier Troubleshooting IP IGRP present ip protocols present ip route debug ip igrp occasions debug ip igrp transactions
OSPF (Open Shortest Path First)
The Open Shortest Path First (OSPF) protocol is a hyperlink state protocol that handles routing for IP site visitors. Because it’s based mostly on an open commonplace, OSPF may be very fashionable in lots of company networks at this time and has many benefits, together with these:
– It will run on most routers, since it’s based mostly on an open commonplace. – It makes use of the SPF algorithm, developed by Dijkstra, to offer a loop-free topology. – It offers quick convergence with triggered, incremental updates through Link State Advertisements (LSAs). – It is a classless protocol and permits for a hierarchical design with VLSM and route summarization.
Given its benefits, OSPF doesn’t have its share of disadvantages:
– OSPF maintains three kinds of tables. So it requires extra reminiscence to carry the adjacency (checklist of OSPF neighbors), topology (a hyperlink state database containing all the routers and their routes), and routing tables. – It requires further CPU processing to run the SPF algorithm, which is very true once you first flip in your routers and they’re initially constructing the adjacency and topology tables. – For massive networks, it requires cautious design to interrupt up the community into an acceptable hierarchical design by separating routers into completely different areas. – It is complicated to configure and tougher to troubleshoot.
Hierarchical Design: Areas
Areas are used to offer hierarchical routing. Basically, areas are used to manage when and the way a lot routing data is shared throughout your community. In flat community designs, equivalent to IP RIP, if a change happens on one router, presumably a flapping route drawback, it impacts each router in your complete community. With a accurately designed hierarchical community, these modifications may be contained inside a single space. OSPF implements a two-layer hierarchy: the spine (space 0) and areas off of the spine. Through an accurate IP addressing design, you must be capable to summarize routing data between areas. By performing this abstract, the routers have a smaller topology database (they know solely about hyperlinks in their very own space and the summarized routes) and their routing tables are smaller (they know solely about their very own space's routes and the summarized routes).
Metric Structure
Unlike RIP, which makes use of hop depend as a metric, OSPF makes use of value. Cost is definitely the inverse of the bandwidth of a hyperlink: the quicker the pace of the connection, the decrease the fee. The most most well-liked path is the one with the bottom value. By utilizing value as a metric, OSPF will select extra clever paths than RIP. OSPF helps load balancing of as much as six equal-cost paths to a single vacation spot. The default measurement that Cisco makes use of in calculating the fee metric is: value = 10 ^ 8 / (interface bandwidth).
Router Identities
Each router in an OSPF community wants a novel ID. The ID is used to offer a novel id to the OSPF router. This is included in any OSPF messages the router generates. The router ID is chosen in response to one of many two following standards:
– The highest IP handle on its loop again interfaces (this can be a logical interface on a router) – The highest IP handle on its energetic interfaces
It is very really helpful that you just use a loop again interface as a result of it’s at all times up after which the router can get a router ID.
Finding Neighbors
OSPF learns about its neighbors and builds its adjacency and topology tables by sharing LSAs. There are various kinds of LSAs. When studying in regards to the neighbors {that a} router is linked to, in addition to maintaining tabs on identified neighbors, OSPF routers will generate howdy LSAs each 10 seconds. When a neighbor is found and an adjacency is fashioned with the neighbor, a router expects to see howdy messages from the neighbor. If a neighbor just isn’t seen inside the lifeless interval time, which defaults to 40 seconds, the neighbor is said lifeless. When this happens, the router will promote this data, through an LSA message, to different neighboring OSPF routers. In order for 2 routers to change into neighbors, the next should match on every router:
– The space quantity and its sort – The howdy and lifeless interval timers
Let's assume that you just turned on all of your routers simultaniously on a section. In this case, the OSPF routers will undergo three states known as the trade course of:
1. Down state the brand new router has not modified any OSPF data with every other router. 2. Init state A vacation spot router has acquired a brand new router's howdy and provides it to its neighbor checklist (assuming that sure values ??match). Note that communication is just unidirectional at this level. 3. Two-Way state the brand new router receives a unidirectional reply to its preliminary howdy packet and provides the vacation spot router to its neighbor database. Once the routers have entered a two-way state, they’re thought-about neighbors. At this level, an election course of takes place to elect the designated router (DR) and the backup designated router (BDR).
Designated and Backup Designed Routers
An OSPF router is not going to kind adjacencies to simply any router. Instead, a shopper / server design is carried out in OSPF. For every community multi-access section, there’s a DR and a BDR in addition to different routers. When an OSPF router comes up, it kinds adjacencies with the DR and the BDR on every multi-access section that it’s linked to. Any trade of routing data is between these DR / BDR routers and the opposite OSPF neighbors on a section (and vice versa). An OSPF router talks to a DR utilizing the IP multicast handle of 224.0.0.6. The DR and the BDR discuss to all routers utilizing the 224.0.0.5 multicast IP handle.
The OSPF router with the best precedence turns into the DR for the section. If there’s a tie, the router with the best router ID will change into the DR. By default, all routers have a precedence of 1 (priorities can vary 0-255). If the DR fails, the BDR is promoted to DR and one other router is elected because the BDR. OSPF makes use of incremental updates. This implies that every time modifications happen, solely the change is shared with the DR, which can then share this data with different routers on the section. OSPF routers share details about their linked routes with the DR, which incorporates the link-state sort, the ID of the promoting router, the price of the marketed hyperlink, and the sequence variety of the hyperlink.
Configuring OSPF
Router (config) # router ospf process_ID Router (config-router) # community IP_address wildcard_mask space area_ #
Note that course of ID doesn’t have to match between completely different routers and that they don’t have anything to do with automated system numbers.
A wildcard masks is 32 bits in size. A Zero in a bit place means there have to be a match, and a 1 in a bit place means the router doesn’t care. Actually, a wildcard masks is an inverted subnet masks, 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, digital interface on a router. By default, the router doesn’t have any loopback interfaces, however they’ll simply be created. Here are some causes you would possibly need to create a loopback interface:
– To assign a router ID to an OSPF router – To use for testing functions, since this interface is at all times up
To create a loopback interface, use the next command:
Router (config) # interface loopback port_ # Router (config-if) # ip handle IP_address subnet_mask
Troubleshooting OSPF
• present ip protocols • present ip route • present ip ospf interface • present ip ospf neighbor • debug ip ospf adj • debug ip ospf occasions • debug ip ospf packet
EIGRP (Enhanced Interior Gateway Routing Protocol)
The Enhanced Interior Gateway Routing Protocol (EIGRP) is a Cisco-proprietary routing protocol for IP. It's really based mostly on IGRP, with many enhancements constructed into it. These traits embrace:
– Fast convergence – Loop-free topology – VLSM and route summarization – Multicast and incremental updates – Routes for a number of routed protocols (Supports IP, IPX, APPLE TALK)
Characteristics of EIGRP
Both provide load balancing throughout six paths (equal or unequal).
– They have related metric constructions. – EIGRP has quicker convergence (triggered updates and saving a neighbor's routing desk domestically). – EIGRP has much less community overhead, because it makes use of incremental updates.
EIGRP and IGRP use the identical metric construction. Both can use bandwidth, delay, reliability, and MTU when computing a finest metric path to a vacation spot. By default, solely bandwidth and delay are used within the metric computation. One fascinating level about these protocols is that if in case you have some routers in your community operating IGRP and others operating EIGRP, and each units have the identical autonomous system quantity, routing data will routinely be shared between the 2.
EIGRP makes use of the Diffusing Update Algorithm (DUAL) to replace the routing desk. This algorithm can allow very quick convergence by storing a neighbor's routing data in an area topology desk. If a major route within the routing desk fails, DUAL can take a backup route from the topology desk and place this into the routing desk with out essentially having to speak to different EIGRP neighboring routers to seek out an alternate path to the vacation spot.
Interaction with Other EIGRP Routers
EIGRP makes use of howdy packages to find and keep neighbor relations, a lot as OSPF does. EIGRP generates howdy packs each 5 seconds on LAN, point-to-point, and multipoint connections with speeds of at the least T1 / E1 speeds. Otherwise, hellos are generated each 60 seconds. The lifeless interval interval is thrice the howdy interval. EIGRP makes use of the multicast handle of 224.0.0.10 for the vacation spot within the howdy packets.
For EIGRP routers to change into neighbors, the next data should match:
– The AS quantity – The Okay-values ??(these allow / disable the completely different metric elements)
When two routers decide whether or not they are going to change into neighbors, they undergo the next course of:
1. The first router generates a Hello with configuration data. 2. If the configuration data matches, the second router responds with an Update message with topology data. 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 through an replace message. 5. The second router responds again with an ACK.
At this level, the 2 routers have converged.
Here are the message sorts for which an EIGRP router expects an ACK again:
– Update Contains a routing replace – Query Asks a neighboring router to validate routing data – Reply Responses to a question message
If an EIGRP router doesn’t obtain an ACK from these three packet sorts, the router will strive a complete of 16 occasions to resend the data. After this, the router declares the neighbor lifeless. When a router sends a howdy packet, no corresponding ACK is predicted.
Configuring EIGRP
Setting up EIGRP is sort of so simple as configuring IGRP:
Router (config) # router eigrp automous_system_ # Router (config-router) # community IP_network_ #
You should specify the AS quantity when configure EIGRP. Even although EIGRP is classless, it’s essential to configure it as a classful protocol when specifying your community numbers with the community command.
Troubleshooting EIGRP
– present ip protocols – present ip route – present ip eigrp neighbors – present ip eigrp topology – present ip eigrp site visitors – debug ip eigrp
Comments