Hà Nội: NTT03, Line 1, Thống Nhất Complex, 82 Nguyễn Tuân, Thanh Xuân, Hà Nội. ● HCM: Số 31B, Đường 1, Phường An Phú, Quận 2 (Thủ Đức), TP HCM. ===> Đơn Vị Hàng Đầu Trong Lĩnh Vực Cung Cấp Thiết Bị Security - Network - Wifi - CCTV - Conference - Máy chủ Server - Lưu trữ Storge.
Danh mục sản phẩm

Configure OSPF Route Control

Configuration Condition

Before configuring OSPF route control, ensure that:

  • Interface IP addresses have been configured so that neighbor nodes are reachable at the network layer.
  • Enable OSPF.

Configure Route Summary on Inter-Area OSPF Routes

When an ABR in OSPF advertises inter-area routes to other areas, it advertises each route separately in the form of Type-3 LSA. You can use the inter-area route summary function to summarize some continuous network segments to form a summary route. Then the ABR advertises the summary route, reducing the size of OSPF databases.

Table 7-15 Configuring Route Summary on Inter-Area OSPF Routes

Step

Command

Description

Enter the global configuration mode.

configure terminal

-

Enter the OSPF configuration mode.

router ospf process-id [ vrf vrf-name ]

-

Configure route summary on inter-area OSPF routes.

area area-id range ip-address/mask-length [ advertise [ cost cost ] | cost cost | not-advertise ]

Mandatory.

By default, an ABR does not summarize inter-area routes.

note


  • The OSPF inter-area route summary function is valid only for ABRs.
  • By default, the minimum cost value among the cost values of the routes in the route summary is used as the cost value of the route summary.

Configure OSPF External Route Summary

When OSPF redistributes external routes, it advertises each route separately in the form of external LSA. You can use the external route summary function to summarize some continuous network segments to form a summary route. Then OSPF advertises the summary route, reducing the size of OSPF databases.

If you run the summary-address command on an ASBR, you can summarize all Type-5 LSAs and Type-7 LSAs within the address range.

Table 7-16 Configuring OSPF External Route Summary

Step

Command

Description

Enter the global configuration mode.

configure terminal

-

Enter the OSPF configuration mode.

router ospf process-id [ vrf vrf-name ]

-

Configure OSPF to summarize external routes.

summary-address ip-address mask [ not-advertise | tag tag-value ]

Mandatory.

By default, an ABR does not summarize external routes.

note


  • The OSPF external route summary function is valid only for ASBRs.

Configure Route Filtration on Inter-Area OSPF Routes

When an ABR receives inter-area routes, it performs filtration in the incoming direction based on an ACL or prefix list. When the ABR advertises inter-area routes, it performs filtration in the outgoing direction based on an ACL or prefix list.

Table 7-17 Configuring Route Filtration on Inter-Area OSPF Routes

Step

Command

Description

Enter the global configuration mode.

configure terminal

-

Enter the OSPF configuration mode.

router ospf process-id [ vrf vrf-name ]

-

Configure route filtration on intra-area OSPF routes.

area area-id filter-list { access { access-list-name | access-list-number } | prefix prefix-list-name } { in | out }

Mandatory.

By default, an ABR does not filter inter-area routes.

note


  • In filtration based on ACL, only a standard ACL is supported.
  • The OSPF inter-area route filtration function is valid only for ABRs.

Configure OSPF External Route Filtration

Configuring OSPF external route filtration is to apply an ACL or prefix list to allow or not allow external routes of an OSPF AS to flood into the OSPF AS.

Table 7-18 Configuring OSPF External Route Filtration

Step

Command

Description

Enter the global configuration mode.

configure terminal

-

Enter the OSPF configuration mode.

router ospf process-id [ vrf vrf-name ]

-

Configure a distribution list to filter external routes.

distribute-list { access-list-name | access-list-number | prefix prefix-list-name } out [ routing-protocol [ process-id ] ]

Mandatory.

By default, an ASBR does not filter external routes.

note


  • In filtration based on ACL, only a standard ACL is supported.
  • The OSPF external route filtration function is valid only for ASBRs.

Configure OSPF Route Installation Filtration

After OSPF calculates routes through LSA, to prevent certain routes from being added into the routing table, OSPF filters the calculated OSPF routing information.

Three filtration methods are available:

  • Filtration based on the prefix. An ACL or prefix list is used to filter the destination addresses of routes.
  • Filtration based on the next hop. A prefix list is used to filter the next hops of the routes. You can also use a prefix list to filter both the destination addresses and next hops of the routes.
  • Filtration of routes based on the routing policy.

