1. Trang chủ
  2. » Công Nghệ Thông Tin

Tài liệu Routing and Switching Alogrithms pdf

64 540 3
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Routing and Switching Algorithms
Trường học Cisco Systems
Chuyên ngành Routing and Switching
Thể loại Tài liệu
Định dạng
Số trang 64
Dung lượng 646,69 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Terms you’ll need to understand:✓ Distance vector protocols ✓ Routing Information Protocol RIP ✓ Interior Gateway Routing Protocol IGRP ✓ Enhanced Interior Gateway Routing Protocol EIGRP

Trang 1

Terms you’ll need to understand:

✓ Distance vector protocols

✓ Routing Information Protocol (RIP)

✓ Interior Gateway Routing Protocol (IGRP)

✓ Enhanced Interior Gateway Routing Protocol (EIGRP)

✓ Link-state protocols

✓ Intermediate System to Intermediate System (ISIS)

✓ Open Shortest Path First (OSPF)

✓ Hello packets

✓ Border Gateway Protocol (BGP)

✓ Interior Border Gateway Protocol (IBGP)

✓ Exterior Border Gateway Protocol (EBGP)

✓ Summarization

✓ Multicast

Techniques you’ll need to master:

✓ Describing the mechanics of RIP, IGRP, EIGRP, ISIS,OSPF, and BGP

✓ Setting up IP routing protocols in a simple designscenario

✓ Identifying the IP routing table for each routing protocol

Trang 2

This chapter presents the commands you need to know when configuring thevarious IP routing protocols on Cisco routers Frequently, the terminology pre-sents the most challenging aspect of understanding routing with Cisco IOS.Therefore, after reviewing the basic CCIE blueprint objectives covered in thischapter, we’ll offer a brief overview of basic terminology Then, we’ll move on todiscuss the Cisco IOS routing configuration commands.

The following CCIE blueprint objectives as laid out by the Cisco Systems CCIEprogram are covered in this chapter:

➤ Border Gateway Protocol (BGP)—Peer groups, route reflectors, confederations,

clusters, attributes, autonomous systems (AS), route maps, filters, neighbors,decision algorithm, Interior Border Gateway Protocol (IBGP), Exterior Bor-der Gateway Protocol (EBGP)

➤ Enhanced Interior Gateway Routing Protocol (EIGRP)—Metrics, mechanics,

and design

➤ Intermediate System to Intermediate System (ISIS)—Metrics, mechanics, and

design

➤ Open Shortest Path First (OSPF)—Areas, virtual links, stub, not so stubby

ar-eas (NSSA), area border router (ABR), autonomous system boundary router(ASBR) redistributions, media dependencies, external versus internal, sum-marization, designated router (DR), backup designated router (BDR), adja-cencies, link-state advertisement (LSA) types, link-state database, shortestpath first (SPF) algorithm, authentication

➤ Routing Information Protocol (RIP) and RIP II—Metrics, mechanics, and

design

➤ Multicast—Design, protocol independent multicast (PIM), Distance Vector

Multicast Routing Protocol (DVMRP), Internet Group Management tocol (IGMP)

Pro-As in other chapters in this book, additional information is provided in this chapterfor completeness and in preparation for additional subjects as the CCIE programexpands By now, you should be aware that a CCIE candidate’s knowledge mustspan a wide range of topics One topic of particular emphasis involves under-standing the Network layer and how Cisco devices can be used to accomplishintelligent routing This chapter, the largest chapter in the book, addresses thesefocal-point topics to help you fully prepare for the CCIE exam

Trang 3

Summary of Available IP

Routing Protocols

Cisco IOS supports a number of IP routing protocols Listing 6.1 shows therouting protocols supported by Cisco routers According to the CCIE exam objec-tives, you’re only required to understand RIP, IGRP, EIGRP, ISIS, OSPF, andBGP

Listing 6.1 The router ? command.

R2(config)#router ?

bgp Border Gateway Protocol (BGP)

egp Exterior Gateway Protocol (EGP)

eigrp Enhanced Interior Gateway Routing Protocol (EIGRP)

igrp Interior Gateway Routing Protocol (IGRP)

isis ISO ISIS

iso-igrp IGRP for OSI networks

mobile Mobile routes

odr On-Demand Stub Routes

ospf Open Shortest Path First (OSPF)

rip Routing Information Protocol (RIP)

static Static routes

RIP, IGRP, EIGRP, OSPF, and BGP are called dynamic protocols because they

employ techniques that “automatically” discover and learn IP routing

informa-tion from other routers Dynamic protocols use dynamic routing, a routing method

in which routers learn about IP networks without static configuration

In the upcoming sections, we’ll cover the distance vector protocols—RIP, RIP II,and IGRP Next, we’ll look at a hybrid distance vector and link-state protocol—EIGRP Then, we’ll cover the link-state protocols—ISIS and OSPF Finally, we’lldiscuss BGP, a path vector protocol, which is an advanced routing protocol usedextensively in the Internet

Routing Information Protocol (RIP) I and II

Routing Information Protocol (RIP) is a distance vector protocol, which useshop counts as the metric This metric determines whether an IP network will beplaced in the routing table There are two versions of RIP—RIP I and RIP II.Both RIP versions I and II operate over UDP using port 520 As discussed inChapter 2, RIP uses holddowns, split horizon, and poison reverse to avoid rout-ing loops RIP version I cannot carry subnet information, and it applies the de-fault network mask to all networks Hence, all networks within a RIP networkmust have the same subnet mask throughout RIP II does carry subnet informa-tion, because RIP II can use variable length subnet masking (VLSM)

Trang 4

