19
Lecture No 31 Concept of Area in OSPF The Domain (Single Network) in which we have to configure OSPF we divide this Domain into parts instead of treats it as a whole. These parts are called Areas. The benefit of dividing the Network into different Areas is that its management becomes easy. Or In OSPF environment an Autonomous System (Network) is divided into several Areas due to these small areas their Management (OSPF Operation) becomes easy. Let following Network picture is of any company or autonomous system 1 when we configure OSPF and divided it into different Areas. In following network it is easy to configuration individual areas instead of whole Network. Area 0 Area 2 Area 3 Area 4 Area 1 Area Border Router A Router which connects two areas is called ABR. It has routes of both areas Internet Cloud Autonomous System Boundary Router (ASBR) A Router which connects the Autonomous System OSPF Network with the Internet Cloud Autonomous System 1

OSPF Lecture No 31 Notes

Embed Size (px)

Citation preview

Page 1: OSPF Lecture No 31 Notes

Lecture No 31

Concept of Area in OSPF

The Domain (Single Network) in which we have to configure OSPF we divide this Domain into parts instead of treats it as a whole. These parts are called Areas.The benefit of dividing the Network into different Areas is that its management becomes easy. OrIn OSPF environment an Autonomous System (Network) is divided into several Areas due to these small areas their Management (OSPF Operation) becomes easy.

Let following Network picture is of any company or autonomous system 1 when we configure OSPF and divided it into different Areas. In following network it is easy to configuration individual areas instead of whole Network.

Backbone Area

Area 0

Area 2

Area 3

Area 4

Area 1

Back Bone AreaArea 0 will always be the Back bone Area in OSPF to which all area are directly connected

(Just like Capital as Islamabad is Capital of Pakistan)

Area Border Router A Router which connects two areas is called ABR. It has routes of both areas

Election of DR and BDR Routers which are connected through Ethernet Links there will be election of DR and BDR. These are called Ethernet Networks

Internet Cloud

Autonomous System Boundary Router (ASBR)A Router which connects the Autonomous System OSPF Network with the Internet Cloud

Autonomous System 1

Page 2: OSPF Lecture No 31 Notes

In an autonomous system in which OSPF is configured one Area should be the Backbone Area which is directly connected to the other Areas or in other words all area should have to directly connect with the Backbone Area. As shown above.

Area Border Routers (ABR)

The router which connects two Areas with each other is called ABR (Area Border Router). The traffic of one area which have to go in other area will pass from this router; because it’s some Interfaces are in one area and some interfaces are in other area. Every router of each area contains routing information of its own area.ButABR (Area Border Router) contains the routing information of both areas in which its interfaces are present.

Note:As in previous lecture we state that all OSPF speaking routers in a network have same Link State Data Base or Routing Information Data Base.

ButNow we can State that all OSPF speaking routers in a Specific Area have Identical Link State Data Base or Routing Information Data Base. And Link State Data Base is the MAP of that Area.

Question:What is the Benefit of dividing an OSPF Domain in Areas?

Answer:Before dividing the OSPF Domain into Areas the size of Link State Data Base was very big and it was difficult to manage the whole Link State Data Base so, by dividing OSPF Domain in Areas the size of Link State Data Base become limited and each router has less load of routing tables.

Note:In CCNA course we have to study OSPF configuration only in Single Area not in

multiple areas, so if there are only few router in our network then we can put all routers in single area and it is not necessary that there should be any Back Bone Area, or Area 0.

Question:How many Maximum routers can be in an Area?

Answer:Because size of an Area can go up 200 to 250 routers so if we have few routers we can put them in a single area easily.

Note: All Non-Back Bone Areas should directly connect with the Back Bone Area.

Question:

Page 3: OSPF Lecture No 31 Notes

Is it necessary that an OSPF Area should be the Back Bone Area or Area 0 when you have created your OSPF Network in only One Area?