Table 7-19 Configuring OSPF Route Installation Filtration

Step

Command

Description

Enter the global configuration mode.

configure terminal

-

Enter the OSPF configuration mode.

router ospf process-id [ vrf vrf-name ]

-

Configure OSPF to prohibit installed routes.

distribute-list { access-list-name | access-list-number | gateway prefix-list-name1 | prefix prefix-list-name2 [ gateway prefix-list-name3 ] | route-map route-map-name } in [ interface-name ]

Mandatory.

By default, the installed routes are not filtered.

note


  • Filtration based on prefix, gateway, and route-map is mutual exclusive with filtration based on ACL. For example, if you have configured filtration based on prefix, you cannot configure filtration based on ACL again.
  • Filtration based on route-map and prefix is mutual exclusive with filtration based on gateway.
  • Filtration based on prefix and filtration based on gateway overwrite each other.

Configure the Cost Value of an OSPF Interface

By default, the cost of an OSPF interface is calculated based on the following formula: Reference bandwidth/Interface bandwidth.

Table 7-20 Configuring the Cost Value of an OSPF Interface

Step

Command

Description

Enter the global configuration mode.

configure terminal

-

Enter the interface configuration mode.

interface interface-name

-

Configure the cost value of an OSPF interface.

ip ospf [ ip-address ] cost cost-value

Optional.

By default, the cost value is calculated through the formula Reference bandwidth/Interface bandwidth.

Configure the OSPF Reference Bandwidth

The reference bandwidth of an interface is used to calculate the cost value of the interface. The default value is 100Mbit/s. The formula for calculating the cost value of the OSPF interface is: Reference bandwidth/Interface bandwidth. If the calculation result is larger than 1, use the integer part. If the calculation result is smaller than 1, use the value 1. Therefore, in a network whose bandwidth is larger than 100Mbit/s, the optimal route fails to be selected. In this case, you can use the auto-cost reference-bandwidth command to configure a proper reference bandwidth to solve the problem.

Table 7-21 Configuring the OSPF Reference Bandwidth

Step

Command

Description

Enter the global configuration mode.

configure terminal

-

Enter the OSPF configuration mode.

router ospf process-id [ vrf vrf-name ]

-

Configuring the OSPF interface reference bandwidth.

auto-cost reference-bandwidth reference-bandwidth

Optional.

By default, the reference bandwidth is 100Mbit/s.

Configure the OSPF Administrative Distance

An administrative distance is used to indicate the reliability of the routing protocol. If the routes to the same destination network are learnt by different routing protocols, the route with the smallest administrative distance is selected with priority.

Table 7-22 Configure the OSPF Administrative Distance

Step

Command

Description

Enter the global configuration mode.

configure terminal

-

Enter the OSPF configuration mode.

router ospf process-id [ vrf vrf-name ]

-

Configure the OSPF administrative distance.

distance { distance [ ip-address wildcard-mask ] [ access-list-name | access-list-number ] | ospf { external distance | inter-area distance | intra-area distance } }

Optional.

By default, the administrative distance of intra-area and inter-area OSPF routes is 110, and the administrative distance of external routes is 150.

Configure the Maximum Number of OSPF Load Balancing Routes

If multiple equivalent paths are available to reach the same destination, load balancing is achieved. This improves the utility rate of links and reduces the load of the links.

Table 7-23 Configuring the Maximum Number of OSPF Load Balancing Routes

Step

Command

Description

Enter the global configuration mode.

configure terminal

-

Enter the OSPF configuration mode.

router ospf process-id [ vrf vrf-name ]

-

Configure the maximum number of OSPF load balancing routes.

maximum-path max-number

Optional.

By default, the maximum number of OSPF load balancing routes is 4.

Configure OSPF to Be Compatible with RFC1583

If there exist multiple paths to an ASBR or external route forwarding address, RFC1583 and RFC2328 define different routing rules. If OSPF is configured to be compatible with RFC1583, the intra-area or inter-area paths in the backbone area is selected with priority. If OSPF is configured not to be compatible with RFC1583, the intra-area paths in non-backbone networks are selected with priority.

Table 7-24 Configuring OSPF to be Compatible with RFC1583

Step

Command

Description

Enter the global configuration mode.

configure terminal

-

Enter the OSPF configuration mode.

router ospf process-id [ vrf vrf-name ]

-

Configure OSPF to be compatible with RFC1583.

compatible rfc1583

Mandatory.

By default, OSPF is not compatible with RFC1583.

note


  • In an OSPF AS, the routing rules of all the devices must be the same, that is, they must be all configured to be compatible with or not compatible with RFC1583 to prevent routing loops.