Bab 3
Bab 3
Bab 3
OSPF sends small “Hello” packets at regular time intervals to adjacent routers to
Hello Packets
verify that the link between two routers is active and the routers are communicat-
Used in the OSPF ing. If a router fails to respond to a Hello it is assumed that the link or possibly the
protocol to verify
router is down. The OSPF Hello packet captured with a network protocol analyzer
that the links are still
communicating.
is discussed in Section 3-5.
Areas OSPF uses the concept of areas to partition a large network into smaller networks.
The partition of a large
The advantage of this is that the routers have to calculate routes only for their area.
OSPF network into If a route goes down in a given area, only the routers in that area have to calculate
smaller OSPF networks. new routes. Any number between 0 and 4,294,967,295 (232 – 1) can be used; how-
ever, area 0 is reserved for the root area, which is the backbone for the network.
Backbone The backbone is the primary path for data traffic to and from destinations and
The primary path for sources in the campus network. All areas must connect to area 0, and area 0 cannot
data traffic to and from be split. The area numbers can also be expressed in IP notation—for example, area
destinations and sources
0 could be 0.0.0.0—or you can specify an area as 192.168.25.0 or in subnet nota-
in the campus network.
tion. Hence, the need for the large upper-area number (232 – 1) = 255.255.255.255
when converted to a decimal number.
OSPF allows the use of variable length subnet masks (VLSM), which enable dif-
Variable Length ferent size subnets in the network to better meet the needs of the network and more
Subnet Masks (VLSM) efficiently use the network’s limited IP address space. For example, point-to-point
Enables the use of inter-router links don’t need a large block of addresses assigned to them. Figure 3-1
subnet masks to better
illustrates an example of an inter-router link.
fit the needs of the
network, thereby
minimizing the waste FA0/0 FA0/1
of IP addresses when 10.10.250.1 10.10.250.2
interconnecting subnets.
10.10.250.0 Network address
10.10.250.3 Broadcast address
10.10.25.0 Subnet
FIGURE 3-1 An inter-router link subnetted to provide for two host IP addresses, a network
address, and a broadcast address
Advantages Disadvantages
Not proprietary—available for use by Can be complicated to implement.
all vendors.
Link state changes are immediately Is process intensive due to routing table
reported, which enables rapid calculations.
convergence.
Consumes little network bandwidth. Intermittent routes that are going up and Route Flapping
down will create excessive LSA updates—this
Intermittent routes
is called route flapping. going up and down
Uses VLSM creating excessive LSA
updates.
Uses areas to partition the network
into smaller networks, minimizing
the number of route calculations.
The next step is to enter the information about the IP address for each of the Ether-
net interfaces. The IP addresses for Router A are as follows:
FastEthernet0/0: 10.10.20.250
FastEthernet0/1: 10.10.200.1
FastEthernet0/2: 10.10.100.1
segment
E0 segment E0 E1 segment E0
A1 A2 B1 B2 C1 C2 D1 D2
RouterA Port Addresses (LAN A) RouterB Port Addresses (LAN B) RouterB Port Addresses (LAN C) RouterC Port Addresses (LAN D)
Subnet Mask 255.255.255.0 Subnet Mask 255.255.255.0 Subnet Mask 255.255.255.0 Subnet Mask 255.255.255.0
Next, the command router ospf process id is used to enable OSPF routing. In this
router ospf [process case, the command router ospf 100 is entered. The 100 is the process id number.
id]
This number must be the same on each router for OSPF to exchange routes. The
The command used to
process ID number is selected by the network administrator and is not used for rout-
enable OSPF routing.
ing outside the network. It is customary to use the same process ID throughout the
network for ease of management, but it is not required. Entering the router ospf
100 command places the router in the RouterA(config-router)# prompt:
RouterA(config)#router ospf 100
RouterA(config-router)#
A.B.C.D is the IP address or network number for the Ethernet interface. Next, en-
tering network 10.10.20.250 ? prompts you to enter the OSPF wild card bits in the Network Number
form of A.B.C.D. The wild card bits, also called the inverse mask bits, are used to Another name for the IP
match the network IP address (A.B.C.D format) to interface IPs. If there is a match, subnet.
the subnet on the interface is advertised out OSPF, and OSPF packets are sent out Wild Card Bits
the interface. A 0 wild card bit is used to indicate a “must” match. A 255 is a “don’t Used to match network
care,” hence the name inverse mask. IP addresses to interface
IPs.
The last entry when defining an OSPF route is for the area. Remember, areas are
used to partition a large network into smaller networks. Area 0 is the root area and Area 0
is the backbone for the network. All other areas must connect to area 0. Area 0 can- In OSPF, this is the root
not be split. Other area numbers are specified by the network administrator. area and is the backbone
for the network.
Assume that the router command network 10.10.20.250 0.0.0.0 area 0 is entered.
The wild card bits indicate that any interface with an address of 10.10.20.250 must
run OSPF on the interface and will be assigned to area 0 (the network backbone).
Assume that the router command network 10.10.20.250 0.255.255.255 area 0 is
entered. The wild card bits indicate that any interface with an IP address of 10.x.x.x
must run OSPF on the interface and will be assigned to area 0:
RouterA(config-router)#network 10.10.20.250 ?
A.B.C.D OSPF wild card bits
RouterA(config-router)#network 10.10.20.250 0.0.0.0 ?
area Set the OSPF area ID
RouterA(config-router)#network 10.10.20.250 0.0.0.0 area 0
The following command sequence details the three OSPF network entries needed to
configure OSPF routing for Router A:
RouterA(config-router)#network 10.10.20.250 0.0.0.0 area 0
RouterA(config-router)#network 10.10.200.1 0.0.0.0 area 0
RouterA(config-router)#network 10.10.100.1 0.0.0.0 area 0
Note that the Router A interface to LAN A (10.10.20.250 NET) is listed when con-
figuring OSPF. This is used in OSPF to advertise the LAN to the other routers. Also
note that the network has been assigned to area 0 (the backbone). The command sh
ip int brief is used to check the status of the interfaces. The output Protocol down
indicates that the cable to the interface is either unplugged or the interface is shut
down:
RouterA#show int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 10.10.20.250 YES NVRAM up up
FastEthernet0/1 10.10.200.1 YES manual up down
FastEthernet0/2 10.10.100.1 YES manual up down
Verify that the interfaces are properly configured using the sh ip int brief com-
mand, as shown:
RouterB#sh ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 10.10.10.250 YES manual up up
FastEthernet0/1 10.10.1.250 YES manual up up
FastEthernet0/2 10.10.200.2 YES manual up up
FastEthernet0/3 10.10.150.1 YES manual up down
The FastEthernet0/3 interface shows the protocol is down because the connecting
interface is shut down on RouterC.
The next step is to configure RouterC. The OSPF routing protocol for RouterC
is set using the command router OSPF 100 followed by network 10.0.0.0
0.255.255.255 area 0, as shown:
RouterC(config)#router ospf 100
RouterC(config-router)#network 10.0.0.0 0.255.255.255 area 0
The interfaces on RouterC are checked using the sh ip int brief command, as
shown:
RouterC#sh ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 10.10.5.250 YES manual up up
FastEthernet0/1 10.10.150.2 YES manual up up
FastEthernet0/2 10.10.100.2 YES manual up up
Notice that the Protocol column shows up for all interfaces. This is because all in-
terfaces are connected and the interfaces are enabled.
The routing table for Router A can be checked using the command sh ip route, as
shown. The routing table indicates there are seven subnets in the campus network
shown in Figure 3-2. The Os indicate the subnets running OSPF, and C indicates
the subnets directly connected to the router:
RouterA#sh ip route
Codes: C connected, S static, I IGRP, R RIP, M mobile, B BGP D EIGRP,
EX EIGRP external, O OSPF, IA OSPF inter area
N1 OSPF NSSA external type 1, N2 OSPF NSSA external type 2
E1 OSPF external type 1, E2 OSPF external type 2, E EGP
i IS-IS, L1 IS-IS level-1, L2 IS-IS level-2, * candidate default
U per-user static route, o ODR T traffic engineered route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 7 subnets
O 10.10.5.0 [110/74] via 10.10.100.2, 00:03:28, FastEthernet0/2
O 10.10.10.0 [110/74] via 10.10.200.2, 00:03:28, FastEthernet0/1
O 10.10.1.0 [110/74] via 10.10.200.2, 00:03:28, FastEthernet0/1
C 10.10.20.0 is directly connected, FastEthernet0/0
C 10.10.100.0 is directly connected, FastEthernet0/2
O 10.10.150.0 [110/128] via 10.10.200.2, 00:03:28, FastEthernet0/1
[110/128] via 10.10.100.2, 00:03:28,
FastEthernet0/2
C 10.10.200.0 is directly connected, FastEthernet0/1
To display only the OSPF routes, you can use the sh ip route ospf command. The
following are the results for this command from Router A:
RouterA#sh ip route ospf
10.0.0.0/24 is subnetted, 6 subnets
O 10.10.5.0 [110/74] via 10.10.100.2, 00:10:03, FastEthernet0/2
O 10.10.10.0 [110/74] via 10.10.200.2, 00:10:03, FastEthernet0/1
O 10.10.150.0 [110/128] via 10.10.200.2, 00:10:03, FastEthernet0/1
[110/128] via 10.10.100.2, 00:10:03,
FastEthernet0/2
To verify the adjacent OSPF neighbors of the router and observe the neighbor state,
you can use the sh ip ospf neighbor command. This command displays the directly
connected neighbors, since the hello packets are exchanged among them. The fol-
lowing are the results for this command from Router A:
RouterA#sh ip ospf neighbor
Neighbor ID Neighbor ID Pri State Dead Time Address
Interface
The highest IP address
defined by the loopback 10.10.150.2 1 FULL/BDR 00:00:39 10.10.100.2
FastEthernet0/2
address of the neighbor
router ID. 10.10.200.2 1 FULL/DR 00:00:31 10.10.200.2
FastEthernet0/1
Designated Router
(DR) The show ip ospf neighbor command shows there are two adjacent neighbors:
The router with the 10.10.150.2 and 10.10.200.2. The Neighbor ID is the highest IP address defined
highest priority. by the loopback address of the neighbor router ID. In this case, 10.10.150.2 is the
Backup Designated highest IP address for Router C, and 10.10.200.2 is the highest IP address of Router
Router (BDR) B. Refer to Figure 3-2 for the IP assignments for each router. The Pri column
The router or routers stands for Priority, which indicates the priority of the neighbor routers. The router
with lower priority. with the highest priority becomes the Designated Router (DR), and the router or
State of FULL routers with lower priority will become a Backup Designated Router (BDR). In this
case, the priority is the same, so the router with the highest router ID becomes the
Indicates that the
routers are fully adjacent
DR, which is Router B, and Router C becomes the BDR. This process is called
to each other. a DR Election. It happens during the exchange of Hello packets. The main pur-
pose of the DR router is to maintain the OSPF topology table of the network. This
Dead Time way, there is only one source that can send the OSPF routing updates to the rout-
The Hello time interval ers within the area, thus minimizing the network traffic. Every router also sends
an OSPF router will its update to the DR and BDR via the multicast address. If the DR should fail, the
wait before terminating BDR will assume the role of the designated router. The state of FULL is a good and
adjacency with a
desired state, which indicates that the routers are fully adjacent to each other. The
neighbor.
dead time is the Hello time interval an OSPF router will wait before terminating
With the Shortest Path First protocol, OSPF uses the Dijkstra algorithm to calculate
the shortest path. The algorithm takes into consideration the topology path and the
associated cost and calculates the cumulative cost to reach a destination.
With destinations with multiple paths, OSPF will calculate the best shortest path
and install the route into the routing table. For the example network (refer to Figure
3-2), Router A has two paths to reach the 10.10.10.0 network on Router B. One
route is via FastEthernet0/1 to Router B and another route is via FastEthernet0/2 to
Router C and then to Router B. The output of show ip route shows that the Router
A has selected the path via its FastEthernet0/1 as the best path and this is confirmed
when issuing the command sh ip route 10.10.10.0.
RouterA#sh ip route 10.10.10.0
Routing entry for 10.10.10.0/24
Known via “ospf 100”, distance 110, metric 2, type intra area
Last update from 10.10.200.2 on FastEthernet0/1, 00:44:13 ago
Routing Descriptor Blocks:
* 10.10.200.2, from 10.10.200.2, 00:44:13 ago, via FastEthernet0/1
Route metric is 2, traffic share count is 1
Because OSPF uses the interface cost as one of the factors in calculating the best
Interface Cost path, one of the easiest ways to influence the OSPF path selection is by manipulat-
One of the factors used ing the interface cost. In our example, there are two equal routes to the network
in calculating the best 10.10.150.0 Net, as shown.
path.
RouterA#sh ip route 10.10.150.0
Routing entry for 10.10.150.0/24
Known via “ospf 100”, distance 110, metric 2, type intra area
Last update from 10.10.200.2 on FastEthernet0/1, 00:00:05 ago
Routing Descriptor Blocks:
* 10.10.100.2, from 10.10.200.2, 00:00:05 ago, via FastEthernet0/2
Route metric is 2, traffic share count is 1
10.10.200.2, from 10.10.200.2, 00:00:05 ago, via FastEthernet0/1
Route metric is 2, traffic share count is 1
If the preferred route to reach the 10.10.150.0 network is via Router B, then the
OSPF cost of the interface connected to Router C can be increased. The default
OSPF cost of the interface is 1.To change the cost of this interface, issue the ip ospf
cost command at the interface, as shown:
RouterA(config)#int fastEthernet 0/2
RouterA(config-if)#ip ospf cost 5
RouterA#sh ip route 10.10.150.0
Routing entry for 10.10.150.0/24
Known via “ospf 100”, distance 110, metric 2, type intra area
Last update from 10.10.200.2 on FastEthernet0/1, 00:00:07 ago
Routing Descriptor Blocks:
* 10.10.200.2, from 10.10.200.2, 00:00:07 ago, via FastEthernet0/1
Route metric is 2, traffic share count is 1
By increasing the OSPF cost of interface0/2, the route to the network 10.10.150.0 is
being preferred via the interface FastEthernet0/1 off Router B. However, changing
the OSPF cost could have side effects if you are not careful. In our case, because
the interface to Router C now has a higher OSPF cost, what will happen to the LAN
As you can see, the route to LAN D is now preferred through Router B. This means
one extra router hop that it must take from Router A to reach LAN D. By increas-
ing the interface cost, it affects everything along its path. This is definitely not the
desirable side effect that you want. The network engineer must understand the net-
work topology before adjusting the OSPF cost, Administrative Distance (AD), or
any routing protocol metrics. This has to be carefully done and thoroughly verified;
otherwise, it can result in a routing abnormality such as this.
Networking Challenge—OSPF
Use the Net-Challenge Simulator Software included with the text’s companion CD-ROM to demon-
strate that you can configure OSPF for Router A in the campus LAN (the campus LAN is shown in
Figure 3-2 and is displayed by clicking the View Topology button when the software is started). Place
the Net-Challenge CD-ROM in your computer’s drive. Open the Net-Challenge folder and click
NetChallenge V3-2.exe. When the software is running, click the Select Router Challenge button to
open a Select Router Challenge drop-down menu. Select Chapter 3—OSPF. This opens a checkbox
that can be used to verify that you have completed all the tasks:
1. Enter the privileged EXEC mode on the router.
2. Enter the router’s terminal configuration mode: Router(config).
3. Set the hostname to Router A.
4. Configure the FastEthernet0/0 interface with the following:
IP address: 10.10.20.250
Subnet mask: 255.255.255.0
5. Enable the FA0/0 interface.
6. Configure the FastEthernet0/1 interface with the following:
IP address: 10.10.200.1
Subnet mask: 255.255.255.0
7. Enable the FA0/1 interface.
8. Configure the FastEthernet0/2 interface with the following:
IP address: 10.10.100.1
Subnet mask: 255.255.255.0
10.10.100.0 NET
segment
segment segment
E0 E0 E1 E0
A1 A2 B1 B2 C1 C2 D1 D2
RouterA Port Addresses (LAN A) RouterB Port Addresses (LAN B) RouterB Port Addresses (LAN C) RouterC Port Addresses (LAN D)
Subnet Mask 255.255.255.0 Subnet Mask 255.255.255.0 Subnet Mask 255.255.255.0 Subnet Mask 255.255.255.0
On Router A, the interface FastEthernet 0/0 and the interface Fastethernet 0/2 are
configured to use IS-IS. The same set of commands is issued on Router B and
Router C to route with IS-IS. You can verify that IS-IS is running on Router A by
entering the command sh ip protocol, as shown at the enable prompt (RouterA#):
RouterA# sh ip protocol
Routing Protocol is “isis”
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Redistributing: isis
Address Summarization:
None
Maximum path: 4
Routing for Networks:
FastEthernet0/0
FastEthernet0/1
FastEthernet0/2
Routing Information Sources:
Gateway Distance Last Update
10.10.100.2 115 00:02:44
10.10.150.1 115 00:02:44
Distance: (default is 115)
The text shows that the routing protocol is “isis.” The networks it is routing are on
the interface FastEthernet0/0, FastEthernet0/1, and FastEthernet0/2. It also shows
that it is receiving routing information from the source 10.10.100.2, which is the
Router C interface FastEthernet0/2 and 10.10.150.1, which is the Router B interface
FastEthernet0/3. The routing information was updated 2 minutes 44 seconds ago.
Next, the command show ip route (sh ip route) can be used to examine the con-
tents of Router A’s routing table to see if any IS-IS routes have been received:
The command sh ip route indicates that the network 10.10.5.0 has been received
via the IP 10.10.100.2, which is directly connected to the interface FastEthernet0/2. show ip route isis
(sh ip route isis)
The routes for network 10.10.1.0 and 10.10.10.0 are learned via the IP 10.10.200.2
on interface FastEthernet0/1. The network 10.10.150.0 is learned via both FastEth- Displays only the IS-IS
routes.
ernet0/1 and FastEthernet0/2. As a matter of fact, the routing table looks similar to
the one of OSPF. The “i” before the route indicates IS-IS routes, and “L1” stands
for IS-IS level 1. The command show ip route isis can be used to view the routing
table just for IS-IS, as shown:
RouterA#sh ip route isis
10.0.0.0/24 is subnetted, 7 subnets
i L1 10.10.1.0 [115/20] via 10.10.200.2, FastEthernet0/1
i L1 10.10.5.0 [115/20] via 10.10.100.2, FastEthernet0/2
i L1 10.10.10.0 [115/20] via 10.10.200.2, FastEthernet0/1
i L1 10.10.150.0 [115/20] via 10.10.100.2, FastEthernet0/2
[115/20] via 10.10.200.2, FastEthernet0/1
Similar to an OSPF router, IS-IS establishes its adjacencies with its neighbors and
the neighbor information can be found with the command show clns is-neighbors. show clns
is-neighbors
RouterA#sh clns is-neighbors
Command used in IS-IS
to find adjacencies with
System Id Interface State Type Priority Circuit Id
neighbors.
Format
RouterB Fa0/1 Up L1L2 64/64 RouterA.02
Phase V
RouterC Fa1/0 Up L1L2 64/64 RouterA.03
Phase V
The final step is to view the running-configuration in each router using the sh run
command. The running-configuration for Router A is provided. Notice the entries
for router isis and net 49.0001.c202.00e8.000.00, and ip router isis in the
running-configuration file.
RouterA#sh run
Building configuration...
Current configuration:
!
version 12.0
service timestamps debug uptime service timestamps log uptime no
service password-encryption
!
hostname RouterA
!
enable secret 5 $1$6M4r$dleo7h1WP0AYu0K/cM6M91
enable password Salsa
!
ip subnet-zero
!
interface FastEthernet0/0
ip address 10.10.20.250 255.255.255.0
ip router isis
no ip directed-broadcast
!
interface FastEthernet0/1
ip address 10.10.200.1 255.255.255.0
no ip directed-broadcast
Remember to use the copy run start command to save the changes made to
NVRAM.
By increasing the IS-IS metric on the FastEthernet0/2 on Router A, the same results
happen as when increasing the OSPF cost on this very same interface. That is all
routes destined to any networks on Router C now prefer the interface FastEther-
net0/1 via Router B as their primary route or best path. The result of adjusting the
IS-IS metric is shown via command show ip route isis:
RouterA#sh ip route isis
10.0.0.0/24 is subnetted, 7 subnets
i L1 10.10.1.0 [115/20] via 10.10.200.2, FastEthernet0/1
i L1 10.10.5.0 [115/20] via 10.10.200.2, FastEthernet0/1
i L1 10.10.10.0 [115/20] via 10.10.200.2, FastEthernet0/1
i L1 10.10.150.0 [115/20] via 10.10.200.2, FastEthernet0/1
10.10.100.0 NET
segment
RouterA E2 RouterB RouterC E2
10.10.200.0 NET 10.10.150.0 NET
E1 E2 E3 E1
E0 E0 E1 E0
segment segment
A1 A2 B1 B2 C1 C2 D1 D2
RouterA Port Addresses (LAN A) RouterB Port Addresses (LAN B) RouterB Port Addresses (LAN C) RouterC Port Addresses (LAN D)
Subnet Mask 255.255.255.0 Subnet Mask 255.255.255.0 Subnet Mask 255.255.255.0 Subnet Mask 255.255.255.0
After configuring the router interfaces, the EIGRP routing protocol for Router A
will be configured. Use the conf t command to enter the router’s configuration
mode. Next, enter the command router eigrp [AS-number]. Any AS number can
be used. The router uses the AS numbers to determine which routers share routing
tables. Only routers with the same AS number will share routing updates. The com-
mand router eigrp 150 is entered as shown. The prompt changes to (config-router)
and the next command entered sets the network to run EIGRP. In this example, the
command network 10.0.0.0 is entered. This instructs the router to run EIGRP on
any of the router’s interfaces that have an IP address that begins with 10. A different
network command will be used on Router B to show how the command can be used
to specify a limited IP address range.
RouterA(config)#router eigrp 150
RouterA(config-router)#network 10.0.0.0
Now, the 10.x.x.x interfaces on Router A are configured to run EIGRP. The com-
mand sh ip protocol is entered to verify that the EIGRP routing protocol is enabled
on Router A:
RouterA# sh ip protocol
Routing Protocol is “eigrp 150”
Outgoing update filter list for all interfaces is Incoming update
filter list for all interfaces is Default networks flagged in outgoing
updates Default networks accepted from incoming updates EIGRP metric
weight K1 1, K2 0, K3 1, K4 0, K5 0
The top line states that the routing protocol is “eigrp 150” and indicates that it has
been 9 seconds since the last update to the routing table. In EIGRP, updates to the
routing table are made when there are changes in the network.
Another useful command is sh ip route. The following are the results of entering
the command. In this case, the router does not show any EIGRP routes to the sub-
nets in the network, because EIGRP has not been configured on Router B or
Router C:
RouterA#sh ip route
Codes: C connected, S static, I IGRP, R RIP, M mobile, B BGP D EIGRP,
EX EIGRP external, O OSPF, IA OSPF inter area
N1 OSPF NSSA external type 1, N2 OSPF NSSA external type 2
E1 OSPF external type 1, E2 OSPF external type 2, E EGP
i IS-IS, L1 IS-IS level-1, L2 IS-IS level-2, * candidate default
U per-user static route, o ODR T traffic engineered route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 3 subnets
C 10.10.20.0 is directly connected, FastEthernet0/0
C 10.10.200.0 is directly connected, FastEthernet0/1
C 10.10.100.0 is directly connected, FastEthernet0/2
The command sh ip int brief is entered and the status and protocols for the Ether-
net interfaces are up. These will show up as long as there is a network connection
to the interfaces:
RouterA#sh ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 10.10.20.250 YES NVRAM up up
FastEthernet0/1 10.10.200.1 YES manual up up
FastEthernet0/2 10.10.100.1 YES manual up up
The sh run command is used to view the contents of the router’s running-
configuration file. The following shows the part of the configuration file that shows
the entries for EIGRP. Notice that these entries are the same as the commands en-
tered earlier when configuring EIGRP:
!
router eigrp 150
network 10.0.0.0
!
The sh ip route command for Router B shows that six routes are on Router B, and
there are EIGRP routes to the 10.10.20.0 and 10.10.100.0 subnets. The code for the
EIGRP routes is D. Remember, the C code is for the subnets directly connected to
the router:
RouterB#sh ip route
Codes: C connected, S static, I IGRP, R RIP, M mobile, B BGP D EIGRP,
EX EIGRP external, O OSPF, IA OSPF inter area
N1 OSPF NSSA external type 1, N2 OSPF NSSA external type 2
E1 OSPF external type 1, E2 OSPF external type 2, E EGP
i IS-IS, L1 IS-IS level-1, L2 IS-IS level-2, * candidate default
U per-user static route, o ODR T traffic engineered route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 6 subnets
C 10.10.10.0 is directly connected, FastEthernet0/0
C 10.10.1.0 is directly connected, FastEthernet0/1
D 10.10.20.0 [90/2195456] via 10.10.200.1, 00:00:09, FastEthernet0/2
D 10.10.100.0 [90/2681856] via 10.10.200.1, 00:00:09, FastEthernet0/2
A check of the IP routes on Router A also shows that Router A and Router B are ex-
changing routes with each other. Router A now shows six subnets. Once again, the
D indicates the EIGRP routes, and the C indicates the directly connected subnets:
RouterA#sh ip route
Codes: C connected, S static, I IGRP, R RIP, M mobile, B BGP D EIGRP,
EX EIGRP external, O OSPF, IA OSPF inter area
N1 OSPF NSSA external type 1, N2 OSPF NSSA external type 2
E1 OSPF external type 1, E2 OSPF external type 2, E EGP
i IS-IS, L1 IS-IS level-1, L2 IS-IS level-2, * candidate default
U per-user static route, o ODR T traffic engineered route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 6 subnets
D 10.10.10.0 [90/2195456] via 10.10.200.2, 00:00:50, FastEthernet0/1
D 10.10.1.0 [90/2195456] via 10.10.200.2, 00:00:50, FastEthernet0/1
C 10.10.20.0 is directly connected, FastEthernet0/0
C 10.10.100.0 is directly connected, FastEthernet0/2
D 10.10.150.0 [90/2681856] via 10.10.200.2, 00:00:50, FastEthernet0/1
C 10.10.200.0 is directly connected, FastEthernet0/1
The last step is to configure EIGRP for Router C using the router eigrp 150 com-
mand. The command network 10.10.0.0 is used to instruct the router to assign
EIGRP to all interfaces that are part of the 10.10.0.0 network. In this case, all inter-
faces on Router C have a 10.10.x.x address and therefore will run EIGRP:
RouterC(config)#router eigrp 150
RouterC(config-router)#network 10.10.0.0
The sh ip route command is used to display the IP routes for Router C. Router C
shows seven subnets. In fact, there are seven subnets in the campus LAN shown in
Figure 3-4. This completes the setup for running EIGRP on the campus LAN:
RouterC#sh ip route
Codes: C connected, S static, I IGRP, R RIP, M mobile, B BGP D EIGRP,
EX EIGRP external, O OSPF, IA OSPF inter area
E1 OSPF external type 1, E2 OSPF external type 2, E EGP
i IS-IS, L1 IS-IS level-1, L2 IS-IS level-2, * candidate default
Gateway of last resort is not set
10.0.0.0 255.255.255.0 is subnetted, 7 subnets
C 10.10.5.0 is directly connected, FastEthernet0/0
D 10.10.10.0 [90/2195456] via 10.10.150.1, 00:00:01, FastEthernet0/1
D 10.10.1.0 [90/2195456] via 10.10.150.1, 00:00:01, FastEthernet0/1
D 10.10.20.0 [90/2195456] via 10.10.100.1, 00:00:01, FastEthernet0/2
C 10.10.100.0 is directly connected, FastEthernet0/2
C 10.10.150.0 is directly connected, FastEthernet0/1
D 10.10.200.0 [90/2681856] via 10.10.150.1, 00:00:01, FastEthernet0/1
[90/2681856] via 10.10.100.1, 00:00:01,
FastEthernet0/2
The output result of the show ip eigrp neighbors command is simpler comparing
to other routing protocol neighbor commands. There is no state that one has to de- Uptime
cipher. If the neighbor adjacency is established it will be displayed. The important Indicates the time
fields that one should pay attention to when troubleshooting EIGRP routing are Up- the neighbor has
last established its
time and Q Cnt. The uptime indicates the time the neighbor has last established its
adjacency.
adjacency. If the number is much lower than the others, there could be a neighbor
or connection issue. The Q Cnt is the number of EIGRP packets being queued to its Q Cnt
neighbor. The expected number is 0. If the number is consistently higher, this could The number of EIGRP
mean that there is a link issue or link congestion. packets being queued to
its neighbor.
The output of the show ip eigrp neighbors command consists of the following fields:
• H: The order in which the adjacency is established with the specific neighbor.
• Address: The IP address of the neighbor router interface.
• Interface: The router interface connected to the neighbor.
• Hold: Amount of time EIGRP will wait to hear from its neighbor before declar-
ing it down.
• Uptime: The uptime of the adjacent neighbor.
• SRTT: Smooth Round Trip Time for sending and receiving EIGRP packet from
its neighbor.
• RTO: Retransmission Timeout to resend EIGRP packet as calculated by SRTT.
• Q Cnt: Queue count is the number of EIGRP packets in the queue waiting to be
sent.
• Seq Num: Sequence number of the last update sent by its neighbor.
The show ip route eigrp also confirms that the path via FastEthernet0/1 to Router
B is now the preferred path for all network routes:
RouterA#sh ip route eigrp
10.0.0.0/24 is subnetted, 7 subnets
D 10.10.1.0 [90/30720] via 10.10.200.2, 00:11:42,
FastEthernet0/1
D 10.10.5.0 [90/33280] via 10.10.200.2, 00:11:42,
FastEthernet0/1
D 10.10.10.0 [90/30720] via 10.10.200.2, 00:11:42,
FastEthernet0/1
D 10.10.150.0 [90/30720] via 10.10.200.2, 00:11:42,
FastEthernet0/1
Changing the bandwidth value could have more impact beyond EIGRP routing;
delay
other protocols, like QoS, depend on the bandwidth value to make their decisions.
Between the bandwidth value and the delay value, the delay value command is the This command sets the
delay on the interface.
one with the least impact. Therefore, to manipulate the EIGRP composite metric,
The delay value is
adjusting the delay value is preferred over adjusting the bandwidth value. To adjust measured in tens of
the bandwidth value, this can be done by adjusting the delay command at the router microseconds.
interface:
RouterA(config)#int fastEthernet 0/2
RouterA(config-if)#delay 100
The delay value is measured in tens of microseconds. The command delay 100
changes the default delay value from 100 microseconds to 1,000 microseconds.
This, in turn, increases the composite metric of the interface FastEthernet0/2 on
Router A connecting to Router C. The composite metric of any route via the inter-
face FastEthernet0/2 has changed as reflected in the recent show ip eigrp topology
command. The path composite metric that used to be 30,720 is now 53,760. Again,
the path via FastEthernet0/1 to Router B is now a more preferred path for all net-
work routes.
RouterA#sh ip eigrp topology
IP-EIGRP Topology Table for AS(150)/ID(10.10.200.1)
10.10.5.250
10.10.150.1
10.10.200.2
10.10.100.2
RouterA RouterB
f0/1 f0/1
f0/0 f0/0 f0/1
19 istri
red
2.1 bu
68 ted
.30
f0/1 .0
RouterC
f0/0
LAN_A LAN_B LAN_C
10.10.10.0 Net 10.20.20.0 Net 192.168.30.0 Net
RouterA RouterB RouterC
Fa0/1: 10.1.1.1/30 Fa0/0: 10.1.1.2/30 Fa0/1: 172.16.20.2/30
Fa0/0: 10.10.10.1/24 Fa0/0: 10.20.20.1/24 Fa0/0: 192.168.30.1/24
Fa0/1: 172.16.20.1/30
FIGURE 3-5 Route redistribution from LAN C network to LAN A and LAN B
However, Router B has an interface that is connected to Router C that is not part
of the network advertised via RIP. This interconnected interface on Router B is
FastEthernet0/1 and has an IP address of 172.16.20.1. This interface is not expected
to participate in RIP advertisement since Router C is running a different routing
protocol. This is why this route it is not included as a network statement in the RIP
configuration. Nonetheless, Router A should still learn about this interconnected
network, so Router A can reach it over the network.
In order to accomplish this, Router B can redistribute its connected network into
redistribute protocol
RIP. The command to do this is redistribute protocol. The following is a list of the
The command used to
options of what can be used to redistribute the networks into RIP:
inject routes from one
RouterB(config)#router rip routing protocol into
RouterB(config-router)#redistribute ? another routing protocol.
bgp Border Gateway Protocol (BGP)
connected Connected
eigrp Enhanced Interior Gateway Routing Protocol (EIGRP)
isis I SO IS-IS
iso-igrp IGRP for OSI networks
metric Metric for redistributed routes
mobile Mobile routes
odr On Demand stub Routes
ospf Open Shortest Path First (OSPF)
rip Routing Information Protocol (RIP)
route-map Route map reference
static Static routes
<CR>
RouterB(config-router)#redistribute connected
The other dynamic protocols are distributed into RIP in similar fashion. If Router C
runs OSPF as its routing protocol, then Router B will need to run the same in order
for the routers to communicate. To do this, both routers will have to agree on the
OSPF Process ID. In the following example, the OSPF Process ID will be 200. The
OSPF configuration for Router C and Router B are shown.
Router C’s OSPF configuration:
!
router ospf 200
log-adjacency-changes
network 192.168.30.0 0.255.255.255 area 0
network 172.16.20.0 0.0.0.3 area 0
!
Now, Router B can receive an OSPF route from Router C as shown as the result of
issuing the command show ip route. Along with it, Router B receives a RIP route
from Router A. It is important to verify the routes of the protocol one is trying to
redistribute. Note: This important step is often neglected. Remember, the router
cannot redistribute what it doesn’t know and the route must be there for you to re-
distribute.
Router A does not know of the new OSPF route yet, so the route has to be redistrib-
uted. On Cisco routers, there is a caveat for redistributing dynamic routing proto- redistribute ospf
process_id metric
cols into RIP. That caveat is the metric must be assigned in order for the routes to
0-16
be redistributed properly. This is not required for static and connected routes since
The command to
RIP assigns the metric of 1 to each of these by default. Also, recall that the metric
redistribute OSPF routes
value for RIP is hop count and each hop count along the path has the value of 1. into RIP.
The maximum hop count value is 16. The command to redistribute OSPF routes
into RIP is redistribute ospf process_id metric 0-16.
RouterB(config)#router rip
RouterB(config-router)#redistribute ospf 200 metric 1
Now, the RIP routing table on Router A shows the route 192.168.30.0 that is
learned from the LAN C network:
RouterA#sh ip route rip
R 192.168.30.0/24 [120/1] via 10.1.1.2, 00:00:12, FastEthernet0/1
172.16.0.0/30 is subnetted, 1 subnets
R 172.16.20.0 [120/1] via 10.1.1.2, 00:00:08, FastEthernet0/1
10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks redistribute eigrp
R 10.20.20.0/24 [120/1] via 10.1.1.2, 00:00:08, FastEthernet0/1 AS_number metric
0-16
For EIGRP, the command to redistribute routes into RIP is almost the same as Command to redistribute
EIGRP routes into RIP.
OSPF. The command is redistribute eigrp AS_number metric 0-16. For IS-IS, the
command is redistribute isis IS-IS_Level metric 0-16. The configuration example redistribute isis
is as follows: IS-IS_Level metric
0-16
RouterB(config)#router rip
RouterB(config-router)#redistribute eigrp 200 metric 1
Command to redistribute
IS-IS routes into RIP.
RouterB(config-router)#redistribute isis level-1-2 metric 1
Once the basic configuration for OSPF has been configured, the routers will have
the OSPF neighbor adjacency established and the OSPF routes will be exchanged.
The result of the show ip ospf neighbor and show ip route ospf on Router A are
shown in the output examples that follow. The results confirm the neighbor adja-
cency and that the expected network routes are being learned via OSPF:
RouterA#sh ip ospf neighbor
However, what we get is the message stating that only classful networks can be
redistributed. Because the connected network is 172.16.20.0/30, which is not a
classful network, this will not work. Cisco provides a solution to this problem with
a slightly different command:
RouterB(config-router)#redistribute connected subnets
redistribute
This command allows the classless network to be distributed. Once the command
connected subnets
is issued, we can then verify the result on Router A. The show ip route command
Allows the classless
now shows the network 172.16.20.0 is being advertised by OSPF. Not only that, the
network to be
distributed.
network route is flagged as an E2 or an OSPF external type 2 route, which is differ-
ent than other OSPF internal routes. By default, any routes that are being redistrib-
E2 uted from another routing protocol into OSPF will appear as OSPF E2 routes that
An OSPF external type 2 are the least preferred among the OSPF route types.
route.
RouterA#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
The same warning message is shown saying that, “only classful networks will be
redistributed.” This time, the network 192.168.30.0/24 is a classful network, so the redistribute static
subnets
network will be redistributed; otherwise, the command redistribute static subnets
Allows the static network
will need to be used to distribute classless networks similar to what was done for
to be distributed.
the connected network. As a result of the redistributed static route entered in Router
B, Router A now learns of the route to LAN C network via OSPF and the network
is shown as an OSPF external type 2 route:
RouterA#sh ip route ospf
O E2 192.168.30.0/24 [110/20] via 10.1.1.2, 00:03:37, FastEthernet0/1
172.16.0.0/30 is subnetted, 1 subnets
O E2 172.16.20.0 [110/20] via 10.1.1.2, 00:51:59, FastEthernet0/1
10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
O 10.20.20.0/24 [110/2] via 10.1.1.2, 00:42:28, FastEthernet0/1
The other dynamic protocols are distributed into OSPF in similar fashion. For ex-
ample, if Router C runs EIGRP as its routing protocol, then Router B will need to
run EIGRP in order for Router B and Router C to communicate. Both routers have
to agree on an EIGRP Autonomous system number. In this example, an EIGRP
AS number of 200 is selected. The EIGRP routing configuration for Router C and
Router B follow.
Now, verify that Router B is able to receive an EIGRP route from Router C before
proceeding with the route redistribution. This can be done using the sh ip route
command. The routing table for Router B is shown. It shows a network route of
192.168.30.0/24 learned from Router C’s interface 172.16.20.2 via EIGRP:
RouterB#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS
level-2
ia - IS-IS inter area, * - candidate default, U - per-user
static route
o - ODR, P - periodic downloaded static route
The next step is to configure Router B to redistribute a learned EIGRP route into
OSPF. Recall that the OSPF cost or metric is derived from the bandwidth of the
interface. By default, Cisco routers will assign an OSPF cost/metric of 20 to any
redistributed routes with exception for redistributed routes from BGP. If the metric
does not need to be set, the command to distribute dynamic routing protocols is
all the same for OSPF. The command to redistribute EIGRP routes into OSPF is
The EIGRP neighbor adjacency can be verified with the command show ip eigrp
neighbor, and the EIGRP route is verified with show ip route eigrp on Router A.
The results confirm that the neighbor adjacency is established and the correct net-
work routes are being exchanged via EIGRP:
RouterA#sh ip eigrp neighbors
IP-EIGRP neighbors for process 200
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
0 10.1.1.2 Fa0/1 11 00:03:39 40 240 0 4
Once the command redistribute connected is issued, the command sh ip route can
EX be issued on Router A to verify that the network 172.16.20.0 is being advertised via
External EIGRP type. EIGRP. The network route is also flagged as an EX or an external EIGRP type. The
external EIGRP route has an administrative distance (AD) value of 170, which is
higher than the internal EIGRP route’s AD value of 90:
RouterA#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS
level-2
ia - IS-IS inter area, * - candidate default, U - per-user
static route
o - ODR, P - periodic downloaded static route
As a result, Router A now learns of the route to LAN C network via EIGRP, and the
network 192.168.30.0 is displayed as an EIGRP external route, just like the distrib-
uted connected route:
The following example demonstrates how to redistribute RIPv2 routes into EIGRP.
Router C and Router B are both configured to run RIPv2. The RIPv2 routing con-
figurations for Router C and Router B follow:
Router C’s RIPv2 configuration:
!
router rip
version 2
network 172.16.0.0
network 192.168.30.0
!
Now, you must verify that Router B is able to receive a RIP route from Router C
before proceeding with the route redistribution. The routing table of Router B is
The next step is to configure Router B to redistribute a learned RIP route into
redistribute rip
EIGRP. As previously discussed, all the EIGRP metric values will need to be as-
metric bandwidth
delay reliability load signed to the redistributed routing protocol. The command to redistribute RIP
MTU routes into EIGRP is redistribute rip metric bandwidth delay reliability load MTU,
The command to
as demonstrated here:
redistribute RIP routes RouterB(config)#router eigrp 200
into EIGRP. RouterB(config-router)#redistribute rip metric 100000 10 255 1 1500
Instead of entering the long metric command every time, a default metric can be
default-metric defined. For every redistribute statement, it will use the default metric. If the redis-
bandwidth delay tribute statement has metric values assigned, it overrides the default metric. The
reliability load MTU
command for setting the default metric is default-metric bandwidth delay reliabil-
The command for setting
ity load MTU. The following is an example of how a default metric is configured:
the default metric.
RouterB(config)#router eigrp 200
RouterB(config-router)#default-metric 100000 10 255 1 1500
RouterB(config-router)#redistribute rip
Once the default metric is defined in EIGRP, the command redistribute ospf can
be used to redistribute OSPF into EIGRP. For IS-IS, the command is redistribute
isis IS-IS_Level. The configuration example is as follows:
RouterB(config)#router eigrp 200
RouterB(config-router)#redistribute rip
RouterB(config-router)#redistribute isis level-1-2
The IS-IS routing is verified with show ip route isis on Router A. The result con-
firms the correct network routes are being exchanged via IS-IS:
RouterA#sh ip route isis
10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
i L1 10.20.20.0/24 [115/20] via 10.1.1.2, FastEthernet0/1
One caveat to know about redistributing routes into IS-IS is that if no metric is as-
signed, all distributed routes will be automatically assigned a metric value of 0.
In IS-IS, the default metric value for each interface is 10. Therefore, redistributed
routes could end up with lower metric values than IS-IS learned routes. If there
happens to be multiple routes to the same network, one is learned via internal IS-IS
routes and another one is learned via redistributed routes. IS-IS would prefer the
redistributed routes. It is recommended that at least a metric value of 10 be assigned
to redistributed routes. To advertise a connected network of 172.16.20.0/30, the
command redistribute connected is issued on Router B with a metric of 10:
RouterB(config)#router isis
RouterB(config-router)#redistribute connected metric 10
Once the command is issued, you can then verify the results on Router A. The show
ip route command now shows the network 172.16.20.0 is being advertised via IS-
IS and the network route is also flagged as an L2 or an IS-IS level-2 type:
RouterA#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS
level-2
ia - IS-IS inter area, * - candidate default, U - per-user
static route
o - ODR, P - periodic downloaded static route
As a result, Router A now learns of the route to LAN C network via IS-IS and the
network is displayed as an IS-IS level-2 route just like the distributed connected
route:
RouterA#sh ip route isis
i L2 192.168.30.0/24 [115/20] via 10.1.1.2, FastEthernet0/1
172.16.0.0/30 is subnetted, 1 subnets
i L2 172.16.20.0 [115/20] via 10.1.1.2, FastEthernet0/1
10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
i L1 10.20.20.0/24 [115/20] via 10.1.1.2, FastEthernet0/1
As long as those dynamic routing protocols are configured on Router B and Router
C correctly and their routes are exchanged, the result of show ip route isis on
Router A should yield the same result as the one from the static route.
192.168.200.0 NET
E1 (192.168.200.11)
RouterC
E0 (192.168.1.250)
192.168.1.0 NET
LAN D
Hub
D1 D2
Protocol Analyzer
FIGURE 3-6 The test network for capturing the OSPF Hello packets
One of the complex things about OSPF is the assignment of the router ID (RID).
The router ID is an IP address chosen from all interfaces on the router. Cisco IOS
first examines the loopback address for the router’s ID IP address. If a loopback
address is not being used, the highest IP address for a router interface is selected
as the router ID. In this case, the highest loopback IP address is 192.168.200.11,
the IP address for the E1 Ethernet interface. The middle panel in Figure 3-7 shows
The bottom panel in Figure 3-7 is the actual data packet displayed in hexadecimal
(base 16) code. The highlighted hex code is
E0000005
This is the hexadecimal value for 224.0.0.5, the destination IP address of the multi-
cast.
Hexadecimal Value: E 0 00 00 05
Decimal Equivalent: 224 0 0 5
Note
The decimal equivalent of E0 is 14, and (14 ✕ 16 + 0) = 224.
A detailed view of the OSPF packet information is provided in Figure 3-8. This in-
formation is available in the Open Shortest Path First (OSPF) window, as shown in
Figure 3-8.
In addition to the version number, the router ID is listed (192.168.200.11), and the
Hello interval is specified to be 10 seconds. Looking again at Figure 3-7, the OSPF
Hello packets are approximately 10 seconds apart. The router dead interval is 40
seconds.
This section has demonstrated how to use the Surveyor Demo Protocol Analyzer to
capture OSPF “Hello” packets. Figures 3-7 and 3-8 and the accompanying text ex-
plained how to extract information from the captured packets.
Additionally, this chapter examined the steps for route redistribution. The last sec-
tion examined the OSPF Hello packets.