25
CCNP Class Note (OSPF) American University in Cairo Cisco Academy Elnaim Ahmed 4.2011

Ccnp Class Notes (Ospf)

Embed Size (px)

Citation preview

Page 1: Ccnp Class Notes (Ospf)

CCNPClass Note (OSPF)

American University in CairoCisco Academy

Elnaim Ahmed4.2011

Page 2: Ccnp Class Notes (Ospf)

CCNP (Cisco Certified Network Professional) Class Note

OSPF (Open Shortest Path First)Date: 07th June 2009

OSPF Terms and terminology1. Link: Network communication channel consist of a circuit or transmission path.2. Link State: The statistics of link between routers, in other words a interface of a router and its relationship to

its neighbor router.3. Topology of LSDB (Link state database): A list of information about all networks. All routers with same area

must have same LSDB.4. Area: A collection of network and router having same logical boundary. Area provides OSPF a 2 layer

hierarchical concept.a. Area 0: Known as backbone of area. It is the area which acts like a transit to all other area.b. Off Backbone area: Areas which must be connected with area 0. It is a logically or physical ranges

between area 1 to area Infinite (∞). Off backbone cannot communicate each other without traversing area 0.

5. OSPF cost: OSPF cost is the value assign to a link as routing metric. OSPF cost is calculate as 10 8 /bandwidth of link in bps (cumulative).

6. Router ID: Router ID is a identification tag used by OSPF and EIGRP. Normally, it is the highest loopback interface IP, if loopback is not configured then the highest physical interface IP will be the Router ID.

OSPF Network Types

Point to Point Broadcast Multi-Access Non Broadcast Multi-access(BMA) (NBMA)

Hello: 10 Second 10 Second 30 Second

Dead: 40 Second 40 second 120 Second

Showing OSPF Interfaces:Router#show ip ospf interface

Election Criteria DR/BDR 1. Highest router interface priority will be the DR. Priority can be assign from 0 to 255. Where 0 is not eligible

for DR/BDR election, 1 is default priority, 255 is the highest priority.2. In case of tie then highest router ID will be DR.

For setting Priority:Route(config-if)r#ip ospf priority

Created by: Naim Ahmed 2

SWITCHFR Cloud

It will display all the interfaces where the OSPF protocol is running

Page 3: Ccnp Class Notes (Ospf)

CCNP (Cisco Certified Network Professional) Class Note

OSPF Packet Type1. HELLO Packet - Discover neighbor and built adjacency between them. Maintain neighbor relationship.2. DBD (Database Description) – Check for database synchronization between routers.3. LSR (Link State Request) – Request specific link state records from another router.4. LSU (Link State Update) – Sends specific requested link state records from another router.5. LSACK (Link State Acknowledgement) – The other packet types.

OSPF packet header formatLink Header IP Header Protocol ID no

= 89 For OSPFOSPF Packet type

Link trailer

Version No

Types (1 – 5)

PacketLength

Router ID Area ID Checksum AuthenticationType

Authentication Data

The data field contains different information depending in the OSPF packet type.1. Hello packet contains a list of known neighbor.2. DBD packet contains a summary of the LSDB among the number of the field.3. LSR packet contains the type of LSU needed and the router ID of the Router that has the need of the LSU.4. LSU packet contains the full LSA entries.5. LSACK packet contains Null in this field.

OSPF neighbor adjacency parametersSame following parameters must match to became OSPF neighbor

1. Hello and dead interval timer.2. Area IDs.3. Authentication type and password (if configured).4. Area stub flag – which indicates the type area stub.

OSPF area characteristic1. Minimizing routing table.2. Localized impact of a topology change3. Detail LSA flooding stops at the area boundary.4. Required hierarchical network design.

OSPF route types1. Internal Router – Router that have all their interface in the same area and has same LSDB.2. Backbone Router – Router that are situated on the backbone and have at least one interface connected to

area 0.3. ABR (Area Border Router) – Router that have interfaces attached to multiple areas, maintain separate LSDB

for each area to which they comes. ABRs are the exits point of area.4. ASBR (Autonomous System Boundary Router) – Router that have at least one interface attached to an entire

router domain (A network running different routing protocol other then OSPF known as different AS). ASBR can impact as non OSPF network into the OSPF network.

Backbone Internal ABR Internal

InternalAREA 5

AREA 52 ABRBackbone

Internal ASBR

Created by: Naim Ahmed 3

External AS

Page 4: Ccnp Class Notes (Ospf)

CCNP (Cisco Certified Network Professional) Class Note

RA RB

No Hello sent orReceived

I am Router RB, My router ID is 10.0.0.1 224.0.0.5

Hello is sent to neighbor no Hello / Acknowledge received

Unicast to RA I am Router RB, My router ID is 10.0.0.2Hello is received from Neighborand adjacency is built.

I will start exchange process because my router ID is 10.0.0.1

I will start exchange process because my router ID is 10.0.0.2

Here is summary of my LSDB

Here is summary of my LSDB

Thanks for the information

I need the complete network entry for 20.0.0.0/8

Here is the entry for network 20.0.0.0/8

Thanks for the information

LAB 05: OSPF with Multi Area

LB:10.1.2.1/24

S0/0/0 DCE S0/1/0 DCE

10.1.12.0/24 .2 10.1.33.0/24

S0/2/0 .3 S0/0/02811_R1 1841_R3

LB1:10.1.1.1/24 .1 LB1: 10.1.3.1/24

Area 0 Area 23

Created by: Naim Ahmed 4

Constructing AdjacencySharing Routing Inform

ation (Exchange State)

Down State

Router RB Neighbor 10.0.0.01 on f1

INT State

Router RA Neighbor 10.0.0.02 on f2

EXSTART STATE

DBD

DBD

EXCHANGE STATE

DBD

LSACK LSACK

DBD

LOADING STATE

LSR

LSR

LSACK LSACK

FULL STATE

Page 5: Ccnp Class Notes (Ospf)

