configuring ospf – part 1 of 2 cis 185 ccnp route rick graziani cabrillo college...

139
Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College [email protected] Last Updated: Fall 2010

Upload: maximillian-white

Post on 12-Jan-2016

268 views

Category:

Documents


13 download

TRANSCRIPT

Page 1: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

Configuring OSPF – Part 1 of 2

CIS 185 CCNP ROUTE

Rick Graziani

Cabrillo College

[email protected]

Last Updated: Fall 2010

Page 2: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

2

Topics

Review of OSPF

Areas LSAs show ip ospf database (summary of link state database) show ip route Stub Areas Totally Stubby Areas E1 and E2 routes Default Routes Route Summarization NSSA (Not So Stubby Areas) Multiple ABR Scenario Multiple ASBR Scenario

Page 3: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

Single Area OSPF - Review

Page 4: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

4

Introduction to OSPF

OSPF is: Classless Link-state routing protocol Uses the concept of areas for scalability

RFC 2328 defines the OSPF metric as an arbitrary value called cost. Cisco IOS software uses bandwidth to calculate the OSPF cost metric.

Page 5: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

5

The network Command

The area area-id refers to the OSPF area. A group of OSPF routers that share link-state information. All OSPF routers in the same area must have the same link-

state information in their link-state databases. This is accomplished by routers flooding their individual link

states to all other routers in the area.

Router(config-router)# network network-address wildcard-mask area area-id

Page 6: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

6

1 – Flooding of link-state information

2 – Building a Topological Database

3 – SPF Algorithm

4 – SPF Tree

5 – Routing Table

Link State Concepts

Page 7: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

7

Before two routers can form an OSPF neighbor adjacency, they must agree on three values: Hello interval Dead interval Both the interfaces must be part of the same network, including

having the same subnet mask. IP MTU must match

Neighbors and Adjacencies

Page 8: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

8

Hello Intervals

By default, OSPF Hello packets are sent: 10 seconds on multiaccess and point-to-point segments 30 seconds on nonbroadcast multiaccess (NBMA) segments (Frame

Relay, X.25, ATM). In most cases, use multicast address ALLSPFRouters at 224.0.0.5.

Page 9: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

9

Dead Intervals

Cisco uses a default of four times the Hello interval. 40 seconds - Multiaccess and point-to-point segments. 120 seconds - NBMA networks.

Dead interval expires OSPF removes that neighbor from its link-state database. Floods the link-state information about the “down” neighbor out all

OSPF-enabled interfaces.

Page 10: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

10

Modifying OSPF Intervals

Dead time is counting down from 40 seconds. Refreshed every 10 seconds when R1 receives a Hello from the neighbor.

R1# show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface

10.3.3.3 0 FULL/ - 00:00:35 192.168.10.6 Serial0/0/1

10.2.2.2 0 FULL/ - 00:00:36 192.168.10.2 Serial0/0/0

Page 11: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

11

Modifying OSPF IntervalsRouter(config-if)# ip ospf hello-interval seconds

Router(config-if)# ip ospf dead-interval seconds

Page 12: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

Basic OSPF Configuration

Lab Topology The router ospf command The network command OSPF Router ID Verifying OSPF Examining the Routing Table

Page 13: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

13

OSPF Router ID is an IP address used to uniquely identify an OSPF router. Also used in the DR and BDR process.

1. Use the IP address configured with the OSPF router-id command.

2. Highest IP address of any of its loopback interfaces.

3. Highest active IP address of any of its physical interfaces.

OSPF Router ID

Router ID?

Router ID?

Router ID?

Page 14: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

14

Verifying New Router IDs (Loopbacks)R1# show ip protocols

Routing Protocol is “ospf 1”

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Router ID 10.1.1.1

<output omitted>

R2# show ip protocols

Routing Protocol is “ospf 1”

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Router ID 10.2.2.2

<output omitted>

R3# show ip protocols

Routing Protocol is “ospf 1”

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Router ID 10.3.3.3

<output omitted>

Page 15: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

15

Verifying OSPF

Neighbor ID: The router ID of the neighboring router. Pri: The OSPF priority of the interface. State: The OSPF state of the interface. Dead Time: Address: The IP address of the neighbor’s interface Interface: Local interface

R1# show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface

10.3.3.3 1 FULL/ - 00:00:30 192.168.10.6 Serial0/0/1

10.2.2.2 1 FULL/ - 00:00:33 192.168.10.2 Serial0/0/0

Page 16: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

16

R1# show ip ospf interface serial 0/0/0

Serial0/0/0 is up, line protocol is up

Internet Address 192.168.10.1/30, Area 0

Process ID 1, Router ID 10.1.1.1, Network Type POINT_TO_POINT, Cost: 64

Transmit Delay is 1 sec, State POINT_TO_POINT,

Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

<output omitted>

Verifying OSPF

Page 17: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

17

Verifying OSPF

R1# show ip protocols

Routing Protocol is “ospf 1”

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Router ID 10.1.1.1

Number of areas in this router is 1. 1 normal 0 stub 0 nssa

Maximum path: 4

Routing for Networks:

172.16.1.16 0.0.0.15 area 0

192.168.10.0 0.0.0.3 area 0

192.168.10.4 0.0.0.3 area 0

Reference bandwidth unit is 100 mbps

Routing Information Sources:

Gateway Distance Last Update

10.2.2.2 110 11:29:29

10.3.3.3 110 11:29:29

Distance: (default is 110)

OSPF Process ID

OSPF Router ID

Networks OSPF is advertising that are originating from this router

OSPF Neighbors

Administrative Distance

Page 18: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

18

Verifying OSPFR1# show ip ospf

<some output omitted>

Routing Process “ospf 1” with ID 10.1.1.1

Start time: 00:00:19.540, Time elapsed: 11:31:15.776

Supports only single TOS(TOS0) routes

Supports opaque LSA

Supports Link-local Signaling (LLS)

Supports area transit capability

Router is not originating router-LSAs with maximum metric

Initial SPF schedule delay 5000 msecs

Minimum hold time between two consecutive SPFs 10000 msecs

Maximum wait time between two consecutive SPFs 10000 msecs

Incremental-SPF disabled

Minimum LSA interval 5 secs

Minimum LSA arrival 1000 msecs

Area BACKBONE(0)

Number of interfaces in this area is 3

Area has no authentication

SPF algorithm last executed 11:30:31.628 ago

SPF algorithm executed 5 times

Page 19: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

19

Verifying OSPF

Any time a router receives new information about the topology (addition, deletion, or modification of a link), the router must: Rerun the SPF algorithm Create a new SPF tree Update the routing table

The SPF algorithm is CPU intensive, and the time it takes for calculation depends on the size of the area.

R1# show ip ospf

<some output omitted>

Initial SPF schedule delay 5000 msecs

Minimum hold time between two consecutive SPFs 10000 msecs

Maximum wait time between two consecutive SPFs 10000 msecs

Page 20: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

20

Verifying OSPF

A flapping link can cause OSPF routers in an area to constantly recalculate the SPF algorithm, preventing proper convergence. If there is a route in the routing table the router will continue to forward

the packet. SPF schedule delay.

To minimize this problem, the router waits 5 seconds (5000 msec) after receiving an LSU before running the SPF algorithm.

Minimum hold time: To prevent a router from constantly running the SPF algorithm, there is

an additional hold time of 10 seconds (10,000 ms). The router waits 10 seconds after running the SPF algorithm before

rerunning the algorithm.

R1# show ip ospf

<some output omitted>

Initial SPF schedule delay 5000 msecs

Minimum hold time between two consecutive SPFs 10000 msecs

Page 21: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

21

Verifying OSPFR1# show ip ospf interface serial 0/0/0

Serial0/0/0 is up, line protocol is up

Internet Address 192.168.10.1/30, Area 0

Process ID 1, Router ID 10.1.1.1, Network Type POINT_TO_POINT, Cost: 64

Transmit Delay is 1 sec, State POINT_TO_POINT,

Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

