📜 ⬆️ ⬇️

Channel Status Protocols and Single-Zone OSPF (Part 3)

Photo from amazon.com Continuing to translate the chapter from the book by Chris Bryant "CCNP Route Study Guide". His site is thebryantadvantage.com . The book is available on amazon .

Of all the videos viewed, read books to prepare for CCNP ROUTE, the material from this seemed the easiest to learn. Allows you to sort everything out. In addition to theory, I also liked practical examples. At the end of each chapter there are links to youtube lessons.
Part 1 ,
Part 2 .

Why not use one big zone 0?


After hearing about the importance of zone 0 for the 10,000th time, you start thinking: “Why not put all the routers in one big zone 0? In this case, do not have to worry about the network plan, virtual channels and so on! In the end, RIP does not use zones at all. ”

All right, but for the same reason, RIP is not so common in global computer networks. Using OSPF zones allows you to create a hierarchy .
')
Sounds great, in the Cisco exams love the word "hierarchical" ... but what does it mean? . Here is the definition:

adjective: classified by various criteria into consecutive levels or layers .

Benefits of Multi-Zone OSPF


OSPF zones give you the opportunity to build a multi-layer network. Reduce the load on router resources such as memory and CPU. Due to this approach, routers may sometimes not need a large routing table.

Unnecessarily large routing tables can drain router resources — and if there is only one path for packets from the router to different destinations — why have a complete route table if the default route does the same?

Single-zone OSPF has other disadvantages. Logical division of the OSPF network into zones helps limit LSU and LSA traffic, since Sending notifications of network changes is limited to a zone. This allows you to limit the re-computation of the routing table using the Dijkstra algorithm.

In summary, OSPF zones have the following advantages:

- more efficient routing through “complete but brief” (complete yet concise) routing tables,
- smaller overall SPF calculation,
- less LSU \ LSA traffic and associated costs

