OSPF multi-region principle and configuration

Source: Internet
Author: User

OSPF Multi-zone principle and configuration

N reasons for generating OSPF multi-region

1. reasons for generating OSPF multi-region

? Improve the scalability of your network

? Fast Convergence

2. capacity of the OSPF area

How many routers can be accommodated in each OSPF area after partitioning the multi-region? The number of routers supported by a single zone is approximately 30-200. However, the number of routers actually joined within a region is less than the maximum number of routers that a single region can accommodate. This is because there are more important factors that affect this number, such as the number of links within an area, the stability of the network topology, the memory and CPU performance of the routers, the efficient use of routing summaries, and the number of aggregated LSA injected into the region. Because of these factors, it is sometimes possible to include more than 25 routers in some areas, while others can accommodate more than 500 routers in other areas.

The following three types are defined for the traffic associated with the zone:

? Intra-domain traffic (intar-area traffic): refers to traffic that is composed of packets exchanged between routers in a single region.

? Inter-domain traffic (inter-area traffic): refers to traffic that is composed of packets exchanged between routers in different regions.

? external traffic (External traffic): refers to traffic that is made up of packets exchanged between routers in the OSPF area and routers outside the OSPF area or in another autonomous system.

The ability of OSPF to be partitioned into multiple regions is implemented in accordance with layered routing. When divided into small areas, operations such as recalculating the topology database are confined to that small area, and the interregional only needs to advertise some summary information. For example, when the router's up or down is inside Zone 1, routers in other areas do not need to run the SPF algorithm to recalculate routing information because those problems are isolated within zone 1.

Specifically, tiered routing has the following advantages:

? reduces the frequency of SPF operations. because detailed routing information is kept inside each zone, there is no need to flood the entire link state to all other regions. Therefore, only those routers affected by the topology change need to rerun the SPF algorithm.

? reduced the routing table. when using multiple regions, each region retains only detailed routing entries for its own region and does not advertise these entries to the outside of the zone, and the zone boundary routers can summarize one or more routing information and advertise between OSPF domains, which reduces the number of LSA while ensuring connectivity between regions.

? reduced traffic for link State update messages (LSU). LSU contains a variety of LSA types, including link state information and summary information. When divided into multiple regions, it is no longer the LSU that sends each network, but rather an update of a single path or several summary paths between regions, effectively reducing LSU traffic across multiple regions.

n type of router

Routers, like traffic, can be divided into several types that are related to the region:

? Internal Router (Internal Router): refers to a router where all interfaces belong to the same zone.

? Zone Border Router (area Border routers,abr): refers to routers that connect one or more areas to the backbone area, and these routers act as routing gateways for inter-domain traffic. Therefore, the ABR router has at least one interface belonging to the backbone area, and must maintain a different link state database for each area connected to it. For this reason, ABR routers typically require more memory and higher-performance routing processors than normal internal routers. The ABR router will summarize the topology information of the area to which it is connected to the backbone area, and then transmit the aggregated information to the other regions.

? Autonomous System Border router (autonomous system boundary ROUTER,ASBR): A gateway router that can be considered a traffic outside the OSPF domain to enter the OSPF domain, that is, The ASBR router is a router that is used to inject other router protocols into the OSPF domain via route-selective redistribution. A ASBR router can be any router within an autonomous system that is located in an OSPF domain, which can be an internal router or an ABR router.

types of n regions

The OSPF routing protocol divides the region into different types, including the backbone area, the standard area, the distal area, the complete peripheral area, and the non-pure peripheral area. OSPF provides different types of routing updates, depending on the type and number of interconnect areas.

The entire area running OSPF belongs to an autonomous system (as), except that the route for as is an external route. Backone is the backbone of the connecting areas, cross-regional traffic must be through the backbone, the backbone of stability, robustness is crucial. Routers on the backbone are mostly regional boundary router ABR.

1. Backbone areas Area 0

The ID of the zone must be 0, which is the core domain that connects all other zones, equivalent to the aggregation layer of the switching network.

