Chapter 6
Routing Issues
From Millions to Thousands of Networks
Using CIDR Addresses Inside Your Network
OSPF Implementation Recommendations
This chapter will discuss the purpose of routing and the many issues that arise from routing in various network environments, from smaller networks to very large, complicated, dynamic networks such as the Internet. We will introduce the many routing protocols, such as the Routing Information Protocol (RIP), Open Shortest Path First (OSPF), and Border Gateway Protocol (BGP), and discuss the characteristics and issues involved with each. Each routing protocol has its own set of strengths and weaknesses that you will need to assess in order to understand how to implement this protocol. You will also see how these routing protocols are addressing the issue of the exhaustion of available IP addresses, the introduction of the IPv6 protocol, and the concern for growing routing tables on major routers on the Internet.
Solutions in this chapter:
· Introduction to routing protocols
· Supernetting with Classless Interdomain Routing (CIDR)
· Internal Routing with Interior Gateway Routing Protocol (IGRP) and Enhanced Interior Gateway Routing Protocol (EIGRP)
· Understanding the history of the Routing Information Protocol (RIP) and RIP-2
· Implementing the Open Shortest Path First (OSPF) routing protocol
· External network routing with Exterior Gateway Protocol (EGP) and Border Gateway Protocol (BGP)
As most of you know, the rate of growth on the Internet is phenomenal, and usage has increased nearly exponentially. Networks and hosts are being added to the Internet, which threatens to eat up every available IP address unless something is done. Not only is the exhaustion of available IP addresses an important issue, we also have to deal with the tremendous amount of routing that takes place on the Internet. Routers are network devices used to route packets to different networks on the Internet. The Internet is composed of hundreds of thousands of different networks. Routers use a routing table, which is an internal table that contains routes to networks and other routers. In most routers found on the Internet, these routes are learned dynamically by the use of a dynamic routing protocol such as RIP, IGRP, OSPF, and BGP, to name a few. Routers share information with each other concerning the availability of paths and the shortest distance to a destination. In the past, the routing tables have been growing as fast as the Internet; however, technology has not been able to keep pace. The number of routes advertised has doubled every 10 months. It was estimated that there were around 2000 routes on the Internet in 1990, and two years later there were 8500 routes. In 1995 there were over 29,000 routes, which required around 10MB of memory for the router. A router requires a significant amount of RAM and CPU in order to add, modify, delete, and advertise these routing tables with other routers. The routing tables have been growing at a slower rate, and we now have about 65,000 routes.
With the advent of Classless Interdomain Routing, we have been able to limit significantly the growth of these routing tables, making them more manageable and efficient.
Classless Interdomain Routing (CIDR, pronounced as apple “cider”) was developed when the world was faced with the exhaustion of Class B address space and the explosion of routing between tons of Class C addresses. CIDR allows for a more efficient allocation of IP addresses than the old Class A, B, and C address scheme. This old scheme is often referred to as “classful” addressing, whereas CIDR is referred to as “classless” addressing, as illustrated in Figure 6.1.
Figure 6.1 The prefix length of a classless address.
Another term for CIDR supernetting is prefix-based addressing. As you can see in Figure 6.1, it looks very similar to custom subnet masking, where the boundary between the network ID and host ID is not fixed.
You will learn later in this section just how this supernetting is possible. If you are familiar with TCP/IP subnet masking, you will have no problems understanding the concept of supernetting and classless addressing. Both concepts involve “masking” a portion of the IP address to reveal a network address. CIDR extended the successful ideas of TCP/IP subnetting.
Some say that if it weren’t for the advent of CIDR, the Internet would not be functioning today. That is a testament to the power of CIDR, and the need of CIDR for networking supernetting. CIDR is the best hope we have for smoothing the transition from Ipv4 to Ipv6.
The IETF wrote the standard for CIDR in the early 1990s, and it is described in RFC 1517 through RFC 1520. CIDR has a primary requirement for using a routing protocol, such as RIP version 2, OSPF version 2, and BGP version 4.
CIDR helps the Internet reduce the routing overload by minimizing routing tables and making sure the most important routes are carried by most routers, making the path to sites much quicker. These routing tables are global, and contain information for routes across the planet, so you can begin to see how large these routing tables can get. The routing tables are dangerously close to a level where current software, hardware, and people can no longer effectively manage.
CIDR is very similar to subnetting, but actually is a more advanced method of subnetting that can combine networks into supernets; subnetting, on the other hand, involves breaking networks into smaller, more manageable subnets. This is accomplished through the use of the subnet mask, which masks a portion of the IP address to differentiate the network ID from the host ID. With CIDR, you basically eliminate the concept of Class A, B, and C networks, and replace them with a generalized IP prefix consisting of an IP address and the mask length. For example, a single class C address would appear as 195.129.1.0/24, in which /24 refers to the number of bits of the network portion of the IP address.
With the traditional Class A, B, and C addressing scheme, the addresses were identified by converting the first eight bits of the address to their decimal equivalent. Table 6.1 shows the breakdown of the three address classes, and how many bits appear in the host ID and the network ID.
Address Class |
# Network Bits |
# Hosts Bits |
Decimal Address Range |
Class A |
8 bits |
24 bits |
1–126 |
Class B |
16 bits |
16 bits |
128–191 |
Class C |
24 bits |
8 bits |
192–223 |
Table 6.1 The Familiar Delineations of the IP Address Classes
Using the old Class A, B, and C addressing scheme, the Internet could support the following:
· 126 Class A networks that could include up to 16,777,214 hosts each
· 65,000 Class B networks that could include up to 65,534 hosts each
· Over 2 million Class C networks that could include up to 254 hosts each
As you can see, there are only three classes; every company or organization will have to choose the class that best supports their needs. Since it is nearly impossible to receive a Class A or B address, you would be stuck with a Class C address, which may or may not be suitable for your needs. If you were assigned one Class C address, and you only needed 10 addresses, you would be wasting 244 addresses. This results in what appears to be a condition of running out of addresses; however, the problem stems more from the inefficient use of the addresses. CIDR was developed to be a much more efficient method of assigning addresses.
A CIDR supernet consists of numerous contiguous IP addresses. An ISP can assign their customers blocks of contiguous addresses to define the supernets. Each supernet has a unique supernet address that consists of the upper bits that are shared between all IP addresses in the supernet. For example, the following group of addresses are all contiguous (198.113.0.0 through 198.113.7.0 in decimal notation).
11000110 01110001 00000 000 00000000
11000110 01110001 00000 001 00000000
11000110 01110001 00000 010 00000000
11000110 01110001 00000 011 00000000
11000110 01110001 00000 100 00000000
11000110 01110001 00000 101 00000000
11000110 01110001 00000 111 00000000
The supernet address for the block is 11000110 01110001 00000 (the 21 upper bits) because every address in the supernet has this in common. The complete supernet address consists of the address and the mask.
· The address is the first 32-bit address in the contiguous address block. In our case this would be 11000110 01110001 00000000 00000000 (198.113.0.0 in decimal notation).
· The mask is a 32-bit string, similar to the subnet mask, which contains a set bit in the supernet portion of the address. In our case this would be 11111111 11111111 11111000 00000000 (255.255.248.0 in decimal notation). The masked portion, however, contains the number of bits that are in the on position; in our case this would be 21.
The complete supernet address would be 198.113.0.0/21. The /21 indicates that the first 21 bits are used to identify the unique network, leaving the remaining bits to identify the specific host.
You can compare this to an office phone system where every phone number starts with a prefix such as 288 and ends with a unique four-digit combination. For example, your phone number is 288-1301, and Doug Fortune, the Human Resources supervisor, has a phone number of 288-2904. Most companies are set up so that you can dial the unique portion of the user’s phone number as a means of internal dialing. To contact Doug, you would just dial 2904, which is the unique portion of his full phone number. Continuing the example, 288, the prefix of the phone number, would be the supernet address. Isn’t it much easier to dial the person's four-digit extension rather than the entire seven-digit extension? Imagine if you had to dial the area code every time you made a local call. Also continuing the comparison, the area code resembles a supernet address for an area.
CIDR can then be used to employ a supernet address to represent multiple IP destinations. Rather than advertise a separate route for each of the members of the contiguous address space, the router can now advertise the supernet address as a single route, called an aggregate route. This aggregate route will represent all the destinations within the supernet address, thereby reducing the amount of information that needs to be contained in the routing tables of the routers. This may not seem like much of a reduction in the routing table, but multiply this by hundreds of routers on the Internet, and you can see the effect CIDR can have on the number of entries in the routing tables.
Table 6.2 shows how the CIDR block prefix is used to increase the number of groups of addresses that can be used, thereby offering a more efficient use of addressing than the Class A, B, or C method.
CIDR Block Prefix |
# Equivalent Class C |
# of Host Addresses |
/27 |
1/8th of a Class C |
32 hosts |
/26 |
1/4th of a Class C |
64 hosts |
/25 |
1/2 of a Class C |
128 hosts |
/24 |
1 Class C |
256 hosts |
/23 |
2 Class C |
512 hosts |
/22 |
4 Class C |
1,024 hosts |
/21 |
8 Class C |
2,048 hosts |
/20 |
16 Class C |
4,096 hosts |
/19 |
32 Class C |
8,192 hosts |
/18 |
64 Class C |
16,384 hosts |
/17 |
128 Class C |
32,768 hosts |
/16 |
256 Class C |
65,536 hosts |
|
(= 1 Class B) |
|
/15 |
512 Class C |
131,072 hosts |
/14 |
1,024 Class C |
262,144 hosts |
/13 |
2,048 Class C |
524,288 hosts |
Table 6.2 Characteristics of Each CIDR Block Prefix
At this time, the Internet is not completely CIDR-capable. Some older routers and other network devices must be upgraded to support CIDR, and compatible protocols must also be used. Non-CIDR-capable portions of the Internet can still function fine, but may be required to default towards the CIDR-capable parts of the Internet for routes that have been aggregated for nonnetwork boundaries. CIDR-capable forwarding is described as the ability of a router to maintain its forwarding table and to perform correct forwarding of IP packets without making any assumptions about the class of IP addresses.
The CIDR Applicability Statement composed in September of 1993 required Internet domains providing backbone and/or transit service to fully implement CIDR in order to ensure that the growth of the resources required by routers will provide Internet-wide connectivity. The Applicability Statement also recommended that all other nonbackbone and/or transit Internet domains also implement CIDR because it will reduce the amount of routing between these domains. At this time, individual domains are not required to implement CIDR. Individual domains are also not prohibited from using an addressing scheme that is not compliant with CIDR.
It is very important to note that CIDR does not attempt to solve the problem of eventual exhaustion of the 32-bit IP address space. CIDR can address the short- to midterm difficulties to allow the Internet time to continue functioning effectively while progress is made on the longer term solution of IP address exhaustion. With the development of CIDR around 1993, it was given at least three years as a viable solution until the deployment of the long-term solution, IPv6 (otherwise known as Ipng). The next generation of IP is a little behind schedule, but vendors are now making their devices compliant, and the buzz is starting to spread in the Internet community.
For IT Professionals Only
Upgrading the Routing Protocols
on your Network
If you are a network engineer or administrator for a company or organization with a fairly large network, you may be faced with a dilemma—migrating your routers to another routing protocol. [mb1]Chances are you are still using RIP, as most networks are. However, this routing protocol, as you will see in this chapter, is not the most capable protocol of the many routing protocols in existence. However, RIP may still function perfectly in your network, so you must determine whether you actually need to upgrade the routing protocol. As an IT professional in charge of your network, or contracting for another company’s network, you will have to know when, if ever, to make a network protocol migration. You will have to ask yourself several questions in order to gather enough information to make an informed decision:
· How long has this routing protocol been in use in our network?
· Has our network grown significantly in the past few years?
· Has the network been suffering from degradation when communicating with remote networks?
· Do we have goals for the network that may not be met with this current routing protocol?
· Are we eventually going to segment our network into logical areas?
These questions will help you determine whether you need to investigate the possibility of migrating your routing protocols to a more modern, robust routing protocol. Do not make an important decision such as choosing a routing protocol in haste. You can severely hinder your network if you do not implement the routing protocol correctly. Spend the time, research all the available protocols, and do your homework.
From Millions to Thousands of Networks
For engineers, the biggest push on the Internet today is to devise a plan to limit the huge growth in available networks on the Internet. We have learned in the previous section that the addition of so many networks on the Internet has severely hindered the ability to maintain effective routing tables for all the new networks that have been added. It was becoming more difficult to route packets to their destinations because the route to the destination was sometimes not included in the large routing tables maintained by these routing domains. This threat, much like a tornado warning, was due to touch down on the Internet before the dreaded exhaustion of IP addresses.
Now that CIDR has come to the rescue, the problem is to implement CIDR fast enough to consolidate these networks to minimize the number of entries in the routing tables. From the millions of networks out there, CIDR is able to consolidate contiguous IP addresses, known as supernetting, into fewer numbers of networks that contain more hosts. The only caveat with CIDR is that these must be contiguous Class C addresses. The authority for assigning IP addresses has assigned large contiguous blocks of IP addresses to large Internet Service Providers. These large ISPs assign a smaller subset of contiguous addresses from their block to other ISPs or large network customers, as illustrated in Figure 6.2.
Figure 6.2 Maintaining contiguous CIDR blocks while assigning addresses.
The bottom line is that the large ISP maintains a large block of contiguous addresses that it can report to a higher authority for CIDR address aggregation. With CIDR, the large ISP does not have to report every Class C address that it owns; it has to report the prefix that every Class C address has in common. These addresses are aggregated into a single supernetted address for routing purposes. In our example, the prefix is 198.113.201, which is what all IP addresses have in common. Instead of advertising six routes, we are advertising only one. That is a decrease of 83 percent. Imagine if every ISP were able to decrease the routes they advertise by this much. This can literally bring the number of networks from millions down to thousands. Not only does this decrease the number of networks, but it is a significant reduction in the number of routing table entries. By March of 1998, the number of global routing table entries was around 50,000. Without CIDR, it is speculated that the number of global routes would have been nearly twice that number. You can always count on the standards committees behind the scenes of the Internet to deliver effective solutions when adversity stares them in the face.
In the near future, organizations are likely to undergo changes that will affect their IP addresses. This can result from a variety of reasons, such as a change in Internet Service Provider, structural reorganization, physically moving equipment, and new strategic relationships. An IP address renumbering plan can result in easier future IP address management.
When moving from one ISP to another, and CIDR is being used, it will be required to return the addresses that were allocated to the organization from the ISP’s original CIDR block. These addresses belong to a single large block of address space allocated to their current ISP, which acts like an aggregator for these addresses. If your address is aggregated into your ISP’s larger address block, you can then be routed under their network address.
What if you leave Internet Service Providers and choose to take your IP addresses with you? This is a predicament for the original ISP who can no longer advertise the addresses as part of an aggregated CIDR block, because there is now a hole in the CIDR block (resulting from the loss of the IP addresses you took with you). CIDR can address this issue by requiring routers to accept multiple matches. When a duplicate routing match is found, the router will search for the route with the longest mask, which should be the most recent route. This is referred to as an exception to a CIDR block, and is used when a block of contiguous addresses cannot be used, like the example in which we defected from one ISP to another and took our addresses with us.
To contain the growth of this routing information, an organization should change these addresses, which involves renumbering their subnets and hosts. If the organization does not renumber, the consequences may include limited Internet-wide IP connectivity issues. ISPs sometimes have to change to a new and larger block of addresses, and this may affect the organization that currently has addresses that were allocated to them from the original CIDR block.
The easiest form of renumbering is with the use of dynamic addressing, such as Dynamic Host Configuration Protocol (DHCP). However, many servers and network devices such as routers have static addresses, which will hamper the renumbering process.
The most important aspect of the renumbering plan is centered around routing. Routing issues have become very important, due to the large growth of the Internet and the maintenance of large routing tables that accompany this growth. Since routers are a key component to connectivity, they are a large focus of the renumbering plan.
If you are not aggregated into your ISP’s larger address block, and you are a smaller organization, you are risking being dropped from the global routing tables. There is no governing force that has control over what addresses are added to the global routing tables; any ISP can manage their routing tables as they see fit. If you are a smaller network, you can still be included in global routing tables if your address is part of a larger CIDR address block.
Using CIDR Addresses Inside Your Network
The interior (intradomain) routing protocols that support CIDR are OSPF, RIP II, Integrated IS-IS, and EIGRP. If you are running one of these routing protocols in your internal network, you have the ability to use CIDR addresses inside your network. Most companies and organizations do not have internal networks large enough to require CIDR addressing. However, CIDR does provide more than just efficient addressing.
When implementing CIDR addressing in your internal network, you have the ability to create smaller subnets than those available with the current classful subnetting schemes. For example, in order to subnet your network using TCP/IP subnet with a custom subnet mask, the smallest subnet you have would still have 254 available hosts. With CIDR you can implement fractional aggregates, the ability to take a Class C address and assign fractions of it to customers or your internal subnets on your own network. ISPs are now using this technology to assign 64 and 32 block addresses to customers with small networks. This makes efficient use of available Class C addresses, because without CIDR, you would be wasting the remaining IP address in the Class C address that was not used. This is how you can combat IP address exhaustion within your own network, just like many people are trying to do on the Internet. Table 6.3 shows the fractional aggregates of a single Class C address.
CIDR Block Prefix |
# Equivalent Class C |
# of Host Addresses |
/27 |
1/8th of a Class C |
32 hosts |
/26 |
1/4th of a Class C |
64 hosts |
/25 |
1/2 of a Class C |
128 hosts |
/24 |
1 Class C |
256 hosts |
Table 6.3 Fractions of a Class C Address Made Possible by CIDR
With CIDR we now have the ability not only to use a full Class C address, but also to assign fractions of the Class C, such as ½th, ¼th, or 1/8th the number of available addresses.
NOTE
Two of the addresses in the Class C block are reserved for broadcasts, so our theoretical limit is 254 hosts.
As we mentioned earlier, you can also use this fractional Class C address for your internal network. The advantages of this are subnetting networks into logical groupings of computers and devices, isolating traffic, and therefore increasing network performance. You will have to use a CIDR-capable routing protocol, such as OSPF or RIP-2 on your network. This will make your network more complex and difficult to manage, but it will help you reap the benefits of subnetting that we described earlier.
The most important rule to remember with CIDR classless addressing is that subnets must be contiguous. A router cannot process subnet routes for networks to which it is not directly connected. The example in Figure 6.3 illustrates this rule more clearly.
Figure 6.3 An illegal CIDR configuration with disconnected networks.
If a router is to take part in the same classful network in order to interpret the prefix length, it must be connected directly to the network.
In Figure 6.3, the router is not a part of the contiguous network, so it has no way of knowing the prefix length that is being used. More specifically, Router1 and Router2 cannot advertise their routes to Router3 because Router3 is not a part of the 201.35.88 network. The only route that can be advertised to Router3 is 201.35.88. This poses a problem because Router3 has no indication of which direction to send a packet with the prefix of 201.35.88; it will undoubtedly send packets to the wrong network.
The problem with the network configuration shown in Figure 6.3 is that the 198.113.201 networks are not contiguous. If we configured a direction connection between Router1 and Router2, we would have a contiguous network, and could benefit from CIDR addressing. The addition of Router3 injects another classful network between the 198.113.201 networks, thus making it discontiguous.
The networking community began to realize the limitations of the RIP protocol (which we will see later in the chapter), and something had to be done. Many years ago, the Internet Engineering Task Force (IETF) had not yet formalized the specifications for OSPF, so Cisco had the option of waiting for the specifications, or continuing to develop their own protocol. They chose to implement their own protocol, which turned out to be Interior Gateway Routing Protocol (IGRP).
IGRP is a protocol that is designed to coordinate routing between a number of routers. There are a number of routing goals with Cisco’s IGRP protocol:
· Stable routing, even in a very large or complex network
· No routing loops should occur
· Fast response to changing network topology
· Low overhead, meaning IGRP should not use more bandwidth than it needs for its own use
· Splitting traffic among parallel routes when they are of equal desirability
· Taking into account error rates and levels of traffic on different paths
· The ability to handle multiple “types of services” with a single set of information.
IGRP is intended for use within internal networks, under the management of one organization.
IGRP is also commonly referred to as IGP (Interior Gateway Protocol). IGRP is intended for maintaining a very accurate representation of the internal network topology. Convergence is very important within internal networks, because the paths to networks must be quickly rerouted in the event a network link were to go down. This is not as important as external networks, because most change in network topology occurs within networks, such as the addition or removal of a broken link. External network links must be stable and consistent to avoid major disturbances from misconfigured or down links. EGRP also is more important with providing reasonable routes, rather than optimal routes. However, IGRP is very concerned with providing the optimal route when packets are being routed.
IGRP is a distance-vector protocol in which routers (often called gateways) exchange routing information only with adjacent routers. When the adjacent router receives the update, it will compare the information with its own routing table. Any new paths or destinations will be added. Paths in the adjacent router’s update will also be compared with existing paths to determine if the new route is more efficient than the route that currently exists in the routing table. If the new path is better, it will replace the existing one. This is the general procedure used in all distance-vector protocols.
The alternative to distance-vector routing is Shortest Path First (SPF) routing, which we will discuss in great detail in the section on Open Shortest Path First (OSPF). This is a link-state technology in which each router contains an identical database.
The routing information exchange contains a summary of information concerning the rest of the network. A collection of routers using IGRP completes the entire network topology, resulting in a distributed algorithm in which each router solves only a portion of the routing. Working together and exchanging routing information with only their adjacent routers, these routers can determine the best route a packet can take. In other words, no one router needs to maintain the information for the entire network.
IGRP goes beyond RIP when it comes to metrics. The added information in IGRP allows the router to make more intelligent choices with regards to the metric cost of one route over another. RIP had no way of choosing the route with the highest bandwidth when both routes had the same metric hop count. The new metrics introduced with IGRP include:
Topological delay time. The amount of time it would take a packet to reach its destination if the network was not busy. You can incur additional delays if there is network traffic on the network.
Bandwidth of the narrowest bandwidth segment of the path. The bandwidth in bits per second.
Channel occupancy of the path. Indicates how much of the bandwidth is currently in use. This number will change often as the network traffic increases and decreases.
Reliability of the path. Indicates the reliability of the path based on the number of packets that actually arrive at the destination, based on the number of packets that were originally sent.
IGRP calculates these factors with a complicated algorithm and determines the best route to take, indicated by the smallest metric value.
IGRP also has substantial stability features, such as Hold-downs, Split horizons, and Poison-reverse updates, which are described as follows:
Hold-downs. Used to prevent a regular update message from reinstating a route that may have gone bad in the past. When a network link goes down, the neighboring routers will detect the lack of regularly scheduled updates, and determine that this link is not functioning. Update messages will then begin to permeate the network regarding the fact this router is not functioning. If this convergence takes too long, it is possible that another router on the network will advertise that this router is still functioning normally. This device potentially is advertising incorrect routing information. A hold-down will tell the routers on the network to hold down any of the changes that may affect the routes for a period of time. The hold-down period is calculated to be just slightly greater than the period of time necessary to update the entire network with a routing change.
Split horizons. Used to avoid routing loops between two routers. It is never useful to send information about the route back in the direction from which the packet was sent. In Figure 6.4, Router1 will advertise a route to Network A, which it is directly connected. Router2 should never advertise this route back to Router1 because Router1 is closer to Network A. This will prevent routing loops between the two routers. For example, if the interface to Network A went down, Router2 may continue to inform Router1 that it can reach Network A through Router1 (which is itself). Router1 may be fooled into believing this route is correct, and a routing loop would then occur. (Remember that split horizons avoid only loops between two routers.)
Figure 6.4 Avoiding routing loops with split horizons.
Poison-reverse updates. Used to minimize loops between more than two routers. When the metric is increasing significantly, this may indicate a routing loop. A poison-reverse update is then sent to the router to place it into hold-down.
Another feature of IGRP stability is the use of timers and variables that contain time intervals. The timers include an update timer, an invalid timer, a hold-time period, a flush timer, and a sleep timer.
· The update timer will specify how frequently the update messages will be sent. The IGRP update timer default is every 90 seconds.
· The invalid timer will specify how long a router will wait if it is not receiving routing update messages before the route will be declared invalid. The IGRP invalid timer default is three times the update timer.
· The hold-time period (sometimes referred to as the hold-down period) will specify the amount of time for the hold-down period. The IGRP hold-time default is three times the update timer plus ten seconds.
· The flush timer will specify how much time should pass before a route is flushed from a routing table. The IGRP flush timer default is seven times the update period.
· The sleep timer is the amount of time that update messages will be postponed. The sleep value should be less than the update timer because the routing tables will never be synchronized if the sleep value is higher than the update timer.
EIGRP is an enhanced version of the IGRP routing protocol, and is continually evolving. EIGRP uses the same distance-vector-based routing that IGRP uses. What has improved is the convergence and operating efficiency. The main enhancement with EIGRP is the sophisticated Diffusing Update Algorithm (DUAL). This algorithm is significantly more advanced than the distance-vector algorithm used by RIP and previous versions of IGRP. The new algorithm was enhanced to decrease routing loops drastically.
Convergence is improved by implementing a new algorithm that enables all routers involved in a topology change to synchronize their internal routing tables at the same time.
EIGRP is now Network Layer protocol-independent, which means it can support other protocol suites. One of the downfalls of EIGRP is the fact that it is seen as a competitor to OSPF.
EIGRP can be implemented seamlessly within a network or IGRP routers. This makes it possible to benefit from the features of both protocols simultaneously, also providing an upgrade path for continual migration from IGRP to EIGRP. Another benefit of this coexistence is that you can strategically implement EIGRP in specific portions of your network.
Cisco defines the four basic components of EIGRP as follows:
Neighbor Discovery/Recovery. The process of dynamically learning the status of other routers on their directly attached networks. Routers must also continually poll their neighbors to determine if they are still functioning or reachable. This is achieved by sending Hello packets on a regular basis. Once these Hello packets are received, the routers can then continue to exchange route information.
Reliable Transport Protocol. Responsible for the guaranteed delivery of packets in the correct order. For efficiency, reliability is only provided when needed. This is accomplished by sending a multicast Hello packet to the neighbors that states the packet does not have to be acknowledged. As you know, the process of responding to acknowledgment requests is what consumes valuable bandwidth on a network, especially an Ethernet network with a very broadcast-intensive protocol. Every packet must be captured and analyzed by the network adapters to determine if the packet is destined for them. This can be very CPU-intensive as well.
DUAL Finite State Machine. The decision process for route computations. It is responsible for tracking routes that are advertised by all neighbors. The metric hop count is the distance information used to create loop-free paths. The routes are selected based on feasible successors. A feasible successor will be discussed later in this section.
Protocol Dependent Modules. Responsible for sending and receiving EIGRP packets that are encapsulated in a protocol, such as IP. This module has support for more protocols.
This section describes the concepts for Cisco’s EIGRP implementation.
Neighbor table. A table in which each router keeps track of neighboring (adjacent) routers. When a new neighbor is learned, the address and interface is recorded into the routing database.
Topology table. A table that is populated with protocol-dependant modules containing all destinations advertised by the neighboring routers. Each entry also contains the destination address and list of neighbors that have advertised this particular destination. The table also contains the metric associated with this destination. The is the best metric the router uses and places in the routing table, which is then used for routing and for advertising this route to other routers.
Feasible successors. An entry that is moved from the Topology table to the Neighbor table when there is a feasible successor. The neighbors that have an advertised metric route that is less than the current routing table metric are considered feasible successors. Feasible successors are routers that are downstream neighbors to the neighboring router, not this particular router. It is the neighbor’s neighbor. When a neighbor has changed its metric, or a topology change occurs on the network, the list of feasible successors will have to be recomputed.
Route states. The route can be only one of two states: passive or active. A route is considered passive when the router is not performing a route recomputation. The route is considered active when a router is performing route computation.
Routing Information Protocol (RIP), the distance-vector Interior Gateway Routing Protocol that we discussed in the previous section, is used by routers to route packets to remote networks. There are a few differences between RIP and IGRP that we will discuss later in this section.
The RIP protocol is an interior routing protocol, and the most popular of the interior routing protocols. The RIP protocol is based on a 1970s design, and emerged for TCP/IP in the early 1980s. With the rapid advancements in technology, you can see how technology has exceeded the capabilities of the RIP protocol. RIP has changed very little since its emergence, and therefore has some limitations in larger, more complex networks. Some of these limitations have been addressed by the newer RIP-2 protocol specification. Limitations of RIP-1 include the following:
· RIP cannot support an internal network with more than 15 hops within the same network. A router counts the hops a packet makes as it crosses other routers on the way to its destination.
· RIP cannot support variable-length subnet masking. Subnetting is very popular in TCP/IP-based networks, and the RIP protocol is subject to restrictions in this type of network. Another term for this is Variable Length Subnet Masks (VLSM), which RIP does not support.
· RIP will broadcast updates about every 30 seconds. Bandwidth can be consumed if the router has a large routing table, or the network is very large with slow links.
· RIP has limited security. It is possible to obtain an unauthorized list of routes from other neighboring routers, and it may be possible for a hacker to inject false routes on the network.
· Routing problems are difficult to diagnose in RIP. · RIP has a slower convergence time than OSPF. RIP routers have a period of hold-down, garbage collection, and will slowly time-out information during the convergence process. This is not acceptable in some large networks and could possibly cause routing inconsistencies.
· RIP has no concept of slow links or network delays. Routing decisions are only made by metrics hop counts. The path with the lowest hop count is the most efficient, which may not be the best method because this does not take into account the speed of some of these network links.
· RIP networks are not hierarchical, and have no concept of areas, domains, and autonomous systems.
· RIP does not support classless routing, which has become increasingly popular and necessary on large networks and on the Internet.
Routers periodically will exchange routing tables with neighboring routers. Routers using the RIP protocol exchange their entire routing table, which can be inefficient. For this reason, routers are using more efficient routing protocols such as Open Shortest Path First (OSPF). Figure6.5 is an example of a typical routing table.
Figure 6.5 A sample RIP routing table.
Not everything about the RIP protocol is negative. Since it is one of the most widespread interior routing protocols, RIP can be supported almost anywhere. As many network technicians and engineers know, any protocol that is almost universal is a welcome addition because of the compatibility. Also, RIP is very easy to configure, which makes it very attractive because of the minimal amount of configuration required.
RIP classifies routers as passive and active. An active router will advertise its routes to other routers. Passive routers will receive these routes, but they do not have the ability to advertise their own routes. Typically, a router will run in active mode, and hosts will run in passive mode. The update will consist of an IP network address and the integer distance to that network. RIP uses a hop count, which, as we described earlier, is the number of routers the packet will have to cross to reach the destination network. Each pass over a router increases the hop count by one hop. RIP has a maximum of 15 hops when routing packets to a remote network. These metric counts of hops to the destination determine the most efficient route; that is, the quickest path to the destination network. In other words, a route with 5 hops is more efficient than a route with 8 hops. However, the route with the least number of hops may not be the fastest route to a destination. The hops do not take into account the speed of the route. For example, a route with 5 hops may cross slower serial links in order to reach a destination, rather than another route with 7 hops that crosses an Ethernet network. For this reason, a router can advertise a higher hop count for a slow link to compensate for the slower link. This will deter the use of this slower link.
The comparison between RIP and IGRP is useful because RIP is used for purposes that are similar to IGRP. However, RIP was designed with smaller networks in mind, and was never meant to be used in large, complex networks.
The most basic difference between the two protocols is the use of metrics. RIP uses a simple hop count, which we discussed in the previous section. RIP has a hop count of 15 when routing packets to a remote network. The hop count, expressed in a decimal from 1 to 15, describes the number of routers the packet will have to pass before arriving at its destination. Since the maximum hop count is 15, it may be difficult to reach a slower network represented with a large hop count. To accommodate the full range of network links, such as serial and asynchronous WAN links, the metric should be increased to a higher number, such as 24. This 24-bit metric could allow for most reliable routing on large, complex networks, or networks with various slow links. Some networks today are so large that RIP cannot pass packets from one end of the network to the other without exhausting the maximum of 15 hops. RIP is just not possible on these large networks.
Since you cannot just increase the hop count with RIP, you must find an alternative. IGRP not only provides a larger metric hop count, but also includes a few more features that make it more robust than RIP. IGRP can express the metric hop count to include factors such as delay, bandwidth, and reliability. RIP can express two different routes as the same hop count, but cannot take into account the fact that these routes may travel slower routes, or consume more bandwidth than desired.
IGRP can also split traffic among several equal routes, which is not very easy to implement with RIP. Instead of implementing a configuration where RIP supports traffic splitting, it may be more effective to update the network to use a routing protocol other than RIP.
RIP updates also contain little information, such as the destinations and the hop counts (metric values). IGRP can support an Autonomous System Number (ASN), which is a number used to describe an area, or domain. We will learn more about the ASN in the section on Border Gateway Protocol (BGP).
And finally, RIP uses the concept of a “default route,” a route that will get a packet to a destination that is not specified in the router’s internal routing table. This can be compared to the default router in TCP/IP, which is used to send a packet that is destined for a remote network that this host is unable to find. The phrase “I don’t know where this packet is destined for, so you do something with it.” is used to describe the concept of the default gateway. RIP and some other routing protocols distribute the default route as if it were a path to a real network, which in most cases it is not. IGRP uses a different approach to the default route. Rather than distribute the default route as a fake route, IGRP can flag real networks (more than one) as candidates for the default route. IGRP can scan all of the default routes to determine which route is the best candidate with the lowest metric. This candidate can then become the actual default route.
As we discussed earlier, one of the disadvantages of RIP routing is the extensive use of broadcasts. A router updates its own routing table with information received from neighboring routers. When a router that is configured to respond hears this request, it will respond with a packet that contains information on routes from its very own routing database. This response packet contains destination network information and metrics (hops) for reaching these destination networks. When the host or router receives this routing information it will rebuild its database by adding new routes and modifying existing routes. To modify an existing route, the host or router will determine if the new route has a better path to the destination, which is a lower hop count. RIP will also delete a route that contains more than 15 hops to the destination. Routes will also be removed from the router’s database if no updates are received within a certain period of time. This is a dynamic means of purging routes in the database that have not been used recently. As we have already discussed, routes are usually broadcast every 30 seconds, and routes are deleted from the route database if they are not updated within 180 seconds. To understand the cost of routes, examine Figure 6.6.
Figure 6.6 An illustration of hop count with RIP.
Network A is connected to Network D through Network B and Network C. Once Network E is up and running, packets from Network A destined for Network D can now be sent through Network E, at a hop count of 1. This hop count is less, and will therefore be the route of choice when Network A needs to communicate with Network D. If Network E were to go down, Network A would have to know about it. Since RIP requires a router to send updates every 30 seconds, a broken link will be learned quickly by the rest of the routers on the network. Remember, if RIP does not receive an update from another router in 180 seconds, that route is removed from the routing database because the router believes this route is no longer available.
RIP routing updates are very dynamic, and changes to the network can be updated very quickly and accurately. For example, a change in network topology can easily be reflected in the updated RIP routing updates. These will update the current entries in a router’s routing table (if they are present). If the routes are not in the routing database, they will be added. If a router detects a failure for another router on the network, the router can recalculate its routes and send the updated information to other neighboring routers, informing them of the new route. Each router that receives this route update can now update its own database and propagate the changes to the remaining routers on the network.
RIP version 2 was developed to address some of the limitations with the original version of RIP. The purpose of RIP-2 is to increase the amount of information in the packet itself, and to increase security, which was lacking in RIP version 1. Since RIP is still in widespread use, it was decided to increase the capabilities of RIP so organizations would not have to implement a brand new routing protocol. RIP is also easier to implement compared to the rest of the interior gateway protocols.
The following is a list of features with the new RIP-2 protocol:
Optional authentication. Most implementations use a simple password authentication.
Routing Domain field. Enables you to ignore logical domains on the same physical network. The default routing domain is assigned the value 0.
Route Tag field. Exists to support Exterior Gateway Protocols (EGP). This field will carry autonomous system numbers for EGP and Border Gateway Protocol (BGP). The Internet is divided into domains, or autonomous systems. Interior Gateway Protocols (IGPs) are the protocols used within a domain for the exchange of routing information. Basically, this route tag will separate internal RIP routes from external ones.
Subnet Mask field. Contains a subnet mask that is applied to the IP address to determine the host network on which the destination is located.
Next Hop. Forwards packets to the immediate next hop. This is useful in networks where the routers can be using routing protocols other than RIP.
Multicasting. Sends broadcast packets out on the network. The RIP-2 multicast address is 224.0.0.9.
The most important aspect of RIP-2 is that it is completely backwards-compatible with RIP-1, and can also run in RIP-1 emulation mode or RIP-1 compatible mode, in addition to full RIP-2 mode.
RIP-2 also keeps the features that made RIP-1 so popular, such as its small size, easy implementation, and the ability to run on embedded systems that cannot afford the memory space consumed by more efficient routing protocols. RIP has also been redefined to support IPv6, which is very similar to RIP-2. Basically all that has changed is the header information contained within the RIP packet. This makes RIP easier to implement in IPv6 networks; however, RIP is still not the most ideal choice for modern networks. Newer routing protocols such as OSPF and IS-IS are hoping to make RIP obsolete, but RIP still is implemented in more networks than OSPF and IS-IS combined; therefore the push by some to make RIP-2 successful is very strong in the networking community.
Open Shortest Path First (OSPF), like RIP, is another Interior Gateway Protocol (IGP).
NOTE
Interior Gateway Protocols (IGP) are often described as Interior Gateway Routing Protocols (IGRP), but they are used interchangeably. IGP and IGRP are the same thing.
OSPF was specifically designed for the Internet, which uses the IP protocol, and is designed with the following features:
· Authentication of routing updates
· TOS-based routing
· Tagging of externally derived routes
· Fast response to topology changes with low overhead
· Load sharing over meshed links
OSPF will attempt to open the shortest path to a destination first. This link-state technology is called Shortest Path First (SPF), in which each router contains an identical database. Inside this routing database is a description of a particular router and its current state, which also includes the state of interfaces that this router is connecting. This is much different from RIP routers, which can each have differing entries in their routing databases. SPF-based routers contain the database for the Autonomous System (AS) topology. As you learned earlier, the Internet is divided into domains, or autonomous systems.
NOTE
The term domain is frequently used interchangeably with the term AS, or autonomous system. Try not to confuse domain with an Internet domain name, such as microsoft.com. Also, do not confuse domain with the Windows NT domain, which is a logical grouping of computers. You must know in what context the term is being used to be completely sure of the domain being used.
Another feature of OSPF that is not available with RIP-1 is the ability to support subnet masking. Each route that is distributed by OSPF has a destination address and a subnet mask. When packets are being routed, the routes with the longest match are given a higher priority than routes with a shorter subnet mask.
OSPF is also capable of supporting four types of physical networks: point-to-point, broadcast, nonbroadcast, and point-to-multipoint.
Point-to-point networks. Consist of two routers in which the point-to-point interfaces can be set up as numbered or unnumbered interfaces. A network of synchronous lines is an example of a point-to-point network.
Broadcast networks. For networks with potentially more than two routers, but the OSPF has the ability to send the same broadcast to all of the routers. An Ethernet network is an example of a broadcast-based network.
Nonbroadcast networks. Networks also with potentially more than two routers; however, OSPF does not have the ability to send a broadcast to all of the routers. An example of this type of network is X.25 or ATM.
Point-to-multipoint networks. Resemble a bicycle wheel, with the main router as the hub and the other routers branching off in spokes from the central hub. This appears very similar in theory to the Ethernet star topology.
One concept of OSPF that is very different from RIP is that networks can be split into many areas. These areas are described as entirely within an area (intra-area routing) or in another area (inter-area routing). To remember the differences, think of the inter-area as the Internet as opposed to an internal intranet for an organization. When OSPF needs to link together areas, they use the concept of a backbone, which is similar to the use of a backbone in an Ethernet network. This backbone is made up of routers and networks that link together different areas. This backbone must be contiguous, which is also similar to the backbone of an Ethernet bus network. Interfaces can extend from this backbone to other networks. This type of routing is called external routing because the source and destination are located on different networks.
Since an area can be defined in such a way that the backbone is not contiguous, there needs to be a way to continue the backbone connectivity. This is made possible by a virtual link. This virtual link is configured between any backbone routers that share a link to this nonbackbone area and function as if they were direct links to the backbone. A virtual link also enables us to patch in the backbone in case discontinuity occurs, such as when a link is down.
When packets need to be sent from one area to another, they will be sent along this backbone. This makes use of an Area Border Router (ABR), a router that is connected to the originating area and then connected to the backbone area. The packet is then sent across the backbone where it is received by another router, which is also another area border router. This router then sends the packet on to its destination.
There are four types of routers associated with OSPF: Internal routers, Area Border routers, Backbone routers, and Autonomous System (AS) boundary routers.
Internal routers. Responsible for routing packets within a single area. They flood the internal area with routing information that occurs within its specific area. This internal router can also be a backbone router if it has no physical interfaces to another area.
Area Border routers. Are responsible for routing packets between multiple areas on which this router has interfaces.
Backbone routers. Have a physical interface to the backbone. These are often called border routers.
Autonomous System (AS) boundary routers. Exchange information with other autonomous systems using EGP protocols like BGP.
Backbone routers, sometimes referred to as border routers, can treat certain areas as stubs. This means the border routers will not forward any information about external routes to these stub areas. These border routers can also be configured not to forward any internal information about internal OSPF routes.
These four types of routers make it possible for OSPF to divide an autonomous system into areas.
To configure OSPF on your Cisco router, you need to enter the router in config mode and enter the following information. First, enable the OSPF process:
router ospf <process-id>
Then you must assign areas to the interfaces:
network <network or IP address> <mask> <area-id>
The following is an example of both completed steps:
router ospf 5
network 203.11.87.156 255.255.255.0 100
The network command in the second step is how we assign a router to an area. We must specify the network or IP address to this router, which includes the subnet mask, in order to use TCP/IP to connect to this router. The area-id must correspond with the area in which this router will be placed. If you recall, an area is another name for an autonomous system (AS).
To use passwords with OSPF routers, which is one feature we were not able to take advantage of with RIPv1 routers, you must also enter the router in config mode. The passwords should be configured the same for every OSPF router in your area. To enable password authentication, enter config mode on the router and enter the following information:
ip ospf authentication-key
<key> (this goes under the specific interface portion)
area <area-id> authentication
(this goes under "router ospf <process-id>" portion)
The following is an example of both completed portions:
interface Ethernet1
ip address 197.13.55.110 255.255.255.0
ip ospf authentication-key february
router ospf 100
network 45.113.22.188 255.0.0.0 area 200
area 200 authentication
From the preceding example you can see that our password is february. Unfortunately, anyone with a link analyzer can obtain this password as it passes over the network.
To implement a more secure means of authentication, we can use OSPF Message Digest Authentication. You must configure the key (password) and a key-id for each OSPF router that will participate in password authentication. A link analyzer cannot obtain the password because the password (key) is not passed over the network. To enable Message Digest Authentication, enter config mode on the router and enter the following information:
ip ospf message-digest-key
<key-id> md5 <key> (this
goes under the specific interface portion)
area <area-id> authentication
message-digest (this goes under "router ospf
<process-id>" portion)
The following is an example of both completed portions:
interface Ethernet1
ip address 197.13.55.110 255.255.255.0
ip ospf message-digest-key 10 md5 february
router ospf 100
network 45.113.22.188 255.0.0.0 area 200
area 200 authentication message-digest
From the preceding example you can see that our password is still february. Our message-digest-key is 10 and our area is still 200.
We have learned about the backbone, which is a contiguous area of physical links. This backbone is called “area 0” and has to be the center of all other areas. We can use a virtual link to provide a logical connection to the backbone from an area that is disconnected, as illustrated in Figure 6.7.
Figure 6.7 Creating a virtual link between to noncontiguous sites.
In Figure 6.7, Area 1 does not have a physical, contiguous connection to Area 3. A virtual link has been created between Router 1 and Router 2. Area 2 is now a transit area and Router 2 is now the entry point into Area 3.
In order for this virtual link to work, we need to enter the OSPF router in config mode and enter some information concerning the link:
area <area-id> virtual-link <RID>
The following is an example of the completed portions on both routers:
Router 1#
router ospf 100
area 2 virtual-link 2.2.2.2
Router 2#
router ospf 100
area 2 virtual-link 1.1.1.1
The area-id in the preceding example is the transit area, which we determined was Area 2. The RID is the router ID, in which we entered the IP address of the router.
The RIP protocol is more suited to smaller networks because of the large amount of broadcasts used to update routers about paths to remote networks. The OSPF protocol is well-suited to larger, dynamic, more complicated networks. RIP updates occur every 30 seconds, whereas OSPF updates occur every 30 minutes. RIP routers send the entire routing table to neighboring routers, whereas OSPF sends very small update files to routers whenever they detect a change in the network, such as a failed link or new link. When routers exchange information, it is called convergence, where the routers “converge” on the new representation of the network very quickly.
A network of OSPF and RIP routers can possibly coexist. OSPF is slowly replacing RIP as the interior gateway routing protocol of choice. These OSPF routers can simultaneously RIP for router-to-end station communications, and OSPF for router-to-router communications. For example, you can configure a Windows NT computer to participate as a RIP router in a RIP-routing environment, but you cannot configure this same Windows NT computer to participate as an OSPF router in an OSPF-routing environment. This coexistance between RIP and OSPF makes gradual migrations from RIP to OSPF feasible. In fact, RIP and OSPF routers can not only coexist in the same network, they can actually share routing information. Figure 6.8 shows the enabling of RIP routing on Windows NT.
Figure 6.8 Configuring a Windows NT computer as a RIP router.
To configure your Windows NT computer to participate in sharing routing updates with other computers on the network, you need to enable IP forwarding. This is done in the Network applet of the Control Panel, by selecting the TCP/IP protocol and viewing the properties. The Routing tab is illustrated in Figure 6.8. You also need to enable RIP in the Services applet in the Control Panel.
In OSPF, a neighbor is another router running OSPF that has an interface on the same network. When discovering and configuring OSPF neighbors, the router will use the Hello protocol to discover their neighbors and maintain this relationship. On two of the types of OSPF networks, point-to-point and broadcast, the Hello protocol will dynamically discover the neighbors. On a nonbroadcast network, you will have to configure the neighbors manually, because OSPF will not have a means of contacting and establishing relationships with its neighbors.
This Hello protocol ensures that the relationships between the routers are bidirectional. This will guarantee that every OSPF router will send as well as receive updated route information to and from each of its neighbors. The communication is bidirectional when the router sees itself in the Hello packet from another router. Included in the Hello protocol packet is the following:
· The router’s priority
· The router’s Hello timer and Dead timer value
· A list of routers that has sent the router Hello packets on this interface
· This router’s choice of designated router and backup designated router
However, this does not mean OSPF is a perfect routing protocol as far as routing updates are concerned. In really large network configurations, OSPF can produce a large number of router updates that flow between routers. If a network consists of hundreds of routers in a network topology that is designed to be fault tolerant, the number of link-state messages that traverse the network can be in the thousands. These thousands of link-state messages can be propagated from router to router across the network, consuming valuable bandwidth, especially on slower WAN links. The routers then have to recalculate their routing tables, which can consume valuable RAM and CPU cycles if these routing tables are a significant size. Fortunately for OSPF, no routing protocol available today is capable of minimizing routing updates in a very large network with many routers. OSPF is, however, much more capable than RIP at minimizing these bandwidth intensive routing updates. By the way, by “link-state” we mean the state, or condition of a link that is a description of the router’s relationship to its neighboring routers. We think of the link as being an interface on the router. An interface, for example, would be the IP address of the physical interface, the subnet mask, the type of network to which it is connected, or the routers connected to the network. The collection of all these link-states would comprise a link-state database.
The link-state algorithm states (in much more complex terms than described here) a few steps of building and calculating these paths:
· Upon initialization or upon a change in routing information, a router will generate a link-state advertisement that will represent the collection of all the link-states currently on the router.
· In an event called flooding, all routers will exchange this link-state information. This flood of routing information will be propagated to all routers in the area.
· After each router has finished compiling the link-state information, they will begin to calculate a Shortest Path Tree to all destinations. This is very CPU-intensive, as there can be hundreds of paths that need to be processed. These paths will include the associated cost and next hop information to reach those destinations.
· If there are no changes in the network topology, OSPF will not be very active. OSPF will not need to exchange link-state information, and the routers will therefore not need to calculate Shortest Path Trees, because they will already have the information processed.
There are also different types of link-state packets, as follows:
Router links. Describe the state and cost of the router’s links to the area. These router links are the indication of the interfaces on a router belonging to a certain area.
Network links. Describe all routers that are attached to a specific segment. These are generated by the Designated Router (DR).
Summary links. Describe networks in the autonomous system (AS), but outside of an area. These summary links also describe the location of the ABSR. They are also generated by the ABRs.
External links. Describe destinations that are external to the AS, or a default route from outside the AS. The ASBR is responsible for injecting the external link information into the autonomous system.
Another feature of OSPF is that routing updates are not passed across areas. Remember that areas are separated by the types of routers that we listed before, such as area border routers. If a network link were to fail, only the routers inside that area would exchange routing update information. Area border routers filter the routing updates from separate areas and the backbone. Area border routers can communicate with each other and exchange routing update information, but they use special link-state messages that are a brief summarization of the LAN or WAN topology for their areas.
Figure 6.9 illustrates the use of dividing areas that represent physical regions with area border routers attached to the backbone.
Figure 6.9 Dividing physical regions into areas separated by area border routers.
Each city does not want to receive the routing updates from the other cities; therefore, these areas are separated by area border routers, which can and do exchange information between each other, but in a smaller link-state update.
You can also fine-tune OSPF routers to minimize the amount of updates that are unleashed on the network, and therefore minimize the reduction in network bandwidth. You can also fine-tune the rate of convergence, which is the time between the routers receiving the new routing information and the time the network routers have made the necessary adjustments in their routing tables.
Table 6.4 illustrates an example of the OSPF database. This output is from the following command:
show ip ospf database
OSPF Router with ID (211.231.15.67) (Process ID 10)
|
Router Link States (Area 1) |
|
Link ID |
ADV Router |
Link count |
211.231.15.67 |
211.231.15.67 |
2 |
211.231.16.130 |
211.231.16.130 |
2 |
|
Summary Net Link States (Area 1) |
|
Link ID |
ADV Router |
|
211.231.13.41 |
211.231.15.67 |
|
211.231.15.64 |
211.231.15.67 |
|
211.231.15.192 |
211.231.15.67 |
|
|
Router Link States (Area 0) |
|
Link ID |
ADV Router |
Link count |
211.231.13.41 |
211.231.13.41 |
3 |
211.231.15.67 |
211.231.15.67 |
1 |
|
Net Link States (Area 0) |
|
Link ID |
ADV Router |
|
211.231.15.68 |
211.231.13.41 |
|
|
Summary Net Link States (Area 0) |
|
Link ID |
ADV Router |
|
211.231.15.0 |
211.231.15.67 |
|
|
Summary ASB Link States (Area 0) |
|
Link ID |
ADV Router |
|
211.231.16.130 |
211.231.15.67 |
|
|
AS External Link States |
|
Link ID |
ADV Router |
Tag |
0.0.0.0 |
211.231.16.130 |
10 |
211.231.16.128 |
211.231.16.130 |
0 |
Table 6.4 The Complete OSPF Database Taken from an Area Border Router (ABR)
We can begin analyzing the results, first starting with the Router Link States section of Area 1, shown in Table 6.5.
Link ID |
ADV Router |
Link count |
211.231.15.67 |
211.231.15.67 |
2 |
211.231.16.130 |
211.231.16.130 |
2 |
Table 6.5 The Router Link States Section of Area 1 in the OSPF Database
The two entries represent two routers in this area. Both routers have two links to Area 1, as represented by the Link Count column.
We continue, skipping past the Summary Net Link States section, and on to the next Router Link States section, which is for Area 0, shown in Table 6.6.
Link ID |
ADV Router |
Age |
Link count |
211.231.13.41 |
211.231.13.41 |
179 |
3 |
211.231.15.67 |
211.231.15.67 |
675 |
1 |
Table 6.6 The Router Link States Section of Area 0 in the OSPF Database
Once again, there are two routers in this area. The first router has three links to Area 0, and the second router has one link to Area 0.
The Summary ASB Link States of Area 1 are listed in Table 6.7.
Link ID |
ADV Router |
Age |
211.231.16.130 |
211.231.15.67 |
468 |
Table 6.7 The Summary ASB Link States of Area 1 in the OSPF Database
This gives you an indication of who the ASBR for the area is. The ASBR is a router with the address of 211.231.16.130.
The AS External Link States information contains information about destinations outside of our area, shown in Table 6.8.
Link ID |
ADV Router |
Age |
Tag |
0.0.0.0 |
211.231.16.130 |
1683 |
10 |
211.231.16.128 |
211.231.16.130 |
65 |
0 |
Table 6.8 The AS External Link States in the OSPF Database
Both of the two external links that are listed have been injected into our area from the OSPF.
OSPF Implementation Recommendations
Consider the following list of suggestions from Nortel Networks when implementing OSPF on your network (see http://support.baynetworks.com).
· Keep the same password within an area if possible.
· Use the default timers.
· Use the address range if your network is a subnetted network.
· Keep all subnets within one area.
· Make sure the AS Border Router parameter is enabled if the router has any non-OSPF interfaces, and if you want that information propagated.
· Configure virtual links for each area border router that does not reside within or directly interface the backbone. Every border router must have a configured path to the backbone.
· If you have a preferred path to a destination, edit the Metric Cost parameter of your interface. OSPF will then choose the path with the lowest cost.
· Configure your routers that are running OSPF with the same timer values that coincide with the timers in your other devices.
· If there is a topology change, such as a change to an area or moving routers, you must reconfigure the appropriate OSPF elements, such as the interfaces, virtual links, and so on.
For IT Managers Only
Managing and Decision Making in
an Information Systems Department
As the manager of an Information Systems department you will be required to be the sounding board for an entire department of intelligent, dynamic, and often strong-minded individuals. With this comes the need to sort out every IT member’s thoughts, aspirations, and goals for the network. The feelings expressed may not be parallel with your thoughts and goals, and may contradict you and many others in your department. If this happens, you have to listen closely to what each member of your team is saying. You must value their opinion, but in the end, it is just their opinion. You may have to meet with team members individually, and also in a group forum. If you do not reach common ground, and fear that a decision can never be made, you may find yourself in the predicament of making a decision. Just make sure you have completed the following when making a decision that is crucial to the entire department:
· Gather plenty of information in order to make your decision
· Identify needs and goals that you are trying to meet
· Identify alternatives to achieving the goal at hand
· Solicit input from everyone involved
· Test all of the products in an environment that simulates the actual environment
· Read as much information as you can about the solution
· Document the entire process
· Eliminate ideas that will not achieve the goal as you continue
· Make a decision, and stick by that decision
There is the possibility that even after all the intense discussions, tests, and decision-making, you will end up not reaching your goal. This happens from time to time. Falling short of a goal is not the worst thing in the world; making a decision without the proper information, however, is worse.
Border Gateway Protocol (BGP) is the de-facto standard for routing between Autonomous Systems in the Internet. BGP was developed to address the limitations with Exterior Gateway Protocol (EGP), which was not the strongest routing protocol, although it was widely used. BGP can be thought of as the next generation of EGP. All communications between Internet Service Providers (ISP) is handled via BGP-4, which is required for CIDR. BGP-4 differs from BGP-3 just as RIP-2 differs from RIP-1. BGP-4 is also known as BGP4 without the hyphen.
BGP allows the use of announcements of classless routes, routes that are not strictly on Class A, Class B, or Class C networks. These classless routes can be subnets or supernets. For more information on supernets, refer to the section on CIDR.
The primary purpose of BGP is to advertise routes to other networks, which are called Autonomous Systems (AS). BGP is also useful for advertising routes to upstream providers about what routes are available inside your network. When you are communicating with another ISP over the Internet, you are communicating with their network, or autonomous system, which is the more appropriate wording when speaking of routing with BGP. The border routers separate your AS from their AS. Every router in your AS should know the route to that destination AS. All AS routers in your area should contain the same routing information, and you should be advertising only routes that you know how to get to. The sin of BGP routing is advertising routes that you do not know how to reach.
There are three types of configurations in a network:
Stub areas. Always end points. This is usually a single, statically routed connection from a central site, such as an ISP, to a remote location such as a home or office. BGP is not needed in stub area configurations.
Multihomed areas. Central sites with at least two statically-defined or dynamically routed connections to remote locations. Data will only flow to and from the remote locations. BGP is also not needed in this multihomed configuration.
Transit areas. Central sites with at least two connections to remote locations. One connection is to a remote location with an Internet connection, and another connection is to an additional Internet connection. Each of these locations is an autonomous system (AS). BGP is required in this configuration.
BGP is needed in the configuration if the customer has multiple locations with multiple routers, but they do not want each location’s routing tables to affect the others. Defining these autonomous systems makes its possible to use these trusted paths between locations. This is the strategy that is used on the Internet to ensure better reliability and higher performance.
Figure 6.10 should clearly illustrate the purpose of BGP single-homed connections to an upstream provider.
Figure 6.10 Routing BGP in single-homed connections.
You can see how the default route for the AS is routed through the default route. This default route makes perfect sense on a singularly homed network, with only one connection to an upstream provider. From the upstream provider, it is also much easier, because your AS does not have a multihomed link to more than one upstream provider. This upstream provider can configure a static route to your AS. It would make no sense to configure this connection between the two ASs with a dynamic routing protocol, because this link between the ASs will rarely change. If this IP address to your AS were to change, you would simply have the upstream provider change the static routing address to your AS.
You have been hearing about the autonomous system—now we need to describe the autonomous system number, which is used to represent the autonomous system to the Internet. Most networks will have only one autonomous system number. When you are exchanging routes with another router speaking BGP (called a peering session), it will start out like the following:
router BGP 14290
neighbor 204.118.35.166 remote-as 802
<the rest is omitted>
This communication starts out by saying “I would like to connect to ASN (autonomous system number) 14290 using BGP.” The list of commands that would initiate the routing table transfer is omitted.
If a node wishes to connect with BGP peer node, the node will open a connection on TCP port 179, which is the default port. A significant amount of information is transferred, such as the identification numbers, authentication information, and protocol version numbers before the BGP update of the routing tables can take place. The update will not take place if the authentication has not been successful. If the update is successful, the changes will then be propagated to neighboring BGP routers.
When you communicate to other hosts and routers using BGP, you can make semi-intelligent routing decisions, which include the best path to reach a destination. This route contains more than just the first router to route the packet to; it can include the complete route to the destination. You can also advertise your routes to neighboring routers, and have those routers in turn advertise your routes to their neighboring routers.
BGP selects only one path as the best path to a destination. This path is now propagated to the neighboring BGP routers. Unlike some routing protocols, BGP does not need a periodic routing table refresh. The initial exchange between two BGP routers is the full routing table, but from then on only the optimal paths are advertised in update messages to the neighboring BGP routers. This makes long running sessions between BGP routers more efficient than short sessions, because the amount of times the full routing table is exchanged on initial contact is less.
There are actually two types of BGP that differ in terms of advertising routing information. The first is EBGP, basically referred to as BGP, which is what we have been discussing thus far. This is used to advertise routes to different autonomous systems, whereas IBGP is used to advertise routes within the same autonomous system. Figure 6.11 demonstrates the use of both types of BGP protocols and the autonomous system.
Figure 6.11 Differentiating between interior and exterior routing with IBGP and EBGP.
In the network example shown in Figure 6.11, BGP first makes sure that networks within the interior AS are reachable. Then border routers can exchange routing information with each other regarding the status of networks within their autonomous systems. EBGP is used to communicate with border routers, and IBGP is used within the AS.
Just like RIP, IBGP is an interior routing protocol that can be used for active routing within your network. IBGP does not distribute routes as much as EBGP. Each router in an IBGP configuration must be configured to peer into every other router to exchange this information, whereas this is not needed with straight BGP. However, IBGP is more flexible and provides a more efficient means of controlling and exchanging the routing information from within an AS.
BGP requires a combination of hardware and software to support. The most commonly used implementations of BGP are with Cisco routers, Nortel routers, UNIX variants, BSD, and Linux. Nortel and Cisco routers are by far the most common types of routers currently supporting BGP.
We will now discuss the steps required to enable and configure BGP. First, we will assume that we want two routers to communicate using BGP. These routers will be called Router1 and Router2. These routers belong in two unique autonomous systems, called AS 1 and AS 2, as illustrated in Figure 6.12.
Figure 6.12 An example of routing between two separate autonomous systems.
We now need to enable BGP on the routers one at a time, starting with Router1:
router bgp 1
and now the same step on Router2:
router bgp 2
These statements enable BGP on the router for the AS in which they belong. We will now define the neighbors that we wish to communicate with via BGP. Establishing a connection between two neighbors, or peers, via BGP is made possible by the TCP protocol. The TCP connection is essential for the BGP routers to establish a connection and exchange routing updates.
The neighbor command is used to establish a TCP connection:
router bgp 1
neighbor 134.201.56.13 remote-as 2
router bgp 2
neighbor 134.201.56.12 remote-as 1
These statements use the TCP/IP address of the directly connected routers for the EBGP connection. Note that EBGP will be used because we are communicating with an external autonomous system.
If we were to make the configuration more difficult, we could add another router called Router3 within our AS 1, and create another AS called AS 3, as illustrated in Figure 6.13.
Figure 6.13 An example of routing between three autonomous systems.
We need to modify the statements on the routers as follows:
Router1#
router bgp 1
neighbor 134.201.56.13 remote-as 2
neighbor 134.201.56.14 remote-as 3
Router2#
router bgp 2
neighbor 134.201.56.12 remote-as 1
Router4#
router bgp 3
neighbor 134.201.56.12 remote-as 1
In the preceding example, Router1, Router2, and Router4 are running EBGP. Router1 and Router3 are running IBGP. The difference between running IBGP and EBGP is that the remote-as number is pointing to an external or internal AS.
Notice also that Router1 and Router3 are not directly connected, which is the case for Router1 being directly connected to Router2 and Router4. This is acceptable because the router is within your AS. As long as there is some IGP running to connecting the neighboring routers within the same AS this is acceptable.
Another feature of IBGP is the use of loopback interfaces, which eliminate a dependency that occurs when you use the IP address of a router (the physical interface to the route). Figure 6.14 illustrates the use of a loopback interface specified on Router2.
Figure 6.14 Specifying the loopback interface for reliable routing.
In Figure 6.14, Router1 and Router2 are both running IBGP in AS 1. If Router1 were to communicate with Router2 by specifying the IP address of the Ethernet interface 0, 1, 2, or 3 (as shown in the figure as “E” for Ethernet—E0, E1, E2, and E3), and if the specified interface is not available, a TCP connection was not possible. These two routers could not communicate. To prevent this from happening, Router1 would specify the loopback interface that is defined by Router2. When this loopback interface is used, BGP does not have to rely on the physical interface availability when making TCP connections. The following commands on both of the routers illustrate the use of specifying a loopback interface.
Router1#
router bgp 1
neighbor 201.13.145.88 remote-as 1
Router2#
loopback interface 0
ip address 201.13.145.88 255.255.255.0
router bgp 1
neighbor 180.121.33.67 remote-as 1
neighbor 180.121.33.67 update-source loopback 0
Router1 will specify the address of the loopback interface (201.13.145.88) of Router2 in the neighbor remote-as configuration command. The use of this loopback interface requires that Router2 also includes the neighbor update-source router configuration command in its own configuration. When this neighbor <ip address> update-source loopback command is used, the source of the BGP TCP connections for this specified neighbor is the IP address of the loopback interface, and not the IP address of the physical interface.
In this chapter we discussed the need for routing protocols and the many types of routing protocols available. As networks vary in size and complexity, it is important to implement the correct routing protocol to handle the network requirements. We learned that smaller networks have different needs than larger, more complex networks. With this in mind, a protocol designed for smaller networks cannot address the needs of the larger network, and any attempts to do so will impose restrictions and inhibit growth. This is evident with the Routing Information Protocol (RIP), which is a very popular routing protocol that works beautifully in smaller, less complex networks, but is incapable of performing on a complex network such as the Internet.
We also discussed the threat of IP address exhaustion on the Internet and the concern for large global routing tables with the influx of new networks on the Internet. One of the protocols responsible for addressing of these issues is Classless Interdomain Routing (CIDR). CIDR can also implement supernetting to aggregate IP addresses into a large block that global routers can use instead of advertising each individual address.
We also learned that internal networks have different routing needs when maintaining routers inside a specific area. These routers use a routing protocol such as the distance-vector-based Interior Gateway Routing Protocol (IGRP) to keep an accurate assessment of the network topology. Routers update their routing tables with neighboring routers and assign costs to network links that make one route more efficient than another.
Enhanced Interior Gateway Routing Protocol (EIGRP) has improved on IGRP in many areas, such as convergence, which implements a new algorithm that enables all routers involved in a topology change to synchronize their internal routing tables at the same time.
Routing Information Protocol (RIP) version 2 has also improved on its predecessor, RIP. Although the first version of RIP was limited for large network use, RIP-2 has addressed some of these issues, such as the addition of authentication, support for the subnet mask, and maintaining its small size and ease of implementation.
Open Shortest Path First (OSPF), like RIP, is another Interior Gateway Protocol (IGP). We learned that OSPF is much more robust than RIP, although RIP still is very effective in some implementations. OSPF uses a link-state technology and Shortest Path First algorithm that can determine the most efficient route much better than RIP, because OSPF can also determine the speed of the link. OSPF also makes use of areas, which are used to group hosts into logical groupings, much like a domain. OSPF can route to some of these areas, but will require an Exterior Gateway Protocol (EGP) to communicate with other areas.
Finally, in this chapter we learned how information is routed outside of an area by use of a protocol such as Border Gateway Protocol (BGP). This protocol passes information through the network backbone to the autonomous systems. Communication between Internet Service Providers is done through BGP. Border Gateway Protocol addresses the limitations of EGP, and is the routing protocol of choice when it comes to exterior routing.
Q: Do I need to carry a full routing table for the Internet when I am implementing CIDR?
A: You do not have to carry the full routing table if you have a connection to the Internet through only one ISP; you just need to point your default route to your ISP, and inform your ISP that they do not need to send you the full routing table.
Q: When do I not need to implement BGP?
A: When you are singularly homed, which means you only have one connection to the Internet. You also do not need BGP if you are not providing downstream routing. Use a default route instead.
Q: When do I have to renumber if I am using CIDR?
A: If you move your site from one ISP to another and you have been using an allocated set of addresses from your original ISP’s CIDR block. You will have to return those addresses to your ISP.
Q: I am determining whether to configure my new network with RIP or OSPF. Why should I choose one over the other?
A: If you are implementing a new network, you need to examine both protocols to determine the correct protocol for your environment. You should use OSPF if you have a larger, complicated network. RIP works wonderfully for smaller, less complex networks and is still very common in internal networks.
Q: Why would I want to implement CIDR within my network?
A: Because you can create smaller subnets than are available with a standard Class C address. You can create subnets with 128, 64, or 32 hosts.
[mb1] WHY? This is a new statement that have nothing to do with what has been discussed so far.