<output omitted>

Page 22: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

22

Examining the Routing Table

Unlike RIPv2 and EIGRP, OSPF does not automatically summarize at major network boundaries.

R1# show ip route

Codes: <some code output omitted>

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

192.168.10.0/30 is subnetted, 3 subnets

C 192.168.10.0 is directly connected, Serial0/0/0

C 192.168.10.4 is directly connected, Serial0/0/1

O 192.168.10.8 [110/128] via 192.168.10.2, 14:27:57, Serial0/0/0

172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks

O 172.16.1.32/29 [110/65] via 192.168.10.6, 14:27:57, Serial0/0/1

C 172.16.1.16/28 is directly connected, FastEthernet0/0

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

O 10.10.10.0/24 [110/65] via 192.168.10.2, 14:27:57, Serial0/0/0

C 10.1.1.1/32 is directly connected, Loopback0

Page 23: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

The OSPF Metric

OSPF Metric Modifying the Cost of the Link

Page 24: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

24

OSPF Metric

The OSPF metric is called cost. The following passage is from RFC 2328: A cost is associated with the output side of each router interface. This

cost is configurable by the system administrator. The lower the cost, the more likely the interface is to be used to forward data traffic.

RFC 2328 does not specify which values should be used to determine the cost.

Page 25: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

25

OSPF Metric

Cisco IOS software uses the cumulative bandwidths of the outgoing interfaces from the router to the destination network as the cost value.

108 is known as the reference bandwidth

Cisco IOS Cost for OSPF = 108/bandwidth in bps

Page 26: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

26

Reference Bandwidth

When this command is necessary, it is recommended that it is used on all routers so the OSPF routing metric remains consistent.

R1(config-router)# auto-cost reference-bandwidth ?

1-4294967 The reference bandwidth in terms of Mbits per second.

R1(config-router)# auto-cost reference-bandwidth 10000

To increase it to 10GigE (10 Gbps Ethernet) speeds, you need to change the reference bandwidth to 10,000.

Page 27: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

27

T1 cost 64 + Fast Ethernet cost 1 = 65 The “Cost = 64” refers to the default cost of the serial interface,

108/1,544,000 bps = 64, and not to the actual 64-Kbps “speed” of the link.

R1# show ip route

O 10.10.10.0/24 [110/65] via 192.168.10.2, 14:27:57, Serial0/0/0

OSPF Accumulates Cost

Serial interfaces bandwidth value defaults to T1 or 1544 Kbps.

Page 28: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

28

Default Bandwidth on Serial Interfaces

On Cisco routers, the bandwidth value on many serial interfaces defaults to T1 (1.544 Mbps).

R1# show interface serial 0/0/0

Serial0/0/0 is up, line protocol is up

Hardware is GT96K Serial

Description: Link to R2

Internet address is 192.168.10.1/30

MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,

reliability 255/255, txload 1/255, rxload 1/255

Page 29: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

29

Modifying the Cost of the Link

The bandwidth command is used to modify the bandwidth value used by the Cisco IOS software in calculating the OSPF cost metric. Same as with EIGRP

Router(config-if)# bandwidth bandwidth-kbps

R1(config)# inter serial 0/0/0

R1(config-if)# bandwidth 64

R1(config-if)# inter serial 0/0/1

R1(config-if)# bandwidth 256

R1(config-if)# end

R1# show ip ospf interface serial 0/0/0

Serial0/0 is up, line protocol is up

Internet Address 192.168.10.1/30, Area 0

Process ID 1, Router ID 10.1.1.1, Network Type POINT_TO_POINT, Cost: 1562

Transmit Delay is 1 sec, State POINT_TO_POINT,

<output omitted>

100,000,000/64,000 = 1562

Page 30: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

30

The ip ospf cost Command

An alternative method to using the bandwidth command is to use the ip ospf cost command, which allows you to directly specify the cost of an interface.

This will not change the output of the show ip ospf interface command,

R1(config)# interface serial 0/0/0

R1(config-if)# ip ospf cost 1562

R1(config)# inter serial 0/0/0

R1(config-if)# bandwidth 64

R1(config-if)# end

R1# show ip ospf interface serial 0/0/0

Serial0/0 is up, line protocol is up

Internet Address 192.168.10.1/30, Area 0

Process ID 1, Router ID 10.1.1.1, Network Type POINT_TO_POINT, Cost: 1562

<output omitted>

100,000,000/64,000 = 1562

Page 31: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

OSPF and Multiaccess Networks

Challenges in Multiaccess Networks DR/BDR Election Process OSPF Interface Priority

Page 32: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

32

Solution: Designated Router

OSPF elects a Designated Router (DR) to be the collection and distribution point for LSAs sent and received.

A Backup Designated Router (BDR) is also elected in case the DR fails. All other routers become DROthers.

Page 33: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

33

DROthers only form full adjacencies with the DR and BDR in the network. send their LSAs to the DR and BDR using the multicast address 224.0.0.6 (ALLDRouters, all DR routers).

R1 sends LSAs to the DR. The BDR listens, too.

The DR is responsible for forwarding the LSAs from R1 to all other routers. DR uses the multicast address 224.0.0.5 (AllSPFRouters, all OSPF routers). Only one router doing all the flooding.

DROther

DROther DROther DROther

DROther

DROther

224.0.0.6

224.0.0.5

Page 34: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

34

DR/BDR Election

The following criteria are applied:

1. DR: Router with the highest OSPF interface priority.

2. BDR: Router with the second highest OSPF interface priority.

3. If OSPF interface priorities are equal, the highest router ID is used to break the tie.

Default OSPF interface priority is 1. Current configuration, the OSPF router ID is used to elect the DR and BDR.

DR

BDR

DROther

Page 35: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

35

RouterA# show ip ospf interface fastethernet 0/0

FastEthernet0/0 is up, line protocol is up

Internet Address 192.168.1.1/24, Area 0

Process ID 1, Router ID 192.168.31.11, Network Type BROADCAST, Cost: 1

Transmit Delay is 1 sec, State DROTHER, Priority 1

Designated Router (ID) 192.168.31.33, Interface address 192.168.1.3

Backup Designated router (ID) 192.168.31.22, Interface address 192.168.1.2

Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

<output omitted>

Verifying Router States

Page 36: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

36

Timing of DR/BDR Election

If I booted first and started the election before the others were ready, I would be the DR!

Page 37: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

37

Timing of DR/BDR Election

When the DR is elected, it remains the DR until one of the following conditions occurs: The DR fails. The OSPF process on the DR fails. The multiaccess interface on the DR fails.

If the DR fails, the BDR assumes the role of DR, and an election is held to choose a new BDR.

DR failed! I am now the DR! Elections will now happened for BDR

I am now the BDR!

DR

BDR

Page 38: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

38

If a new router enters the network after the DR and BDR have been elected, it will not become the DR or the BDR even if it has a higher OSPF interface priority or router ID than the current DR or BDR.

DR

BDR

Timing of DR/BDR Election

DROther

I am a new router with the highest Router ID. I cannot force a new DR or BDR election, so I am a DROther.

Page 39: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

39

A previous DR does not regain DR status if it returns to the network.

DR

BDR

Timing of DR/BDR Election

DROther

I’m back but I don’t get to become DR again. I am now just a DROther.

DROther

Page 40: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

40

If the BDR fails, an election is held among the DROthers to see which router will be the new BDR.

DR

BDR

Timing of DR/BDR Election

BDR

Amongst the DROthers I have the highest Router ID, so I am the new BDR!

DROther

Page 41: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

41

RouterB fails. Because RouterD is the current BDR, it is promoted to DR. RouterC becomes the BDR.

DR

BDR

Timing of DR/BDR Election

BDR

I am now the new DR!

DROther

I am now the new BDR!

Page 42: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

42

Timing of DR/BDR Election

We can change the OSPF interface priority to better control our DR/BDR elections.

How can we make sure RouterB is the DR and RouterA is the BDR, regarless of RouterID values?

Want to be DR