2. Standard Area

The zone can receive various link state information and aggregated routing advertisements. Areas that are not specifically defined are standard areas.

n link State database

In a router running the OSPF routing protocol, all valid LSA advertisements are stored in its link-state database, and the correct LSA advertisement can describe the structure of an OSPF area network topology.

n the composition of the link state database

Each router creates a database of each interface, the corresponding neighboring node, and the interface rate, each of which is called an LSA (link-state advertisement), and there are six types of common LSA.

n link Status notification

There are six types of common LSA, namely LSA1, LSA2, LSA3, LSA4, LSA5, and LSA7.

? LSA1 : Router LSA

? LSA2 : Network LSA

? LSA3 : Network Rollup LSA

Router LSA (Router LSA): Each router that runs the OSPF routing protocol generates router LSA advertisements. This most basic LSA notice lists all of the routers ' links or interfaces and indicates their status and the cost of outbound along each link direction. These LSA notices will only flood within the region from which they originated. The command "show ip OSPF database router" Can view all router LSA advertisements listed in the database. You can also add a parameter after this command to specify a router ID to observe the details of a single router LSA advertisement. This information shows the complete LSA information recorded in the link-state database.

Network LSA: The specified router Dr in each multicast network (broadcast type and NBMA) will produce a network LSA notification. The DR Router can be viewed as a "pseudo" node or a virtual router that depicts a multiple access network and all routers connected to it. The network LSA notification lists all the routers that are connected to it, including the DR router itself. Like the router LSA, the network LSA is flooded only within the region that generated the network LSA. Use the command show ip OSPF database Network to view information advertised by a network LSA.

NET Rollup LSA (Network Summary LSA): originating from the ABR router. The ABR router sends a network rollup LSA to an area that advertises the destination address outside the zone. In fact, these network summary LSA is a way for the ABR router to tell the internal router within its own zone which destination address it can reach. An ABR router can also advertise the destination address within the zone to which it is connected through the network rollup LSA to the backbone area. A default route that is outside a region and is still inside an OSPF autonomous system can also be advertised through this LSA. Use the command show ip OSPF database summary to display the network rollup LSA information in the link-state databases.

N OSPF Multi-zone configuration verification and OSPF routing table

1. Common inspection commands for OSPF

Command description

show ip Route View routing table information (direct connect/learn)

show IP route OSPF View only routes learned by OSPF

Show IP Protocol view OSPF protocol configuration information

show ip OSPF See how OSPF is configured on the router and the information of the ABR

show ip OSPF database View all LSA data information in the LSDB

show ip OSPF interface View information on the OSPF configuration on the interface (process ID, routerid, cost, priority, number of neighbors)

show ip OSPF neighbor View the status of OSPF neighbors and adjacencies (full indicates neighbor status OK)

show ip OSPF neighbor detail View detailed information about OSPF neighbors (including DR/BDR)

Debug ip OSPF adj view the entire process of the router "adjacency"

Debug IP OSPF packet View information for each OSPF packet (including OSPF version, Routerid, Areaid)

Clear IP Route emptying the routing table

2. OSPF routing table

Use the show ip route command to view the routing table for routers in a multi-region OSPF instance.

The current "o" in the routing bar represents a route within the OSPF region, while "o IA" represents a route between OSPF regions.

? An intra-region path (Intra-area path) is a path that can reach a destination within the same area as the router.

? An interregional path (inter-area path) is a destination path that is in another region but is still within the OSPF autonomous system. In the routing table, the entry with the IA flag is the Inter-zone path, which always passes at least one ABR router.

3. selection of router routing entries

When a router chooses a route entry and adds it to the routing table, it uses two parameters:Metrics (Measure) and distance Metric (administrative distance).

? Measures represent distances, which are measured to determine the optimal route when seeking a path.

? Administrative distance refers to the routing confidence of a routing protocol.


? The measure in the OSPF routing protocol is the interface cost, and the measure in the RIP routing protocol represents the distance (hop count).

