You are on page 1of 51


OSPF in Multiple Areas
June 2007

Single VS. Multiple Areas OSPF
Problems with OSPF in single area: 1-Frequent calculation of SPF algorithm (in a large sized topology a single network instability will cause instability to the whole topology) 2-Large link-state table (due to large network size) 3-Large routing table (due to large network size) So routers will need high CPU power & big memory size,


The solution if you require to scale your network using OSPF, is to use hierarchical design.

Multiple Area OSPF 1-Reduced Rate of SPF calculations. 2-Smaller routing and topology table. 3-Reduced LSU overhead by confining network instability.


Types of Routers • Internal Router: Router that has all its interfaces in the same area, it has full LSDB for its area (config)#router ospf <process id> (config-router)#network <link id> <wcm> area <area id> • ABR (Area Border Router): Router that is responsible for connecting two or more areas, it must has at least one interface in the backbone area (area 0), it has full database for all areas to which it is connected and send summary database updates between these areas (config)#router ospf <process id> (config-router)#network <link id> <wcm> area 0 (config-router)#network <link id> <wcm> area <area


Types of Routers • ASBR (Autonomous System Boundary Router): Router that has at least one interface into an external internetwork (another AS) or other non-OSPF network • Backbone Router: Router that has at least one link in area 0, it could be an internal router, ABR or ASBR


cost 4-describe whether the router is ABR or ASBR. it describes: 6 1-directly attached link by its IP 2-mask of link 3-state of link... Type 1 LSID is the originating router RID 5-Link type (point to point to other router. multiaccess (transit). virtual link.Types of LSAs • Type 1 LSA:(router link LSA) Intra-area LSA "O in routing table" Every router generate router link advertisements and flood it to all routers for each area to which it belong.) . stub.

Types of LSAs 7 • Type 2 LSA: (Network Link LSA) Intra-area "O in routing table" generated by DR and flooded inside its area. Type2 LSID is the ip of interface of the DR facing the segment A type 2 network LSA lists each of the attached routers that make up the transit network. as well as the subnet mask used on the link. . including the DR itself. its function is that DR advertise its existence to all its area.

• Type3 LSA:(Network Link Summary LSA) inter-area "O-IA in routing table" generated by ABR. 8 Type3 LSA LSID is destination network ip . ABR take type1 LSA and type2 LSA from area and summarize theses LSAs to type3 LSA and flood it to all AS. it describes network ips and their masks.

it describe path and cost to reach ASBR. so it contains RID of ASBR & cost.• Type4 LSA:(ASBR summary LSA) inter-area "O-IA in routing table" generated by ABR to advertise how to reach an ASBR inside an area to all AS. 9 .

• 10 Type5 LSA (AS External link LSA) generated by ASBR and flood to all AS. OE2" in routing table -external type 2 (OE2): doesn’t add internal cost to external cost (default) -external type 1(OE1): add internal cost to external cost . it describe routes to destination networks in an external AS "OE1.

ON2 in routing table“ generated by the ASBR of NSSA. it is similar to type 5 LSA except they are flooded within the NSSA. ABR will translate type7 LSA to type5 LSA and flooded to all AS .11 • Type6 LSA (Multicast OSPF-Not supported by Cisco) • Type7 LSA (NSSA (Not-So-Stubby-Area) external LSA) "ON1.

Link-State Advertisement Types 12 (Future use) Interpreting the Routing Table: Types of Routes .

Interpreting the OSPF Database 13 .