CCNP (Cisco Certified Network Professional) Class Note

Besic configuration of R1, R2 and R3R1(config)#router OSPF 1R1(config-router)#net 0.0.0.0 255.255.255.255 area 0 [all interface in this router are in OSPF area 0]

R2(config)#router OSPF 1 Area Border RouterR2(config-router)#net 10.1.2.0 0.0.0.255 area 0R2(config-router)#net 10.1.12.0 0.0.0.255 area 0R2(config-router)#net 10.1.23.0 0.0.0.255 area 23

R3(config)#router OSPF 1R3(config-router)#net 0.0.0.0 255.255.255.255 area 23 [all interface in this router are in OSPF area 23]

R1-2811#sh ip route D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks ASBR (No “O IA” Route)C 10.1.12.0/24 is directly connected, Serial1/0O 10.1.2.1/32 [110/65] via 10.1.12.2, 00:09:05, Serial1/0O IA 10.1.3.1/32 [110/129] via 10.1.12.2, 00:08:04, Serial1/0C 10.1.1.0/24 is directly connected, Loopback0O IA 10.1.23.0/24 [110/128] via 10.1.12.2, 00:09:05, Serial1/0

R3-1841#sh ip route

10.0.0.0/8 is variably subnetted, 5 subnets, 2 masksO IA 10.1.12.0/24 [110/128] via 10.1.23.2, 00:10:00, Serial1/0C 10.1.3.0/24 is directly connected, Loopback0O IA 10.1.2.1/32 [110/65] via 10.1.23.2, 00:10:00, Serial1/0O IA 10.1.1.1/32 [110/129] via 10.1.23.2, 00:10:00, Serial1/0C 10.1.23.0/24 is directly connected, Serial1/0

OSPF Authentication – Clear Text Authentication (Type 1)Router(config-if)#ip OSPF authentication /Rrouter(config-router)#area 0 authenticationRouter(config-if)#ip OSPF authentication-key <cisco>

OSPF Authentication – Message Test Authentication (Type 1)Router(config-if)#ip OSPF authentication-message-digestOR Rrouter(config-router)#area 0 authentication authentication-message-digestRouter(config-if)#ip OSPF authentication-key 1 md5 <cisco>

Link State Advertisement

LSA Type DescriptionType 1 Router LSAType 2 Network LSAType 3 and 4 Summary LSAType 5 AS External LSAType 6 Multicast OSPF LSAType 7 Defined as NSSA (Not So

Stubby Area) Type 8 External Attribute LSA for

BGPType 9, 10, and 11 Opaque LSA

Created by: Naim Ahmed 5

R2-2811#sh ip route

10.0.0.0/8 is variably subnetted, 5 subnets, 2 masksC 10.1.12.0/24 is directly connected, Serial1/0O 10.1.3.1/32 [110/65] via 10.1.23.3, 00:09:48, Serial1/1C 10.1.2.0/24 is directly connected, Loopback0O 10.1.1.1/32 [110/65] via 10.1.12.1, 00:10:49, Serial1/0C 10.1.23.0/24 is directly connected, Serial1/1

Page 6: Ccnp Class Notes (Ospf)

CCNP (Cisco Certified Network Professional) Class Note

Type 1 LSA: Describe the collective states of directly connected interface of the router. Only confined within the area where it’s generated. That means it’s don’t cross the area where it is originated.

Internal Type 1 LSA

Area 1 Internal

Type 2 LSA:The DR of the network enforces the network LSA (Type 2) and then Type 2 LSA is flooded within the internal routers. Type LSAs don’t cross the ABRs.

Type 2 Internal Type 2 DR

InternalType 2

Type 2

InternalInternal Area 1

Type 3 LSA:The ABR sent Type 3 summary LSA, is advertise into the backbone by the ABRs only.

Area 3 Area 0

Type 3

ABR ABR Area 1

Type 1 & 2 Type 1 & 2

Backbone

Type 4 LSA:The type 4 summary LSA is generated by an ABR only when an ASBR exists within an area and then LSA are subsequently flooded throughout the OSPF domain. In short type 4 LSA are generated by the ABRs of the area which contains ASBR.

Area 0

ABRType 4 ABR Type 1 & 2

Area 3 Type 1 & 2

Area 1

ASBR Backbone

Created by: Naim Ahmed 6

External AS

Page 7: Ccnp Class Notes (Ospf)

CCNP (Cisco Certified Network Professional) Class Note

Type 5 LSA:Type 5 external LSA describes routed to Network outside the OSPF domain. Type 5 LSA are originated by ASBR and flooded through the entire OSPF domain.

Type 5 Area 0 Area 1

ABR Type 5 ABR

Area 3 Type 1 & 2

Type 5 Type 5

Backbone

ASBR

Type 6 LSA:There are special LSA used in multicasting OSPF applications.

Type 7 LSA:Type 7 is a LSA type that is used only in NSSA. The area originated. The information continued with LSA 7 can be flooded through the OSPF domain if and only if the ABR convert the LSA 7 to LSA 5.

Type 1 & 2

Area 3 Type 7 Type 5 Type 5

ABR

Type 1 & 2

ABR Type 5 Area 1

Backbone

ASBR Area 0

Type 8 LSA:Type 8 LSA that used in internetworking of OSPF and BGPType 9, 10 & 11:The opaque LSA are designed for future upgrade to OSPF for application specific purpose. For an example in CISCO System Opaque LSA are uses for MPLS in OSPF.

Created by: Naim Ahmed 7

External AS

External AS

Page 8: Ccnp Class Notes (Ospf)

CCNP (Cisco Certified Network Professional) Class Note

Type of Areas

1. Backbone Area: Known as area 0. It is the area which acts like a transit to all other area.2. Off Backbone area: Areas which must be connected with area 0. Logically or physical ranges between area 1

to 4294967295. Off backbone cannot communicate each other without traversing area 0. Area types depend upon the characteristic of the internal router administrative privilege and