Speaking about the recalculation of SPF routing tables, you can see how many times it was launched using the show ip ospf command. If you see that this number is constantly increasing, then there is an unstable segment in the OSPF zone. (There is a lot of text in the command output, but it's worth knowing).

R3#show ip ospf Routing Process "ospf 1" with ID 3.3.3.3 Supports only single TOS(TOS0) routes Supports opaque LSA 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 0. Checksum Sum 0x000000 Number of opaque AS LSA 0. Checksum Sum 0x000000 Number of DCbitless external and opaque AS LSA 0 Number of DoNotAge external and opaque AS LSA 0 Number of areas in this router is 3. 3 normal 0 stub 0 nssa External flood list length 0 Area BACKBONE(0) Number of interfaces in this area is 2 Area has no autentication SPF algorithm executed 10 times Area ranges are Number of LSA 12. Checksum Sum 0x06DBEB Number of opaque link LSA 0. Checksum Sum 0x000000 Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 3 Flood list length 0 Area 13 Number of interfaces in this area is 1 Area has no autentication SPF algorithm executed 4 times Area ranges are Number of LSA 14. Checksum Sum 0x0822C6 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 34 Number of interfaces in this area is 1 Area has no autentication SPF algorithm executed 6 times Area ranges are Number of LSA 15. Checksum Sum 0x06BDFB 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 

We will look at all this in detail in the next section.

OSPF Path Costing


When you look at the OSPF routing table, you see two numbers in square brackets. The first number is the administrative distance (AD) OSPF, which is 110. The second number is the metric used by OSPF, the cost of the path.
 R2#show ip route ospf 1.0.0.0/32 is subnetted, 1 subnets O IA 1.1.1.1[110/65] via 172.12.123.1, 2d03h, Serial0 33.0.0.0/32 is subnetted, 1 subnets O IA 33.33.33.33[110/65] via 172.12.123.3, 2d02h, Serial0 3.0.0.0/32 is subnetted, 1 subnets O IA 3.3.3.3[110/65] via 172.12.123.3, 2d03h, Serial0 15.0.0.0/24 is subnetted, 1 subnets 

OSPF assigns a cost to each interface on which it is enabled. The cost of the interface depends on the speed of the port. By default, OSPF uses the following formula:

100,000,000 / Bandwidth in bps (NOT kbps!)

In the documentation you can meet 10 ^ 8, but it seems to me that it is easier to remember it as 100 million. If you need to calculate the cost manually, remember the units of measurement - bits, not kilobits per second.

Here are some default values ​​for known interface speeds:

56 kbps = 1785
T1 line = 64
Ethernet = 10
16 MBPS Token Ring = 6
FDDI and 100 MBPS Ethernet = 1

In preparation for CCNA, you learned that the bandwidth interface level command allows you to assign a more accurate EIGRP value on the serial interface. The same command can be used for OSPF.

For example, if the speed on the router serial1 interface is 512 kbps, and not 1544 kbps, then the bandwidth command allows you to specify a more accurate value for the interface speed. OSPF will recalculate the cost of the interface almost immediately after entering this command.

The cost of the interface can be viewed using the show ip ospf interface command. Note that the cost of the serial interface is 64, which means the interface is connected to the T1 line. If he were connected to the line at a speed of 512 kbps, one could use the bandwidth command, and OSPF would immediately recalculate the cost of the interface.

 R1#show ip ospf interface serial0 Serial0 is up, line protocol is up Internet Address 172.12.123.1/24, Area 0 Process ID 1, Router ID 1.1.1.1, Network Type NON_BROADCAST, Cost 64 R1#conf t Enter configuration commands, one per line. End with CNTL/Z. R1(config)#interface serial0 R1(config-if)#bandwidth 512 R1#show ip ospf interface serial0 Serial0 is up, line protocol is up Internet Address 172.12.123.1/24, Area 0 Process ID 1, Router ID 1.1.1.1, Network Type NON_BROADCAST, Cost 195 

The new interface speed is one third of T1, so the new interface cost is approximately equal to the three default costs for this interface.

The preferred route is the lowest cost. Like RIP, OSPF uses load balancing on four interfaces with equal default path costs.

You can change the value that OSPF uses to calculate the cost of the path. If you really have a good reason to change the value of 100,000,000, you can use the ospf auto-cost reference-bandwidth command. The funny thing is that this command requires specifying speed in MBPS:

 R2#conf t Enter configuration commands, one per line. End with CNTL/Z. R2(config)#router ospf 1 R2(config-router)#auto-cost reference-bandwidth ? <1-4294967> The reference bandwidth in terms of Mbits per second 

A good reason for this change is the addition of FastEthernet and GigEthernet interfaces to your network.

Comparison of OSPF and RIP


OSPF is considered better than RIP, and this is why:
- The OSPF metric is more accurate to measure the actual distance to a remote network.
- In OSPF, the composite metric is used, cost , then in RIP, the entire metric is based on the number of hops.
--OSPF does not impose restrictions when the network is “available” or “inaccessible”, whereas in RIP the maximum number of hops is 15 to fight against “counting to infinity”.
--OSPF supports VLSM, whereas RIPv1 does not. Although RIPv2 has support for VLSM. The protocol with support for VLSM allows more efficient use of address space.
--OSPF uses network bandwidth more efficiently than RIP.
- Multi-address OSPF updates occur only when a neighborhood is established, a network changes, or a 30-minute period has elapsed over which network changes have occurred.
--OSPF converges faster than any version of RIP.

The main disadvantage of OSPF, especially in comparison with RIP, is that OSPF spends much more router resources (CPU and memory) than RIP.

Troubleshoot Neighboring Routers


As you know from the CCNA course, establishing a neighborhood in OSPF goes through the following steps: Down, Attempt, Init, 2-Way, Exstart, Exchange, Loading, Full . Here is a brief overview of what happens at each stage:

- Down - not a single Hello-packet was received from the neighbor.
- Attempt - unicast Hello-packet sent to a neighbor. This can be found only in NBMA networks, since the neighbor command is used there.
- Init - the first Hello packet is received from a neighbor.
- 2-Way — each router received a Hello packet containing its own RID, hence two-way messaging took place. When a router receives a Hello packet containing its own RID, this is the way for the remote router to say "I received the Hello packet you sent earlier."
- Exstart — DR / BDR is selected, the exchange of information from the channel status database begins. A router with a large OSPF RID value will begin the exchange and increase the value of the initial sequence number specified at this stage.
- Exchange - the database descriptor (DBD) packages have been exchanged. These packages contain a description of the channel status database.
- Loading — Routers send LSRs to their potential neighbors.
- Full - the databases are synchronized and the neighborhood is established.

Always use the show ip ospf neighbor and show ip ospf interface commands to make sure that the neighborhood is actually set (stage Full). Neighborhood can be viewed using any of these commands. Show ip ospf neighbor gives you basic information about the neighborhood, while the interface command gives you more detailed information.

 R1#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 19.1.1.1 1 2WAY/DROTHER 00:00:38 100.1.1.5 Ethernet0 172.12.123.3 1 FULL/- 00:00:35 13.13.13.3 Serial1 R1#show ip ospf interface ethernet 0 Ethernet0 is up, line protocol is up Internet Address 100.1.1.1/24, Area 0 Process ID 1, Router ID 10.1.1.1, Network Type BROADCAST, Cost: 10 Transmit Delay is 1 sec, State BDR, Priority 1 Designater Router (ID) 19.1.1.1, Interface address 100.1.1.5 Backup Designated router (ID) 10.1.1.1, Interface address 100.1.1.1 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:06 Index 2/2, flood queue length 0 Next 0x0(0)/0x0(0) Last flood scan length is 1, maximum is 1 Last flood scan time is 0 msec, maximum is 0 msec Neighbor Count is 1 , Adjacent neighbor count is 1 Adjacent with neighbor 19.1.1.1 (Designated Router) Supress Hello for 0 neighbor(s) 

Show ip ospf interface is a great command to view the details related to Hello and Dead timers. If you do not see the problem with the show command, you can run debug ip ospf adj to see how a neighborhood is being formed (or not). Here is part of the output of this command, you can see the steps of the process of establishing a neighborhood in OSPF, up to the stage Full:

 4d22h: OSPF: Rcv DBD from 10.1.1.1 on Serial1 seq 0x5DD opt 0x42 flag 0x7 len32 mtu 1500 state INIT 4d22h: OSPF: 2 Way Communication to 10.1.1.1 on Serial1, state 2WAY 4d22h: OSPF: Send DBD to 10.1.1.1 on Serial1 seq 0x14EC opt 42 flag 0x7 len 32 4d22h: OSPF: First DBD and we are not SLAVE 4d22h: OSFP: Rcv DBD from 10.1.1.1 on Serial1 seq 0x14EC opt 0x42 flag 0x2 len 92 mtu 1500 state EXSTART 4d22h: OSPF: NBR Negotiation Done. We are the MASTER 4d22h: OSPF: Send DBD to 10.1.1.1 on Serial1 seq 0x14ED opt 0x42 flag 0x3 len 92 4d22h: OSPF: Database request to 10.1.1.1 4d22h: OSPF: sent LS REQ packet to 13.13.13.1, length 12 4d22h: OSPF: Rcv DBD from 10.1.1.1 on Serial1 seq 0x14ED opt 0x42 flag 0x0 len 32 mtu 1500 state EXCHANGE 4d22h: OSPF: Send DBD to 10.1.1.1 on Serial1 seq 0x14EE opt 42 flag 0x1 len 32 4d22h: OSPF: Rcv DBD from 10.1.1.1 on Serial1 seq 0x14E opt 0x42 flag 0x0 len 32 mtu 1500 state EXCHANGE 4d22h: OSPF: Exchange Done with 10.1.1.1 on Serial1 R22h: OSPF: Synchronized with 10.1.1.1 on Serail1, state FULL 4d22h: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.1.1 on Serial1 from LOADING to FULL, Loading Done 4d22h: OSPF: Build Router LSA for area 0, router ID 172.12.123.3, seq 0x80000005 

Briefly, to form a neighborhood, the following parameters must be agreed:
--Hello- and Dead-timers.
--Area ID.
- stub-zone flag (on \ off).
- password (if used, must be in both neighbors).

The process number does not have to match - this is a local parameter. (Yes, I know, I have already spoken about this. And I repeat again! :))

