OSPF for IPv6 Networks (OSPFv3)

In much the same way that a new version of RIP has been defined for use on IPv6 networks, a new version of OSPF is in the works as well. Referred to as either OSPF for IPv6 or OSPF version 3, this new version is fundamentally very similar to the IPv4 version of the protocol, but which a few changes. The most basic of these is the fact that the addressing portions of an LSA packet have been changed to use IPv6 addresses and prefixes, as you may well have guessed. Other major changes include OSPF running on a per-interface rather than a per-subnet basis, and the removal of all authentication functions from the protocol. The IPv6 authentication header now handles all authentication responsibilities instead.

OSPF version 3 is still only a proposed standard going through the RFC process. However, all signs point to it soon becoming the standard for running OSPF on IPv6 networks.

Open Shortest Path First (OSPF) Routing

OSPF is a scalable, industry standard link state protocol used on IP networks and defined in RFC 2328. Because link state protocols build and maintain a topology database for a network based on first-hand knowledge rather than simply relying on the “hearsay” of neighbors, they tend to be more efficient in determining the most efficient route to a network. OSPF uses what is known as the Dijkstra algorithm to determine the shortest path between a router and a destination network. The metric used by OSPF to determine the best route to a network is interface cost, which is calculated based on bandwidth. For those interested, the actual calculation is 108 divided by the interface bandwidth in bits per second, which you might remember can be found using the show interface command. For example, the cost associated with a T1 line would be 108/1544000, which equals 64.

Like RIPv2, OSPF is also classless, meaning that it supports the use of VLSM addressing. OSPF routers exchange information by flooding link state advertisement (LSA) packets throughout a network. These packets include information on the current state of the router’s links, interfaces, and cost. Ultimately, this information is used by an OSPF router to build its adjacency, topology, and routing tables. Every 10 seconds, on a broadcast network, an OSPF router also sends out a “hello” message, letting adjacent routers know that it is still around.

While a simple distance vector protocol like RIP or IGRP may require little more than being enabled in order to make routing decisions, an OSPF implementation is usually designed according to a hierarchy, where different routers are given different roles. A proper OSPF design also helps to ensure that those LSA packets just mentioned don’t overwhelm routers. Instead, an OSPF network is divided into what are known as areas, with a group of areas forming what is known as an OSPF autonomous system (AS). The figure below shows a network made up of 4 areas, all within autonomous system 100.

OSPF autonomous system including multiple areas, IRs, ABRs, and an ASBR.

It’s easy to get confused by OSPF terms when learning them for the first time. The bullet points below outline all of the key terms that you should be familiar with

Area. An OSPF area is nothing more than a grouping of routers (running OSPF) amongst whom link state advertisements will be flooded. The idea is to try to reduce the number of LSAs that are sent throughout an internetwork by keeping the majority of LSAs within an area.

Backbone Area. The backbone area should be the first area defined in an OSPF network, and is the area to which all other areas usually connect. The backbone area is known as Area 0. The backbone area is used to move OSPF routing information between areas.

Autonomous System. An OSPF autonomous system is nothing more than a collection of OSPF areas amongst which OSPF routing information is shared. An autonomous system is assigned a number, similar to the one we used when looking at IGRP.

External Network. Any networks running other routing protocols, or other OSPF autonomous systems, are considered external networks.

Routers within an Area exchange LSAs with one another to build their link state databases. All OSPF routers in the same area have the same link state database. The LSAs flooded within an area are known as Type 1 or router LSAs – they contain information on the links, interfaces, and costs for routers within an area. Any router whose interfaces only connect to a single area is known as an Internal Router (IR).

How EIGRP Routing Works

EIGRP operates through the use of four key technologies:

Neighbor Discovery. Similar to link state protocols, EIGRP routers also periodically send out “hello” packets, letting neighboring routers know that they are functioning and available. On a LAN or point-to-point links, these message are sent out as multicasts every 5 seconds. On a multipoint network (like Frame Relay) with speeds lower than T1, these packets are unicast every 60 seconds. As long as these “hello” packets are received, an EIGRP router assumes that its neighbors are available for the purpose of exchanging routing table information. If three “hello” periods pass without receiving a “hello” message, a router will consider its neighbor unavailable and make the necessary routing table changes. On a LAN, this can happen in as little as 15 seconds (3 times the “hello” message interval).