accommodation of redistributed route. Based on the information area can be of three types.a. Stub Area – Does not accept information about external routes to the OSPF domain, such as route

from non OSPF sources (other routing protocol). These mean that no type 5 LSA will be known inside this area and consequently type 4 LSA is unnecessary. ABRs at the age of the Stub area are used Type 3 LSA to advertise a single default route into the all internal routers within the stub area, So that if the router need to route to the network outside of the OSPF area will use default route.

b. Not So Stubby Area (NSSA) – An NSSA is another area to the OSPF area terminology which offers the benefit that are similar to the Stub or Totally Stubby area, but also all external route to be advertise into the OSPF domain. These forms of NSSA allow ASBR (Redistribution Point).

The ASBR originated type 7 LSA to advertise the external distribution. Type 7 LSAs are flooded throughout the NSSA but are blocked by the ABR. the ABR convert the type 7 LSA into a type 5 LSA which is propagated through the OSPF domain.

c. Totally Stubby Area – These type of area is even restricted than stubby area. The internal router can communicate, within their networks, within their area via OSPF routing. But, any communication beyond the area must be communicated via default route. Totally stubby cannot contain the ASBR. Except that the ASBR may also be ASBR.

OSPF Extenal Route Type/ Type of Routes in OSPF

Symbol Route Designator Description

O OSPF inter area Routes Network within the same areaAdvertise known from Router LSA and Network LSA

OIA OSPF Inter area router Network from different areaAdvertise known from summary LSA

OE 1 Type 1 External Route Network from outside OSPF domainAdvertise known from external LSA

OE 2 Type 2 External Route Network from outside OSPF domainAdvertise known from external LSA

External Type 1 Router (OE1) – Type OE1 extended route calculate the cost by adding the external to the internal cost of each link that the packet process. We will use this type route when there are multiple ASBR advertise an external route to the same OSPF domain.External Type 1 Router (OE2) – The external cost of OE2 packet is a value only and that same value propagating throughout the OSPF domain. This is the default external route type.

Created by: Naim Ahmed 8

Page 9: Ccnp Class Notes (Ospf)

R3-1841#sh ip ospf database

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

Router Link States (Area 23)

Link ID ADV Router Age Seq# Checksum Link count10.1.2.1 10.1.2.1 398 0x80000002 0x000467 210.1.200.1 10.1.200.1 403 0x80000003 0x00FCA0 4

Summary Net Link States (Area 23)

Link ID ADV Router Age Seq# Checksum10.1.1.1 10.1.2.1 404 0x80000001 0x00FBE410.1.2.1 10.1.2.1 404 0x80000001 0x006EB110.1.12.0 10.1.2.1 404 0x80000001 0x008255

CCNP (Cisco Certified Network Professional) Class Note

LAB 06: OSPF with Multi Area Configuration and Stub Configuration Lb0: 10.1.2.1/24

2811 – R210.1.23.0/24

10.1.12.0/24 S0/0/0 S0/1/0.2 .2

.1 DCE Lb0: 10.1.3.1/24S0/2/0 S0/0/0 Lb200: 10.1.200.1/24

2811 – R1 .3

Lb0: 10.1.1.1/24 1841 – R3

AREA 0 AREA 23

Include all interfaces into OSPF.Router(config)#router ospf 1Router(config-router)#network 0.0.0.0 255.255.255.255 <area ID> area 0

Based on the above scenario following will be the configuration for the OSPF.R1-2811(config-router)#net 0.0.0.0 255.255.255.255 area 0

R2-2811(config-router)#net 10.1.2.0 0.0.0.255 area 0R2-2811 (config-router)#net 10.1.12.0 0.0.0.255 area 0R2-2811 (config-router)#net 10.1.23.0 0.0.0.255 area 23

R3-1841(config-router)#net 10.1.0.0 0.0.255.255 area 23

R1-2811#sh ip routeO - OSPF, IA - OSPF inter area

10.0.0.0/8 is variably subnetted, 6 subnets, 2 masksC 10.1.12.0/24 is directly connected, Serial1/0O 10.1.2.1/32 [110/65] via 10.1.12.2, 00:00:12, Serial1/0O IA 10.1.3.1/32 [110/129] via 10.1.12.2, 00:00:03, Serial1/0C 10.1.1.0/24 is directly connected, Loopback0O IA 10.1.23.0/24 [110/128] via 10.1.12.2, 00:00:12, Serial1/0O IA 10.1.200.1/32 [110/129] via 10.1.12.2, 00:00:03, Serial1/0

Created by: Naim Ahmed 9

R1-2811#sh ip ospf database

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

Router Link States (Area 0)

Link ID ADV Router Age Seq# Checksum Link count10.1.1.1 10.1.1.1 331 0x80000004 0x0060CB 310.1.2.1 10.1.2.1 313 0x80000003 0x00FD2B 3

Summary Net Link States (Area 0)

Link ID ADV Router Age Seq# Checksum10.1.3.1 10.1.2.1 298 0x80000001 0x00E5F810.1.23.0 10.1.2.1 308 0x80000001 0x0009C310.1.200.1 10.1.2.1 298 0x80000001 0x0066B2

R2-2811#sh ip ospf database

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

Router Link States (Area 0)

Link ID ADV Router Age Seq# Checksum Link count10.1.1.1 10.1.1.1 298 0x80000004 0x0060CB 310.1.2.1 10.1.2.1 278 0x80000003 0x00FD2B 3

Summary Net Link States (Area 0)

Link ID ADV Router Age Seq# Checksum10.1.3.1 10.1.2.1 263 0x80000001 0x00E5F810.1.23.0 10.1.2.1 273 0x80000001 0x0009C310.1.200.1 10.1.2.1 263 0x80000001 0x0066B2

Router Link States (Area 23)

Link ID ADV Router Age Seq# Checksum Link count10.1.2.1 10.1.2.1 272 0x80000002 0x000467 210.1.200.1 10.1.200.1 278 0x80000003 0x00FCA0 4