RIP version I characteristics can be summarized as follows:

➤ Distance vector protocol

➤ Hop count is 15

➤ Broadcasts full routing table every 30 seconds

➤ RIP can load balance if the hop count is the same

RIP version II characteristics can be summarized as follows:

➤ Distance vector protocol

➤ Hop count is 15

➤ Supports VLSM (carries subnet information in updates)

➤ Authentication of IP routing updates

The deficiencies encountered in RIP I, such as no support for variable length net masks, spurred the release of RIP version II RIP II’s biggest improvement overRIP I is that RIP II supports variable length subnetting and authentication ofrouting updates RIP II is also a classless routing protocol, whereas RIP Version

sub-I is classful Rsub-IP sub-Isub-I still has a hop count limit of 15 Furthermore, Rsub-IP sub-Isub-I supportsmulticast updates While RIP II provides advancements over RIP I, it still con-tains some of the deficiencies found in RIP I For example, RIP II continues tosend full routing updates every 30 seconds and limits hop counts to 15 hops.Cisco routers support both RIP I and RIP II By default a Cisco router runs RIPversion I Therefore, by default, the router will listen to RIP II updates but willonly forward RIP I updates unless configured otherwise

Note: In order to configure RIP version II, you will have to be in the “router rip”

configuration mode.

To further clarify the operation of RIP I and RIP, let’s look at a sample RIPconfiguration on a small network consisting of four Cisco routers

Configurating RIP I and II

RIP is easy to configure, you start RIP with the IOS command router rip and

then apply the networks you want to be advertised The IOS command to enablethe local network within RIP is:

network <classful networks to be advertised>

For illustrative purposes, let’s configure the network shown in Figure 6.1 for IPRIP version I Then, we can modify the configuration to enable RIP II

Trang 5

In order to get our RIP network operating, a few steps will need to occur so let’sbriefly discuss them First, we will need to start the RIP routing process on eachrouter and then apply the networks that are advertised as shown previously TheRIP configuration on all three routers is identical because we are using the classfulClass A address of 10.0.0.0.

Listing 6.2 provides the configuration for router R1 shown in Figure 6.1 Router R1’sRIP configuration is identical to the configuration of routers R2 through R4

Listing 6.2 IP RIP configuration

Token Ring

s1

s0

s1 s3

s0 s1E0 E0

Figure 6.1 RIP network scenario.

Trang 6

As you can see in Listing 6.2, the network uses the Class A network of 10.0.0.0.Hence, we only need one line to identify the directly connected networks To

view the IP routing table, you type the IOS command show ip route Listing 6.3

shows the R1 router’s routing table

Listing 6.3 The show ip route command.

C 10.1.2.0/24 is directly connected, Serial2

C 10.1.1.0/24 is directly connected, Ethernet0

24 is indicated by the R on the left side Because the hop count 1 is sent via Serial

1 and Serial 2, the Cisco router will load balance across the two paths to theremote network 10.1.5.0/30 Following this is the next hop address (10.1.7.2 or10.1.2.2, for example, to the remote network 10.1.5.0/30) and how long the net-work has been valid in minutes and seconds Let’s take another remote network,say 10.1.9.0/24, in the routing table:

R 10.1.9.0/24 [120/4] via 10.1.4.1, 00:00:22, Serial3

We’ll define the network as follows:

➤ R—The network was learned via RIP (The key is shown at the beginning of

the table.)

➤ 10.1.9.0/24—Which subnet is learned and how many bits of subnetting are

applied

Trang 7

➤ [120/4]—Administrative distance/hops

➤ via 10.1.4.1—The IP address of the interface that the router learned the route

from

➤ 00:00:22—How long ago was the route learned

➤ Serial3 —What interface the network has been discovered from

As you can see in Listing 6.3, the network 10.1.5.0/24 is reachable via routers R2and R3 with the same hop count (1) so RIP will load balance to this networkbecause of the multiple paths Listing 6.3 also shows a default route The defaultroute is used if there is an IP packet to an unknown destination In Listing 6.3,the default route will be sent to the next hop address 10.1.4.1 or router R4 Let’sassume you have been supplied a default router from the source address131.108.1.100 To create a default route in RIP, you use the following command:

ip route 0.0.0.0 0.0.0.0 131.108.1.100

Note: The combination of a source address of 0.0.0.0 and mask of 0.0.0.0 indicates a

special route known as a default route.

The preceding command injects a default route into any neighboring RIP ers To view the characteristics of how RIP is operating on a Cisco router, you can

rout-use the show ip protocol command, as illustrated in Listing 6.4.

Listing 6.4 The show ip protocol command.

R1#show ip protocol

Routing Protocol is "rip"

Sending updates every 30 seconds, next due in 21 seconds

Invalid after 180 seconds, hold down 180, flushed after 240

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Redistributing: rip

Default version control: send version 1, receive any version

Interface Send Recv Key-chain

Routing Information Sources:

Gateway Distance Last Update

10.1.8.1 120 00:00:13

Distance: (default is 120)

Trang 8

As you can see in Listing 6.4, the router sends updates every 30 seconds, and thenext expected update will be in 21 seconds; RIP version I packets are being sentout on interfaces E0, S0, S1, S2, and S3; and the router is listening to both RIP Iand RIP II The administrative distance, which is defined as a group of hosts orrouters under a common management, for RIP is 120.

For further study, let’s now change the subnet mask on all the serial links to a bit mask or 255.255.255.252 RIP I will not support variable length subnet masking(VLSM), so we’ll turn on RIP II globally To activate RIP II, you enter the com-mand displayed in Listing 6.5