Want to be BDR

Highest Router ID

To simplify our discussion, we removed RouterD from the topology.

Page 43: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

43

OSPF Interface Priority

Control the election of these routers with the ip ospf priority interface command.

Priority (Highest priority wins): 0 = Cannot become DR or BDR 1 = Default

Therefore, the router ID determines the DR and BDR. Priorities are an interface-specific value, they provide better control of the

OSPF multiaccess networks. They also allow a router to be the DR in one network and a DROther in

another.

Router(config-if)# ip ospf priority {0 - 255}

Page 44: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

44

OSPF Interface Priority

The OSPF interface priority can be viewed using the show ip ospf interface command.

RouterA# show ip ospf interface fastethernet 0/0

FastEthernet0/0 is up, line protocol is up

Internet Address 192.168.1.1/24, Area 0

Process ID 1, Router ID 192.168.31.11, Network Type BROADCAST, Cost: 1

Transmit Delay is 1 sec, State DROTHER, Priority 1

Designated Router (ID) 192.168.31.33, Interface address 192.168.1.3

Backup Designated router (ID) 192.168.31.22, Interface address 192.168.1.2

Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

<output omitted>

Page 45: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

45

After doing a shutdown and a no shutdown on the Fast Ethernet 0/0 interfaces of all three routers, we see the result of the change of OSPF interface priorities.

RouterA(config)# interface fastethernet 0/0

RouterA(config-if)# ip ospf priority 200

RouterB(config)# interface fastethernet 0/0

RouterB(config-if)# ip ospf priority 100

Pri = 200

Pri = 100

Highest priority wins

Page 46: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

46

Clarifications regarding DR/BDR

Hello packets are still exchanged between all routers on a multi-access segment (DR, BDR, DROthers,….) to maintain neighbor adjacencies.

OSPF LSA packets (coming) are packets which are sent from the BDR/DROthers to the DR, and then from the DR to the BDR/DROthers. (The reason for a DR/BDR.)

Normal routing of IP packets still takes the lowest cost route, which might be between two DROthers.

Page 47: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

More OSPF Configuration

Redistributing an OSPF Default Route Fine-tuning OSPF

Page 48: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

48

Redistributing an OSPF Default Route

If the default-information originate command is not used, the default “quad zero” route will not be propagated to other routers in the OSPF area.

R1(config)# interface loopback 1

R1(config-if)# ip add 172.30.1.1 255.255.255.252

R1(config-if)# exit

R1(config)# ip route 0.0.0.0 0.0.0.0 loopback 1

R1(config)# router ospf 1

R1(config-router)# default-information originate

The static default route is using the loopback as an exit interface because the ISP router in this topology does not physically exist.

Page 49: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

49

R3’s Routing Table

R3# show ip route

Gateway of last resort is 192.168.10.5 to network 0.0.0.0

192.168.10.0/30 is subnetted, 3 subnets

O 192.168.10.0 [110/1952] via 192.168.10.5, 00:00:38, S0/0/0

C 192.168.10.4 is directly connected, Serial0/0/0

C 192.168.10.8 is directly connected, Serial0/0/1

172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks

C 172.16.1.32/29 is directly connected, FastEthernet0/0

O 172.16.1.16/28 [110/391] via 192.168.10.5, 00:00:38, S0/0/0

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

C 10.3.3.3/32 is directly connected, Loopback0

O 10.10.10.0/24 [110/782] via 192.168.10.9, 00:00:38, S0/0/1

O*E2 0.0.0.0/0 [110/1] via 192.168.10.5, 00:00:27, Serial0/0/0

Page 50: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

50

External Type 2 Route

E2 denotes that this route is an OSPF External Type 2 route. OSPF external routes fall in one of two categories:

External Type 1 (E1) External Type 2 (E2)

OSPF accumulates cost for an E1 route as the route is being propagated throughout the OSPF area. This process is identical to cost calculations for normal OSPF internal routes.

E2 route is always the external cost, irrespective of the interior cost to reach that route. In this topology, because the default route has an external cost of 1 on the

R1 router, R2 and R3 also show a cost of 1 for the default E2 route. E2 routes at a cost of 1 are the default OSPF configuration. More later

R3# show ip route

O*E2 0.0.0.0/0 [110/1] via 192.168.10.5, 00:00:27, Serial0/0/0

Page 51: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

Steps to OSPF Operation with States

1. Establishing router adjacencies (Routers are adjacent)Down State – No Hello receivedInit State – Hello received, but not with this router’s Router ID

“Hi, my name is Carlos.” “Hi, my name is Maria.”Two-way State – Hello received, and with this router’s Router ID

“Hi, Maria, my name is Carlos.” “Hi, Carlos, my name is Maria.”

2. Electing DR and BDR – Multi-access (broadcast) segments onlyExStart State with DR and BDRTwo-way State with all other routers

3. Discovering RoutesExStart StateExchange StateLoading StateFull State (Routers are “fully adjacent”)

4. Calculating the Routing Table

5. Maintaining the LSDB and Routing Table

Page 52: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

52

Hello 10.6.0.1

Hello 10.5.0.1

Hello 10.6.0.1 10.5.0.1

Hello 10.5.0.1 10.6.0.1

DownInit DownInit2-way 2-way

Down State - Init State – Two Way State Down State - OSPF routers send Hello packets at regular intervals (10 sec.) to establish

neighbors. When a router (sends or) receives its first Hello packet, it enters the init state.

Hello packet contains a list of known neighbors. When the router sends a Hello packet (unicast reply) to the neighbor with its RouterID and

the neighbor sends a Hello packet packet back with that Router ID, the router’s interface will transition to the two-way state.

Now, the router is ready to take the relationship to the next level.

1. Establishing Adjacencies

Page 53: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

53

Steps to OSPF Operation with States (cont)

Explanations in Notes Section

Page 54: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

Couple of notes on link state flooding… OSPF is a link state routing protocol and does not send periodic updates

like RIP. OSPF only floods link state state advertisements when there is a change

in topology (this includes when a routers are first booted). OSPF uses hop-by-hop flooding of LSAs; an LSA received on one

interface are flooded out other OSPF enabled interfaces. If a link state entry in the LSDB (Link State DataBase) reaches an age of 60

minutes (MaxAge) without being updated, it is removed and SPF is recalculated.

Every 30 minutes (LSRefreshTime), OSPF routers flood only their link states to all other routers (in the area). This is known as a “paranoid update” These do not trigger SPF recalculations.

Special note: When a link goes down and a router wants to send a LSA to tell other routers to remove this link state, it sends this link state with a value of 60 minutes (MAXAGE).

Page 55: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

Single Area OSPF End of Review

CIS 185 Advanced Routing

Rick Graziani

Cabrillo College

[email protected]

Page 56: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

56

Issues with large OSPF nets Large link-state table

Each router maintains a LSDB for all links in the area

The LSDB requires the use of memory

Frequent SPF calculations

A topology change in an area causes each router to re-run SPF to rebuild the SPF tree and the routing table.

A flapping link will affect an entire area.

SPF re-calculations are done only for changes within that area.

Large routing table

Typically, the larger the area the larger the routing table.

A larger routing table requires more memory and takes more time to perform the route look-ups.

Solution: Divide the network into multiple areas

Page 57: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

57

OSPF uses “Areas”

Hierarchical routing enables you to separate large internetworks (autonomous systems) into smaller internetworks that are called areas.

With this technique, routing still occurs between the areas (called inter-area routing).

Some operations are restricted within an area: Flooding of LSAs Recalculating the database Re-running the SPF algorithm

Page 58: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

58

OSPF Router Types

Page 59: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

59

OSPF Router Types

InternalInternal: Routers with all their interfaces within the same area

BackboneBackbone: Routers with at least one interface connected to area 0

ASBRASBR: (Autonomous System Boundary Router): Routers that have at least one interface connected to an external internetwork (another autonomous system)

ABRABR: (Area Border Router): Routers with interfaces attached to multiple areas.

Page 60: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

60