Summary Net Link States (Area 23)

Link ID ADV Router Age Seq# Checksum10.1.1.1 10.1.2.1 278 0x80000001 0x00FBE410.1.2.1 10.1.2.1 285 0x80000001 0x006EB110.1.12.0 10.1.2.1 285 0x80000001 0x008255

R3-1841#sh ip route

10.0.0.0/8 is variably subnetted, 6 subnets, 2 masksO IA 10.1.12.0/24 [110/128] via 10.1.23.2, 00:00:06, Serial1/0C 10.1.3.0/24 is directly connected, Loopback0O IA 10.1.2.1/32 [110/65] via 10.1.23.2, 00:00:06, Serial1/0O IA 10.1.1.1/32 [110/129] via 10.1.23.2, 00:00:06, Serial1/0C 10.1.23.0/24 is directly connected, Serial1/0C 10.1.200.0/24 is directly connected, Loopback200

Page 10: Ccnp Class Notes (Ospf)

CCNP (Cisco Certified Network Professional) Class Note

OSPF Stub and Not-So-Stubby (NSSA)OSPF StubStub area configuration and totally stub area configurationIn this above scenario we will configure are 23 as stub area for that within the OSPF routing process we will provide “area <area ID> stub”.This must be configuring in the ABR and the internal Router. That means:R2-28111(config)#router ospf 1R2-2811(configure-router)#area 23 stub no-summary

R3-1841(config)#router ospf 1R3-1841(config-router)#area 23 stub no-summaryR2-2811#sh ip route

10.0.0.0/8 is variably subnetted, 5 subnets, 2 masksC 10.1.12.0/24 is directly connected, Serial1/0O 10.1.3.1/32 [110/65] via 10.1.23.3, 00:00:37, Serial1/1C 10.1.2.0/24 is directly connected, Loopback0O 10.1.1.1/32 [110/65] via 10.1.12.1, 00:01:15, Serial1/0C 10.1.23.0/24 is directly connected, Serial1/1

R3-1841#sh ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route

Gateway of last resort is 10.1.23.2 to network 0.0.0.0

10.0.0.0/24 is subnetted, 2 subnetsC 10.1.3.0 is directly connected, Loopback0C 10.1.23.0 is directly connected, Serial1/0O*IA 0.0.0.0/0 [110/65] via 10.1.23.2, 00:00:39, Serial1/0

Created by: Naim Ahmed 10

R2-2811#sh ip ospf Routing Process "ospf 1" with ID 10.1.2.1!! Output omitted !! Area BACKBONE(0) Number of interfaces in this area is 2 (1 loopback) Area has no authentication SPF algorithm last executed 00:07:44.720 ago SPF algorithm executed 4 times Area ranges are Number of LSA 5. Checksum Sum 0x02B463 Number of opaque link LSA 0. Checksum Sum 0x000000 Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0 Area 23 Number of interfaces in this area is 1 Area has no authentication SPF algorithm last executed 00:07:34.728 ago SPF algorithm executed 3 times Area ranges are Number of LSA 5. Checksum Sum 0x02EDF1 Number of opaque link LSA 0. Checksum Sum 0x000000 Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0

Page 11: Ccnp Class Notes (Ospf)

CCNP (Cisco Certified Network Professional) Class Note

OSPF Not-So-Stubby (NSSA)The OSPF not-so-stubby area (NSSA) feature is described by RFC 1587 and is first introduced in Cisco IOS Software release 11.2. It is a non-proprietary extension of the existing stub area feature that allows the injection of external routes in a limited fashion into the stub area.Redistribution into an NSSA area creates a special type of link-state advertisement (LSA) known as type 7, which can only exist in an NSSA area. An NSSA autonomous system boundary router (ASBR) generates this LSA and an NSSA area border router (ABR) translates it into a type 5 LSA, which gets propagated into the OSPF domain. The network diagram demonstrates this principle.

Lb0: 10.1.2.1/242811 – R2

10.1.23.0/2410.1.12.0/24 S0/0/0 S0/1/0

.2 .2.1 DCE Lb0: 10.1.3.1/24

S0/2/0 S0/0/0 Lb200: 10.1.200.1/24

2811 – R1 .3

Lb0: 10.1.1.1/24 1841 – R3

AREA 0 AREA 23

As NSSA is not compatible with stub area we will remove the stub configuration first and then area 23 as NSSA with common at “config-router” router mode.Assume as LB200 is a static external (non OSPF route).R3-1841(config)#int loopback 172R3-1841(config-if)#ip address 172.16.200.1 255.255.255.0

Router(config-router)#area 23 NSSA

R2-2811(config)#router ospf 1R2-2811(config-router)#area 23 nssa

R3-1841(config)#router ospf 1R3-1841(config-router)#area 23 nssa

For redistribute connected route in OSPFR3-1841(config-router)#redistribute connected subnet

R2-2811#sh ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

172.16.0.0/24 is subnetted, 1 subnetsO N2 172.16.200.0 [110/20] via 10.1.23.3, 00:00:09, Serial1/1 By default the value is N2 10.0.0.0/8 is variably subnetted, 5 subnets, 2 masksC 10.1.12.0/24 is directly connected, Serial1/0O 10.1.3.1/32 [110/65] via 10.1.23.3, 00:00:09, Serial1/1C 10.1.2.0/24 is directly connected, Loopback0O 10.1.1.1/32 [110/65] via 10.1.12.1, 00:19:20, Serial1/0C 10.1.23.0/24 is directly connected, Serial1/1

Created by: Naim Ahmed 11

Page 12: Ccnp Class Notes (Ospf)

CCNP (Cisco Certified Network Professional) Class Note