? The cost of a route in OSPF is the sum of the cost of all outbound interfaces on the routing path to the destination network.

When a router receives a routing entry for the same destination address, it first compares the administrative distance and selects a route entry with a small administrative distance to add to the routing table. If the administrative distance is the same, the measure value is compared and a route entry with a small measure is selected to be added to the routing table.

When you receive a route entry that has the same destination address, measure, and administrative distance values, a load-balanced routing entry is formed in the routing table.

It is important to note that the OSPF routing protocol prescribes different priority levels for different types of routes, that is, intra-domain routing is higher than inter-domain routing. For example, if a router uses an OSPF SPF algorithm to get a network segment with the same metric and two paths that manage the same distance, if one path is within the domain and the other is outside the domain, the router chooses to add intra-field routes to the route entry.


? The administrative distance for static routes is 1 by default, and the measure is 0.

? The administrative distance of the RIP protocol is 120 by default, and the metric is the hop count.

? The administrative distance of the OSPF protocol is 110 by default, and the measure is the interface cost.

When learning floating routes, it is the same network segment using a different administrative distance (one routing management distance, the other is small), and then the router to select the best route (high-confidence route) added to the routing table. When a line fails, a route with a small management distance fails, and a route with a large administrative distance is the best route, which is selected by the router in the routing table.

It is important to note that the router forwards the data by selecting the route that can match the destination address exactly. For example, if there are routing entries,, and in the routing table, and the destination address is, then the last route entry will be selected. The most accurate match should always be the longest match-the route with the longest address mask. if the router does not find a matching entry, it sends an ICMP Destination Unreachable message to the source address of the packet and discards the packet. If the last number of equivalent routes is matched, then the load will be shared using multiple equivalent routes.

n Stub area and configuration

In addition to the backbone and standard areas, there are also peripheral areas (stubs), complete peripheral areas (totally stubby), and non-pure peripheral areas (NSSA).

n LSA4 and LSA5

? LSA4:ASBR Rollup LSA (ASBR Summary LSA)

? LSA5: Autonomous System external LSA (Autonomous System External LSA)

1. LSA4

ASBR Rollup LSA (ASBR Summary LSA): also originating from the ABR router. ASBR rollup LSA The other domain network rollup LSA is the same except that the advertised destination is a ASBR router and not a network. Use the command show ip OSPF database asbr-summary to view information about the ASBR rollup LSA.

Note: The destination is a host address, and the mask is 0. Usually the destination that the ASBR rollup LSA advertises is always a host address because it is a route to a router.

2. LSA5

Autonomous System external LSA (Autonomous System External LSA): also known as the external LSA (External LSA), originating from the ASBR router, The LSA used to advertise a destination that reaches the outside of the OSPF autonomous system or a default route to the outside of the OSPF autonomous system. The external LSA notification will be flooded throughout the autonomous system. Use the command show ip OSPF database external to view information about the as external LSA.

n Peripheral area and complete peripheral area

In the OSPF area, some areas have very few exits, only one default route is required for routes outside the region, and to reduce routing entries for routers in the zone, this area can be configured as a peripheral area. In the stub area, all the routing entries in the domain and a default route to the zone boundary router are required, so that unnecessary LSA flooding can be reduced in the stub area.

Because there is only one default route from within the stub area to other regions, there is a limit to the stub area, where autonomous system border routers (ASBR) cannot be found in the zone, and they cannot be forwarded for inter-zone traffic.

The stub area does not restrict a router that must have only one area border as an egress. Link states that are able to enter or exist stub areas have the type 1, 2, 3, and prohibit the 4, 5, and 7 types from entering the stub area.

When the zone is configured as a complete peripheral area (totally stubby), there is only one default route within the zone, except for intra-domain routing.

Areas that meet the following four criteria can be identified as stubs or totally stubby areas:

? Only one default route is exported as its region

? Zone cannot be used as a traversing area of a virtual link