Question: I understand the routing table is recalculated every time the router receives an new version of an LSA. Does OSPF recalculate its routing table when their is a topology change in another area? show ip ospf displays no change in SPF execution, but show ip ospf database shows a change in the topology?

Answer: Good question! OSPF areas are designed to keep issues like flapping links within an area. SPF is not recalculated if the topology change is in another area. The interesting thing is that OSPF distributes inter-area (between areas) topology

information using a distance-vector method. OSPF uses link-state principles only within an area. ABRs do not announce topological information between areas, instead, only routing

information is injected into other areas. ABRs relay routing information between areas via distance vector technique similar

to RIP or EIGRP. This is why show ip ospf does not show a change in the number of times SPF has

been executed when the topology change is in another area. Note: It is still a good idea to perform route summarization between areas, announcing

multiple routes as a single inter-area route. This will hide any changes in one area from affecting routing tables in other areas.

An advantage of Multiple Areas

Page 61: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

61

OSPF Packet Types In CCNA we discussed various OSPF packets

OSPF packet types

Page 62: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

62

OSPF Type 4 - Link State Advertisements

In CCNP we will look at OSPF Type 4 packets more closely

OSPF packet types

Page 63: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

63

OSPF packet types

OSPF Type-4 packets have 7 LSA packets (later)

Page 64: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

64

LSAs used for discovering routes and reaching Full State, along with Maintain Routes

LSA Types

Page 65: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

65

LSA TypesLSA Types 1 through 5 We will look at these in detail as we discuss areas in this chapter.

LSA Type 6 MOSPF (Multicast OSPF) Not supported by Cisco. MOSPF enhances OSPF by letting routers use their link-state databases to

build multicast distribution trees for the forwarding of multicast traffic.

LSA Type 7 NSSA External Link Entry Next presentation!

LSA Type 8 External attributes LSA for BGP Not supported by Cisco N/A LSA Type 9, 10, or 11 Opaque LSAs Future upgrades

Page 66: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

66

Area Types

Standard or Normal Areas Backbone Non-Backbone

Stub Areas Stub Area Totally Stubby Area Not-so-stubby-area (NSSA)

Page 67: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

67

Area Types

Page 68: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

68

Part I - LSAs using all normal areasMulti Area OSPF

Normal Areas

ASBR

ABR ABRInternal

Internal

Internal

Internal

Backbone Area

What are the router types?

Page 69: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

69

Routes Received on all OSPF Routers

Overview of Normal Areas – This will all be explained!

Receives all routes from within A.S.: Within the local area – LSA 1 and LSA 2 From other areas (Inter-Area) – LSA 3, LSA 4, LSA 5

Receives all routes from External A.S.’s (External AS means routes not from this OSPF routing domain):

From external AS’s – LSA 5 As long as routes are being redistributed by the ASBR (more later)

Default Route Received only if default-information-originate command was used

(later) If default-information-originate command is not used, then the

default route is not received

Part I - LSAs using all normal areas

Page 70: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

70

1. OSPF Multi-Areas - All Normal AreasR33router ospf 1 network 172.16.1.0 0.0.0.255 area 1 network 172.30.1.0 0.0.0.255 area 1

R22router ospf 1 network 172.16.1.0 0.0.0.255 area 1 network 172.30.2.0 0.0.0.255 area 1

R1router ospf 1 network 10.0.0.0 0.0.0.3 area 0 network 9.0.0.0 0.0.0.3 area 0 network 172.16.1.0 0.0.0.255 area 1 network 172.16.2.0 0.0.0.255 area 1

R2router ospf 1 network 192.168.2.0 0.0.0.255 area 0 network 10.0.0.0 0.0.0.3 area 0 network 11.0.0.0 0.0.0.3 area 0 default-information originateip route 0.0.0.0 0.0.0.0 serial 0/2

R3router ospf 1

network 11.0.0.0 0.0.0.3 area 0

network 9.0.0.0 0.0.0.3 area 0

network 172.16.10.0 0.0.0.255 area 51

network 172.16.11.0 0.0.0.255 area 51

network 99.0.0.0 0.0.0.3 area 51

R100router ospf 1

network 99.0.0.0 0.0.0.3 area 51

network 99.1.0.0 0.0.255.255 area 51

network 99.0.0.4 0.0.0.3 area 51

R200router ospf 1 network 99.0.0.4 0.0.0.3 area 51 network 99.0.0.0 0.0.255.255 area 51

ABR contains network statements for each area it belongs to, using the proper area value.

Page 71: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

71

Part I - LSAs using all normal areasMulti Area OSPF

Normal Areas

ASBR

ABR ABRInternal

Internal

Internal

Internal

Backbone Area

What are the router types?

Page 72: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

72

Part I - LSAs using all normal areasMulti Area OSPF

Normal Areas

ASBR

ABR ABRInternal

Internal

Internal

Internal

Backbone Area

What are the router types?

Page 73: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

73

Part I - LSAs using all normal areasMulti Area OSPF

Normal Areas

ASBR

ABR ABRInternal

Internal

Internal

Internal

Backbone Area

What are the router types?

Page 74: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

74

Understanding LSAs (FYI ONLY) show ip ospf database

This is not the link state database, only a summary. It is a tool to help determine what routes are included in the routing table. We will look at this output to learn the tool as well as become familiar with

the different types of LSAs. To view the link state database use: show ip ospf database [router|

network|…]

0 1 2 3

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| LS age | Options | LS type |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Link State ID |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Advertising Router |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| LS sequence number |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| LS checksum | length |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

LSA Header

Page 75: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

75

LSA 1 – Router LSA Generated by each router for each area it belongs to. Describes the states of the links in the area to which this router belongs.

Flooded only within the area. On multi-access networks, sent to the DR. Denoted by just an “O” in the routing table or “C” if the network is directly

connected. ABR will include a set of LSA 1’s for each area it belongs to. When a new LSA 1 is received and installed in the LSDB, the router forwards

that LSA, using hop-by-hop or asynchronous flooding.

A C

D

2

5

B

15 Router A’s LSA 1s which are flooded to all other routers in this area.

“Leaf” network

LSA 1 - Router Link States

Page 76: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

76

0 1 2 3

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| LS age | Options | 1 |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Link State ID |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Advertising Router |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| LS sequence number |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| LS checksum | length |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| 0 |V|E|B| 0 | # links |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Link ID |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Link Data |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Type | # TOS | metric |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| ... |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| TOS | 0 | TOS metric |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Link ID |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Link Data |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| ... |

LSA 1 - Router Link States

Page 77: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

77

LSA 1 – Router Link States

LSA 1’sLSA 1’s

LSA 1’s

Each router floods their LSA 1s ONLY within their own area. LSA 1s only announce the links (networks) within the area. Router receives LSA 1s from neighbor, floods those LSA 1s to other

neighbors within the same area.

Page 78: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

78

LSA 1 - Router Link States

For Router Links: Link State ID: Advertising Router ID Advertising Router: Router ID of the router that created this LSA 1 Bottom line: Router Link States (LSA1’s) should display all the RouterIDs of

routers in that area, including its own. Rick’s reminder: LSA 1 -> “my one area”

R100# show ip ospf database OSPF Router with ID (100.100.100.100) (Process ID 1)

Router Link States (Area 51) <- Note the Area (LSA 1 - Links in this area.)

Link ID ADV Router Age Seq# Checksum LinkCnt3.3.3.3 3.3.3.3 42 0x80000004 0x00168d 4100.100.100.100 100.100.100.100 10 0x80000005 0x00472f 4200.200.200.200 200.200.200.200 10 0x80000002 0x00db5f 1

Page 79: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

79

R100# show ip route

172.16.0.0/24 is subnetted, 4 subnets

O 172.16.10.0 [110/65] via 99.0.0.1, 00:08:30, Serial0/0

O 172.16.11.0 [110/65] via 99.0.0.1, 00:08:30, Serial0/0

LSA 1 - Router Link States

• Denoted by just an “O” in the routing table, or a “C”