R1-2811#sh ip route 172.16.0.0/24 is subnetted, 1 subnetsO E2 172.16.200.0 [110/20] via 10.1.12.2, 00:00:05, Serial1/0 10.0.0.0/8 is variably subnetted, 5 subnets, 2 masksC 10.1.12.0/24 is directly connected, Serial1/0O 10.1.2.1/32 [110/65] via 10.1.12.2, 00:27:19, Serial1/0O IA 10.1.3.1/32 [110/129] via 10.1.12.2, 00:27:09, Serial1/0C 10.1.1.0/24 is directly connected, Loopback0O IA 10.1.23.0/24 [110/128] via 10.1.12.2, 00:27:19, Serial1/0

Subnet will use for classless boundaries. We can change external route type (i.e N1 or N2 for ABR & E1 or E2 for other OSPF router) with provided at

redistribution point. Router(config-router)#redistribute connected subnet metric-type 1 or 2R3-2811(config-router)#redistribute connected subnet metric-type 1 [default is 2]

R2-2811#sh ip route

172.16.0.0/24 is subnetted, 1 subnetsO N1 172.16.200.0 [110/85] via 10.1.23.3, 00:00:01, Serial1/1 10.0.0.0/8 is variably subnetted, 5 subnets, 2 masksC 10.1.12.0/24 is directly connected, Serial1/0O 10.1.3.1/32 [110/65] via 10.1.23.3, 00:10:47, Serial1/1C 10.1.2.0/24 is directly connected, Loopback0O 10.1.1.1/32 [110/65] via 10.1.12.1, 00:29:58, Serial1/0C 10.1.23.0/24 is directly connected, Serial1/1

We can also make NSSA to totally NSSA.Router(config-router)#area 23 NSSA no-summaryR2-2811(config-router)#area 23 NSSA no-summary

Configure this command on NSSA ABRs only. After you define the NSSA totally stub area, Area 23 has these characteristics in addition to the NSSA characteristics:

No type 3 or 4 summary LSAs are allowed in Area 23. This means no inter-area routes are allowed in Area 23. A default route is injected into the NSSA totally stub area as a type 3 summary LSA.

R3-1841#sh ip route

172.16.0.0/24 is subnetted, 1 subnetsC 172.16.200.0 is directly connected, Loopback172 10.0.0.0/24 is subnetted, 2 subnets No OSPF RouteC 10.1.3.0 is directly connected, Loopback0C 10.1.23.0 is directly connected, Serial1/0O*IA 0.0.0.0/0 [110/65] via 10.1.23.2, 00:03:44, Serial1/0

Created by: Naim Ahmed 12

R1-2811#sh ip route 172.16.0.0/24 is subnetted, 1 subnetsO E1 172.16.200.0 [110/149] via 10.1.12.2, 00:00:50, Serial1/0 10.0.0.0/8 is variably subnetted, 5 subnets, 2 masksC 10.1.12.0/24 is directly connected, Serial1/0O 10.1.2.1/32 [110/65] via 10.1.12.2, 00:30:46, Serial1/0O IA 10.1.3.1/32 [110/129] via 10.1.12.2, 00:30:37, Serial1/0C 10.1.1.0/24 is directly connected, Loopback0O IA 10.1.23.0/24 [110/128] via 10.1.12.2, 00:30:46, Serial1/0

Page 13: Ccnp Class Notes (Ospf)

CCNP (Cisco Certified Network Professional) Class Note

OSPF Virtual LinkVirtual link is a link that allows distinguish area 0 to be connected a disconnecting area to be to be connecting with area 0 via a transit area.[Note: virtual link should not be use as primary design; rather it should be use only for specific cases, such as temporary communication or backup for failure.]

The hello protocol works over the virtual link as it does over standard link in 10 second interval, however LSA updates works differently on virtual link and LSA usually refresh every 30 munities but, LSAs learn through virtual link have “Do Not Age (DNA)” option set. So, the LSA does age out. DNA is required to prevent excessive flooding over the virtual link.

Configuration issue of Virtual Link

Router(config-router)#area <transit area ID> virtual link <router ID> to which these router is connected.

Router ID 10.1.2.1/24 a logical Virtual Link Created to Area 0

ABR Area 23

Area 0 Area 24

R4

Router ID 10.1.4.1/24

Link to Area 0 Down

From the above scenario the virtual link command should be like:ABR(config)#router ospf 1ABR(config-router)#area 23 virtual link 10.1.4.1

R4(config)#router ospf 1R4(config-router)#area 23 virtual link 10.1.2.1

OSPF Route SummarizationIn OSPF intra area route summarization is not possible but inter area (within the same area) route summarization is possible and external route summarization is possible.Inter area route summarization is always occur on an ABR. We have to use “area range” command to instruct the ABR to summarized route for a specific area before injection them.External route summarization always occur in the ABR with the help of “summary-address” command which instruct the ASBR to summarization to summarized external route before inject them into OSPF domain as type 5 external LSADefault Route InclusionA default route while include in OSPF domain is injected as an LSA type 5, default route distribution is not on by default in OSPF we have to issue the “default-information originated” command under the OSPF routing process.

Created by: Naim Ahmed 13

Page 14: Ccnp Class Notes (Ospf)

CCNP (Cisco Certified Network Professional) Class Note

LAB 07: OSPF with Multi Area, Virtual Link, Route summarization

Lb0:10.1.2.1/24 ABRTo External Global Route R2-2811

10.1.23.0/24S0/0/0 S0/1/0 Area 23

Lb10:172.16.10.1/24 10.1.12.0/24 .2 S0/0/0.1 .3 R3-1841

S0/2/0 Area 0 Lb0: 10.1.3.1/24R1-2811

Lb0: 10.1.1.1/24 Lb100: 192.168.100.1/24Lb101: 192.168.101.1/24

ASBR Lb200:192.168.200.1/24 Lb102: 192.168.102.1/24Redistributed networks LB201: 192.168.201.1/24 Lb103: 192.168.103.1/24 Router ID

LB202: 192.168.202.1/24 Area 100LB203: 192.168.203.1/24