Answer:If we have to create our OSPF network into a single area then it could be any area or Non-Back Bone, but the moment when we have to add another Area then one area should be the Back Bone Area or Area 0. And every area should have to directly connect to the Back Bone Area.

Autonomous System Boundary Router (ASBR)

The routers which connect the Autonomous System with the internet cloud are called the ASBR (Autonomous System Boundary Router). It may be any router and may be from any Area of the Autonomous system.

Question:1 Is ASBR (Autonomous System Boundary Router) should be from the Back Bone Area

or Non-Back Bone Area?2 Is ABR (Area Border Router) can be the ASBR (Autonomous System Boundary Router)?3 Is there should be only one ASBR (Autonomous System Boundary Router) in an

Autonomous System?

Answer:1 ASBR (Autonomous System Boundary Router) can be from any Back Bone Area and

Non-Back Bone Area.2 An ABR (Area Border Router) can also be the ASBR (Autonomous System Boundary

Router).3 There can be Multiple ASBR (Autonomous System Boundary Routers) in an

Autonomous System.

Not: How Router assumes in OSPF area that they are ABR or ASBR

Question: How Router assumes that it is ABR (Area Border Router)

Answer:

Question: How Router assumes that it is ASBR (Autonomous System Boundary Router)

Answer: Mostly routing information between the routers in an Area is exchanged through OSPF (Open Shortest Path First) and in Two or more Autonomous Systems the routing information Exchange through different Routing Protocols but the mostly using routing protocol is BGP (Border Gateway Protocol) and the Router on which Both

Page 4: OSPF Lecture No 31 Notes

OSPF (Open Shortest Path First) and BGP (Border Gateway Protocol) are configured will assume itself an ASBR (Autonomous System Boundary Router).

------------------------------------------------------------------------------------

Metric Of OSPF (Open Shortest Path First)

Question: What is band width?

Answer: The difference between the Highest and Lowest Frequencies available for Network signals is called Bandwidth. Big size packets can not pass through the interface which has low bandwidth.In simple words we can say that it is just like the Width of the Road. No traffic can pass which is wide more than the width of road.

The cost is the Bandwidth dependent metric and it is calculated by Routers automatically by using the following formula:

108 Cost =

Bandwidth

Router divides the Interface Bandwidth by the Reference Bandwidth and gets the Cost of a link.

The default value of the Reference Bandwidth is 108 100000000

The Cost is inversely proportional to the Bandwidth. If a Link has High Band width its cost will be less and vise versa.

It is non monitory cost. It is just a number. Bandwidth is a number between 110,000,000 and is measured in kilobits.

Cost is a number between 165,535. Cost has no unit of measurement it is just a number.

Links having High Band width and Low Cost are more preferable.

Note:

Ethernet Interfaces have high Bandwidth there for Ethernet Links have Low Cost.AndSerial Interfaces have Low Bandwidth there for Serial Links have High Cost

Cost OSPF for Ethernet interfaces:

Page 5: OSPF Lecture No 31 Notes

1 Bandwidth of Ethernet (802.2) is 10 Mb2 Bandwidth of Fast Ethernet (802.3u) is 100Mb3 Bandwidth of Gigabit Ethernet (802.3z) is 1000Mb

1 Cost of Ethernet (802.2) = 108/BandwidthCost of Ethernet (802.2) = 108/10MbCost of Ethernet (802.2) = 108/10x106

Cost of Ethernet (802.2) = 100000000/10000000Cost of Ethernet (802.2) = 10

2 Cost of Fast Ethernet (802.3u) = 108/BandwidthCost of Fast Ethernet (802.3u) = 108/100MbCost of Fast Ethernet (802.3u) = 108/100x106

Cost of Fast Ethernet (802.3u) = 100000000/100000000Cost of Fast Ethernet (802.3u) = 1

3 Cost of Gigabit Ethernet (802.3z) = 108/BandwidthCost of Gigabit Ethernet (802.3z) = 108/1000MbCost of Gigabit Ethernet (802.3z) = 108/1000x106