Reliable Transport Protocol. The Reliable Transport Protocol is responsible for ensuring that EIGRP updates actually reach neighboring routers, in the correct order. EIGRP updates are sent out as multicasts to address 224.0.0.10. When a neighboring router receives an update, RTP requires that an acknowledgement be sent. This is different than many routing protocols, which send update traffic in a connectionless manner.

Diffusing Update Algorithm. DUAL is the protocol used by EIGRP to ensure fast convergence and that the most efficient loop-free route advertised by neighbors is the one added to a router’s routing table. DUAL uses the lowest calculated metric to determine the best path to a destination, referred to as the feasible distance. Routers that advertise a lower metric to the destination than the feasible distance are known as feasible successors, and are ultimately used as the next hop router to which packets will be sent. When a topology change occurs, an EIGRP router will use the route provided by the next most feasible successor as the next hop. In cases where all metrics are higher than the feasible distance, the EIGRP router must recompute the route.

Protocol-Dependent Modules. Because it is capable of routing multiple protocols (IP, IPX, and AppleTalk), EIGRP implements what are known as protocol-dependent modules. For example, the IP EIGRP module will automatically redistribute IGRP routes into EIGRP and vice versa. Similarly, AppleTalk EIGRP will redistribute routes into and out of AppleTalk RTMP.

EIGRP offers greater flexibility, reliability, and better convergence times than a traditional distance-vector protocol. One limiting factor is that EIGRP is proprietary to Cisco – as such, EIGRP is limited to networks running Cisco equipment.

Introduction to EIGRP

While IGRP might be a better solution than RIP when it comes to scalability, EIGRP takes things many steps further. First of all, EIGRP is classless, meaning that it supports the use of VLSM. Unlike IGRP, EIGRP supports the routing of multiple protocols, including IP, AppleTalk, and IPX. EIGRP is usually described as a hybrid protocol, meaning that it displays characteristics of both a distance vector and link state protocol.

EIGRP uses the same metrics as IGRP in making its routing decisions – bandwidth, delay, reliability, load, and MTU. The default metrics used are again the same, bandwidth and delay. However, for a more granular level of control, EIGRP multiplies each of the metrics by 256 before performing the calculation of the composite metric. EIGRP was designed to make much better use of bandwidth, and to allow routers to have a much better awareness of neighboring routers.

Instead of sending its entire routing table out at regular intervals, an EIGRP router instead sends out only partial updates, and even then, only when a route changes. Obviously this makes better use of the available network bandwidth. An EIGRP router also has a more complete view of the network than a typical distance vector protocol – it not only maintains its own routing table, but also keeps a copy of the routing tables of neighboring routers. When an EIGRP router cannot find a route to a network based on all the information it currently has, it sends out a query to other routers, which is propagated until a route is found.

RIP for IPv6 (RIPng)

Although RIPv2 represents a significant improvement over the original version, RIPv2 is still a routing protocol used for IPv4 networks only. Because of this, a new version of RIP, referred to as RIPng or RIP version 3 has been developed in order to support this popular distance vector routing protocol on IPv6 networks. In case you’re curious, the “ng” in RIPng stands for “next generation”.

RIPng functions in a manner almost identical to RIPv2, though with a couple of key differences. The first is that instead of using IPv4 addresses in its update messages, RIPng uses IPv6 addresses and prefixes. The second change is that when a RIPng router needs to communicate with other RIPng routers, it uses a special multicast address (FF02::9) as the destination address.

As of this writing, RIPng was still not a finalized Internet standard. It is currently a proposed standard in the RFC process, but Cisco already supports the protocol in their IPv6 IOS images.

Routing Information Protocol Version 2 (RIPv2)