30-Note: All serial links in Figure 6.1 have been configured with 30 bit mask For

example, the link between R1 and R4 that was assigned the subnet 10.1.4.0/24 has now become 10.1.4.0/30, and so forth.

Listing 6.5 Enabling RIP II

router rip

version 2

The commands in Listing 6.5 will force the router to send and receive RIP sion II packets only Let’s take another look at the routing table for R1 now thatRIP II is enabled for the router Listing 6.6 shows the updated routing table

ver-Listing 6.6 The show ip route command after enabling RIP II.

R1#sh ip route

Gateway of last resort is 10.1.4.1 to network 0.0.0.0

10.0.0.0/8 is variably subnetted, 16 subnets, 2 masks

C 10.1.2.0/30 is directly connected, Serial2

C 10.1.1.0/24 is directly connected, Ethernet0

Trang 9

Notice that the serial networks display with the new 30-bit notation, and theClass C networks display RIP I would not be able to cope with IP networks withvarying masks.

Now, take a look at Listing 6.7, which shows the output you receive when the

show ip protocol command is issued after RIP II is in use.

Listing 6.7 The show ip protocol command after enabling RIP II.

R1>sh ip protocol

Routing Protocol is "rip"

Sending updates every 30 seconds, next due in 7 seconds

Invalid after 180 seconds, hold down 180, flushed after 240

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Redistributing: rip

Default version control: send version 2, receive version 2

Interface Send Recv Key-chain

Routing Information Sources:

Gateway Distance Last Update

Table 6.1 Summary of RIP commands.

Command Description

debug ip rip events Outputs IP RIP events, such as updates every

30 seconds

debug ip rip Displays the RIP routing transactions

neighbor <ip address> Establishes a link to a remote router via unicast

network <network number> Runs RIP on the associated interface

(continued)

Trang 10

Note: RIP is relatively easy to configure and troubleshoot when compared to other

protocols, such as OSPF Therefore, RIP was popular in the early days of IP

100 hops

IGRP uses a concept called autonomous systems (AS) An AS is a domain under

the same administration The AS number will be unique in each domain, and the

numbers are controlled by IANA (www.iana.org) IGRP AS’s numbers are not

Table 6.1 Summary of RIP commands (continued).

Command Description

offset-list <access list> {in|out} Modifies an incoming or outgoing hop count

<offset>

passive-interface <interface> Stops RIP updates from being sent out only

timers basic <update> Modifies RIP timers

<invalid> <holdown> <flush>

ip rip authentication key-chain Specifies authentication parameters

<key chain>

ip rip authentication mode Indicates the RIP mode for password authentication;

md5 or clear text is supported

ip rip send version [1] [2] Specifies the version of RIP to send out to an

individual interface

ip rip receive version [1] [2] Specifies the version of RIP to receive out of an

individual interface

Trang 11

maintained by IANA but BGP AS numbers are For example, to enable IGRP in

AS 10, you would use the following command:

router igrp 10

A router in the same domain would need to have the same AS number configured

in order for it to exchange routing information with other routers running IGRP.IGRP’s key points can be summarized as follows:

➤ It is scalable to large networks, because it supports up to 255 hops

➤ The use of a composite metric ensures that high-bandwidth links are used

➤ It can load share up to six paths (the default is four paths)

➤ It is a distance vector protocol, which sends out updates periodically

The metric used by IGRP to measure the best path to a remote network is to use

a composite metric that includes the bandwidth, reliability, delay, and load Bydefault, only the bandwidth and the delay is used to measure how long a packetwill take to leave an interface The bandwidth is calculated in kilobits, and thedelay is calculated in microseconds The formula to calculate the IGRP metric inits simple form is:

IGRP metric = 10 7 /Bandwidth + Delay/10

For example, assuming a delay of 20,000 msec on a 1,544K line, the IGRP metricwould be calculated as:

IGRP metric = 10 7 /1544 + 20000/10 = 6476+2000=8476

The full IGRP metric can be based on reliability and load (default metrics) Ifthese metrics are used, then the formula becomes:

IGRP metric = K1 * bandwidth + (K2 * bandwidth)/(256-load) + K3*Delay

In the preceding formula, the values K1 through K5 are constants If the defaultsare not modified by the administrator, then K1=K3=1 and K2=K4=K5=0

If K5 is not 0 or it’s given an appropriate value as directed by a qualified Ciscoengineer, then you also have the formula IGRPmetric = Metric * [K5/(reliability +K4)] In effect, the metric is simply multiplied by the constant K5/K4 Thesevalues should only be changed under the guidance of a qualified engineer at Ciscosystems This metric was designed to ensure that networks are selected based on

a number of key parameters, and that packets are sent over the best path (unlike

Trang 12

RIP, which would not recognize the difference between a 1,544Kbps line and a64K line).

Let’s examine how to configure IGRP on a Cisco router using the same networktopology shown earlier in Figure 6.1

Listing 6.8 displays router R1’s routing table

Listing 6.8 The show ip route command after configuring IGRP on R1.

R1#sh ip route

10.0.0.0/24 is subnetted, 9 subnets

C 10.1.9.0 is directly connected, Ethernet0

C 10.1.8.0 is directly connected, Serial0

I 10.1.3.0 [100/158350] via 10.1.8.2, 00:00:01, Serial0

I 10.1.2.0 [100/160250] via 10.1.4.2, 00:00:01, Serial2 [100/160250] via 10.1.8.2, 00:00:01, Serial0

I 10.1.1.0 [100/89056] via 10.1.4.2, 00:00:01, Serial2

I 10.1.7.0 [100/160250] via 10.1.4.2, 00:00:01, Serial2