Cost of Gigabit Ethernet (802.3z) = 100000000/1000000000Cost of Gigabit Ethernet (802.3z) = 1/10

Very Important Note:

Cost will never be in Fractions so in above Question 3 the cost of Gigabit Ethernet is no correct. Minimum Cost will be 1 so Cost cannot be decrease.

Then how we can get the correct Cost?

If the Bandwidth of Interface increases from the Default Reference Bandwidth then we should have to configure the Reference Value of Bandwidth manually.

Cost OSPF for Serial Interface:

1 Bandwidth of Serial Interface (T-1) is 1.544 Mb

1 Cost of Serial Interface (T-1) = 108/Bandwidth

Page 6: OSPF Lecture No 31 Notes

E0 (200.100.50.100) E0 (200.100.200.100)

IP (200.100.50.12)IP (200.100.50.11) IP (200.100.50.26)IP (200.100.200.25)

200.100.50.0200.100.200.0

Cost of Serial Interface (T-1) = 108/1.544MbCost of Serial Interface (T-1) = 108/1.544x1000Cost of Serial Interface (T-1) = 100000000/1544000Cost of Serial Interface (T-1) = 64.75~64

T-1 = 1.544Mb = 1544Kb is the default Bandwidth of Serial Interface if we change the bandwidth of the Serial Interface of Cisco Routers.Let we change it to 64Kb

2 Bandwidth of Serial Interface (Manually Changed) is 64Kb

router>router>enablerouter#router#configure terminalrouter(config)#router(config)#interface serial 0router(config-if)#router(config-if)#bandwidth 64000router(config-if)#

Cost of Serial Interface (64Kb) = 108/BandwidthCost of Serial Interface (64Kb) = 108/64kbCost of Serial Interface (64Kb) = 108/64x1000Cost of Serial Interface (64Kb) = 100000000/64000Cost of Serial Interface (64Kb) = 1562.5~15

Tip:For OSPF to calculate routes properly, all interfaces connected to the same link must agree on the cost of that link. Therefore, if you change the reference bandwidth on one router, you must change it to match on all routers in that area.

-----------------------------------------------------------------------------------

Page 7: OSPF Lecture No 31 Notes

S0 (1.1.1.1)

S0 (1.1.1.2)S1 (2.1.1.2)

S1 (2.1.1.1)S0 (3.1.1.1)

S1 (4.1.1.2)

S0 (3.1.1.2)

S1 (4.1.1.1)

E0 (200.100.100.100) E0 (200.100.150.100)

A

B

D

C

1.0.0.0

2.0.0.0

3.0.0.0

4.0.0.0

IP (200.100.100.65) IP (200.100.100.66)IP (200.100.150s.80)

IP (200.100.150.81)

200.100.100.0 200.100.150.0

This is the Network Topology in Corvit and we have to configure the OSPF routing protocol. If there are two areas then one of both should be the Backbone Area.But we put all the Routers in a single Area. It can be any area but we always start from the Area 0.

Let us configure OSPF on Router A for Networks 1.0.0.0 & 4.0.0.0 & 200.100.50.0

routerA>routerA>enablerouterA#routerA#configure terminalrouterA(config)#routerA(config)#router ospf 1routerA(config-router)#rouetrA(config-router)#network 1.0.0.0 0.255.255.255 area 0routerA(config-router)#network 4.0.0.0 0.255.255.255 area 0routerA(config-router)#network 200.100.50.0 0.0.0.255 area 0routerA(config-router)#endrouterA#OSPF is configured just like the IGRP three difference are nominated above let us see what they are:

1 Process ID

It is purely the internal number of the router and it is not concern with any neighboring router.(During configuration of IGRP we type Autonomous System Number and it concern with the neighboring routers because, those networks in which IGRP is configured and if Autonomous System Number of neighboring routers do not match they can never exchange the routing information).

Area 0

Process ID

