No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

S1720, S2700, S3700, S5700, S6700, S7700, and S9700 Series Switches Common Operation Guide

This document describes the CLI-based configurations of universal protocols and common features for Huawei switches on basic networks.
Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Common OSPF Operations

Common OSPF Operations

This chapter uses the Open Shortest Path First (OSPF) network shown in Figure 22-1 as an example to describe common OSPF operations.
Figure 22-1  Basic OSPF network

Configuring Basic OSPF Functions

The following uses the configuration of SwitchA as an example. The configurations of other switches are similar to the configuration of SwitchA.

<SwitchA> system-view
[SwitchA] ospf 1
[SwitchA-ospf-1] area 0
[SwitchA-ospf-1-area-0.0.0.0] network 192.168.0.0 0.0.0.255     //Enable OSPF on VLANIF10.
[SwitchA-ospf-1-area-0.0.0.0] quit
[SwitchA-ospf-1] area 1
[SwitchA-ospf-1-area-0.0.0.1] network 192.168.1.0 0.0.0.255     //Enable OSPF on VLANIF20.
[SwitchA-ospf-1-area-0.0.0.1] quit
[SwitchA-ospf-1] quit

Configuring a Stub Area

A stub area is a special area where an area border router (ABR) does not flood received autonomous system (AS) external routes, which significantly reduces the routing table size and transmitted routing information of routers. A border area on an OSPF network is often configured as a stub area. For example, configure Area1 as a stub area.

The following uses the configuration of SwitchA as an example. The configurations of other switches in Area1 are similar to the configuration of SwitchA.

[SwitchA] ospf 1
[SwitchA-ospf-1] area 1
[SwitchA-ospf-1-area-0.0.0.1] stub
[SwitchA-ospf-1-area-0.0.0.1] quit
[SwitchA-ospf-1] quit

Configuring an NSSA

In a not-so-stubby area (NSSA), an ABR does not flood AS external routes received from other areas, similar to the situation in a stub area. The difference is that an ABR can import and flood AS external routes to the entire OSPF domain. A border area connected to another AS on an OSPF network is often configured as an NSSA. For example, configure Area2 as an NSSA.

The following uses the configuration of SwitchB as an example. The configurations of other switches in Area2 are similar to the configuration of SwitchB.

[SwitchB] ospf 1
[SwitchB-ospf-1] area 2
[SwitchB-ospf-1-area-0.0.0.2] nssa
[SwitchB-ospf-1-area-0.0.0.2] quit
[SwitchB-ospf-1] quit

Configuring OSPF to Import Routes

To access a device running a non-OSPF protocol, an OSPF-capable device needs to import routes of the non-OSPF protocol into the OSPF network. For example, configure OSPF to import direct routes of SwitchF into the OSPF network.

[SwitchF] ospf 1
[SwitchF-ospf-1] import-route direct
[SwitchF-ospf-1] quit

Setting the OSPF Interface Cost

OSPF automatically calculates the cost of an interface according to the interface bandwidth by default. You can also manually set the OSPF interface cost. For example, set the cost of VLANIF 20 on SwitchA to 5.

[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] ospf cost 5
[SwitchA-Vlanif20] quit

Configuring Association Between OSPF and BFD

To accelerate OSPF convergence when the status of a link changes, you can configure bidirectional forwarding detection (BFD) on OSPF links. After detecting a link failure, BFD notifies OSPF of the failure, which triggers fast OSPF convergence. When the OSPF neighbor relationship is Down, the BFD session is deleted dynamically.

For example, set up a BFD session on the OSPF link between SwitchA and SwitchB.

# Configure SwitchA.

[SwitchA] bfd
[SwitchA-bfd] quit
[SwitchA] ospf 1
[SwitchA-ospf-1] bfd all-interfaces enable
[SwitchA-ospf-1] quit

# Configure SwitchB.

[SwitchB] bfd
[SwitchB-bfd] quit
[SwitchB] ospf 1
[SwitchB-ospf-1] bfd all-interfaces enable
[SwitchB-ospf-1] quit

Configuring OSPF to Advertise Default Routes

Multiple switches for next-hop backup or traffic load balancing often reside on the area border and AS border of an OSPF network. A default route can be configured to reduce routing entries and improve resource usage on the OSPF network.

The advertising mode of the default route is determined by the type of the area to which the default route is imported, as shown in Table 22-1.

Table 22-1  Default route advertising mode

Area Type

Generated By

Advertised By

LSA Type

Flooding Area

Common area

The default-route-advertise command

ASBR

Type5 LSA

Common area

Stub area

Automatically

ABR

Type3 LSA

Stub area

NSSA

The nssa [ default-route-advertise ] command

ASBR

Type7 LSA

NSSA

Totally NSSA

Automatically

ABR

Type3 LSA

NSSA

Translation
Download
Updated: 2018-09-03

Document ID: EDOC1000057410

Views: 91188

Downloads: 12230

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next