RIPv2 is the newer, enhanced version of the RIP routing protocol, and is specified in RFC 1723. In many ways, this newer version is still very similar to its predecessor – it is still a distance vector protocol that uses hop count as its metric (the hop count limit is still 15), and still has a default administrative distance of 120. However, version 2 also introduces a number of features not found in the original version. Firstly, RIPv2 is classless; this means that it can be used on networks that employ variable-length subnet masking (VLSM). This is possible because RIPv2 includes the subnet mask associated with a destination network in its routing table updates. Where routing table updates were broadcast in RIP version 1, RIPv2 instead uses multicasts to send updates – specifically, a router will send updates to the multicast address 224.0.0.9.

RIPv2 is also capable of employing authentication between neighboring routers. This is another feature not found in the original version. You may be asking why authentication might be an issue when it comes to routing table updates. Remember that a RIPv1 update was no more than a broadcast, and that routers completely trust the information provided by neighbors. Now, imagine how easy it would be to anyone to set up another RIP router on a network (even versions of Windows can be configured as a RIP router), and begin broadcasting all sorts of incorrect routing table information! It certainly wouldn’t take long to really mess up those RIP routing tables. With RIP version 2, authentication can be enabled on any router interface using either plain text or MD5 authentication. If authentication is enabled, a router will only accept updates from routers whose updates contain the correct authentication string.

Routing IPX

For the purpose of both the CCNA and CCDA, you’ll also need to be familiar with routing IPX traffic across an internetwork. Recall from Chapter 7 that IPX functionality is enabled on a router through the use of the ipx routing command. After issuing this command, you can assign IPX addresses to interfaces by providing a network number, and optionally (on Ethernet, Token Ring, or FDDI interfaces) specifying an encapsulation type.

Setting up IPX routing is exceptionally simple. What I didn’t tell you in the last chapter is that after issuing the ipx routing command, your router is already running an IPX routing protocol – IPX RIP. Though much like the RIP protocol looked at previously, IPX RIP and IP RIP are not compatible – they are different routing protocols, even if they exhibit similar characteristics. For example, both define infinity as 16 hops, meaning that the maximum diameter of an IPX network running IPX RIP is 15 hops. IPX RIP update packets are broadcast every 60 seconds by default.

One major difference between the IP and IPX versions of RIP is the metric used. IPX RIP uses something referred to as a “tick” as its metric. A tick is the expected delay in reaching a network, and is defined as 1/18th of a second. In cases where the tick count between two networks is equal, hop count is used as the tiebreaker.

Figure: IPX network configuration.

For the purpose of illustrating IPX routing, we’re going to configure our routers as per the figure above. In this scenario we have two routers and three networks. The steps below outline the configuration of Router A.

RouterA#config t
Enter configuration commands, one per line. End with CNTL/Z.
RouterA(config)#ipx routing
RouterA(config)#int s0
RouterA(config-if)#ipx network 99
RouterA(config-if)#int e0
RouterA(config-if)#ipx network 102A

The configuration of Router B is similar:

RouterB#config t
Enter configuration commands, one per line. End with CNTL/Z.
RouterB(config)#ipx routing
RouterB(config)#int s0
RouterB(config-if)#ipx network 99
RouterB(config-if)#int e0
RouterB(config-if)#ipx network 101A

With only the few steps shown, we have enabled IPX on the routers, given the appropriate interfaces IPX addresses, and even enabled IPX RIP routing – recall that it is enabled automatically as part of the ipx routing command. The next step is taking a look at our IPX routing tables. This is done using the show ipx route command, which is shown on

Router A below.
RouterA#sh ipx route
Codes: C - Connected primary network, c - Connected secondary network
S - Static, F - Floating static, L - Local (internal), W - IPXWAN
R - RIP, E - EIGRP, N - NLSP, X - External, A - Aggregate
s - seconds, u - uses, U - Per-user static
3 Total IPX routes. Up to 1 parallel paths and 16 hops allowed.
No default route known.
C 99 (HDLC), Se0
C 102A (NOVELL-ETHER), Et0
R 101A [07/01] via 99.0060.5cc4.f41b, 13s, Se0