Wild Card Mask

Appropriate Area

Page 8: OSPF Lecture No 31 Notes

In the case of OSPF Process ID does not interfere in the exchanging of the routing tables from one router to its neighbors. If the process ID of two routers is not same in OSPF then they can also exchange the routing information. The range of the Process ID is from 1 to 65535 we can type any Process ID between these numbers. Difference between Autonomous System Number and Process ID

Autonomous System Number Process ID

In IGRP configuration In OSPF configuration

Autonomous System Number Should be same of all the IGRP routers in the same Autonomous System

Process ID Can be configured same and can also be configured different on all the router in a network rout OSPF

In the case of IGRPO Same Autonomous System router will only exchange the routing information

In the case of OSPF Routers having same or different process ID can exchange the routing information

Only one IGRP can be configuredWe can run OSPF multiple times on the routers using different Process ID. Or in technical language we can say that we can configure the Multiple Intensitives of OSPF one a router

2 Wildcard Mask

In the case of RIP and IGRP we only type the Network ID after the Network command but during configuration of OSPF we should have to type the Wildcard Mask of the network

3 Area

We should have to type the area in which the router interface is present

Let us configure OSPF on Router B for Networks 1.0.0.0 & 2.0.0.0 & 200.100.100.0

routerB>routerB>enablerouterB#routerB#configure terminalrouterB(config)#routerB(config)#router ospf 1routerB(config-router)#rouetrB(config-router)#network 1.0.0.0 0.255.255.255 area 0

RouterA(config)#router igrp 1 RouterA(config)#router ospf 1 RouterB(config)#router igrp 1 RouterB(config)#router ospf 24

Page 9: OSPF Lecture No 31 Notes

routerB(config-router)#network 2.0.0.0 0.255.255.255 area 0routerB(config-router)#network 200.100.100.0 0.0.0.255 area 0routerB(config-router)#endrouterB#

Let us configure OSPF on Router C for Networks 2.0.0.0 & 3.0.0.0 & 200.100.150.0

routerC>routerC>enablerouterC#routerC#configure terminalrouterC(config)#routerC(config)#router ospf 1routerC(config-router)#rouetrC(config-router)#network 2.0.0.0 0.255.255.255 area 0routerC(config-router)#network 3.0.0.0 0.255.255.255 area 0routerC(config-router)#network 200.100.150.0 0.0.0.255 area 0routerC(config-router)#endrouterC#

Let us configure OSPF on Router D for Networks 3.0.0.0 & 4.0.0.0 & 200.100.200.0

routerD>routerD>enablerouterD#routerD#configure terminalrouterD(config)#routerD(config)#router ospf 1routerD(config-router)#rouetrD(config-router)#network 3.0.0.0 0.255.255.255 area 0routerD(config-router)#network 4.0.0.0 0.255.255.255 area 0routerD(config-router)#network 200.100.200.0 0.0.0.255 area 0routerD(config-router)#endrouterD#

Let us see Some Show Commands for OSPF routing protocol

On Router A

RouterA#show ip protocols Routing Protocol is "ospf 1" Sending updates every 90 seconds, next due in 10 seconds

Page 10: OSPF Lecture No 31 Notes

Invalid after 30 seconds, hold down 0, flushed after 60 Outgoing update filter list for all interfaces is Incoming update filter list for all interfaces is Redistributing: ospf 1 Routing for Networks: 1.0.0.0 0.0.0.255 area 0 4.0.0.0 0.0.0.255 area 0 200.0.0.0 0.255.255.255 area 0 Routing Information Sources: Gateway Distance Last Update 200.100.50.100 110 00:00:03 Distance: (default is 110)

RouterA#

On Router B