Behavior of neighbors with multiple OSPF routers in the broadcast segment


When you have more than 2 routers in the broadcast segment, the neighborhood results can be interesting. I was often asked about this on Facebook and Twitter (@ ccie12933, by the way), so I decided to include the answer here.

image

Elections have already passed, R1 - DR, R2 - BDR, R3, R4 - DROTHERS. The OSPF neighbor table on R1 and 2 looks expected, but on R3 and 4, it is somewhat strange.

 Router1#show ip ospf nei Neighbor ID Pri State Dead Time Address Interface 4.4.4.4 1 FULL/DROTHER 00:00:33 30.1.1.4 Ethernet0 3.3.3.3 1 FULL/DROTHER 00:00:31 30.1.1.3 Ethernet0 2.2.2.2 1 FULL/BDR 00:00:30 30.1.1.2 Ethernet0 Router2#show ip ospf nei Neighbor ID Pri State Dead Time Address Interface 4.4.4.4 1 FULL/DROTHER 00:00:35 30.1.1.4 Ethernet0 3.3.3.3 1 FULL/DROTHER 00:00:33 30.1.1.3 Ethernet0 1.1.1.1 1 FULL/DR 00:00:39 30.1.1.1 Ethernet0 Router3#show ip ospf nei Neighbor ID Pri State Dead Time Address Interface 4.4.4.4 1 2WAY/DROTHER 00:00:35 30.1.1.4 Ethernet0 2.2.2.2 1 FULL/DROTHER 00:00:32 30.1.1.2 Ethernet0 1.1.1.1 1 FULL/DR 00:00:39 30.1.1.1 Ethernet0 Router4#show ip ospf nei Neighbor ID Pri State Dead Time Address Interface 2.2.2.2 1 FULL/BDR 00:00:29 30.1.1.2 Ethernet0 1.1.1.1 1 FULL/DR 00:00:37 30.1.1.1 Ethernet0 3.3.3.3 1 2WAY/DROTHER 00:00:30 30.1.1.3 Ethernet0 

There is an expression for OSPF neighbors "stuck in 2-way", and many believe that this happens here, but it is not. DROTHERs never finish forming a neighborhood. We can come back tomorrow and see “2-way” again .

This default behavior in OSPF limits the number of transmitted LSA packets in a broadcast segment with more than 2 routers.

The only routers that have a neighborhood in the segment with all the other routers are DR and BDR. Each DRother will form a complete neighborhood with DR and BDR, but not with another DRother.

For this reason, any router that has noticed changes in the network will transmit information about this only to DR and BDR routers, the remaining DRothers will learn about the changes from DR.

Now we know the basics of OSPF perfectly ...
... let's take up multizone OSPF
End of chapter
github .

Source: https://habr.com/ru/post/272771/


All Articles