inter-area and external).Types of Areas • Ordinary or standard area: Area that accept all types of LSAs (intra area. it accept all types of areas except type 7 14 . but doesnot accept type7 • Backbone Area (transit area): It is area 0 and connect all other areas.

Types of Areas 15 .

stub area can never contain an ASBR IP routing table for router in a stub area .• 16 Stub area: Area that its ABR does not advertise to it type 5 LSA and doesnot accept type 7 LSA. so internal routers in that area type doesnot know any details about other AS networks but can reach them using default route through ABR. but its ABR advertise default route instead.

for Stub area: on all area routers (config-router)#area <id> stub 17 .

but use default route to reach them through their ABR. so internal routers does not know details about other AS networks and other Areas networks.Totally Stub area: Area that its ABR does not advertise type 5. IP routing table for router in a stub area 18 . but instead its ABR advertise a default route. type 3. type 4 and does not accept type7.

• for totally stub area: on ABR: (config-router)#area <id> stub no-summary 19 on all other area routers: (config-router)#area <id> stub To define injected default route cost (config-router)#area <area id> default-cost <cost> .

it accepts type7 LSA and all other types except type 5 LSA and use default route instead ABR of NSSA convert type 7 to other areain to type 5 20 Has O. O*IA. OIA. ON1 & ON2 routing entries On all router in NSSA area (config-router)# area <id> nssa .• NSSA (Not-So-Stubby-Area): It is a stub area that can contain ASBR.

O*IA. ON1 & ON2 routing entries It is a total stub area that can contain ASBR.totally stub area: has O.•NSSA . it accepts type7 LSA and use default route only On ABR router in NSSA total stub area (config-router)# area <id> nssa no-summary 21 .

Configuring summarization 22 – Minimizes number of routing table entries – Localizes impact of a topology change – Reduces LSA 3 and 5 flooding and saves CPU resources • Summary on ABR: (config-router)#area <id> range <summary address> .

23 .

summary on ASBR: (config-router)#summary-address <address> <mask> 24 .

then R2 will be the alternative .25 Advertise default route: (config-router)#default-information originate [always] [metric value ] Note that the path through R1 is preferred to Internet until R1 path fail.

26 Router(config-router)# max-lsa maximum-number [thresholdpercentage] [warningonly] .OSPF LSDB Overload Protection • Excessive LSAs generated by other routers can drain local router resources. • This feature can limit the processing of non-self-generated LSAs for a defined OSPF process.

or in case of making redundant link to area 0 27 The solution is to form a virtual link between the far area and area 0 through the transit area .Virtual links • OSPF rule is that all areas must connect to area 0. but there are cases that enforce the opposite of that due to direct physical connections unavailability.

Hello 10.2. Retransmit 5 Hello due in 0:00:08 Adjacency State FULL .2. via interface Ethernet0.1. Dead 40. State POINT_TO_POINT Timer intervals configured.2 is up Transit area 0.0. Cost of using 10 Transmit Delay is 1 sec.(config)#router ospf <process id> (config-router)#area <transit area id> virtual-link <next-hop RID> 28 Router# show ip ospf virtual-links Virtual Link to router 10.0. Wait 40.

Timer intervals configured.1. Cost of using 781 Transmit Delay is 1 sec.3 10. Wait 40. LSAs learned through a virtual link have the DoNotAge (DNA) option set. maximum is 1 Last retransmission scan time is 0 msec.2 10.2 Interface FastEthernet0/0 OSPF_VL0 Serial0/0/1 29 . so that the LSA does not age out. LSA updates work differently on virtual links. Hello 10.2.2 is up Run as demand circuit DoNotAge LSA allowed.The Hello protocol works over virtual links as it does over standard links.2. An LSA usually refreshes every 30 minutes.2 0 FULL/ 00:00:32 172. This DNA technique is required to prevent excessive flooding over the virtual link.2. RouterA#sh ip ospf neighbor Neighbor ID Pri State Dead Time Address 10. However.1.16.2 0 FULL/ 172. RouterA#sh ip ospf interface Virtual Link OSPF_VL0 to router 10. Dead 40. via interface Serial0/0/ maximum is 0 msec properly.13 1 FULL/DR 00:00:33 10.2. Retransmit 5 Hello due in 00:00:07 Adjacency State FULL (Hello suppressed) Index 1/2. State POINT_TO_POINT. Transit area 1.16.200. in 10-second intervals.1.200. retransmission queue length 0. number of retransmission 1 First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0) Last retransmission scan length is 1.

Verification and troubleshooting • • • • • #sh ip protocols #sh ip route #sh ip ospf neighbors #sh ip ospf interface #sh ip ospf database 30 • • • #sh ip ospf border-routers #sh ip ospf virtual-links (config-router)#log-adjacency-changes Design considerations Cisco recommend the following: • • • • 50 routers per area (max) 60 neighbours per router (max) 3 areas per router (max) Router can not be a DR or BDR for more than one network segment .

Configuring Static IPv6 route: (config)#ipv6 unicast-routing (config)#ipv6 route <prefix> <prefix length> {interface / next hop ip} .IPv6 Routing Protocols 31 • IPv6 routing types – Static – RIPng (RFC 2080) – IS-IS for IPv6 – MP-BGP4 (RFC 2545/2858) – EIGRP for IPv6 – OSPFv3 (RFC 2740) • The ipv6 unicast-routing command is required to enable IPv6 before any routing protocol configured.

radius of 15 hops. next-hop IPv6 address • Uses the multicast group FF02::9. split horizon. (UDP) port 521 32 • Named RIPng .RIPng (RIP next Generation) Same as IPv4 • Distance vector. and poison Reverse • Based on RIPv2 Updated features for IPv6 • IPv6 prefix. as the destination address for RIP updates • Uses IPv6 for transport. the all-rip-routers multicast group.

33 Integrated Intermediate System-to-Intermediate System (IS-IS) Same as for IPv4 • Extensions for IPv6 Two new Type. Length.IPv6 reachability (with 128-bit prefix) . Value (TLV) attributes: .IPv6 interface address (with 128 bits) • New protocol identifier • Not yet an IETF standard .

Multiprotocol Label Switching (MPLS) and IPv6.Multiprotocol Border Gateway Protocol (MP-BGP) (RFC 2858) Multiprotocol BGP is used to enable BGP4 to carry information of other protocols. Multiprotocol extensions for BGP4: • Enables protocols other than IPv4 • New identifier for the address family IPv6 specific extensions 34 . for example.

• Updated features for IPv6 • Carry IPv6 addresses • Link-local addresses used as source • IPv6 transport • OSPF for IPv6 currently an IETF proposed standard 35 . but a major rewrite of the internals of the protocol.OSPF Version 3 (OSPFv3) (RFC 2740) Similar to IPv4 • Same mechanisms.

the network mask. result in the creation of the OSPF routing table. • The state of a link is a description of that interface and its relationship to its neighboring networking devices. • The interface information includes the IPv6 prefix of the interface. • A collection of LSA data on a router is stored in a link-state database (LSDB). • It is a link-state protocol. • The contents of the database. • This information is propagated in various types of link-state advertisements (LSAs). • The difference between the database and the routing table is that the database contains a complete collection of raw data. the routers connected to that network. when subjected to Dijkstra’s algorithm. the type of network that it is connected to. and so on. . the routing table contains a list of shortest paths to known destinations via specific router interface ports. supports IPv6. OSPFv3.OSPF and IPv6 (OSPF v3) 36 How OSPF for IPv6 Works • OSPF is a routing protocol for IP. which is described in RFC 2740.

37 .OSPFv3—Hierarchical Structure • Topology of an area is invisible from outside of the area: – LSA flooding is bounded by area. – SPF calculation is performed separately for each area. • Backbones must be contiguous. • All areas must have a connection to the backbone: – Otherwise a virtual link must be used to connect to the backbone.

because each address family has a separate SPF.OSPFv3—Similarities with OSPFv2 • OSPFv3 is OSPF for IPv6 (RFC 2740) – Runs directly over IPv6 • OSPFv3 and OSPFv2 can be run concurrently. 38 . Also supports other modes from Cisco. • LSA flooding and aging mechanisms are identical. • OSPFv3 uses the same basic packet types as OSPFv2: – Hello – Database description (DBD) – Link state request (LSR) – Link state update (LSU) – Link state acknowledgment (ACK) • Neighbor discovery and adjacency formation mechanism are identical. • RFC-compliant NBMA and point-to-multipoint topology modes are supported. such as point-to-point and broadcast.

the 24-byte header in OSPFv2. but some fields have been changed. 39 All OSPFv3 packets have a 16-byte header vs.Enhanced Routing Protocol Support Differences from OSPFv2 – OSPF packet type OSPFv3 has the same five packet types. .

• Instance ID is a new field that is used to allow multiple OSPFv3 protocol instances per link. to use a common link. 5. 3. and link-state ID remain at 32 bits. but their details are described in type9 LSA. even though they do not share a common subnet.0. equivalent to 224. it is now the job of IPv6 to make sure that the right level of authentication is in use.6 in OSPFv2 6.Two nodes can talk directly over a single link. By default. 4. • DR and BDR are now identified by their router ID and not by their IP address. area ID. each running OSPF.Authentication is no longer part of OSPF. they need to have the same instance ID.Security • OSPFv3 uses IPv6 AH and ESP extension headers instead of variety of the mechanisms defined in OSPFv2.0. . • Router LSA and network LSA do not carry IPv6 addresses.This structure allows separate autonomous systems. • Router ID. A single link could belong to multiple areas.5 in OSPFv2 • FF02::6—Represents all DR routers on the link-local scope.Removal of address semantics • IPv6 addresses are no longer present in OSPF packet header (part of payload information). 2. it is 0.0. and for any additional instance it is increased.40 1. equivalent to 224.0. • In order to have two instances talk to each other.Multicast addresses: • FF02::5—Represents all SPF routers on the link-local scope.

LSA Types for IPv6 LSA Function Code 1 2 3 4 5 6 7 8 9 LSA Type 41 Router LSA Network LSA Interarea prefix LSA Interarea router LSA AS external LSA Group membership LSA Type 7 LSA Link-LSA Intra-area prefix LSA 0x2001 0x2002 0x2003 0x2004 0x2005 0x2006 0x2007 0x2008 0x2009 .

* Type 3 and type 9 LSAs carry all IPv6 prefix information.The two renamed LSAs are as follows: • Interarea prefix LSAs for area border routers (ABRs) (type 3) • Interarea router LSAs for autonomous system boundary routers (ASBRs) (type 4) The two new LSAs in IPv6 are as follows: • Link LSAs (type 8): Type 8 LSAs have link-local flooding scope and are never flooded beyond the link with which they are associated. is included in router LSAs and network LSAs. The link-state ID for each intra-area prefix LSA describes its association to either the router LSA or the network LSA. in IPv4. inform other routers attached to the link of a list of IPv6 prefixes to associate with the link. Link LSAs provide the link-local address of the router to all other routers attached to the link. The link-state ID also contains prefixes for stub and transit networks. which. 42 . and allow the router to assert a collection of options bits to associate with the network LSA that will be originated for the link. • Intra-area prefix LSAs (type 9): A router can originate multiple intra-area prefix LSAs for each router or transit network. each with a unique link-state ID.

This command is used on a global basis. Router(config-rtr)#router-id router-id ! For an IPv6-only router. a router ID parameter must be defined in the OSPFv3 configuration as an IPv4 address using the router-id router-id command. Router(config-if)#ipv6 ospf process-id area area-id [instance instance-id] ! Enables OSPF for IPv6 on an interface.OSPFv3 Configuration Router(config)#ipv6 unicast-routing 43 Router(config)#ipv6 router ospf process-id ! Enables an OSPF process on the router. You can use any IPv4 address as the router ID value. . The process ID parameter identifies a unique OSPFv3 process.

2. .2 Router(config-rtr)#area range 1 2001:0DB8::/48 (config)# interface Ethernet0/0 (config-if)# ipv6 address 3FFE:FFFF:1::1/64 (config-if)# ipv6 ospf 1 area 0 (config-if)# ipv6 ospf priority 20 The priority number is used to in the designated router election.Cisco IOS OSPFv3-Specific Attributes • Configuring area range: (config-rtr)# area area-id range prefix/prefix length [advertise | notadvertise][cost cost] • Showing new LSAs: – show ipv6 ospf [process-id] database link – show ipv6 ospf [process-id] database prefix 44 Example: (config)#ipv6 unicast-routing (config)# ipv6 router ospf 1 (config-rtr)# router-id 2.2. (config-if)# ipv6 ospf cost 20 The cost of sending a packet on the interface. expressed in the link state metric.

1.4 .3 45 Router2# interface S3/0 ipv6 address 3FFE:B00:FFFF:1::1/64 ipv6 ospf 100 area 1 ipv6 router ospf 100 router-id Configuration Example Router1# interface S1/1 ipv6 address 2001:410:FFFF:1::1/64 ipv6 ospf 100 area 0 interface S2/0 ipv6 address 3FFE:B00:FFFF:1::2/64 ipv6 ospf 100 area 1 ipv6 router ospf 100 router-id 10.

Ethernet0/0 .The cost of the summarized routes will be the highest cost of the routes being summarized. Ethernet0/0 OI 2001:0DB8:0:0:8::/64 [110/100] via FE80::A8BB:CCFF:FE00:6F00. if the following routes are summarized: OI 2001:0DB8:0:0:7::/64 [110/20] via FE80::A8BB:CCFF:FE00:6F00. Ethernet0/0 46 They become one summarized route: OI 2001:0DB8::/48 [110/100] via FE80::A8BB:CCFF:FE00:6F00. For example. Ethernet0/0 OI 2001:0DB8:0:0:9::/64 [110/20] via FE80::A8BB:CCFF:FE00:6F00.

Router ID 10. maximum is 0 msec Neighbor Count is 1.1. Cost: 1 Transmit Delay is 1 sec.1. line protocol is up Link Local Address 3FFE:B00:FFFF:1::1.3 Suppress hello for 0 neighbor(s) 47 . Wait 40.1. Instance ID 0. State POINT_TO_POINT.Verifying OSPFv3 Router2#show ipv6 ospf int s 3/0 S3/0 is up. Interface ID 7 Area 1. Retransmit 5 Hello due in 00:00:02 Index 1/1/1. Dead 40. flood queue length 0 Next 0x0(0)/0x0(0)/0x0(0) Last flood scan length is 3.1. Process ID 100. Timer intervals configured. maximum is 3 Last flood scan time is 0 msec. Hello 10. Adjacent neighbor count is 1 Adjacent with neighbor 10.4 Network Type POINT_TO_POINT.

7. 1 normal 0 stub 1 nssa Area BACKBONE(0) Number of interfaces in this area is 1 SPF algorithm executed 23 times Number of LSA 14.0.1 It is an area border and autonomous system boundary router Redistributing External Routes from. Checksum Sum 0x760AA Number of DCbitless LSA 0 Number of Indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0 Area 2 Number of interfaces in this area is 1 It is a NSSA area Perform type-7/type-5 LSA translation SPF algorithm executed 17 times Number of LSA 25. connected SPF schedule delay 5 secs. Hold time between two SPFs 10 secs Minimum LSA interval 5 secs.R7#show ipv6 ospf Routing Process “ospfv3 1” with ID 75. Checksum Sum 0x12B75 Number of areas in this router is 2. Minimum LSA arrival 1 secs LSA group pacing timer 240 secs Interface floor pacing timer 33 msecs Retransmission pacing timer 33 msecs Number of external LSA 3. Checksum Sum 0xE3BF0 Number of DCbitless LSA 0 Number of Indication LSA 0 Number of DoNotAge LSA 0 48 .

49 Router2#show ipv6 ospf neighbor detail Neighbor 10.1. number of retransmission 1 First 0x0(0)/0x0(0)/0x0(0) Next 0x0(0)/0x0(0)/0x0(0) Last retransmission scan length is 1. link-local address 3FFE:B00:FFFF:1::2 Neighbor priority is 1. maximum is 0 msec . maximum is 1 Last retransmission scan time is 0 msec. retransmission queue length 0.1. 6 state changes Options is 0x63AD1B0D Dead timer due in 00:00:33 Neighbor is up for 00:48:56 Index 1/1/1. State is FULL.3 In the area 0 via interface S2/0 Neighbor: interface-id 14.

50 R3#show ipv6 ospf database database-summary Area 0 database summary LSA Type Count Delete Router 3 0 Network 0 0 Link 3 0 Prefix 3 0 Inter-area Prefix 6 0 Inter-area Router 0 0 Type-7 External 0 0 Subtotal 15 0 Process 1 database summary LSA Type Count Router 7 Network 1 Link 7 Prefix 8 Inter-area Prefix 14 Inter-area Router 2 Type-7 External 0 Type-5 Ext 3 Total 42 Maxage 0 0 0 0 0 0 0 0 Delete 0 0 0 0 0 0 0 0 0 Maxage 0 0 0 0 0 0 0 0 0 .

50.0.1 26.50.4 75.#show ipv6 ospf database Router Link States (Area 1) ADV Router Age Seq# 26.0.2 139 238 ADV Router 162 0x80000007 .1 26.4 287 0x80000028 72.2 Seq# 0x80000031 0x80000003 Link ID 3 3 Ref-Istype 0x2001 0x2002 0x2001 Prefix 3FFE:FFFF:A::/64 3FFE:FFFF:78::/64 3FFE:FFFF:8::/64 Interface Fa0/0 Fa0/0 Ref-LSID 0 3 0 Intra-Area Prefix Link States (Area 1) Age Seq# Link ID 1691 0x8000002E 0 702 0x80000031 1003 1797 0x80000002 0 Type-5 AS External Link States ADV Router Age Seq# 72.0.4 38 0x80000027 75.50.1 1412 26.0.1 Dest RtrID Link (Type-8) Link States (Area 1) ADV Router Age 772 26.0.1 1812 0x80000048 1901 0x80000006 Net Link States (Area 1) ADV Router Age 26.4 5 Seq# 0x80000001 1207959556 0x80000003 1258292993 Link ID 72.0.1 57 Seq# 0x8000003B Link ID 3 Rtr count 4 Fragment ID Link count 0 1 0 1 Bits None B 51 Inter-Area Prefix Link States (Area 1) ADV Router Age 719 Seq# 0x80000003 0x80000001 Prefix 3FFE:FFFF:26::/64 3FFE:FFF:26::/64 Inter-Area Router Link States (Area 1) ADV Router Age 26.0.0.