• Note: Only partial routing tables will be shown

Page 80: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

80

LSA 1’sLSA 1’s

LSA 1’s

LSA 1 - Router Link States

Page 81: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

81

LSA 2 – Network LSA Generated by the DR on every multi-access network Denoted by just an “O” in the routing table or “C” if the network is

directly connected. Flooded only within the originating area. LSA 2’s are in link state database for all routers within area, even

those routers on not on multi-access networks or DRs on other multi-access networks in the same area.

ABR may include a set of LSA 2s for each area it belongs to.

LSA 2 - Network Link States

Page 82: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

82

0 1 2 3

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| LS age | Options | 2 |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Link State ID |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Advertising Router |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| LS sequence number |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| LS checksum | length |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Network Mask |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Attached Router |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| ... |

LSA 2 - Network Link States

Page 83: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

83

LSA 2s

LSA 2s flooded within area by DR.

LSA 2’s

LSA 2’s

Page 84: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

84

R3# show ip ospf database

 

Net Link States (Area 51)

Link ID ADV Router Age Seq# Checksum

99.0.0.6 200.200.200.200 241 0x80000002 0x006159

LSA 2 - Network Link States

• Link ID IP address of DR on MultiAccess Network• ADV Router Router ID of DR• Bottom line: Net Link States (LSA2’s) should display the RouterIDs of

the DRs on all multi-access networks in the area and their IP addresses.

• Rick’s reminder: LSA 2 -> “Ethernet = Layer 2 or D R” 1 2

Page 85: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

85

LSA 2’s

LSA 2’s

LSA 2 - Network Link States

Page 86: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

86

LSA 3 – Summary LSA Originated by the ABR. Describes links between ABR and Internal Routers of the Local Area ABR will include a set of LSA 3’s for each area it belongs to. LSA 3s are flooded throughout the backbone (Area 0) and to other ABRs. Routes learned via LSA type 3s are denoted by an “IA” (Inter-area) in the

routing table.

LSA 3 – Summary Net Link States

Page 87: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

87

LSA 3 – Summary LSAs

LSA 3 – Summary LSA Originated by the ABR. Describes links between ABR and Internal Routers of the Local Area ABR will include a set of LSA 3’s for each area it belongs to. LSA 3s are flooded throughout the backbone (Area 0) and to other ABRs. Routes learned via LSA type 3s are denoted by an “IA” (Inter-area) in the

routing table.

LSA 3’sLSA 1’s

LSA 3’s

ABRABR

Page 88: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

88

LSA 3 – Summary LSAs

LSA 1’sLSA 3’s

LSA 3’s

ABR ABR

Page 89: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

89

LSA 3 – Summary LSAs

LSA 3’sLSA 3’s

LSA 1’s

Page 90: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

90

0 1 2 3

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| LS age | Options | 3 or 4 |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Link State ID |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Advertising Router |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| LS sequence number |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| LS checksum | length |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Network Mask |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| 0 | metric |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| TOS | TOS metric |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| ... |

LSA 3 – Summary Net Link States

Page 91: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

91

• Routers only see the topology of the area they belong to.• When a link in one area changes, the adjacent routers originate in LSA 1’s and

flood them within the area, causing intra-area (internal) routers to re-run the SPF and recalculating the routing table.

• ABRs do not announce topological information between areas.• ABRs only inject routing information into other areas, which is basically a

distance-vector technique.

LSA 3’sLSA 1’s

LSA 3’s

Process using DV technique not LSA 1 Link States.

New or change, do not run SPF algorithm.

LSA 3 – Summary Net Link States

X

Page 92: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

92

• ABRs calculate intra-area routes and announce them to all other areas as inter-area routes, using LSA 3’s.

• OSPF ABRs will only announce inter-area routes that were learned from the backbone area, area 0.

• The backbone area serves as a repository for inter-area routes.• This keeps OSPF safe from routing loops.

LSA 3’sLSA 1’s

LSA 3’s

LSA 3 – Summary Net Link States

Page 93: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

93

Area 0Backbone Area

Area 51Area 1

RTA RTB

RTC

LSA 3 LSA 3

LSA 1’s

Not ABR

• In normal operation, OSPF ABRs will only announce inter-area routes that were learned from the backbone area, area 0.

• RTC does not forward LSA 3’s from Area 1 to Area 51, and does not forward LSA 3’s from Area 51 to Area 1.

• The backbone area serves as a repository for inter-area routes.• This keeps OSPF safe from routing loops.

Page 94: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

94

Area 0Backbone Area

Area 51Area 1

RTA RTB

RTC

LSA 3

LSA 3

Normal Areas

LSA 1’s

Not ABR

• RTC does not forward the LSA 3’s back into Area 1, or routing loops may develop.

• Note: RTC will create LSA 1’s and flood them within the appropriate area.

• OSPF specification states that ABRs are restricted to considering LSA 3’s only from the backbone area to avoid routing information loops.

Page 95: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

95

Area 0Backbone Area

Area 51Area 1

RTA RTB

RTC

Normal Areas

LSA 1’s

LSA 3

LSA 3

X

Area 1 routers re-run SPF, creates new SPF tree and updates routing table.

Update is sent to Area 0 and Area 51 routers using a “distance vector update technique.” SPF not re-run, but routers update routing table.

Topology Change: Down Link• When a router detects a topology change it immediately sends out LSA

1’s (Router LSAs) with the change.• Age of the LSA is set to MaxAge (3,600 seconds) – Routers remove

this entry from their LSDB (Link State Data Base).• Routers that receive the LSA 1’s, within the area of the change:

• Re-run their SPF algorithm• Build a new SPF tree • Update IP routing tables. (Continued next slide)

Page 96: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

96

Area 0Backbone Area

Area 51Area 1

RTA RTB

RTC

Normal Areas

LSA 1’s

LSA 3

LSA 3

X

Area 1 routers re-run SPF, creates new SPF tree and updates routing table.

Update is sent to Area 0 and Area 51 routers using a “distance vector update technique.” SPF not re-run, but routers update routing table.

Topology Change: Down Link• ABR RTA receives the LSA 1 and recalculate their SPF for that area,

Area 1.• RTA floods the change as a LSA 3 within its other area, Area 0.• RTB receives the LSA 3 and floods it within Area 51.• Area 0 and Area 51 routers do not recalculate their SPFs, but inject the

change into their routing tables.

Page 97: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

97

R33# show ip ospf database

Summary Net Link States (Area 1)

Link ID ADV Router Age Seq# Checksum

10.0.0.0 1.1.1.1 130 0x8000000c 0x00ec09

9.0.0.0 1.1.1.1 130 0x8000000d 0x00ec09

192.168.2.0 1.1.1.1 130 0x8000000e 0x00ec09

11.0.0.0 1.1.1.1 130 0x8000000f 0x00ec09

172.16.10.0 1.1.1.1 130 0x80000010 0x00ec09

172.16.11.0 1.1.1.1 130 0x80000011 0x00ec09

99.0.0.0 1.1.1.1 130 0x80000012 0x00ec09

99.0.0.4 1.1.1.1 130 0x80000013 0x00ec09

99.1.0.0 1.1.1.1 130 0x80000014 0x00ec09

LSA 3 – Summary Net Link States (INTERNAL)

• Link ID = IP network addresses of networks in other areas• ADV Router = ABR Router ID sending the LSA-3

• Bottom line: Should see networks in other areas and the ABR advertising that route.

• Rick’s reminder: LSA 3 -> “networks sent by the A B R” 1 2 3

ABR

Page 98: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

98

R1# show ip ospf database

Summary Net Link States (Area 1) <- Per Area

Link ID ADV Router Age Seq# Checksum

10.0.0.0 1.1.1.1 255 0x8000000c 0x00ec09

9.0.0.0 1.1.1.1 255 0x8000000d 0x00ec09

192.168.2.0 1.1.1.1 255 0x8000000e 0x00ec09

11.0.0.0 1.1.1.1 255 0x8000000f 0x00ec09