Notice that an IPX routing table has a slightly different format, but still displays similar information to an IP routing table. It shows that networks 99 and 102A are directly connected, and also shows a route to network 101A via IPX address 99.0060.5cc4.f41b, which is the S0 interface on Router B. To check and see whether Router A can route all the way to network 101A properly, we can use an IPX ping, specifying the IPX address of interface E0 on Router B.

Router#ping ipx 101a.0060.5cc4.f88b
Type escape sequence to abort.
Sending 5, 100-byte IPXcisco Echoes to 101a.0060.5cc4.f88b, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/35/36 ms

Since our IPX ping worked, Router A and Router B are both configured with complete information about the IPX internetwork.

Default Routing

In the same way that you can set a default gateway on your desktops and servers, you can also set a default gateway of sorts on your Cisco router – the gateway of last resort. While the name is different, the function is the same. Remember that when a router comes across a packet destined for an unknown network, it automatically drops the packet. If we specify a gateway of last resort, a router will forward traffic for networks that it doesn’t know about to the destination router address we specify.

Figure: Router B configured with a default route, also known as a gateway of last resort.

Consider the figure above, in which Router A is connected to many different networks. Router B, on the other hand, is only connected to two networks. In order to allow Router B to get to all of the other networks shown, we would either need to configure a routing protocol (like RIP or IGRP), or define static routes to each network. In this particular scenario, it might actually be easier to use default routing to allow Router B to reach those three networks. Remember that Router B already knows about networks 10.0.40.0/24 and 10.0.50.0/24, since they are directly connected. In order to have Router B forward all traffic destined for other networks to Router A, we should configure a gateway of last resort on Router B. This involves a single routing table entry, with a destination network of 0.0.0.0. If you recall from Chapter 5, this address literally means “all networks”. In other words, we are saying that all other networks can be reached via Router A. When Router B attempts to route packets, it will first look in its routing table for the destination network. If it doesn’t find an entry, it will forward packets to the default route specified.

To configure the gateway of last resort on Router B, use the ip route command, as shown below.

RouterB(config)#ip route 0.0.0.0 0.0.0.0 10.0.40.1
RouterB(config)#^Z
RouterB#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
U - per-user static route, o - ODR
Gateway of last resort is 10.0.20.1 to network 0.0.0.0
10.0.0.0/24 is subnetted, 2 subnets
C 10.0.50.0 is directly connected, Ethernet0
C 10.0.40.0 is directly connected, Serial0
S* 0.0.0.0/0 [1/0] via 10.0.40.1

Notice that the static route entry used 0.0.0.0 for both the destination IP address and subnet mask, followed by the address of the next hop router. In this case, all traffic not destined for networks 10.0.50.0/24 and 10.0.40.0/24 will be forwarded to 10.0.40.1, interface S0 on Router A. The default route also appears in our routing tables as both the gateway of last result and as a static route. In this scenario, Router A would still need a routing table entry that defines how to reach network 10.0.50.0/24.

Default routes are commonly used when you are routing public IP addresses to the Internet. If you didn’t define a default route, you would literally need to define a next hop address for every network on the Internet!

Monitoring IGRP

Information about IGRP messages can be obtained with the debug ip igrp command. Unlike RIP, the command requires additional information. Two types of debugging information are available for IGRP – information about IGRP events, and information about IGRP transactions. The debug ip igrp events command provides summary information about the IGRP updates being sent and received, as well as the number of routes that the update contains. The debug ip igrp transaction command actually shows the routes included in the update.