Additional configuration R3-1841(config)#router ospf 1R3-1841(config-router)#network 192.168.100.0 0.0.3.255 area 100R3-1841(config-router)#exitFor virtual linkR2(config)#router ospf 1R2(config-router)#area 23 virtual link 192.168.103.1………[ <Router ID>R3(config)#router ospf 1R3(config-router)#area 23 virtual link 10.1.2.1 ……….[<Router ID>R2-2811#sh ip route D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 10.0.0.0/8 is variably subnetted, 5 subnets, 2 masksC 10.1.12.0/24 is directly connected, Serial1/0O 10.1.3.1/32 [110/65] via 10.1.23.3, 00:00:05, Serial1/1C 10.1.2.0/24 is directly connected, Loopback0O 10.1.1.1/32 [110/65] via 10.1.12.1, 00:00:05, Serial1/0C 10.1.23.0/24 is directly connected, Serial1/1 192.168.102.0/32 is subnetted, 1 subnetsO IA 192.168.102.1 [110/65] via 10.1.23.3, 00:00:05, Serial1/1 192.168.103.0/32 is subnetted, 1 subnetsO IA 192.168.103.1 [110/65] via 10.1.23.3, 00:00:05, Serial1/1 192.168.100.0/32 is subnetted, 1 subnetsO IA 192.168.100.1 [110/65] via 10.1.23.3, 00:00:05, Serial1/1 192.168.101.0/32 is subnetted, 1 subnetsO IA 192.168.101.1 [110/65] via 10.1.23.3, 00:00:06, Serial1/1

Virtual Link Show commandRouter#show ip OSPF virtual-linkR2-2811#sh ip ospf virtual-linksVirtual Link OSPF_VL2 to router 10.1.3.1 is up Run as demand circuit DoNotAge LSA allowed. Transit area 23, via interface Serial1/1, Cost of using 64 Transmit Delay is 1 sec, State POINT_TO_POINT, Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:01 Adjacency State FULL (Hello suppressed) Index 2/3, retransmission queue length 0, number of retransmission 0 First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0) Last retransmission scan length is 0, maximum is 0 Last retransmission scan time is 0 msec, maximum is 0 msec

Created by: Naim Ahmed 14

Page 15: Ccnp Class Notes (Ospf)

CCNP (Cisco Certified Network Professional) Class Note

Router#show ip OSPF neighbor R2-2811#sh ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface10.1.3.1 0 FULL/ - - 10.1.23.3 OSPF_VL210.1.1.1 0 FULL/ - 00:00:34 10.1.12.1 Serial1/010.1.3.1 0 FULL/ - 00:00:36 10.1.23.3 Serial1/1

R3-1841#sh ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface10.1.2.1 0 FULL/ - - 10.1.23.2 OSPF_VL210.1.2.1 0 FULL/ - 00:00:31 10.1.23.2 Serial1/0

Router#show ip OSPF database router <router ID>

R2-2811#sh ip ospf database router 10.1.3.1

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

Router Link States (Area 0)

Routing Bit Set on this LSA LS age: 1 (DoNotAge) Options: (No TOS-capability, DC) LS Type: Router Links Link State ID: 10.1.3.1 Advertising Router: 10.1.3.1 LS Seq Number: 80000002 Checksum: 0x811D Length: 36 Area Border Router Number of Links: 1

Link connected to: a Virtual Link (Link ID) Neighboring Router ID: 10.1.2.1 (Link Data) Router Interface address: 10.1.23.3 Number of TOS metrics: 0 TOS 0 Metrics: 64

Router Link States (Area 23)

Routing Bit Set on this LSA LS age: 532 Options: (No TOS-capability, DC) LS Type: Router Links Link State ID: 10.1.3.1 Advertising Router: 10.1.3.1 LS Seq Number: 80000007 Checksum: 0xCF9 Length: 60 Area Border Router Virtual Link Endpoint Number of Links: 3

Link connected to: a Stub Network (Link ID) Network/subnet number: 10.1.3.1 (Link Data) Network Mask: 255.255.255.255 Number of TOS metrics: 0 TOS 0 Metrics: 1

Link connected to: another Router (point-to-point) (Link ID) Neighboring Router ID: 10.1.2.1 (Link Data) Router Interface address: 10.1.23.3 Number of TOS metrics: 0 TOS 0 Metrics: 64

Link connected to: a Stub Network (Link ID) Network/subnet number: 10.1.23.0 (Link Data) Network Mask: 255.255.255.0 Number of TOS metrics: 0 TOS 0 Metrics: 64

Created by: Naim Ahmed 15

R3-1841#sh ip ospf database router 10.1.2.1 OSPF Router with ID (10.1.3.1) (Process ID 1) Router Link States (Area 0) Routing Bit Set on this LSA LS age: 1 (DoNotAge) Options: (No TOS-capability, DC) LS Type: Router Links Link State ID: 10.1.2.1 Advertising Router: 10.1.2.1 LS Seq Number: 80000006 Checksum: 0xFAA6 Length: 72 Area Border Router Number of Links: 4 Link connected to: a Virtual Link (Link ID) Neighboring Router ID: 10.1.3.1 (Link Data) Router Interface address: 10.1.23.2 Number of TOS metrics: 0 TOS 0 Metrics: 64 Link connected to: another Router (point-to-point) (Link ID) Neighboring Router ID: 10.1.1.1 (Link Data) Router Interface address: 10.1.12.2 Number of TOS metrics: 0 TOS 0 Metrics: 64 Link connected to: a Stub Network (Link ID) Network/subnet number: 10.1.12.0 (Link Data) Network Mask: 255.255.255.0 Number of TOS metrics: 0 TOS 0 Metrics: 64 Link connected to: a Stub Network (Link ID) Network/subnet number: 10.1.2.1 (Link Data) Network Mask: 255.255.255.255 Number of TOS metrics: 0 TOS 0 Metrics: 1 Router Link States (Area 23) Routing Bit Set on this LSA LS age: 652 Options: (No TOS-capability, DC) LS Type: Router Links Link State ID: 10.1.2.1 Advertising Router: 10.1.2.1 LS Seq Number: 80000006 Checksum: 0x1415 Length: 48 Area Border Router Virtual Link Endpoint Number of Links: 2Link connected to: another Router (point-to-point) (Link ID) Neighboring Router ID: 10.1.3.1 (Link Data) Router Interface address: 10.1.23.2 Number of TOS metrics: 0 TOS 0 Metrics: 64Link connected to: a Stub Network (Link ID) Network/subnet number: 10.1.23.0 (Link Data) Network Mask: 255.255.255.0 Number of TOS metrics: 0 TOS 0 Metrics: 64