172.16.10.0 1.1.1.1 255 0x80000010 0x00ec09

172.16.11.0 1.1.1.1 255 0x80000011 0x00ec09

99.0.0.0 1.1.1.1 255 0x80000012 0x00ec09

99.0.0.4 1.1.1.1 255 0x80000013 0x00ec09

99.1.0.0 1.1.1.1 255 0x80000014 0x00ec09

LSA 3 – Summary Net Link States (ABR)

• ABR will show all routes it is injecting into the other area including:• LSA 3s from other areas• LSA 1s from it’s adjacent area it is injecting into this area

• Bottom line: Should see networks in other areas and the ABR advertising that route.

• Rick’s reminder: LSA 3 -> “networks sent by the A B R” 1 2 3

Page 99: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

99

R2# show ip route

99.0.0.0/8 is variably subnetted, 3 subnets, 2 masks

O IA 99.0.0.0/30 [110/1626] via 11.0.0.2, 00:43:01, Serial0/1

O IA 99.0.0.4/30 [110/1627] via 11.0.0.2, 00:43:01, Serial0/1

O IA 99.1.0.0/16 [110/1627] via 11.0.0.2, 00:43:01, Serial0/1

172.16.0.0/24 is subnetted, 4 subnets

O IA 172.16.1.0 [110/65] via 10.0.0.1, 00:42:21, Serial0/0

O IA 172.16.2.0 [110/65] via 10.0.0.1, 00:42:51, Serial0/0

O IA 172.16.10.0 [110/1563] via 11.0.0.2, 00:43:01, Serial0/1

O IA 172.16.11.0 [110/1563] via 11.0.0.2, 00:43:01, Serial0/1

172.30.0.0/24 is subnetted, 2 subnets

O IA 172.30.1.0 [110/66] via 10.0.0.1, 00:42:21, Serial0/0

O IA 172.30.2.0 [110/66] via 10.0.0.1, 00:42:21, Serial0/0

LSA 3 – Summary Net Link States

• Routes learned via LSA type 3s are denoted by an “IA” (Inter-Area Routes) in the routing table.

Page 100: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

100

LSA 3’sLSA 1’s

LSA 3’s

Page 101: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

101

LSA 4 – ASBR Summary LSA Originated by the ABR. Flooded throughout the area. Describes the reachability to the ASBRs

Advertises an ASBR (Router ID) not a network Included in routing table as an “IA” route.

Exceptions Not flooded to Stub and Totally Stubby networks. More on this later

LSA 4 – ASBR Summary Link States

Page 102: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

102

0 1 2 3

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| LS age | Options | 3 or 4 |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Link State ID |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Advertising Router |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| LS sequence number |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| LS checksum | length |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Network Mask |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| 0 | metric |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| TOS | TOS metric |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| ... |

LSA 4 – ASBR Summary Link States

Page 103: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

103

LSA 4 – ASBR Summary Link States

How does the ABRs know about the ASBR? ASBR sends a type 1 Router LSA with a bit (external bit – e bit) that

is set to identify itself as the ASBR.

LSA 1’s (e bit)

LSA 4

LSA 4

Page 104: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

104

R1# show ip ospf database

Summary ASB Link States (Area 1)

Link ID ADV Router Age Seq# Checksum

2.2.2.2 1.1.1.1 1482 0x8000000b 0x00ec09

LSA 4 – ASBR Summary Link States (ABR)

• Link ID - Router ID of ASBR• ADV Router - Router ID ABR advertising route

• Bottom line: Routers in non-area 0, should see Router ID of ASBR and its ABR to get there .

• Rick’s reminder: LSA 4 -> “Reachability to the A S B R” 1 2 3 4

ASBR (This) ABR

ABR

Page 105: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

105

R33# show ip ospf database

Summary ASB Link States (Area 1)

Link ID ADV Router Age Seq# Checksum

2.2.2.2 1.1.1.1 130 0x8000000b 0x00ec09

LSA 4 – ASBR Summary Link States (INTERNAL)

• Link ID - Router ID of ASBR• ADV Router - Router ID ABR advertising route

• Bottom line: Routers in non-area 0, should see Router ID of ASBR and its ABR to get there .

• Rick’s reminder: LSA 4 -> “Reachability to the A S B R” 1 2 3 4

ASBR (Advertising) ABR

ABR

Page 106: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

106

LSA 1’s e bit

LSA 4

LSA 4

LSA 4 – ASBR Summary Link States

Page 107: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

107

LSA 5 – AS External LSA Originated by the ASBR. Describes destination networks external to the Autonomous System (This

OSPF Routing Domain) Flooded throughout the OSPF AS except to stub and totally stubby areas Denoted in routing table as E1 or E2 (default) route (soon) ASBR – Router which “redistributes” routes into the OSPF domain.

Exceptions Not flooded to Stub and Totally Stubby networks. More on this later

LSA 5 - AS External Link States

Page 108: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

108

0 1 2 3

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| LS age | Options | 5 |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Link State ID |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Advertising Router |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| LS sequence number |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| LS checksum | length |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Network Mask |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

|E| 0 | metric |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Forwarding address |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| External Route Tag |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

|E| TOS | TOS metric |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Forwarding address |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| External Route Tag |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| ... |

LSA 5 - AS External Link States

Page 109: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

109

R2 (ASBR)

router ospf 1

redistribute static

ip route 57.0.0.0 255.0.0.0 ser 0/3

Added ->

ASBR

Page 110: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

110

“Redistribute” command creates an ASBR router. LSA 5s

Originated by the ASBR. Describes destination networks external to the OSPF Routing Domain Flooded throughout the OSPF AS except to stub and totally stubby

areas

R2 (ASBR)

router ospf 1

redistribute static

ip route 57.0.0.0 255.0.0.0 ser 0/3

LSA 5’sLSA 5

LSA 5

Page 111: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

111

R1# show ip ospf database Type-5 AS External Link States <- Note, NO Area!

Link ID ADV Router Age Seq# Checksum Tag0.0.0.0 2.2.2.2 2088 0x80000003 0x00ddeb 157.0.0.0 2.2.2.2 2089 0x80000003 0x00ddeb 0

• Link ID = External Networks• ADV Router = Router ID of ASBR• Note: For ABRs: There is only one set of “AS External Link States” in

database summary. In other words, an ABR router will only show one set of “AS External Link States,” not one per area.

• Bottom line: All Routers should see External networks and the Router ID of ASBR to get there .

• Rick’s reminder: LSA 5 -> O T H E R networks 1 2 3 4 5

Note: Packet Tracer does not support LSA 5’s for redistributed routes

ASBR

R2 (ASBR)

router ospf 1

redistribute static

default-information originate

ip route 0.0.0.0 0.0.0.0 ser 0/2

ip route 57.0.0.0 255.0.0.0 ser 0/3

Page 112: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

112

R1# show ip route

O E2 57.0.0.0/8 [110/20] via 10.0.0.2, 00:16:02, Serial0/0O*E2 0.0.0.0/0 [110/1] via 10.0.0.2, 00:16:02, Serial0/0

• Designated by “E2”• Notice that the cost is 20 for all redistributed routes, we will see why later.• It has to do with E2 routes and where the default cost is 20.

– Redistribute command (Route Optimization chapter): If a value is not specified for the metric option, and no value is specified using the default-metric command, the default metric value is 0, except for OSPF where the default cost is 20.

• Cost of 1 for the redistributed route.

LSA 5 - AS External Link States

Page 113: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

113

R33# show ip ospf database

Type-5 AS External Link States <- Note, NO Area!

Link ID ADV Router Age Seq# Checksum Tag

0.0.0.0 2.2.2.2 278 0x80000003 0x00ddeb 1

57.0.0.0 2.2.2.2 1187 0x80000003 0x00ddeb 0

LSA 5 - AS External Link States

R33# show ip route

O E2 57.0.0.0/8 [110/20] via 10.0.0.2, 00:16:02, Serial0/0O*E2 0.0.0.0/0 [110/1] via 10.0.0.2, 00:16:02, Serial0/0