I 10.1.6.0 [100/160350] via 10.1.4.2, 00:00:01, Serial2 [100/160350] via 10.1.8.2, 00:00:01, Serial0

I 10.1.5.0 [100/160250] via 10.1.8.2, 00:00:01, Serial0

C 10.1.4.0 is directly connected, Serial2

Notice that the networks are now reachable via I (IGRP), and the administrative

distance is 100 The metric is also a larger number IGRP will load balance if thecomposite metric is the same In the entry for 10.1.6.0/24, you can see that thereare two alternate paths via Serial2 and Serial 0, because the metric is the same(160350)

To display the characteristics of IGRP, issue the show ip protocols IOS

com-mand, as shown in Listing 6.9

Listing 6.9 The show ip protocols command after enabling IGRP.

R1#sh ip protocols

Routing Protocol is "igrp 1"

Sending updates every 90 seconds, next due in 18 seconds

Invalid after 270 seconds, hold down 280, flushed after 630 Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Trang 13

Default networks flagged in outgoing updates

Default networks accepted from incoming updates

IGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0

IGRP maximum hopcount 100

IGRP maximum metric variance 1

Redistributing: igrp 1

Routing for Networks:

10.0.0.0

Routing Information Sources:

Gateway Distance Last Update

AD is lower

You can force IGRP to load balance over unequal cost paths by using the ance command Further, you can define how undesirable an alternate path can bebefore that path is rejected Keep in mind that IGRP does not carry subnet maskinformation, so we cannot use networks with different classes of address (in otherwords, IGRP is a classful routing protocol)

vari-Table 6.2 provides a summary of the common IGRP configuration commandsthat you will need to know

The maximum hop count for IGRP is 255 hops, and the update interval

is 90 seconds An IGRP packet can carry 104 networks

Eventually, Cisco developed another proprietary protocol that improved onIGRP—Enhanced Interior Gateway Routing Protocol (EIGRP)

Table 6.2 Summary of IGRP commands.

Command Description

maximum-paths Sets the maximum path; the default is 4

metric maximum-hops <hops> Specifies the maximum hops IGRP will use; the

default is 100, and the range is from 1 through 255

neighbor <ip address> Establishes a link to a remote router using a unicast address

network <network number> Runs IGRP on the associated interface

(continued)

Trang 14

Enhanced Interior Gateway Routing

Protocol (EIGRP)

Cisco Systems followed the development of IGRP with Enhanced IGRP(EIGRP) Enhanced IGRP combined the characteristics of distance vector pro-tocols and link-state protocols (link-state protocols are addressed later in this

chapter) Therefore, EIGRP is commonly referred to as a hybrid routing protocol.

EIGRP uses distance vector properties to determine the best path to a networkand uses link-state properties when changes occur or when detecting new neigh-bors EIGRP uses the Diffusing Update Algorithm (DUAL), which provides forfast convergence, VLSM, and partial updates EIGRP supports other desktopprotocols, such as IPX and AppleTalk, which are discussed in Chapter 7.The main characteristics of EIGRP include the following:

➤ Uses the same composite metric as IGRP, but the metric is multiplied by 256

➤ Sends network changes, but does not send periodic updates

➤ Load shares up to six paths (The default is four paths.)

➤ Serves as a hybrid protocol

➤ Performs automatic redistribution between IGRP and EIGRP when usingthe same AS

➤ Requires less CPU resources compared to IGRP By default, EIGRP allows

up to 50 percent of the bandwidth

➤ Carries subnet information in updates, which means support for VLSM

➤ Supports authentication (in IOS release versions 11.3+)

Table 6.2 Summary of IGRP commands (continued).

Command Description

passive-interface <interface> Stops IGRP updates from being sent out only

router igrp <AS> Runs IGRP with an autonomous number required

timers basic <update> Modifies IGRP timers

<invalid><holdown> <flush>

variance <value> Specifies load balancing over unequal cost paths

default-metric bandwidth delay Specifies the default metrics when redistributing

reliability loading mtu

debug ip igrp events Provides routing messages that are sent

and received

debug ip igrp transaction Displays the transactions that are being handled

Trang 15

To ensure that routing information is valid, EIGRP uses several components:

➤ Protocol dependant modules—Provides support for other routable protocols,

such as IPX and AppleTalk

➤ Reliable transport protocol—Ensures the delivery of EIGRP packets, which in

turn leads to reliable routing tables Packets are sent to the reserved class Daddress 224.0.0.10

➤ Neighbor discovery/recovery—Enables EIGRP to discover new neighbors on

any network segment EIGRP will discover when neighbors are no longerreachable and tear down any routes that originated from unreachable neigh-bors When a neighbor has been discovered, the two routers send each othertheir reachable networks EIGRP will use the least-cost path to a network.The neighboring router is termed the feasible successor Any other routerthat provides the same route information, which also provides a loop free

path, is called a feasible successor EIGRP will determine which path has the

lowest metric and that router will be chosen as the successor If this routergoes down for some reason, EIGRP will attempt to calculate a new path

Configuration of EIGRP

Once again, let’s refer the routers shown in Figure 6.1 for illustrative purposes Inthis section, the routers will be configured for EIGRP To do so, you must changethe routing process to EIGRP on all four routers using the following command:

router eigrp 1

network 10.0.0.0

Listing 6.10 shows the IP routing table for router R1 after EIGRP is configured

Listing 6.10 The show ip route command after enabling EIGRP.

C 10.1.2.0 is directly connected, Serial2

C 10.1.1.0 is directly connected, Ethernet0

C 10.1.7.0 is directly connected, Serial1

Trang 16