? No autonomous system border router asbr in stub area

? Not the backbone area Area0

1. Peripheral areas (Stub area)

The peripheral area is an area where the external LSA of an autonomous system is not allowed to advertise flooding within the interior. If the LSA notification of type 5 is not learned in an area, then the LSA notification of type 4 is unnecessary because these LSA advertisements will also be blocked. The ABR router at the boundary of the peripheral area advertises a simple default route (the destination address is to this region using the network LSA. On an intra-zone router, all destination addresses that do not match intra-domain or inter-domain routes will eventually match this default route. Because the default route is routed by the LSA advertisement of type 3, it will not be advertised to the outside of the zone.

Because the router's link state data is reduced in one peripheral area, the performance of these routers is improved and memory is saved. Of course, this improvement will be more noticeable in an OSPF area with a large number of type 5 LSA advertisements.

? As with all regions, all routers inside a peripheral area must also have the same link-state database. To ensure that this condition is met, routers in all the peripheral areas will set a flag e-bit in their hello messages and set it to 0. In this way, these peripheral routers will not accept any Hello messages sent by other routers that are e-bit 1. As a result, the peripheral routers will not be able to establish adjacency with other routers in non-peripheral regions.

? A virtual connection cannot be configured in one of the peripheral areas, nor can it pass through a peripheral area.

? Routers in the peripheral area cannot be ASBR routers. This restriction is easy to understand intuitively, because the ASBR router generates LSA advertisements of type 5, and LSA advertisements for type 5 cannot exist in a peripheral area.

? A peripheral area can have multiple ABR routers, but because of the default route, the intra-zone router will not be able to determine which router is the best gateway to reach the ASBR router.

Note: routers configured as Nssa zones also cannot form adjacency with routers in other non-nssa zones.

2. Complete Distal zone (totally stubby area)

If you could save memory by blocking the LSA propagation of type 5 and type 4, would it not be possible to save more memory if you could block the LSA of type 3? For this problem, Cisco presents the concept of a complete peripheral area with the help of the concept of the distal region.

The complete peripheral region (totally stubby area) not only uses the default route to reach the destination address outside of the OSPF autonomous system, but also uses the default route to reach all destination addresses outside the zone. An ABR in a completely peripheral area will not only block the LSA outside of as, but also block all of the rollup LSA, except for the one that advertises the default route of type 3.

n Configure the distal and complete peripheral areas

1. Configure the stub area

Router (config-router) # area area-id stub

Where Area-id identifies the ID of the stub area, which can be a number or IP address form. This command needs to be configured on all routers in the stub area.

2. Configure totally stubby area

Router (config-router) # area area-id stub no-summary

Where Area-id identifies the ID of the stub area, which can be a number or IP address form. No-summary uses this parameter to generate the totally stubby area, which is used only for ABR, to prevent the ABR from sending summary links to the full peripheral area.

n OSPF Multi-domain Configuration instance

Experimental environment

Benet The company has three branches, the Head Office and branch office connection between the use of dedicated line, Benet company requires the configuration of routers to achieve network interoperability.

As shown in the Benet company's router connection, by configuring the router to achieve the company's internal network interoperability, the specific planning situation is as follows:

? R1 and R2 's connected address:,r1 and R3 's connected address:,r1 and R4 's connected address:

? Use the loopback interface address of the router as LOOPBACK0:,R3 for the loopback0:,r2 of router id,r1 loopback0: 32,R4 's loopback0:

? using the loopback interface to simulate the address network segment with host, R1 LOOPBACK1:,R2 LOOPBACK1:,R3 loopback1: 24,R4 's loopback1:

Specific steps:

1. Configure the router's interface address, loopback interface

2. Configure the OSPF protocol for Internal network interoperability

3. Verify that network access is healthy

4. If area 2 is set to the peripheral area, configure it separately on R1 and R4:

5. If the Zone 2 is set to the complete peripheral area, then the configuration should be done on R1 and R4 respectively:

OSPF multi-region principle and configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.