Page 114: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

114

E1 vs. E2 External Routes

External routes fall under two categories:

external type 1

external type 2 (default)

The difference between the two is in the way the cost (metric) of the route is being calculated.

The cost of a type 2 route is always the external cost, irrespective of the interior cost to reach that route.

A type 1 cost is the addition of the external cost and the internal cost used to reach that route.

A type 1 route is always preferred over a type 2 route for the same destination.

More later…

LSA 5 - AS External Link States

Page 115: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

Stub Areas

Page 116: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

116

Stub Areas

Considerations for both Stub and Totally Stubby Areas

An area could be qualified a stub when:

There is a single exit point (a single ABR) from that area. More than one ABR can be used, but be ready to “accept non-optimal routing paths.”

If routing to outside of the area does not have to take an optimal path.

The area is not needed as a transit area for virtual links (later).

The ASBR is not within the stub area

The area is not the backbone area (area 0)

Stub areas will result in memory and processing savings depending upon the size of the network.

Page 117: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

117

Stub Area

Page 118: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

118

Receives all routes from within A.S.: Within the local area - LSA 1s and LSA 2s (if appropriate) From other areas (Inter-Area) - LSA 3s

Does not receive routes from External A.S. (External Routes).

ABR: ABR blocks all LSA 4s and LSA 5s. ‘If LSA 5s are not known inside an area, LSA 4s are not necessary.’ LSA 3s are propagated by the ABR.

Note: Default route is automatically injected into stub area by ABR External Routes: Once the ABR gets a packet headed to a default route, it must have

a default route, either static or propagated by the ASBR via default information originate (coming!)

Configuration: All routers in the area must be configured as “stub”

Stub Areas

Page 119: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

119

R3 (ABR) router ospf 1 area 51 stub << Command: area area stub

R100 (INTERNAL) router ospf 1 area 51 stub << Command: area area stub

R200 (INTERNAL) router ospf 1 area 51 stub << Command: area area stub

Stub Areas – Additional Commands

• All routers in the area must be configured as “stub” including the ABR

Page 120: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

120

Stub Area

LSA 4 LSA 4 BlockedLSA 5 BlockedLSA 5

LSA 3 LSA 3

Default route to ABR injected

• Sent by ABR: LSA 3s (Inter-Area routes)• Blocked:

• LSA 4s (reachability to ASBR) • LSA 5s (External routes)

• The ABR injects a default route into the stub area, pointing to the ABR. • This does not mean the ABR has a default route of its own.

• Changes in External routes no longer affect Stub Area routing tables.

We only see routes in our area, other areas, and a default route.No external routes.

LSA 1s still sent within each area.

Page 121: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

121

R100# show ip ospf database

Summary Net Link States (Area 51)

Link ID ADV Router Age Seq# Checksum

9.0.0.0 3.3.3.3 1752 0x80000037 0x00ba22

0.0.0.0 3.3.3.3 1612 0x80000038 0x00ca50

11.0.0.0 3.3.3.3 625 0x80000039 0x00db11

192.168.2.0 3.3.3.3 614 0x8000003a 0x00dd10

10.0.0.0 3.3.3.3 614 0x8000003b 0x00dd10

172.16.2.0 3.3.3.3 614 0x8000003c 0x00dd10

172.16.1.0 3.3.3.3 614 0x8000003d 0x00dd10

172.30.2.0 3.3.3.3 614 0x8000003e 0x00dc11

172.30.1.0 3.3.3.3 614 0x8000003f 0x00dc11

• No LSA 4s or LSA 5s for stub area routers.

• Default Route injected by ABR (LSA 3)

Stub Areas

Page 122: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

122

R200# show ip route

9.0.0.0/30 is subnetted, 1 subnets

O IA 9.0.0.0 [110/129] via 99.0.0.5, 00:25:52, FastEthernet0/0

10.0.0.0/30 is subnetted, 1 subnets

O IA 10.0.0.0 [110/1691] via 99.0.0.5, 00:25:52, FastEthernet0/0

11.0.0.0/30 is subnetted, 1 subnets

O IA 11.0.0.0 [110/1627] via 99.0.0.5, 00:25:52, FastEthernet0/0

99.0.0.0/8 is variably subnetted, 4 subnets, 2 masks

O 99.0.0.0/30 [110/65] via 99.0.0.5, 00:25:52, FastEthernet0/0

C 99.0.0.4/30 is directly connected, FastEthernet0/0

O 99.1.0.0/16 [110/2] via 99.0.0.5, 00:25:52, FastEthernet0/0

C 99.2.0.0/16 is directly connected, FastEthernet0/1

172.16.0.0/24 is subnetted, 4 subnets

O IA 172.16.1.0 [110/1692] via 99.0.0.5, 00:25:52, FastEthernet0/0

O IA 172.16.2.0 [110/1692] via 99.0.0.5, 00:25:52, FastEthernet0/0

O 172.16.10.0 [110/66] via 99.0.0.5, 00:25:52, FastEthernet0/0

O 172.16.11.0 [110/66] via 99.0.0.5, 00:25:52, FastEthernet0/0

172.30.0.0/24 is subnetted, 2 subnets

O IA 172.30.1.0 [110/1693] via 99.0.0.5, 00:25:52, FastEthernet0/0

O IA 172.30.2.0 [110/1693] via 99.0.0.5, 00:25:52, FastEthernet0/0

O IA 192.168.2.0/24 [110/1628] via 99.0.0.5, 00:25:52, FastEthernet0/0

200.200.200.0/32 is subnetted, 1 subnets

C 200.200.200.200 is directly connected, Loopback0

O*IA 0.0.0.0/0 [110/66] via 99.0.0.5, 00:25:52, FastEthernet0/0

Stub Areas

LSA 1’s (Within area)

LSA 3’s (Other areas)

No LSA 4’s (ASBR)

No LSA 5’s (External routes)

Default Route (Injected by ABR)

NOTE on default route:

• ABR will advertise a default route with a cost of 1

• cost of 65 = 1 (Default) +1 (Fa) + 64 (serial link)

• The default cost can be modified with the ospf command:

ABR(config-router)# area area-id default-cost cost

Page 123: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

123

R3# show ip route

3.0.0.0/32 is subnetted, 1 subnets

C 3.3.3.3 is directly connected, Loopback0

9.0.0.0/30 is subnetted, 1 subnets

C 9.0.0.0 is directly connected, Serial0/2

10.0.0.0/30 is subnetted, 1 subnets

O 10.0.0.0 [110/1626] via 11.0.0.1, 00:00:41, Serial0/3

11.0.0.0/30 is subnetted, 1 subnets

C 11.0.0.0 is directly connected, Serial0/3

99.0.0.0/8 is variably subnetted, 3 subnets, 2 masks

C 99.0.0.0/30 is directly connected, Serial0/0

O 99.0.0.4/30 [110/65] via 99.0.0.2, 00:00:46, Serial0/0

O 99.1.0.0/16 [110/65] via 99.0.0.2, 00:00:46, Serial0/0

172.16.0.0/24 is subnetted, 4 subnets

O IA 172.16.1.0 [110/1627] via 11.0.0.1, 00:00:31, Serial0/3

O IA 172.16.2.0 [110/1627] via 11.0.0.1, 00:00:31, Serial0/3

C 172.16.10.0 is directly connected, FastEthernet0/0

C 172.16.11.0 is directly connected, FastEthernet0/1

172.30.0.0/24 is subnetted, 1 subnets

O IA 172.30.1.0 [110/1628] via 11.0.0.1, 00:00:01, Serial0/3

O 192.168.2.0/24 [110/1563] via 11.0.0.1, 00:00:41, Serial0/3

O*E2 0.0.0.0/0 [110/1] via 11.0.0.1, 00:00:41, Serial0/3

Stub Areas

• Notice, there is no automatic default route on ABR, as there are with the internal stub routers.

• This default route came from the ASBR.