Notice in Listing 6.10 that the networks are reachable via D (EIGRP) and the

administrative distance is 90 The metric is 256 times what IGRP will calculate.When IGRP was running, the cost calculated by router R1 to the network 10.1.6.0was 158350 With EIGRP started, the metric is 40537600 or 256*158350

To display the characteristics of EIGRP, issue the show ip protocol IOS command.

Listing 6.11 provides the output of this command when issued on router R1

Listing 6.11 The show ip protocols command after enabling EIGRP.

R1#sh ip protocols

Routing Protocol is "eigrp 1"

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Default networks flagged in outgoing updates

Default networks accepted from incoming updates

EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0

EIGRP maximum hopcount 100

EIGRP maximum metric variance 1

Redistributing: eigrp 1

Automatic network summarization is in effect

Routing for Networks:

10.0.0.0

Routing Information Sources:

Gateway Distance Last Update

10.1.2.2 90 00:05:52

10.1.7.2 90 00:05:52

10.1.4.1 90 00:05:52

Distance: internal 90 external 170

As you can see in Listing 6.11, the AS is 1, and there is no update interval cause only changes are sent by EIGRP Also, the administrative distance (AD)

be-for EIGRP is 90 be-for internal routes, and 170 be-for external routes External routes

are networks injected into an EIGRP domain by another routing protocols, such

as RIP

When using EIGRP, you might want to display information about neighboring

routers To do so, you can use the show ip eigrp neighbor command This

com-mand displays current routers in the same AS also running EIGRP—the listedrouters share information between each other or form adjacencies in order tofacilitate this exchange

Listing 6.12 provides the status of adjacencies on router R1 we, which shouldinclude the other three routers (R2, R3, and R4)

Trang 17

Listing 6.12 The show ip eigrp neighbors command.

R1#sh ip eigrp neighbors

IP-EIGRP neighbors for process 1

H Address Interface Hold Uptime SRTT RTO Q Seq

marization by using the no auto-summary IOS command You can also ally summarize a network as a classless route by applying the ip summary-address eigrp <AS> <network> <mask> interface command Table 6.3 provides a sum-

manu-mary of common EIGRP IOS commands

Now, let’s move on to a more advanced type of routing protocol, namely state protocols We will begin by discussing Intermediate System to IntermediateSystem (ISIS) protocol and then we’ll take a look at Open Shortest Path First(OSPF)

link-Table 6.3 Summary of EIGRP commands.

Command Description

auto-summary Enables auto summarization This is the default

action.

Maximum-paths Sets the maximum paths The default is 4.

metric maximum-hops <hops> Specifies the maximum hops EIGRP will use The

default is 100, and the range is from 1 through 255.

ip summary-address eigrp Enables summarization.

autonomous-system-number

address mask

network <network number> Runs EIGRP on the associated interface.

passive-interface <interface> Stops EIGRP updates and hello packets from being

sent out.

router eigrp <AS> Runs EIGRP with autonomous number required.

Show ip eigrp neighbors Displays neighbors in the same AS.

variance <value> Specifies load balancing over unequal cost paths.

Bandwidth Specifies the parameter used for metric calculation.

ip bandwidth-percent eigrp Configures the maximum allowable bandwidth to be

used by EIGRP packets The default is 50 percent of the bandwidth.

Trang 18

Intermediate System to Intermediate System (ISIS)

Intermediate System to Intermediate System (ISIS) is a link-state protocol Cisco’simplementation of ISIS will populate a routing table with remote IP networks.ISIS will form a link-state database and will only send out updates when a net-work event has occurred

Note: ISIS and OSPF are link state protocols used by Cisco routers Link-state refers

to the state of an interface, including the status of the interface, IP address, subnet mask, and network type All these bits of information describe the state of the interface, or the link state.

The main characteristics of ISIS include the following:

➤ Sends out hello packets that discover new neighbors A hello packet is a

multi-cast packet that is used by routers for discovering neighboring devices, such

as routers

➤ Maintains a link-state database

➤ Summarizes networks to reduce the size of routing tables

➤ Serves as a classless protocol (which means ISIS supports VLSM)

➤ Authenticates IP routes

A Cisco router running ISIS can be an intermediate system (IS) or an end system(ES) An IS node is simple a routing node in an OSI network An ES node is gener-ally an end-user device on a network Figure 6.2 shows a typical ISIS environment

As you can see in Figure 6.2, the communication between end systems and anintermediate system is identified as an ES-IS connection Communication be-tween IS end systems is referred to as an ISIS connection Figure 6.2 also definesareas in the ISIS environment that reduce the routing table’s size and memoryrequirements—namely, router R1 in area 1 and R2 in area 2 Routers that haveES-IS and ISIS connections will maintain a different database for each connec-tion Further, routers in the same area will maintain a Level 1 (L1) database,while routers in different areas will need to maintain Level 1 and Level 2 (L1/L2) databases These are the link-state database used by ISIS

Trang 19

➤ Configure ISIS interface parameters.

➤ Configure area parameters

➤ Configure any miscellaneous parameters

The three methods (referred to as network entities) used to define an ISIS area

and their field formats are:

➤ Simple—Area System ID SEL

➤ OSI—Domain Area System ID SEL

➤ GOSIP—AFI ICD DFI AAI Reserved RDI Area System ID SEL

The meaning of each network entity field is defined as follows:

➤ AFI—Authority and format identifier (47, for Cisco routers)

➤ ICD—International code designator

➤ DFI—Domain-specific part

➤ AAI—Administrative authority identifier

➤ RDI—Routing domain identifier (an autonomous system number)