RouterA#debug ip igrp events
IGRP event debugging is on
23:18:27: IGRP: received update from 10.0.20.2 on Serial0
23:18:27: IGRP: Update contains 1 interior, 0 system, and 0 exterior routes.
23:18:27: IGRP: Total routes in update: 1
23:19:24: IGRP: sending update to 255.255.255.255 via Ethernet0 (10.0.10.1)
23:19:24: IGRP: Update contains 2 interior, 0 system, and 0 exterior routes.
23:19:24: IGRP: Total routes in update: 2
RouterA#no debug ip igrp events
IGRP event debugging is off
RouterA#debug ip igrp transactions
IGRP protocol debugging is on
23:37:20: IGRP: sending update to 255.255.255.255 via Ethernet0 (10.0.10.1)
23:37:20: subnet 10.0.30.0, metric=8576
23:37:20: subnet 10.0.20.0, metric=8476
23:37:20: IGRP: sending update to 255.255.255.255 via Serial0 (10.0.20.1)
23:37:20: subnet 10.0.30.0, metric=1100
23:38:39: IGRP: received update from 10.0.20.2 on Serial0
23:38:39: subnet 10.0.30.0, metric 8576 (neighbor 1100)
RouterA#no debug ip igrp transactions
IGRP protocol debugging is off

To get a quick overview on the status of the IP routing protocols running on your system, use the show ip protocols command. Notice that for Router A, we are presented with information about both of our configured protocols, RIP and IGRP.

RouterA#sh ip protocols
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 6 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is
Incoming update filter list for all interfaces is
Redistributing: rip
Default version control: send version 1, receive any version
Interface Send Recv Key-chain
Ethernet0 1 1 2
Serial0 1 1 2
Routing for Networks:
10.0.0.0
Routing Information Sources:
Gateway Distance Last Update
10.0.20.2 120 00:00:06
Distance: (default is 120)
Routing Protocol is "igrp 100"
Sending updates every 90 seconds, next due in 33 seconds
Invalid after 270 seconds, hold down 280, flushed after 630
Outgoing update filter list for all interfaces is
Incoming update filter list for all interfaces is
Default networks flagged in outgoing updates
Default networks accepted from incoming updates
IGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
IGRP maximum hopcount 100
IGRP maximum metric variance 1
Redistributing: igrp 100
Routing for Networks:
10.0.0.0
Routing Information Sources:
Gateway Distance Last Update
10.0.20.2 100 00:01:07
Distance: (default is 100)

Configuring IGRP

The configuration of IGRP is only slightly different than that of RIP. The major difference is that IGRP routers are made part of what is known as an autonomous system (AS), a grouping that defines routers that should exchange routing tables. For example, if a router is made part of AS 100, it will only exchange IGRP routing information with other routers that are part of IGRP AS 100. Many IGRP autonomous systems can be defined within an internetwork, allowing you a more granular level of control over which routers exchange routing table information with one another.

Similar to RIP, you must also specify the networks to be included in IGRP updates. In this configuration, we are going to add IGRP AS 100 to our existing RIP network. This will also help to show what happens when two routing protocols are used on the same network. To review the network, look back at Figure 16. To add IGRP routing, use the router igrp command, followed by the autonomous system number.

RouterA#config t
Enter configuration commands, one per line. End with CNTL/Z.
RouterA(config)#router igrp 100
RouterA(config-router)#network 10.0.0.0

Of course, IGRP also needs to be enabled on Router B:

RouterB#config t
Enter configuration commands, one per line. End with CNTL/Z.
RouterB(config)#router igrp 100
RouterB(config-router)#network 10.0.0.0

A look at the routing table on Router A shows that that network 10.0.30.0 has been added, but via IGRP instead of RIP.

RouterA#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
U - per-user static route, o - ODR
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 3 subnets
C 10.0.10.0 is directly connected, Ethernet0
I 10.0.30.0 [100/8576] via 10.0.20.2, 00:00:01, Serial0
C 10.0.20.0 is directly connected, Serial0

Notice that the listing for network 10.0.30.0 begins with an I, which designates that the route was found using IGRP. The RIP route is no longer available. How does this happen? This is due to that fact that IGRP has a lower administrative distance than RIP. In cases where a route is found by a protocol with a lower administrative distance, the routing table will only show the more trustworthy route. In this case, both RIP and IGRP are announcing the same route, but IGRP’s administrative distance of 100 beats RIP’s administrative distance of 120. The administrative distance and composite metric are both listed in the entry as well – [100/8576], where 8576 is the composite metric.

Like RIP, IGRP is also capable of load balancing over up to 6 links, including links with uneven costs.