RouterB#show ip protocols Routing Protocol is "ospf 1" Sending updates every 90 seconds, next due in 10 seconds Invalid after 30 seconds, hold down 0, flushed after 60 Outgoing update filter list for all interfaces is Incoming update filter list for all interfaces is Redistributing: ospf 1 Routing for Networks: 1.0.0.0 0.0.0.255 area 0 2.0.0.0 0.0.0.255 area 0 200.0.0.0 0.255.255.255 area 0 Routing Information Sources: Gateway Distance Last Update 200.100.100.100 110 00:00:22 Distance: (default is 110)

RouterB#

On Router C

RouterC#show ip protocols Routing Protocol is "ospf 1" Sending updates every 90 seconds, next due in 10 seconds Invalid after 30 seconds, hold down 0, flushed after 60 Outgoing update filter list for all interfaces is Incoming update filter list for all interfaces is

Page 11: OSPF Lecture No 31 Notes

Redistributing: ospf 1 Routing for Networks: 2.0.0.0 0.0.0.255 area 0 3.0.0.0 0.0.0.255 area 0 200.0.0.0 0.255.255.255 area 9 Routing Information Sources: Gateway Distance Last Update 200.100.150.100 110 00:00:24 Distance: (default is 110)

RouterC#

On Router D

RouterD#show ip protocols Routing Protocol is "ospf 1" Sending updates every 90 seconds, next due in 10 seconds Invalid after 30 seconds, hold down 0, flushed after 60 Outgoing update filter list for all interfaces is Incoming update filter list for all interfaces is Redistributing: ospf 1 Routing for Networks: 3.0.0.0 0.0.0.255 area 0 4.0.0.0 0.0.0.255 area 0 200.0.0.0 0.255.255.255 area 0 Routing Information Sources: Gateway Distance Last Update 200.100.200.100 110 00:00:22 Distance: (default is 110)

RouterD#

RouterA#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 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

Page 12: OSPF Lecture No 31 Notes

Gateway of last resort is not set

C 1.0.0.0/8 [110/64]C 4.0.0.0/8 [110/64]C 200.100.50.0/24 [110/10]O 2.0.0.0/8 [110/128] via 1.1.1.2 00:52:55O 3.0.0.0/8 [110/192] via 1.1.1.2 00:44:22

3.0.0.0/8 [110/192] via 4.1.1.1 00:48:44O 200.100.100.0/8 [110/74] via 1.1.1.2 00:21:44O 200.100.150.0/8 [110/138] via 1.1.1.2 00:22:44

200.100.150.0/8 [110/138] via 4.1.1.1 00:54:45O 200.100.200.0/8 [110/74] via 4.1.1.1 00:44:47

RouterA#

How OSPF Calculate the Cost let us see

The Default Cost of Serial Interface is 64 because.Default Bandwidth of Serial Interface is 1544Kb and we know cost is equal to 108/1544=64And Default Cost of Ethernet Interface is 10 because.Default Bandwidth of Ethernet Interface is 10000Kb and we know cost is equal to 108/10000Kb 108/10000000=10

So, Total cost for each route at Router A in OSPF is calculated by adding the Outgoing Interfaces Costs.

It is Table for only at Router A Routing Table Metric Calculation

Administrative Distance

Metric Cost 108

Cost =Bandwidth

Next Hope router IP

Time for Updates

Page 13: OSPF Lecture No 31 Notes

Similarly we apply this command [Show ip routes] on Router B, Router C and Router D.

=======================================================

RouterA#show ip ospf Routing Process "ospf 1" with ID 200.100.50.100 Supports only single TOS(TOS0) routes 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 0. Checksum Sum 0x0 Number of DCbitless external LSA 0 Number of DoNotAge external LSA 0 Number of areas in this router is 1. 1 normal 0 stub 0 nssa Area BACKBONE(0) Number of interfaces in this area is 1 Area has no authentication SPF algorithm executed 4 times Area ranges are Number of LSA 1. Checksum Sum 0x2212D Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0

routerA#

Similarly we apply this command [Show ip ospf] on Router B, Router C and Router D.

======================================================

Cost for Routes

Cost OutgoingInterface Serial + Cost Outgoing