➤ SEL—Selector byte used to ensure uniqueness in the address (NSAP is

Net-work Service Access.)

Router

R1

Router R2

PC

Ring

PC ES-IS

ISIS Area 1

Trang 20

➤ Area—This value is used by level 2 routers

➤ System ID—Used by level 1 routers typically an interface MAC-address

Note: You are not be expected to remember these formats They are included here for

your reference only.

Let’s configure the routers in Figure 6.2 for ISIS and place each router in thesame domain We’ll use the simple address format and enable ISIS on all inter-faces The area ID on all four routers will be set to 47 Listings 6.13 through 6.16display the ISIS configuration on routers R1, R2, R3, and R4

Listing 6.13 ISIS configuration on R1

Trang 22

Listing 6.17 The sh ip route command after configuring ISIS on R1.

C 10.1.2.0 is directly connected, Serial2

C 10.1.1.0 is directly connected, Ethernet0

C 10.1.7.0 is directly connected, Serial1

i L1 10.1.6.0 [115/20] via 10.1.7.2, Serial1

i L1 10.1.5.0 [115/20] via 10.1.7.2, Serial1

[115/20] via 10.1.2.2, Serial2

C 10.1.4.0 is directly connected, Serial3

As you can see in Listing 6.17, the remote networks are reachable through ISIS.The administrative distance for ISIS is 115, and the metric is 20 The left-hand

side of the displays shown with lower case letter i, which indicates ISIS is the

routing protocol used to reach the remote network You can display the protocol

characteristics on any ISIS router by using the show ip protocols IOS command,

as shown in Listing 6.18

Listing 6.18 The show ip protocols command after enabling ISIS.

Routing Protocol is "isis"

Sending updates every 0 seconds

Invalid after 0 seconds, hold down 0, flushed after 0

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Redistributing: isis

Trang 23

Routing Information Sources:

Gateway Distance Last Update

10.1.2.2 115 00:05:16

10.1.7.2 115 00:05:17

10.1.4.1 115 00:05:17

Distance: (default is 115)

Notice in Listing 6.18 that updates are not sent unless a change occurs, like any

link-state protocol To configure a default route, you use the default-information originate command; otherwise, the default router will not be advertised Listing

6.19 outlines the configuration on router R4 required to advertise a default route

Listing 6.19 Default route configuration on router R4

!Injects a Default route

The routing table for router R1, shown in Listing 6.20, shows that a default routehas been installed into the routing table

Listing 6.20 The show ip route command showing a default route on router R1.

R1#sh ip route

i L1 10.1.5.0 [115/20] via 10.1.7.2, Serial1

[115/20] via 10.1.2.2, Serial2

C 10.1.4.0 is directly connected, Serial3

i*L2 0.0.0.0/0 [115/10] via 10.1.4.1, Serial3

As you can see in Listing 6.20, the default router for R1 is via Serial 3 or router R4.There are many configuration and display options for ISIS Table 6.4 provides asummary of the major commands available on a Cisco router when running ISIS.Another very popular link-state protocol is Open Shortest Path First (OSPF)

Trang 24

Open Shortest Path First (OSPF)

Open Shortest Path First (OSPF) is a link-state protocol used by internal works This means that OSPF distributes information between routers belong-ing to the same autonomous system OSPF runs over IP enabled networks andOSPF has been defined in many RFCs over the years

net-OSPF was originally developed in RFC 1131, and its most recent specificationsare in RFC 2328 OSPF was designed to handle large IP networks and manage

them into smaller networks called areas Areas are used to reduce memory and

CPU requirements OSPF is much more process intensive than RIP, IGRP, andEIGRP

The popularity of OSPF ensures that it will remain as a primary routing protocolfor some years to come Figure 6.3 illustrates a brief history of OSPF, beginningwith its inception in 1989

The main features of OSPF include the following:

➤ Supports VLSM and classless behavior

➤ Uses a metric based on a cost value The formula used is 108/Bandwidth inBPS

➤ Supports equal cost load balancing up to six paths

➤ Uses hello packets to discover and maintain links to other routers, whichreduces bandwidth requirements

➤ Supports authentication

Table 6.4 Summary of ISIS commands.

Command Description

router isis Enables ISIS.

net entity Configures the network for the router.

ip router isis Enables ISIS on a local interface.

isis metric Sets the metric used by ISIS for Level 1 or 2 interfaces.

isis hello-interval Sets the hello interval in seconds.

isis password Sets the password used in authentication.

default-information originate Advertises a default route.

summary-address Summarizes networks.

show isis database Displays the ISIS link-state database.

show isis spf-log Displays the number of times the SPF algorithm has

been run due to network changes.

Trang 25

➤ Provides fast convergence.

➤ Provides network summarization

➤ Supports dial-on-demand links

Before you look at an example of enabling OSPF, you should review some of thekey concepts and terminology used in OSPF networks

OSPF Key Concepts and Terminology

In this section, we will discuss concepts and terminology that are used in OSPFnetwork Namely, this section addresses the following topics:

➤ Adjacency

➤ Router ID

➤ Shortest path first (SPF) Algorithm

➤ Area border routers (ABRs)

➤ Virtual links

➤ Authentication

➤ OSPF over demand circuits

➤ OSPF network types and broadcast media

➤ Designated and backup designated routers

OSPF,

version 1

RFC 1131

Interaction with BGP

OSPF over dial-up support added

OSPF,

version 2

MIB added

OSPF, version 2 updated in RFC 1583

OSPF, version 2 updated in RFC 2178

(current) OSPF version 2 updated in RFC 2328

Trang 26

OSPF Adjacency

