Saturday, June 14, 2008

OSPF - Using the max-metric router-lsa command

Don't exactly have all the theory down or a "real-world view" about this one but I wanted to do a lab so here it is:



R1 --- R3 --- R4 --- BACKBONE AREA 0 ---> other routers/areas

R1 connects to R3 on subnet 172.12.123.0/24
R3 connects to R4 on subnet 172.12.34.0/24
All interfaces are in area 345 except the right side of R4.
R4 is an ABR connected to area 0

R4 is advertising a type 3 LSA for 172.12.123.0 into area 0:

R4#show ip ospf database summary 172.12.123.0

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

Summary Net Link States (Area 0)

LS age: 1
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 172.12.123.0 (summary Network Number)
Advertising Router: 4.4.4.4
LS Seq Number: 80000001
Checksum: 0x8175
Length: 28
Network Mask: /24
TOS: 0 Metric: 2

Now suppose R3 didn't want to be a transit network for 172.12.123.0 and the other links connected to R1. Perhaps it just wants to be a backup link. We could have R3 set a maximum metric on that LSA ensuring that any other LSA would be more preferred:

R3(config)#router ospf 1
R3(config-router)#max-metric router-lsa

Verify:

R3#show ip ospf
Routing Process "ospf 1" with ID 3.3.3.3
Start time: 00:00:29.944, Time elapsed: 06:24:37.160
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Supports area transit capability
It is an autonomous system boundary router
Redistributing External Routes from,
eigrp 1
Originating router-LSAs with maximum metric
Condition: always, State: active

(output omitted)

Notice the high metric on R4 now:

R4#show ip ospf database summary 172.12.123.0

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

Summary Net Link States (Area 0)

LS age: 43
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 172.12.123.0 (summary Network Number)
Advertising Router: 4.4.4.4
LS Seq Number: 80000006
Checksum: 0x6B87
Length: 28
Network Mask: /24
TOS: 0 Metric: 65536 <-- MAXIMUM!

Now if there are any other paths to 172.12.123.0, other OSPF routers in the domain are more likely to use those.

2 comments:

  1. I’m impressed, that you managed to make a study like this, this is not an easy thing you know? I really admire you for doing your own study on this matter. I am pretty sure that you will eventually succeed on your career for being such a genius one.

    JilL

    My blog : meuble d'angle pour salle de bain 

    ReplyDelete

Note: Only a member of this blog may post a comment.