Page 16: Ccnp Class Notes (Ospf)

CCNP (Cisco Certified Network Professional) Class Note

OSPF Route SummarizationRoute Summarization other area in ABR (only OSPF route would be summarized)– Reference: Above scenarioRoutre(config)#router OSPF 1Router(config-router)#area <area ID> range <route address>

R3(config)#router OSPF 1R3(config-router)#area 100 range 192.168.100.0 255.255.252.0R2-2811#sh ip route D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

10.0.0.0/8 is variably subnetted, 5 subnets, 2 masksC 10.1.12.0/24 is directly connected, Serial1/0O 10.1.3.1/32 [110/65] via 10.1.23.3, 00:20:25, Serial1/1C 10.1.2.0/24 is directly connected, Loopback0O 10.1.1.1/32 [110/65] via 10.1.12.1, 00:20:25, Serial1/0C 10.1.23.0/24 is directly connected, Serial1/1O IA 192.168.100.0/22 [110/65] via 10.1.23.3, 00:00:18, Serial1/1

Injecting Defaults into OSPFAn autonomous system boundary router (ASBR) can be forced to generate a default route into the OSPF domain. However, an ASBR does not, by default, generate a default route into the OSPF routing domain.To have OSPF generate a default route use the following:

Router(config-router)#default-information originate

Default Route information originate in R1 routerR1(config)#ip route 0.0.0.0 0.0.0.0 172.16.10.2R1(config)#router OSPF 1R3(config-router)#default-information originateR2-2811#sh ip route!!Output omitted!!O 10.1.1.1/32 [110/65] via 10.1.12.1, 00:00:05, Serial1/0C 10.1.23.0/24 is directly connected, Serial1/1O*E2 0.0.0.0/0 [110/1] via 10.1.12.1, 00:00:05, Serial1/0O IA 192.168.100.0/22 [110/65] via 10.1.23.3, 00:00:05, Serial1/1

R3-1841#sh ip route!!Output omitted!! 192.168.103.0/24 is directly connected, Loopback103C 192.168.100.0/24 is directly connected, Loopback100C 192.168.101.0/24 is directly connected, Loopback101O*E2 0.0.0.0/0 [110/1] via 10.1.23.2, 00:01:08, Serial1/0 O 192.168.100.0/22 is a summary, 00:14:10, Null0

For redistribute external connected network in OSPF

Created by: Naim Ahmed 16

R2-2811#sh ip route 10.0.0.0/8 is variably subnetted, 5 subnets, 2 masksC 10.1.12.0/24 is directly connected, Serial1/0O 10.1.3.1/32 [110/65] via 10.1.23.3, 00:00:05, Serial1/1C 10.1.2.0/24 is directly connected, Loopback0O 10.1.1.1/32 [110/65] via 10.1.12.1, 00:00:05, Serial1/0C 10.1.23.0/24 is directly connected, Serial1/1 192.168.102.0/32 is subnetted, 1 subnetsO IA 192.168.102.1 [110/65] via 10.1.23.3, 00:00:05, Serial1/1 192.168.103.0/32 is subnetted, 1 subnetsO IA 192.168.103.1 [110/65] via 10.1.23.3, 00:00:05, Serial1/1 192.168.100.0/32 is subnetted, 1 subnetsO IA 192.168.100.1 [110/65] via 10.1.23.3, 00:00:05, Serial1/1 192.168.101.0/32 is subnetted, 1 subnetsO IA 192.168.101.1 [110/65] via 10.1.23.3, 00:00:06, Serial1/1

R1-2811#sh ip route!!Output omitted!!C 10.1.1.0/24 is directly connected, Loopback0O IA 10.1.23.0/24 [110/128] via 10.1.12.2, 00:06:34, Serial1/0C 192.168.203.0/24 is directly connected, Loopback203S* 0.0.0.0/0 [1/0] via 172.16.10.2O IA 192.168.100.0/22 [110/129] via 10.1.12.2, 00:06:35, Serial1/0

Page 17: Ccnp Class Notes (Ospf)

CCNP (Cisco Certified Network Professional) Class Note

R1(config)#router OSPF 1R1(config-router)#redistributed connected subnet

For summarization of redistributed external networksR1(config-router)#summary-address 192.168.200.0 255.255.252.0R2-2811#sh ip route

172.16.0.0/24 is subnetted, 1 subnetsO E2 172.16.10.0 [110/20] via 10.1.12.1, 00:00:21, Serial1/0 10.0.0.0/8 is variably subnetted, 5 subnets, 2 masksC 10.1.12.0/24 is directly connected, Serial1/0O 10.1.3.1/32 [110/65] via 10.1.23.3, 00:45:03, Serial1/1C 10.1.2.0/24 is directly connected, Loopback0O 10.1.1.1/32 [110/65] via 10.1.12.1, 00:12:05, Serial1/0C 10.1.23.0/24 is directly connected, Serial1/1O*E2 0.0.0.0/0 [110/1] via 10.1.12.1, 00:11:55, Serial1/0O E2 192.168.200.0/22 [110/20] via 10.1.12.1, 00:00:21, Serial1/0O IA 192.168.100.0/22 [110/65] via 10.1.23.3, 00:12:05, Serial1/1