What is an adjacency? Basically, adjacency occurs when two routers running OSPF,for instance, have discovered each other and exchanged routing information Thiscommunication is bidirectional (both ways) To view the adjacency on a Cisco

router, you use the show ip ospf neighbor command Listing 6.21 provides an

example of adjacency taken from a Cisco router with one neighbor

Listing 6.21 The show ip ospf neighbor command showing adjacency.

R1#sh ip ospf nei

Neighbor ID Pri State Dead Time Address Interface 10.1.9.1 1 FULL/ - 00:00:39 10.1.4.1 Serial3

The sample display shows the following fields:

➤ Neighbor ID—The remote router’s ID, which is unique in the domain.

➤ Pri—IP OSPF priority of neighbor.

➤ State—OSPF state (other states are described in the following text).

➤ Dead time—Expected time before Cisco IOS software will declare that the

neighbor is dead

➤ Address—IP address of the local interface.

➤ Interface—The interface on which the neighbor exists (Serial3 in the

preced-ing example)

There are a number of OSPF states between routers The OSPF state indicatesthe relationship between two OSPF-speaking routers The available states include:

➤ Down—No information has been received from any device.

➤ Attempt—No recent information has been received from the neighbor.

➤ Init—The interface has detected a hello packet coming from a neighbor, but

bidirectional communication has not yet been established

➤ Two-way—Bidirectional communication with a neighbor exists.

➤ Exstart—Routers are trying to establish the initial sequence number that is

going to be used in the information exchange packets The sequence numberensures that routers always get the most recent information One router willbecome the primary router and the other will become secondary The primaryrouter will poll the secondary for information

➤ Exchange—Routers exchange entire link-state databases.

➤ Loading—Routers are finalizing the information exchange.

➤ Full—Adjacency is completed At this stage, the routers have the same database.

Trang 27

OSPF Router ID

A router ID is used by OSPF to distinguish the routing process from other

rout-ers A router ID must be unique across an OSPF network This ID is the highest

IP address on the router, or if you use a loopback interface, it is the highest address

assigned by any loopback A loopback interface is a software (logical) interfacethat will never fail because the loopback interface has no physical cable connec-tion subject to failure like an Ethernet interface for example If a network uses aserial line IP address and it continually fails, then OSPF would need to restartevery time there is a failure Therefore, it is highly recommended to use a loopbackaddress when using OSPF to maintain network stability Listing 6.22 displays

the output when you view the router ID on a Cisco router, using the show ip ospf database command.

Listing 6.22 The show ip ospf database command showing the router ID.

R1>sh ip ospf database

OSPF Router with ID (10.1.7.1) (Process ID 1)

Router Link States (Area 0)

Link ID ADV Router Age Seq# Checksum Link count

10.1.7.1 10.1.7.1 624 0x80000007 0x5F7B 6

10.1.9.1 10.1.9.1 621 0x80000004 0x156E 4

The router ID for this router is the address 10.1.7.1 This is the highest IP dress configured on the router, which happens to be Serial 1 If you configured aloopback address using the address 9.1.1.1, the router ID would change to 9.1.1.1,

ad-as shown in Listing 6.23

Listing 6.23 The show ip ospf database command.

R1#sh ip ospf data

OSPF Router with ID (9.1.1.1) (Process ID 1)

Router Link States (Area 0)

Link ID ADV Router Age Seq# Checksum

Shortest Path Tree (SPT)

Another OSPF concept you need to be aware of is the shortest path tree EachOSPF router will place itself at the root of the tree and determine the least costpath to all networks Figure 6.4 provides an example calculation of OSPF cost

Trang 28

In Figure 6.4, router R1 has two connections to routers R2 and R3 The cost onthese links are 10 and 40, respectively Router R1 will form a tree with itself as theroot and calculate the cost to the remote networks as follows:

10.1.2.0/24 as 10+20=30 and 10.1.3.0/24 as 40+10=50

Cisco’s routers running OSPF will keep track of up to six equal cost paths to thesame destination After the router builds the shortest path tree, it starts to buildthe routing table accordingly Any directly connected networks will be reachedvia a metric (cost) of 0

Area Border Routers (ABRs) and Virtual Links

As previously mentioned, OSPF uses areas to limit memory and CPU ments A that router can be in one area is termed an internal router, a router inmultiple areas is termed an area border router A router that is also part of an-other routing domain is termed an autonomous system area border router (ASBR).Finally, there is another area in OSPF that is usually present in all networks—the

require-backbone area, or the area designated as Area 0.

Areas are used to stop the explosion of link-state updates Flooding and tion of the Dijkstra algorithm on a router is limited to changes within an area Allrouters within an area have the exact link-state database Routers can be morethan one type of OSPF route, as illustrated in Figure 6.5

Cost = 10 10.1.3.0/24 Cost = 10 Cost = 40

Cost = 30 Cost = 50

Router R1 calculates

least cost path with

itself as the root of

a tree

10.1.4.0/24 10.1.5.0/24

Figure 6.4 Shortest Path Tree example.

Trang 29

In Figure 6.5, you can see three areas—Area 0 (the backbone area), Area 1, andArea 2 Routers R1 through R4 are in Area 0, routers R5 through R7 are in Area 1,and routers R8 through R10 are in Area 2 All routers within a single area only

are called internal routers In Area 0, the backbone routers (also called internal

routers) include R1 and R3, because those two routers only connect to a single

area Routers connected to multiple areas are called area border routers (ARBs) In

Figure 6.5, routers R2, R4, R5, R8, and R9 are area border routers Routers

con-necting to external routing domains are autonomous system boundary routers

