Flylib.com

Books Software

 
 
 

2-3 area area-id default-cost cost

 <  Free Open Study  >  

2-3 area area-id default-cost cost

NOTE

This command requires the following additional commands:

area area-id nssa (see Section 2-4)

or

area area-id stub (see Section 2-11)


Syntax Description:

  • area-id ” OSPF area ID. This value can be entered as a decimal number in the range of 0 to 4,294,967,295 or in IP address form in the range 0.0.0.0 to 255.255.255.255.

  • cost ” The default cost of an OSPF stub area's advertised external default route metric. The range of values is 0 to 16,777,215. The default value is 1. The cost value will be added to the cost of reaching the Area Border Router (ABR) that is advertising the default route.

Purpose: External networks will not be advertised into a stub or totally stubby area. External networks are networks that have been redistributed into OSPF. External OSPF routes and inter-area OSPF routes are not advertised into a totally stubby area. When an OSPF area is configured as a stub area, a default route will be generated by the ABR into the stub area in place of the external routes. When an OSPF area is configured as a totally stubby area, the default route replaces the external and inter-area routes. The purpose of this command is to set the cost of the default route advertised into a stubby, totally stubby, or not-so-stubby area. If this command is not used, then the cost of the default route will be 1. When configuring stub areas, all routers with interfaces in the stub area must be configured with the same stub area type.

Initial Cisco IOS Software Release: 10.0

Configuration Example: Setting the Default Cost for a Stub Area

Initially, the network in Figure 2-3 is configured without a stubby area to compare the differences between the routes advertised into a normal area with those advertised into a stubby area. You will redistribute the loopback interface on Router C in order to generate an external route on Routers A and B.

Figure 2-3. External OSPF Routes Are Not Advertised into an OSPF Stub Area. Inter-area and External Routes Are Not Advertised into a Totally Stubby Area

graphics/02fig03.gif

Router A

interface Loopback0


ip address 1.1.1.1 255.255.255.255


!


interface Serial0/1


ip address 10.1.1.1 255.255.255.252


clock rate 64000


!


router ospf 1


network 10.1.1.0 0.0.0.3 area 1

_______________________________________________________________________



Router B

interface Loopback0


ip address 2.2.2.2 255.255.255.255


!


interface Serial0


ip address 10.1.1.2 255.255.255.252


!


interface Serial1


ip address 10.1.1.5 255.255.255.252


clock rate 64000


!


router ospf 1


network 10.1.1.0 0.0.0.3 area 1


network 10.1.1.4 0.0.0.3 area 0

_______________________________________________________________________



Router C

interface Loopback0


ip address 3.3.3.3 255.255.255.255


!


interface Serial0


ip address 10.1.1.6 255.255.255.252


!


router ospf 1


redistribute connected subnnets


network 10.1.1.4 0.0.0.3 area 0

If you examine the IP routing table on Router A, you can see that all OSPF routes are being advertised into Area 1.

rtrA#

show 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



Gateway of last resort is not set



     1.0.0.0/32 is subnetted, 1 subnets

C       1.1.1.1 is directly connected, Loopback0

3.0.0.0/32 is subnetted, 1 subnets


O E2    3.3.3.3 [110/20] via 10.1.1.2, 00:00:04, Serial0/1

10.0.0.0/30 is subnetted, 3 subnets

C       10.1.1.0 is directly connected, Serial0/1

O IA    10.1.1.4 [110/128] via 10.1.1.2, 00:00:04, Serial0/1

Modify the configurations on Routers A and B so that Area 1 is a stub area.

Router A

router ospf 1



area 1 stub



network 10.1.1.0 0.0.0.3 area 1

_______________________________________________________________________



Router B

router ospf 1



area 1 stub



network 10.1.1.0 0.0.0.3 area 1


network 10.1.1.4 0.0.0.3 area 0

Re-examine the IP routing table on Router A.

rtrA#

show 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

Gateway of last resort is 10.1.1.2 to network 0.0.0.0

1.0.0.0/32 is subnetted, 1 subnets

C       1.1.1.1 is directly connected, Loopback0

     10.0.0.0/30 is subnetted, 3 subnets

C       10.1.1.0 is directly connected, Serial0/1

O IA    10.1.1.4 [110/128] via 10.1.1.2, 00:00:06, Serial0/1