• In other words the ABR will inject the default route into the stub area whether or not it has a default route in its routing table.

Page 124: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

Totally Stubby Areas

Page 125: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

125

Totally Stubby Area

Page 126: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

126

Receives routes from within A.S.: Only from within the local area - LSA 1s and LSA 2s (if appropriate) Does not receive routes from other areas (Inter-Area) - LSA 3s

Does not receive routes from External A.S. (External Routes)

ABR: ABR blocks all LSA 4s and LSA 5s. ABR blocks all LSA 3s, except propagating a default route. Default route is injected into totally stubby area by ABR.

Configuring: All routers must be configured as “stub” ABR must be configured as “stub no-summary”

Totally Stubby Areas

Page 127: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

127

R1: (ABR) router ospf 1 area 1 stub no-summary ^^ Command: area area stub no-summary

 R22 and R33: (INTERNAL ROUTERS)  router ospf 1 area 1 stub

^^ Command: area area stub

Totally Stubby Areas

Page 128: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

128

Stub Area

LSA 4 LSA 4 BlockedLSA 5 BlockedLSA 5

LSA 3 LSA 3

Default route to ABR injected

• Blocked: • LSA 3s (Inter-Area routes)• LSA 4s (reachability to ASBR) • LSA 5s (External routes)

• The ABR injects a default route into the stub area, pointing to the ABR. • This does not mean the ABR has a default route of its own.

• Changes in other areas and external routes no longer affect Stub Area routing tables.

We only see routes in our area, other areas, and a default route.No external routes.

Totally Stubby Area

BlockedBlockedBlocked

Default route to ABR injected

We only see routes in our area and a default route.

No inter-area or external routes.

LSA 1s still sent within each area.

Page 129: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

129

R33# show ip route

33.0.0.0/32 is subnetted, 1 subnets

C 33.33.33.33 is directly connected, Loopback0

172.16.0.0/24 is subnetted, 2 subnets

C 172.16.1.0 is directly connected, FastEthernet0/0

O 172.16.2.0 [110/2] via 172.16.1.1, 00:02:13, FastEthernet0/0

172.30.0.0/24 is subnetted, 2 subnets

C 172.30.1.0 is directly connected, FastEthernet0/1

O 172.30.2.0 [110/2] via 172.16.1.3, 00:02:23, FastEthernet0/0

O*IA 0.0.0.0/0 [110/2] via 172.16.1.1, 00:02:13, FastEthernet0/0

Totally Stubby Areas

• Default route is injected into totally stubby area by ABR for all other networks (inter-area and external routes)

• Does not receive routes from other areas (Inter-Area)

• Does not receive routes from External A.S. (External Routes)

Note: Packet Tracer does not support Totally Stubby Networks (yet)

Page 130: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

130

R1# show ip route

1.0.0.0/32 is subnetted, 1 subnetsC 1.1.1.1 is directly connected, Loopback0 9.0.0.0/24 is subnetted, 1 subnetsC 9.0.0.0 is directly connected, Serial0/1 10.0.0.0/30 is subnetted, 1 subnetsC 10.0.0.0 is directly connected, Serial0/0 11.0.0.0/30 is subnetted, 1 subnetsO 11.0.0.0 [110/1626] via 10.0.0.2, 00:05:26, Serial0/0 99.0.0.0/8 is variably subnetted, 3 subnets, 2 masksO IA 99.0.0.0/30 [110/1690] via 10.0.0.2, 00:05:26, Serial0/0O IA 99.0.0.4/30 [110/1691] via 10.0.0.2, 00:05:26, Serial0/0O IA 99.1.0.0/16 [110/1691] via 10.0.0.2, 00:05:26, Serial0/0 172.16.0.0/24 is subnetted, 4 subnetsC 172.16.1.0 is directly connected, FastEthernet0/0C 172.16.2.0 is directly connected, FastEthernet0/1O IA 172.16.10.0 [110/1627] via 10.0.0.2, 00:05:26, Serial0/0O IA 172.16.11.0 [110/1627] via 10.0.0.2, 00:05:26, Serial0/0 172.30.0.0/24 is subnetted, 2 subnetsO 172.30.1.0 [110/2] via 172.16.1.2, 00:04:51, FastEthernet0/0O 172.30.2.0 [110/2] via 172.16.1.3, 00:04:41, FastEthernet0/0O 192.168.2.0/24 [110/65] via 10.0.0.2, 00:05:26, Serial0/0O*E2 0.0.0.0/0 [110/1] via 10.0.0.2, 00:05:26, Serial0/0

Totally Stubby Areas

• Notice, there is no automatic default route on ABR, as there are with the internal stub routers.

• This default route came from the ASBR.

• In other words the ABR will inject the default route into the stub area whether or not it has a default route in its routing table.

Page 131: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

131

Quick Review

Page 132: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

132

LSA 1s – Router LSAs

show ip ospf database – Router Link States (LSA 1’s) Should display all the RouterIDs of routers in that area,

including its own. show ip route – “O” routes

Routes within that area

LSA 1’sLSA 1’s

LSA 1’s

Page 133: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

133

LSA 2s – Network LSAs

show ip ospf database – Net Link States (LSA 2’s) Net Link States (LSA2’s) should display the RouterIDs of the

DRs on all multi-access networks in the area and their IP addresses.

show ip route – “O” routes Routes within that area

LSA 2’s

LSA 2’s

Page 134: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

134

LSA 3 – Summary LSAs

LSA 3’sLSA 3’s

LSA 1’s

show ip ospf database – Summary Net Link States (LSA 3’s) Link ID = IP network addresses of networks in other areas ADV Router = ABR Router ID sending the LSA-3

show ip route – “IA” (Inter-Area Routes) Routes in other areas

Page 135: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

135

LSA 4 – ASBR Summary Link States

show ip ospf database – Summary Net Link States (LSA 3’s) Link ID = IP network addresses of networks in other areas ADV Router = ABR Router ID sending the LSA-3

show ip route – “IA” (Inter-Area Routes) Routes in other areas

LSA 1’s ebit

LSA 4

LSA 4

Page 136: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

136

“Redistribute” command creates an ASBR router. Originated by the ASBR. Describes destination networks external to the OSPF Routing Domain Flooded throughout the OSPF AS except to stub and totally stubby areas

R2 (ASBR)

router ospf 1

redistribute static

ip route 57.0.0.0 255.0.0.0 ser 0/3

LSA 5’sLSA 5

LSA 5

LSA 5 – External Link States

Page 137: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

137

Stub Area

LSA 4 LSA 4 BlockedLSA 5 BlockedLSA 5

LSA 3 LSA 3

Default route to ABR injected

• Sent by ABR: LSA 3s (Inter-Area routes)• Blocked:

• LSA 4s (reachability to ASBR) • LSA 5s (External routes)

• The ABR injects a default route into the stub area, pointing to the ABR. • This does not mean the ABR has a default route of its own.

• Changes in External routes no longer affect Stub Area routing tables.

We only see routes in our area, other areas, and a default route.No external routes.

Stub Area LSA 1s still sent within each area.

Page 138: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

138

Stub Area

LSA 4 LSA 4 BlockedLSA 5 BlockedLSA 5

LSA 3 LSA 3

Default route to ABR injected

• Blocked: • LSA 3s (Inter-Area routes)• LSA 4s (reachability to ASBR) • LSA 5s (External routes)

• The ABR injects a default route into the stub area, pointing to the ABR. • This does not mean the ABR has a default route of its own.

• Changes in other areas and external routes no longer affect Stub Area routing tables.

We only see routes in our area, other areas, and a default route.No external routes.

Totally Stubby Area

BlockedBlockedBlocked

Default route to ABR injected

We only see routes in our area and a default route.

No inter-area or external routes.

Totally Stubby Area LSA 1s still sent within each area.

Page 139: Configuring OSPF – Part 1 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: Fall 2010

Multi Area OSPF – Part 1 of 2

CIS 185 Advanced Routing

Rick Graziani

Cabrillo College

[email protected]