(ASBRs) In Figure 6.5, the router named R10 can be classified as an ASBR.Routing information that is exchanged between the various OSPF router typesare termed as follows:

➤ Router links—Sent by all routers Describes the state and cost on the router’s

own links

➤ Network links—Generated by routers sharing the same media, such as Ethernet

or Token Ring Sent by internal routers

➤ Summary links—Sent by ABRs only Describes networks to other areas but

under the same autonomous system

R5

Router Links

Area 1

BGP Domain

or the Internet

ISP

R9

Network Lines R8

R10

Router Links Area 2

External Links

LSA type Router links 1

Trang 30

➤ External links—Sent by ASBRs only Describes networks to external routers not in the same autonomous system External routes can be external type 1 or external type 2 The difference between the two types lies in the way the cost

(metric) of the route is calculated The cost of a type 1 route is determined byadding the external cost and the internal cost used to reach the route Thecost of a type 2 route always equals the external cost, because the internal cost

is irrelevant OSPF type 1 routes are always preferred over type 2 routes forthe same destination, because the cost will always be lower

Networks learned from routers in the same area are called intra-arearoutes, networks learned via other areas are termed inter-area routes.Cisco routers always choose an intra-area route before an inter-area,followed by external networks

There are two more area types that can be defined in OSPF domains—stubby and not so stubby areas (NSSAs) Similar to the previously discussed areas, these

area types are used to reduce the memory and CPU requirements in OSPF works A stub area is where you have a single entry and exit port This setup helps

net-to reduce advertisements in the area and the backbone Not so stubby areas (NSSA)allow external routes to be advertised with but also have the same characteristics

of a stub area As mentioned earlier, external routes are networks that have beenlearned from another routing protocol that have been redistributed into OSPF.All routers in a single area must have at least one router connected to the back-bone area for OSPF routes to be injected into the routing table If a situation

exists like the one in Figure 6.6, then you can use a virtual link A virtual link can

overcome the limitation of having to connect to the backbone by creating a nection between areas not directly connected to the OSPF backbone area 0.0.0.0.This is not the best solution, though, and is typically only used during a migra-tion phase The network shown in Figure 6.6 requires a virtual link

con-In Figure 6.6, the routers in area 2 will not be able to see the backbone area andvice versa, because, in OSPF, all areas must be connected to the backbone In thistype of situation, you could use one of two options to overcome the limitation ofnot connecting remote areas to the OSPF backbone area or to an ABR router.You could install a link between area 2 and the backbone, or you could configure

a virtual link between area 2 and the backbone

Virtual links are used for two purposes:

➤ Linking an area that does not have a physical connection to the backbone

➤ Patching the backbone in case discontinuity of area 0 occurs

Trang 31

OSPF Authentication

OSPF has the capability of authenticating all packets that are exchanged tween adjacent neighbors Authentication ensures that only trusted routers willsend and receive IP network information Cisco routers support plain text andMD5 authentication

be-To enable authentication, follow these two simple steps:

1 Enable the authentication on the interface

2 Enable authentication in the ospf area

We will cover the IOS command set a little later in this chapter when we look atthe code used to configure OSPF

OSPF over Demand Circuits

OSPF routers discover their neighbors using the hello protocol, similar to other link-state protocols Hello protocols send and receive hello packets over a set in-

terval For example, on a Basic Rate Interface (BRI), the default hello interval is

Area 0 cannot see Area 2 and vice versa.

Routers in Area 1 can see both domains.

Figure 6.6 Virtual links.

Trang 32

If a hello packet is not received by a value of four times the hello interval (this is

called the dead interval), then the adjacency (two routers that have exchanged

their full database) will be torn down In this way, hello packets can cause a

dial-up link to remain active, even if no data is being sent OSPF over a demandcircuit provides a solution to this problem OSPF over demand circuits stopshello packets after the two routers have exchanged their database Then, the link

is only brought up if data is transferred This saves the on WAN costs The

en-able OSPF on demand issue the ip ospf demand-circuit IOS command.

OSPF Network Types and Broadcast Media

OSPF supports several network types, including Ethernet and Frame Relay Thisflexibility enables OSPF to run on any network, including Ethernet, Token Ring,

Frame Relay, and X25 OSPF uses multicasts (multicasts are frames sent to a

unique address that are recognized by multicast clients as destined for them) todiscover and maintain neighbors If a multicast cannot access a medium, an adja-cency won’t be formed and no IP networks will be injected into the routing tables.Cisco supports a number of network types, including broadcast, non-broadcast,and multipoint networks Broadcast media do not require any additional con-figuration, because new routers are discovered via the hello protocol Non-broad-

cast media require manual configuration with the neighbor <ip address> command.

Multipoint interfaces look like a number of point-to-point interfaces with eachdevice advertising its IP address

Designated and Backup Designated Routers

Broadcast networks, such as Ethernet, might provide a problem for network signers who do not want every device running OSPF on a local LAN to form anadjacency (if you had 10 routers on a local Ethernet running OSPF, there would

de-be 9 adjacencies per router, or 45 connections!) Fortunately, OSPF is designed to

reduce this requirement by having one router serve as the designated router (DR) and another as the backup designated router (BDR).

With a DR and BDR, the DR establishes an adjacency with all routers, and theBDR waits until the DR fails to step in and do the same function, such as dis-seminating information among the local routers to reduce bandwidth require-ments The BDR does this almost instantaneously The function of the DR is to:

➤ Generate network link advertisements on behalf of the network, thereby ducing advertisements

re-➤ Disseminate information between the local routers and synchronize updates

Ngày đăng: 21/12/2013, 19:15

TỪ KHÓA LIÊN QUAN

w