O*IA 0.0.0.0/0 [110/65] via 10.1.1.2, 00:00:06, Serial0/1

Notice that the cost of the default route is 65. This is the sum of the cost to the ABR of 64 and the cost of the default route, which has the default value of 1. You can verify the default cost by using the command show ip ospf on Router B.

rtrB#

show ip ospf

Routing Process "ospf 1" with ID 2.2.2.2

 Supports only single TOS(TOS0) routes

 It is an area border router

 SPF schedule delay 5 secs, Hold time between two SPFs 10 secs

 Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs

 Number of external LSA 3. Checksum Sum 0x14B45

 Number of DCbitless external LSA 0

 Number of DoNotAge external LSA 0

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

    Area BACKBONE(0)

        Number of interfaces in this area is 1

        Area has no authentication

        SPF algorithm executed 21 times

        Area ranges are

        Number of LSA 3. Checksum Sum 0x14F55

        Number of DCbitless LSA 0

        Number of indication LSA 0

        Number of DoNotAge LSA 0

Area 1

Number of interfaces in this area is 1

It is a stub area


generates stub default route with cost 1

Area has no authentication

        SPF algorithm executed 37 times

        Area ranges are

        Number of LSA 4. Checksum Sum 0x1E701

        Number of DCbitless LSA 0

        Number of indication LSA 0

        Number of DoNotAge LSA 0

Modify the cost of the default route being generated by Router B.

Router B

router ospf 1


area 1 stub



area 1 default-cost 15



Network 10.1.1.0 0.0.0.3 area 1


Network 10.1.1.4 0.0.0.3 area 0

Verification

Verify the new cost for the default route on Router A by using the show ip route command or the show ip route 0.0.0.0 command. You can also verify the cost of the default route on Router B by using the show ip ospf command.

rtrA#

show 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



Gateway of last resort is 10.1.1.2 to network 0.0.0.0



     1.0.0.0/32 is subnetted, 1 subnets

C       1.1.1.1 is directly connected, Loopback0

     10.0.0.0/30 is subnetted, 3 subnets

C       10.1.1.0 is directly connected, Serial0/1

O IA    10.1.1.4 [110/128] via 10.1.1.2, 00:03:39, Serial0/1

O*IA 0.0.0.0/0 [110/79] via 10.1.1.2, 00:00:09, Serial0/1

rtrA#

show ip route 0.0.0.0

Routing entry for 0.0.0.0/0, supernet

  Known via "ospf 1", distance 110, metric 79, candidate default path, type inte

r area

  Redistributing via ospf 1

  Last update from 10.1.1.2 on Serial0/1, 00:01:05 ago

  Routing Descriptor Blocks:

  * 10.1.1.2, from 2.2.2.2, 00:01:05 ago, via Serial0/1

      Route metric is 79, traffic share count is 1

_______________________________________________________________________



rtrB#

show ip ospf

Routing Process "ospf 1" with ID 2.2.2.2

 Supports only single TOS(TOS0) routes

 It is an area border router

 SPF schedule delay 5 secs, Hold time between two SPFs 10 secs

 Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs

 Number of external LSA 3. Checksum Sum 0x14B45

 Number of DCbitless external LSA 0

 Number of DoNotAge external LSA 0

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

    Area BACKBONE(0)

        Number of interfaces in this area is 1

        Area has no authentication

        SPF algorithm executed 21 times

        Area ranges are

        Number of LSA 3. Checksum Sum 0x14F55

        Number of DCbitless LSA 0

        Number of indication LSA 0

        Number of DoNotAge LSA 0

Area 1

Number of interfaces in this area is 1

It is a stub area


generates stub default route with cost 15

Area has no authentication

        SPF algorithm executed 37 times

        Area ranges are

        Number of LSA 4. Checksum Sum 0x27068

        Number of DCbitless LSA 0

        Number of indication LSA 0

        Number of DoNotAge LSA 0

The new cost is now 64 + 15 or 79.

Troubleshooting
Step 1. Verify that there is a neighbor relationship between the OSPF routers by using the show ip ospf neighbor command.

Step 2. Verify that the ABR to the stub area and all routers in the stub area have been configured as a stub using the router configuration command area x stub.

Step 3. Verify that the default-cost command has been configured on the ABR(s) for the stub area. The default-cost command will only work on the stub area ABR.

 <  Free Open Study  >