In June, Microsoft launched a new version of its Multi-Protocol Routing (MPR), Routing and Remote Access Service (RRAS), formerly code-named Steelhead. Compared with the earlier version of MPR, a built-in service in Windows NT Server 4.0, RRAS has a rich set of routing and internetworking features that enable NT servers to route data over IP and IPX LANs and WANs. Some new MPR features in RRAS are Routing Information Protocol (RIP) 2.0 for IP, Open Shortest Path First (OSPF), IP and IPX packet filtering, and a dial-up router. In "Steelhead Swims into the Mainstream,", Mark Minasi describes RRAS's features.
Probably the most significant feature of RRAS is OSPF, a recommended routing protocol for TCP/IP networks. OSPF provides more efficient network convergence of routing information and lessand betteruse of network bandwidth than traditional RIP. OSPF, however, is sophisticated and difficult to configure and manage in a midsize or large network. To design, implement, and manage an OSPF network successfully, you need a good understanding of OSPF and its architecture, and you must know how to configure it.
Some Routing Basics
|Understanding and configuring Microsoft's powerful link-state routing procotol for TCP/IP networks that's part of the new Routing and Remote Access Service|
Routers use two methods to generate and maintain routing: static routing and dynamic routing. In static routing, you manually create a routing table. This method works for a small, stable network, but not for a large network. If the network changes (e.g., if you add or remove a router or a link fails) you must manually modify the routing table, which is an administrative burden. In dynamic routing, a router maintains its routing table through a routing protocol. A routing protocol defines the way in which a group of routers exchanges routing information; a router chooses the best routing paths or routes to destination networks.
A group of routers and networks under the same administration using a common routing protocol is an autonomous system (AS); examples of ASs are networks within a company, a university, or an Internet Service Provider (ISP). The size of a network in an AS is not limited; an AS can be a small LAN with one router or a large network with hundreds of routers. A routing protocol used within an AS is an interior routing protocol (IRP), such as RIP and OSPF. A routing protocol for ASs to exchange routing information is an exterior routing protocol (ERP), such as exterior gateway protocol (EGP) and border gateway protocol (BGP).
A network interface in a router is attached to a network segment or link so that the router can communicate with its neighboring routers. A network interface has a cost, which reflects the bandwidth, length, and priority of the attached link, and reachable neighboring routers. A routing protocol uses the cost to find the best routes.
Advantages of OSPF
An AS has two kinds of IRP: distance-vector and link-state. A distance-vector routing protocol exemplifies a shortest-path algorithm; that is, it uses the total number of hops between a source and a destination as the cost variable in finding the best route. To continuously update their routing tables, routers using a distance-vector routing protocol exchange information in terms of distances from sources to destinations.
A link-state routing protocol, based on a link-state (or shortest-path-first) algorithm, works in a different way. Instead of exchanging distance information, routers exchange link states, or information about the router's network interfaces. A router maintains a link-state database, which is a map of the network. The router uses the link-state database to derive the network topology and establish a routing table. A router using a link-state routing protocol can compute a more accurate route than one using a distance-vector routing protocol. This process is like reading a detailed map to find the best route from one city to another.
RIP is the most widely used distance-vector routing protocol. In an RIP network, each router broadcasts its routing table to neighboring routers every 30 seconds. When a router receives a neighboring router's routing table, it updates its routing table and sends the updated table to neighboring routers. This procedure is repeated until all routers in the network have updated their routing tables and achieved network convergence.
RIP is simple but limited. You can easily implement an RIP network by enabling RIP on each router. However, RIP is not good for large networks or WANs. Broadcasting large routing tables in the network every 30 seconds consumes network bandwidth quickly. RIP also limits a network to a maximum of 15 hops.
In comparison, the OSPF link-state routing protocol is powerful but complex. In an OSPF network, routers don't exchange routing information until a change occurs in the network. When a router detects a network change, it immediately sends its changed link state (instead of an entire routing table) to its neighboring routers. The neighboring routers then forward their updated link-state information to their neighboring routers. Because routers propagate the updated information immediately, they achieve network convergence more quickly in OSPF than in RIP. OSPF uses network bandwidth more efficiently than RIP because it multicasts only the changed part of the link-state database.
OSPF doesn't limit the number of hops. OSPF balances the network load better than RIP by using the actual cost of the link instead of the number of hops. OSPF also supports other important routing features, such as authentication, variable-length subnet masks (VLSMs), and route summarization.
OSPF is good for midsize and large networks because of its efficient network convergence and better use of networks. In fact, the Internet Architecture Board (IAB), an organization overseeing Internet development, recommends OSPF as a replacement for RIP in TCP/IP networks. However, an OSPF network is complex and not easily configured, especially when it contains multiple areas in an AS.
The OSPF Working Group of the Internet Engineering Force Task (IEFT) developed OSPF 2.0 in 1994. IEFT Request for Comments (RFC) 1583 details OSPF specifications. You can download the document from http://www.cis.ohio state.edu/htbin/rfc/rfc1583.html. Bay Networks adapted OSPF for Microsoft.
Welcome to OSPF Areas
As I described previously, when a change occurs in a network, an OSPF router sends its affected link state to its neighboring routers, and the neighbors send their updated link state to their neighbors. Link-state updates flood all routers in the network until the network achieves convergence. This flood of updates degrades network performance. To resolve this problem, you can divide an OSPF AS into several contiguous areas. Each area has a boundary to limit flooding within the area. Routers in the area contain the same link-state database, which reflects the topology of only that area. The routers don't need to know exact topologies of external areas; the routers view an external area as one node in the network. Using multiple areas in the network reduces the size of the link-state database in each area and therefore reduces the memory requirement and time needed to compute the best routes. Figure 1 shows a simplified OSPF network divided into four areas. (In Figure 1, a server icon represents a router to dispel the old image that a router is a closed box.)
Each area has a unique ID number. A four-dotted decimal number similar to an IP address usually represents a 32-bit area ID. For instance, the four areas in Figure 1 are 0.0.0.0, 0.0.0.1, 0.0.0.2, and 0.0.0.3.
Divide the Network into Areas
An OSPF network must have at least one area. If the network contains more than 40 routers, divide the network into multiple areas for better performance. If the network has more than one area, the network must have a backbone area with ID 0.0.0.0. A backbone area is the center of the network. All areas must report their routing information to the backbone, which distributes the information to all other areas. You can envision this relationship as a wheel: The backbone is the hub, and all other areas are spokes.
A router sitting on the border of two or more areas is an area border router (ABR), which exchanges routing information between areas. For example, Router 1 in Figure 1 is an ABR. It has interface 126.96.36.199 in area 0.0.0.0 and interface 188.8.131.52 in area 0.0.0.1; the ABR router connects the two areas.
When an area connects directly to the backbone, it exchanges routing information with the backbone via an ABR. For instance, in Figure 1, the area 0.0.0.1 communicates with the backbone via Router 1. When an area does not directly connect to the backbone, the area exchanges routing information with the backbone indirectly via intermediate areas. For instance, in Figure 1, area 0.0.0.2 communicates with the backbone via the intermediate area 0.0.0.1. OSPF, refers to this intermediate area as a transit area.
For indirect connections, you have to establish a virtual link between the area and the backbone. In the example in Figure 1, to set up the virtual link between the area 0.0.0.2 and the backbone, you configure Router 6 to use transit area 0.0.0.1 to reach the backbone 0.0.0.0, and you configure Router 1 to use the transit area 0.0.0.1 to reach area 0.0.0.2. In OSPF, Microsoft refers to a virtual link as a virtual interface.
Use Area Routers
A router falls into one of three categories: ABR, internal router (IR), or AS border router (ASBR). Each type of router has a different function. An ABR has its interfaces in different areas and handles interarea communications. To reduce the amount of information sent, the ABR sends only the summarized routing information (route summarization or route summary) instead of individual routes. A route summary of an area is the network range that the area covers. For example, if area 0.0.0.0 in Figure 1 contains 8 subnets with IP addresses 184.108.40.206, 220.127.116.11, and so forth, using subnet mask 255.255.255.0, the route summary is IP address 18.104.22.168; and the route summary subnet mask is 255.255.248.0. The route summary subnet mask differs from the subnet map used in a regular IP address. Subnet mask 255.255.255.0 means that the first three-dotted decimal numbers of an IP address are used as an IP network address. The route summary subnet mask 255.255.248.0 means that the IP addresses in the route summary range from the fixed first 21 bits of IP address 22.214.171.124 followed by the changeable last 11 bits. Therefore, this route summary covers the subnets from 126.96.36.199 through 188.8.131.52.
An IR is a router that has all its interfaces in one area and handles intra-area routing. In Figure 1, routers 4, 5, 7, 8, and 9 are IRs. An ASBR is a router that acts as a gateway between two OSPF ASs or between an OSPF AS and a different routing protocol, such as RIP. When the ASBR exchanges routing information with an external network, the routes it receives are external routes. Router 3 in Figure 1 is an ASBR.
Use Stub Areas
You can import many external routes into an OSPF AS via an ASBR. To block external routes from flooding into an area, you can use a stub area. A stub area applies default route 0.0.0.0 to keep the topology database size small. In OSPF, you can assume that any destination that you can't reach through an intra-area or interarea route is reachable through the default route.
To implement a stub area, one or more of the stub area's ABRs must advertise default route 0.0.0.0 to the stub area, in addition to the route summary. For example, in Figure1, if area 0.0.0.3 is a stub area, you must configure Router 2 to advertise the default route to the area 0.0.0.3. When a packet in area 0.0.0.3 must travel to an external network, it goes to area 0.0.0.0 using the default route first; then area 0.0.0.0 forwards the packet to the destination via an external route.
Stub areas are useful when your OSPF network is connected to an external network, but stub areas have restrictions. The backbone area, a transit area, and an area having an ASBR can't be stub areas. For example, in Figure 1, area 0.0.0.0 can't be a stub area because it is a backbone, and area 0.0.0.1 can't be a stub area because it is a transit area. If area 0.0.0.3 is a stub area, you must configure routers 2, 8, and 9 as stub routers.
A stub area accepts the default route and route summary, but not external routes. An extension to a stub area is a totally stubby area, or a stub area without a summary. The extension accepts the default route but not route summary and external routes. The router uses the default route for any destination that is not reachable through an intra-area route in a totally stubby area. Microsoft OSPF supports this extension.
The three kinds of networks are broadcast, point-to-point, and nonbroadcast multiaccess (NBMA). A broadcast network is a network in which a host can send a packet to any other host, all other hosts, or a group of hosts. Ethernet, Token Ring, and Fiber Distributed Data Interface (FDDI) are broadcast networks. A point-to-point network is generally a point-to-point serial line, such as a leased line of 56Kbps, T1, or T3. An NBMA network, such as asynchronous transfer mode (ATM), frame relay, or X.25, is a cloud in which permanent virtual circuits (PVCs) or switched virtual circuits (SVCs) form a physical topology but lack broadcast capabilities that OSPF requires. You must configure routers in a nonbroadcast network to know each other so that they can exchange OSPF packets. For example, if the link between routers 2 and 8 is a frame relay PVC, you configure Router 2 to reach Router 8 via interface 184.108.40.206, and you configure Router 8 to reach Router 2 via interface 220.127.116.11.
OSPF supports authentication to secure the exchange of routing information. To use authentication, you must configure all interfaces in the same area with the same password. A simple authentication uses a clear-text password, so someone with a network analyzer, such as a sniffer, can get the password off the wire. Some router vendors offer cryptographic authentication in addition to simple authentication. For example, a Cisco router supports message-digest authentication. This type of authentication uses an algorithm based on an OSPF packet, an assigned key, and a key ID to generate a message digest that the router appends to the packet for good security. Microsoft OSPF, however, supports only simple authentication.
Hello to Neighboring Routers
Routers can be neighboring routers when they are in the same area, are connected to the same network segment, and use the same password for authentication. A router periodically sends a hello packet to its neighbors to check whether they are still alive in the network and their links are still active. When the neighbors receive the hello message, they acknowledge their existence to the router on the segment. If the router doesn't receive an acknowledgment from a neighboring router in a certain amount of time, it assumes that the neighboring router is dead or unreachable. Consequently, the link-state database changes. The frequency with which a router sends a hello packet is a hello interval. The time that a router waits for an acknowledgment from a neighboring router before it declares the neighbor dead is a dead interval. Neighboring routers must have the same intervals. By default, the hello interval is 10 seconds, and the dead interval is 40 seconds. Microsoft OSPF uses these defaults.
A router in a broadcast network sends the hello packet to the segment by multicasting; that is, it sends one hello packet to a group of neighbors. A router in a nonbroadcast network sends the hello packet to neighbors by unicasting; that is, it sends a separate hello packet to each neighbor, at a less-frequent poll interval. The poll interval is 120 seconds by default. Microsoft OSPF uses this default, too.
Elect Designated Routers
When the network topology changes, neighboring routers start to exchange routing information until their link-state databases become the same. If n routers are in a segment, n *(n-1)/2 pairs of routers will exchange routing information. For example, Figure 1 shows 4 routers in the subnet 18.104.22.168 in the area 0.0.0.0; therefore, 6 pairs of routers will exchange information. To minimize the amount of routing information exchanged, when the routers are powered on, OSPF elects a designated router (DR) on every segment except point-to-point segments. All other routers in the same segment establish an adjacency with the designated router, exchange routing information, and synchronize the link-state database with the DR. If n routers are in a segment, only n-1 adjacencies or n-1 pairs of routers participate in routing information exchange. So, 4 routers require only 3 adjacencies. In terms of efficiency, using a DR reduces the amount of routing information exchanged from order (n*n) to order (n). Routing information exchange between the DR and other routers uses multicasting in a broadcast network but unicasting in a nonbroadcast network.
Each interface in a router has a priority. The priority can range from 0 (the lowest priority) to 255 (the highest priority); the default priority is 1. The network uses router priorities included in hello packets to elect a DR; the router with the highest priority is the DR. If two or more routers have the same priority, the router with the highest router ID will win the election. A router with priority 0 doesn't participate in the election. Therefore, if you want a router to be a DR, you can simply assign the highest priority to it.
For redundancy, OSPF uses the same criteria to elect a backup designated router (BDR). When the DR fails, the BDR becomes the new DR, and OSPF elects a new BDR.
Configure Microsoft OSPF
Familiarity with how OSPF works makes configuring a Microsoft OSPF router straightforward. Microsoft provides an intuitive administrative tool for router configuration. You can also install this tool on an NT Workstation to manage routers remotely.
The following steps explain how to configure a Microsoft OSPF router. You can use the flowchart shown in Figure 2, as a quick guide.
- Prepare an NT server. You need an Intel- or Alpha-based server with NT Server 4.0 (with Service Pack 3 or later).
- Install NICS. Make sure that your NICs are in the NT 4.0 Hardware Compatibility List (HCL--see http://www.microsoft.com/hwtest). Install NICs from the Network applet of Control Panel in the usual way. You install WAN cards in the same way that you install a LAN card. Assign an IP address to each interface. OSPF supports VLSM, so you can use different subnet masks in your network.
- Install RRAS. You can download RRAS from http://www.microsoft.com/ntserver/info/routing&ras.htm. Microsoft offers three options (RAS, routing, and demand-dial); you must install at least the routing option to get the OSPF function.
- Enable OSPF. Add OSPF to IP routing, and add each NIC to OSPF.
- Configure OSPF for the router. Screen 1 shows the initial interface you use to define a router's properties and its areas.
Further configure OSPF for the router. After you have defined
the basic properties of the router, including a router ID and the areas that the
router belongs to, you must configure OSPF further for the router and its
interfaces. A router can be an IR, an ABR, or an ASBR. If the router is an IR
and is in a stub area, you need to enable Stub area from the Areas tab.
If the router is an ABR, you need to configure a route summary (the network
range) for each area that the ABR belongs to. If the router is an ABR in a stub
area, you need to enable Stub area for the stub area from the Areas tab.
You also need to enable Import summary advertisements if the area is an
ordinary stub area, and disable Import summary advertisement if the area
is a totally stubby area.
If the ABR is on a virtual link, you need to set up the ABR's virtual interface by linking it to the other end via a transit area. If the router is an ASBR, you need to choose which routing protocols the ASBR will talk to. You can use RIP or static routing in the ASBR to communicate with an external network. You can even define which external routes the ASBR will accept.
- Configure OSPF for each interface. You need to configure OSPF for the properties of each interface in the router. The properties include the area that the interface belongs to, the priority for DR election, the cost based on the bandwidth, the password for authentication, and the network type that the interface is attached to. If the network type is NBMA, you must define NBMA routing to reach neighboring routers. You can change the defaults of hello, dead, and poll intervals; but if you do, make sure these intervals are the same in all neighboring routers.
Microsoft aims to offer its customers a midrange router with packet-forwarding rates greater than 40,000 packets per second in regular use. Whether Microsoft's new RRAS can survive in or win today's highly competitive router market is questionable because Microsoft is still working on supporting quality of service, IP multicast routing protocols, and BGPs. RRAS, however, is tightly integrated into the NT Server operating system. Using RRAS in an NT network can reduce the cost of ownership because all NT services (file, print, applications, and routing) are in one box. RRAS offers a good cost-saving opportunity for companies that want to roll out NT to remote or branch offices. Using RRAS and the routing protocol for TCP/IP networks, OSPFNT administrators can keep on top of routing and internetworking technologies.