Posts Tagged ‘route’

EIGRP enhancements

August 19, 2012

Enhanced Interior Gateway Routing Protocol (EIGRP) is a Cisco proprietary IGP. So if you have several vendors inside your corporate LAN like HP or Juniper then it’s probably not your choice. However, EIGRP has several enhancements that make it even faster in convergence time in comparison to OSPF.

One of the main drawbacks of OSPF is that it consumes considerable amount of memory to maintain LSDB and CPU power to run Dijkstra on it. EIGRP doesn’t do that. Routers with EIGRP enabled on their interfaces exchange only partial information with their neighbors, as OSPF does. But EIGRP routers don’t maintain the whole topology. On that matters they behave more like RIP. Each router holds information about networks and next hop routers to reach them. But unlike RIP, for each network EIGRP finds primary and secondary (if possible) routes. So that in case of link failure router could immediately switch to the backup route. In EIGRP terminology main route is called successor route and alternative route is feasible successor route.

Also, EIGRP has more sophisticated metric calculation. It considers not only bandwidth, but also delay. The formula is:

metric  = (10^7 / least-bandwidth + cumulative-delay) * 256

Here least-bandwidth is the slowest link speed in kbps along the path and cumulative-delay is sum of all delays from the network to the router in tens of microseconds.

To understand how EIGRP preventsloops there is a need for another two terms. Feasible Distance (FD) is a metric of the best route to reach a subnet, as calculated on a router. And Reported Distance (RD) is a metric as calculated on a neighboring router and then reported and learned in an EIGRP update. The trick here is that route can be a feasible successor route only if its RD is less than FD. It guarantees that this route doesn’t go through this router. Because otherwise it would obviously be greater than FD.

Again, EIGRP is better IGP from all perspectives. The only barrier that restricts its proliferation is proprietary nature of the protocol.

OSPF comparison with RIP

August 19, 2012

Problems with RIP

RIP is a very basic routing protocol with slow convergence time and primitive best route computation based on the number of hops. Router configured to use RIP, sends route updates to its neighbors every 30 seconds. If you have many routers in your network, which is quite common with modern Layer 2/3 switches, then each time you reconfigure routes, changes propagate for unacceptable amount of time. In worst case each router waits for 30 seconds to send an update to the next router in a chain. Network failures make things even worse. Router considers link as failed if it doesn’t receive updates from it for 180 seconds. Then RIP uses a number of loop avoidance techniques to advertise the failed route. For the end user it means network is unreachable for ages in networking terms. More or less critical infrastructures cannot tolerate such delays. Additionally, RIP calculates best route depending on the hop count to the network and doesn’t account for link speeds, which sometimes becomes inappropriate.

OSPF Solution

Open Shortest Path First (OSPF) protocol was developed to solve RIP’s problems. Neighbor routers in OSPF send topology changes to each other immediately. It became achievable because OSPF sends only changes, not all routes as RIP does. In OSPF routers maintain a so called Link-State Database (LSDB), which contains Link-State Advertisements (LSA). In fact, LSDB doesn’t contain routes themselves, but topology. LSA is either a link record, which has information about a subnet and routers connected to it, or router record which contains information on router’s IPs and masks. Each link in OSPF has a metric. Metrics are weighted based on link speeds. Then OSPF needs to calculate shortest paths and fill routing table. Dijkstra Shortest Path First (SPF) algorithm is applied to LSDB to find best routes.

Link failures is another story. Link failure timer in OSPF is 40 seconds, in comparison to 180 for RIP. But the main issue is that there are a number of routing loop problems inherent to RIP. On link failures RIP uses loop avoidance features, such as “split horizon”, “route poisoning”, “poison reverse”, as well as holddown timer, which take considerable amount of time for RIP to converge. In OSPF routers avoid loops by first asking its neighbors if they lack any LSAs. If router has all LSAs in its LSDB, neighbors do not exchange any information. This allows OSPF to converge much more quickly.

Routing Basics

August 6, 2012

Interfaces and Default routes

Routers use Layer 3 IP addressing when deciding where packets should go to. Hence each router interface should have an IP address, otherwise interface won’t be used at all. You simply go:

configure terminal
interface Fa0/0
ip address 10.1.1.1 255.255.255.0

Now router knows about 10.1.1.0/24 corporate network (it’s called “connected route”) and route packets destined to it through Fa0/0 interface. It could be a number of switches behind Fa0/0.

From the opposite site router is usually connected to the Internet (links between routers are usually /30 networks with 2 useable addresses):

configure terminal
interface Fa0/1
ip address 172.16.3.2 255.255.255.252

To tell the router that Fa0/1 is the outside interface where packets to all other networks go, you configure a default route (which is defined as route to network 0.0.0.0):

ip route 0.0.0.0 0.0.0.0 172.16.3.2

Static routes and RIP

Now the reasonable question here is what if we have several networks/routers behind the border router. How will they know about each other’s networks?

One answer is static routes. You can tell router1 that router2 has network2 behind it by adding a static route to the network2 on the router1:

ip route 10.1.2.0 255.255.255.0 10.1.128.254

Here routers are connected using network 10.1.128.252/30 and router2 has network 10.1.2.0/24 behind it. 10.1.128.254 is the router2 ip address (next hop) where router1 should send packets for network 10.1.2.0. If you have many networks in organization, then static routes are obviously not a solution. It’s nearly impossible to configure all routers with static routes to all networks. That is where routing protocols come into picture.

The most primitive routing protocol which is common in LANs is Routing Information Protocol or simply RIP. Using RIP all routers exchange information about routes they know. As a result of RIP convergence all routers know about all networks which exist in corporate LAN. RIP is not meant to be used in WANs due to excessive amount of traffic. Each router sends RIP updates in 30 seconds. Since receiving router in its turn forwards this update to all its interfaces, it would simply paralyze the Internet. To enable RIP updates do the following:

configure terminal
router rip
version 2
network 199.1.1.0
network 10.0.0.0

This tells router to send RIP updates about all its networks on interfaces where networks 199.1.1.0 and 10.0.0.0 are configured.

RIP updates propagate as a broadcast storm. So if router has redundant links, it can receive RIP information about the same network from several interfaces. RIP uses distance in that case. Each time packet comes to a router, link with the shortest path is used to forward it.