Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (5.07 MB, 753 trang )
[Chapter 7] 7.5 Exterior Routing Protocols
a neighbor.
Once a neighbor is acquired, routing information is requested via a poll. The neighbor responds by
sending a packet of reachability information called an update. The local system includes the routes
from the update into its local routing table. If the neighbor fails to respond to three consecutive polls,
the system assumes that the neighbor is down and removes the neighbor's routes from its table. If the
system receives a poll from its EGP neighbor, it responds with its own update packet.
Unlike the interior protocols discussed above, EGP does not attempt to choose the "best" route. EGP
updates contain distance-vector information, but EGP does not evaluate this information. The routing
metrics from different autonomous systems are not directly comparable. Each AS may use different
criteria for developing these values. Therefore, EGP leaves the choice of a "best" route to someone
else.
When EGP was designed, the network relied upon a group of trusted core gateways to process and
distribute the routes received from all of the autonomous systems. These core gateways were expected
to have the information necessary to choose the best external routes. EGP reachability information
was passed into the core gateways, where the information was combined and passed back out to the
autonomous systems.
A routing structure that depends on a centrally controlled group of gateways does not scale well and is
therefore inadequate for the rapidly growing Internet. As the number of autonomous systems and
networks connected to the Internet grew, it became difficult for the core gateways to keep up with the
expanding workload. This is one reason why the Internet moved to a more distributed architecture that
places a share of the burden of processing routes on each autonomous system. Another reason is that
no central authority controls the commercialized Internet. The Internet is composed of many equal
networks. In a distributed architecture, the autonomous systems require routing protocols, both
interior and exterior, that can make intelligent routing choices. Because of this, EGP is no longer
popular.
7.5.2 Border Gateway Protocol
Border Gateway Protocol (BGP) is the leading exterior routing protocol of the Internet. It is based on
the OSI InterDomain Routing Protocol (IDRP). BGP supports policy-based routing, which uses nontechnical reasons (for example, political, organizational, or security considerations) to make routing
decisions. Thus BGP enhances an autonomous system's ability to choose between routes and to
implement routing policies without relying on a central routing authority. This feature is important in
the absence of core gateways to perform these tasks.
Routing policies are not part of the BGP protocol. Policies are provided externally as configuration
information. As described in Chapter 2, the National Science Foundation provides Routing Arbiters
(RAs) at the Network Access Points (NAPs) where large Internet Service Providers (ISPs)
interconnect. The RAs can be queried for routing policy information. Most ISPs also develop private
policies based on the bilateral agreements they have with other ISPs. BGP can be used to implement
these policies by controlling the routes it announces to others and the routes it accepts from others. In
file:///C|/mynapster/Downloads/warez/tcpip/ch07_05.htm (2 of 4) [2001-10-15 09:17:42]
[Chapter 7] 7.5 Exterior Routing Protocols
the gated section of this chapter we discuss the import command and the export command, which
control what routes are accepted (import) and what routes are announced (export). The network
administrator enforces the routing policy through configuring the router.
BGP is implemented on top of TCP, which provides BGP with a reliable delivery service. BGP uses
well-known TCP port 179. It acquires its neighbors through the standard TCP three-way handshake.
BGP neighbors are called peers. Once connected, BGP peers exchange OPEN messages to negotiate
session parameters, such as the version of BGP that is to be used.
The UPDATE message lists the destinations that can be reached through a specific path and the
attributes of the path. BGP is a path vector protocol. It is called a path vector protocol because it
provides the entire end-to-end path of a route in the form of a sequence of autonomous system
numbers. Having the complete AS path eliminates the possibility of routing loops and count-toinfinity problems. A BGP UPDATE contains a single path vector and all of the destinations reachable
through that path. Multiple UPDATE packets may be sent to build a routing table.
BGP peers send each other complete routing table updates when the connection is first established.
After that, only changes are sent. If there are no changes, just a small (19-byte) KEEPALIVE message
is sent to indicate that the peer and the link are still operational. BGP is very efficient in its use of
network bandwidth and system resources.
By far the most important thing to remember about exterior protocols is that most systems never run
them. Exterior protocols are only required when an AS must exchange routing information with
another AS. Most routers within an AS run an interior protocol such as OSPF. Only those gateways
that connect the AS to another AS need to run an exterior routing protocol. Your network is probably
an independent part of an AS run by someone else. Internet Service Providers are good examples of
autonomous systems made up of many independent networks. Unless you provide a similar level of
service, you probably don't need to run an exterior routing protocol.
7.5.3 Choosing a Routing Protocol
Although there are many routing protocols, choosing one is usually easy. Most of the interior routing
protocols mentioned above were developed to handle the special routing problems of very large
networks. Some of the protocols have only been used by large national and regional networks. For
local area networks, RIP is still the most common choice. For larger networks, OSPF is the choice.
If you must run an exterior routing protocol, the protocol that you use is often not a matter of choice.
For two autonomous systems to exchange routing information, they must use the same exterior
protocol. If the other AS is already in operation, its administrators have probably decided which
protocol to use, and you will be expected to conform to their choice. Most often this choice is BGP.
The type of equipment affects the choice of protocols. Routers support a wide range of protocols,
though individual vendors may have a preferred protocol. Hosts don't usually run routing protocols at
all, and most UNIX systems are delivered with only RIP. Allowing host systems to participate in
dynamic routing could limit your choices. gated, however, gives you the option to run many different
file:///C|/mynapster/Downloads/warez/tcpip/ch07_05.htm (3 of 4) [2001-10-15 09:17:42]
[Chapter 7] 7.5 Exterior Routing Protocols
routing protocols on a UNIX system. While the performance of hardware designed specifically to be a
router is generally better, gated gives you the option of using a UNIX system as a router.
In the following sections we discuss the Gateway Routing Daemon (gated) software that combines
interior and exterior routing protocols into one software package. We look at examples of running
RIP, RIPv2, OSPF, and BGP with gated.
Previous: 7.4 Interior
Routing Protocols
7.4 Interior Routing Protocols
TCP/IP Network
Administration
Book Index
Next: 7.6 Gateway Routing
Daemon
7.6 Gateway Routing Daemon
[ Library Home | DNS & BIND | TCP/IP | sendmail | sendmail Reference | Firewalls | Practical Security ]
file:///C|/mynapster/Downloads/warez/tcpip/ch07_05.htm (4 of 4) [2001-10-15 09:17:42]
[Chapter 7] 7.4 Interior Routing Protocols
Previous: 7.3 Building a
Static Routing Table
Chapter 7
Configuring Routing
Next: 7.5 Exterior Routing
Protocols
7.4 Interior Routing Protocols
Routing protocols are divided into two general groups: interior and exterior protocols. An interior
protocol is a routing protocol used inside - interior to - an independent network system. In TCP/IP
terminology, these independent network systems are called autonomous systems. [9] Within an
autonomous system (AS), routing information is exchanged using an interior protocol chosen by the
autonomous system's administration.
[9] Autonomous systems are described in Chapter 2, Delivering the Data.
All interior routing protocols perform the same basic functions. They determine the "best" route to
each destination, and they distribute routing information among the systems on a network. How they
perform these functions, in particular, how they decide which routes are best, is what makes routing
protocols different from each other. There are several interior protocols:
●
●
●
●
The Routing Information Protocol (RIP) is the interior protocol most commonly used on UNIX
systems. RIP is included as part of the UNIX software delivered with most systems. It is
adequate for local area networks and is simple to configure. RIP selects the route with the
lowest "hop count" (metric) as the best route. The RIP hop count represents the number of
gateways through which data must pass to reach its destination. RIP assumes that the best route
is the one that uses the fewest gateways. This approach to route choice is called a distancevector algorithm.
Hello is a protocol that uses delay as the deciding factor when choosing the best route. Delay is
the length of time it takes a datagram to make the round trip between its source and
destination. A Hello packet contains a time stamp indicating when it was sent. When the
packet arrives at its destination, the receiving system subtracts the time stamp from the current
time, to estimate how long it took the packet to arrive. Hello is not widely used. It was the
interior protocol of the original 56 kbps NSFNET backbone and has had very little use
otherwise.
Intermediate System to Intermediate System (IS-IS) is an interior routing protocol from the OSI
protocol suite. It is a Shortest Path First (SPF) link-state protocol. It was the interior routing
protocol used on the T1 NSFNET backbone, and it is still used by some large service
providers.
Open Shortest Path First (OSPF) is another link-state protocol developed for TCP/IP. It is
suitable for very large networks and provides several advantages over RIP.
file:///C|/mynapster/Downloads/warez/tcpip/ch07_04.htm (1 of 11) [2001-10-15 09:17:44]
[Chapter 7] 7.4 Interior Routing Protocols
Of these protocols, we will discuss RIP and OSPF in detail. OSPF is widely used on routers. RIP is
widely used on UNIX systems. We will start the discussion with RIP.
7.4.1 Routing Information Protocol
As delivered with most UNIX systems, Routing Information Protocol (RIP) is run by the routing
daemon routed (pronounced "route" "d"). When routed starts, it issues a request for routing updates
and then listens for responses to its request. When a system configured to supply RIP information
hears the request, it responds with an update packet based on the information in its routing table. The
update packet contains the destination addresses from the routing table and the routing metric
associated with each destination. Update packets are issued in response to requests, as well as
periodically to keep routing information accurate.
To build the routing table, routed uses the information in the update packets. If the routing update
contains a route to a destination that does not exist in the local routing table, the new route is added. If
the update describes a route whose destination is already in the local table, the new route is used only
if it has a lower cost. The cost of a route is determined by adding the cost of reaching the gateway that
sent the update to the metric contained in the RIP update packet. If the total metric is less than the
metric of the current route, the new route is used.
RIP also deletes routes from the routing table. It accomplishes this in two ways. First, if the gateway
to a destination says the cost of the route is greater than 15, the route is deleted. Second, RIP assumes
that a gateway that doesn't send updates is dead. All routes through a gateway are deleted if no
updates are received from that gateway for a specified time period. In general, RIP issues routing
updates every 30 seconds. In many implementations, if a gateway does not issue routing updates for
180 seconds, all routes through that gateway are deleted from the routing table.
7.4.1.1 Running RIP with routed
To run RIP using the routing daemon (routed), [10] enter the following command:
[10] On some systems the routing daemon is in.routed.
# routed
The routed statement is often used without any command-line arguments, but you may want to use
the -q option. The -q option prevents routed from advertising routes. It just listens to the routes
advertised by other systems. If your computer is not a gateway, you should probably use the -q option.
In the section on static routing we commented out the routed statement found in a startup file. If that
statement is in your startup file, no other action is required to run RIP; just boot your system and RIP
will run. Otherwise, add the routed command to your startup.
file:///C|/mynapster/Downloads/warez/tcpip/ch07_04.htm (2 of 11) [2001-10-15 09:17:44]