OSPF in Frame RelayOSPF supports five (5) type s of command option while detecting network types and these options are

1. Broadcast2. Non Broadcast3. Point to Multipoint4. Point to Multipoint (Non Broadcast)5. Point to Point

Command Option Description

BroadcastIt is a CISCO creation, make the WAN interface appear to a LAN, single IP subnet, usages multicast hello packet, DR BDR election occur. The topology must be a partial mess or full.

Non BroadcastIt is RFC complain, neighbor must be manually configure, single ip subnet, DR BDR election occurs, DR BDR must need full connectivity with all other router. Preferred topology are fully mesh or partially mess

Point to MultipointIt is a RFC complain, single IP subnet, use OSPF multicast hello. But DR BDR not required. Typically used in star topology.

Point to Multipoint (Non Broadcast)

If multicast and broadcast are enable on virtual circuit, the RFC complain, point to multipoint cannot be use, because the router cannot dynamically discover its neighboring router using hello multicast packet. So CISCO complains point to multipoint non broadcast works. Neighbors must be manually configured but DR/BDR election is not required. So, we have to maintained the Hub router force fully as the DR.

Point to PointCISCO extension, different IP subnet on each sub-interface, no DR/BDR election required. Use when only two routers needs to form adjacency on single link.

Created by: Naim Ahmed 17

Page 18: Ccnp Class Notes (Ospf)

CCNP (Cisco Certified Network Professional) Class Note

LAB 08: OSPF in Frame Relay

10.1.123.0/24

DCE.1 S0/0/1 .2

S0/0/0DCE S0/1/0

.3

OSPF Configuration for the above scenario2811_Hub(config)#router OSPF 12811_Hub (config-router)#net 10.1.0.0 0.0.255.255 area 0Or2811_Hub(config)#router OSPF 12811_Hub (config-router)#neighbor 10.1.123.22811_Hub (config-router)#neighbor 10.1.123.3

1751_Spoke1(config)#router OSPF 11751_Spoke1 (config-router)#net 10.1.123.0 0.0.0.255 area 01751_Spoke1 (config-router)#ip route 10.1.2.0 0.0.0.255 area 01841_Spoke2 (config)#router OSPF 11841_Spoke2 (config-router)#net 10.1.123.0 0.0.0.255 area 01841_Spoke2 (config-router)#net 10.1.3.0 0.0.0.255 area 0

Router#show ip ospf int s0/0

HUB#sh ip ospf interface s1/0Serial1/0 is up, line protocol is up Internet Address 10.1.123.1/24, Area 0 Process ID 1, Router ID 10.1.1.1, Network Type NON_BROADCAST, Cost: 64 Transmit Delay is 1 sec, State DR, Priority 1 Designated Router (ID) 10.1.1.1, Interface address 10.1.123.1 No backup designated router on this network Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5 oob-resync timeout 120 Hello due in 00:00:04 Supports Link-local Signaling (LLS) Cisco NSF helper support enabled IETF NSF helper support enabled Index 1/1, flood queue length 0 Next 0x0(0)/0x0(0) Last flood scan length is 0, maximum is 0 Last flood scan time is 0 msec, maximum is 0 msec Neighbor Count is 0, Adjacent neighbor count is 0 Suppress hello for 0 neighbor(s)

HUB#sh ip route

10.0.0.0/24 is subnetted, 2 subnetsC 10.1.1.0 is directly connected, Loopback0C 10.1.123.0 is directly connected, Serial1/0

Spoke-1#sh ip route

10.0.0.0/24 is subnetted, 2 subnetsC 10.1.2.0 is directly connected, Loopback0C 10.1.123.0 is directly connected, Serial1/0

Created by: Naim Ahmed 18

1751_Spoke1S0/0DLCI – 201Lb0: 10.1.2.1/24

1841_Spoke2S0/0/0DLCI – 301Lb0: 10.1.3.1/24

2811_HubS0/2/0DLCI – 102DLCI – 103Lb0: 10.1.1.1/24

Spoke-2#sh ip route

10.0.0.0/24 is subnetted, 2 subnetsC 10.1.3.0 is directly connected, Loopback0C 10.1.123.0 is directly connected, Serial1/0

Page 19: Ccnp Class Notes (Ospf)

CCNP (Cisco Certified Network Professional) Class Note

After the above configuration there is no OSPF adjacency table will not be created, because OSPF default network type is non broadcast.

2811_Hub(config)#int s0/2/02811_Hub(config)#ip ospf network point-to-multipoint

1751_Spoke1(config)#int s0/01751_Spoke1 (config)#ip ospf priority 01751_Spoke1(config-if)#ip ospf network point-to-multipoint

1841_Spoke2(config)#int s0/0/01841_Spoke2 (config)#ip ospf priority 01841_Spoke2(config-if)#ip ospf network point-to-multipoint

HUB#sh ip ospf interface s1/0Serial1/0 is up, line protocol is up Internet Address 10.1.123.1/24, Area 0 Process ID 1, Router ID 10.1.1.1, Network Type POINT_TO_MULTIPOINT, Cost: 64 Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5 oob-resync timeout 120 Hello due in 00:00:25 Supports Link-local Signaling (LLS) Cisco NSF helper support enabled IETF NSF helper support enabled Index 1/1, flood queue length 0 Next 0x0(0)/0x0(0) Last flood scan length is 0, maximum is 0 Last flood scan time is 0 msec, maximum is 0 msec Neighbor Count is 2, Adjacent neighbor count is 0 Suppress hello for 0 neighbor(s)

Changing Hello and Dead interval timer Router(config-if)#ip ospf hello-interval <Value> <10 or 30>Router(config-if)#ip ospf dead-interval <Value> [4 times of Hello packet]

Do not forward Hello packet for a particular interface Router(config-if)#no ip ospf hello-interval

Changing OSPF cost parametersRouter(config-router)#auto-cost reference-bandwidth 1000 [Mbits]

Created by: Naim Ahmed 19