Interface EthernetTotalCost

Serial 0

Serial 1 + Ethernet 0

1.0.0.0 64 + 0 644.0.0.0. 64 + 0 64200.100.50.0 + 10 102.0.0.0 64 64 + 0 1283.0.0.0 64+64 64 + 0 192200.100.100.0 64 + 10 74200.100.150.0 64 64 + 10 138200.100.200.0 64 + 10 74

The highest IP address of any interface of the router is called Router ID

It means all the Interfaces of this router are in single area

Page 14: OSPF Lecture No 31 Notes

RouterA#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface200.100.200.100 1 Full 00:00:35 4.1.1.1 Serial 1200.100.100.100 1 Full 00:00:28 1.1.1.1 Serial 0

router#

It is the neighbor table which is developed due to exchange of hello packets.

Similarly we can apply this command [show ip ospf neighbors] on Router B, Router C and Router D.

=======================================================

if we use [show ip ospf interface] command then all the interfaces of the router will execute so we can see individually the interfaces one by one, Using the command of each Serial and Ethernet interface.

[Show ip ospf serial 0], [Show ip ospf serial 1]And [Show ip ospf Ethernet 0]

Let us see interface Ethernet 0 of router A

routerA#routerA#show ip ospf Ethernet 0

Ethernet 0 is up, line protocol is upInternet Address 200.100.50.100/24, Area 0

OSPF always shows the Router ID (highest ip address of any interface of the router) of its directly connected routers and these routers are called neighbor routers

It is the priority of the routers which are neighbors of router A and all routers in OSPF have by default value of priority=1. Also we know all the routers should have same priority

As we know that all the router in OSPF pass through seven different states and last state is called Full state and at this state all router have exchanged the DBDP.

As we know Dead Time in OSPF is by default is 40 seconds. All the routers send hello packets after every 10 seconds to its neighbors. And all routers should have same Hello time and dead intervals.

These are the IP address of those interfaces of the router A through which routers [200.100.200.100and 200.100.100.100] are neighbors of router A.

These are the interfaces of the router A through which routers B and D are neighbors of router A.

Page 15: OSPF Lecture No 31 Notes

Process ID 1, Router ID 200.100.50.100, Network Type Broadcast. Cost 10Transmit delay is 1 sec, State DRPriority 1, Designated Router ID 200.100.50.100No backup designated router on this NetworkTime interval configured, Hello 10, Dead 40, Retransmit 5Hello due in 00:00:09Index 2/2. Flood queue length is 0Next 0x0(0)/0x0(0)Last flood scan length is 1, maximum is 1Last flood scan time is 0 msec, maximum count is 1Neighbor count is 0, adjacent neighbor count is 0Suppress hello for 0 neighbors

routerA#

Let us see interface serial 0 of router A

routerA#routerA#show ip ospf serial 0

Serial 0 is up, line protocol is upInternet Address 1.1.1.1/8, Area 0Process ID 1, Router ID 200.100.50.100, Network Type POINT_TO_POINTCost 10Transmit delay is 1 sec, State POINT_TO_POINT,Time interval configured, Hello 10, Dead 40, Retransmit 5Hello due in 00:00:09Index 2/2. Flood queue length is 0Next 0x0(0)/0x0(0)Last flood scan length is 1, maximum is 1Last flood scan time is 0 msec, maximum count is 1Neighbor count is 1, adjacent neighbor count is 1Adjacent with neighbor 1.1.1.2/8Suppress hello for 0 neighbors

routerA#

Similarly we can apply this command [show ip ospf interface] on Router B, Router C and Router D.

=======================================================

RouterA#show ip ospf database

Page 16: OSPF Lecture No 31 Notes

OSPF Router with ID () (Process ID 1)

Router Link States (Area 0)

Link ID ADV Router Age Seq# Checksum Link count

RouterA#

Similarly we can apply this command [show ip ospf database] on Router B, Router C and Router D.

==========================================================