You are on page 1of 61

CloudEngine 12800 and 12800E Series Switches

Configuration Guide - IP Unicast Routing 2 Static Route Configuration

2 Static Route Configuration

About This Chapter

This chapter provides an overview of the functions, purposes and use cases of static routes,
and explains how they can be configured.
2.1 Overview of Static Routes
2.2 Understanding Static Routes
2.3 Application Scenarios for Static Routes
2.4 Summary of Static Route Configuration Tasks
2.5 Licensing Requirements and Limitations for Static Routes
2.6 Default Settings for Static Routes
2.7 Configuring IPv4 Static Routes
2.8 Configuring IPv6 Static Routes
2.9 Configuration Examples for Static Routes

2.1 Overview of Static Routes


Static routes are applicable to simple networks. Proper static routes can improve network
performance and ensure bandwidth for important applications.

Definition
A static route is a route that, in most cases, manually configured by the network administrator
to allow network traffic to reach a target destination.

Purpose
Static routes are used in different ways on different types of networks.
l On simple networks, static routes can be used alone without the need for dynamic routes
to ensure network connectivity.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 40


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

l On complex networks, static routes can be used alongside dynamic routes to improve
network performance and ensure that bandwidth is available for important applications.
l Static routes associated with VPN instances are used to manage VPN routes.

2.2 Understanding Static Routes

2.2.1 Basic Concepts of Static Routes


A router forwards data packets based on routing entries in a routing table. These routing
entries can be manually configured or calculated using dynamic routing protocols. A static
route typically refers to a manually configured route.
Static routes use less bandwidth than dynamic routes and do not occupy CPU resources for
route calculation and update analysis. When a network fault occurs or the topology changes,
static routes cannot be automatically updated and must be manually reconfigured to adapt to
the network change. A static route has five parameters: destination IP address, mask,
outbound interface, next hop, and preference.

Destination Address and Mask


The destination IPv4 address of a static route is expressed in dotted decimal notation. The
mask of the route can be expressed either in dotted decimal notation or by the mask length.
The mask length is the number of consecutive 1s in the mask. For details about the destination
IPv6 address and mask of a static route, see "Basic IPv6 Configurations - Principles - IPv6
Addresses" in the Configuration Guide - IP Service. Setting the destination address and mask
to all 0s configures a default static route. For details about the default static route, see 2.3.2
Static Default Routes.

Outbound Interface and Next-Hop IP Address


When configuring a static route, you need to specify either the outbound interface or the next-
hop IP address depending on the outbound interface type.
l For a point-to-point (P2P) interface, you only need to specify an outbound interface. This
automatically sets the IP address of the remote interface connected to the outbound
interface as the next-hop address.
l For a non-broadcast multiple access (NBMA) interface such as an Asynchronous
Transfer Mode (ATM) interface, specify a next-hop IP address. This type of interfaces
support point-to-multipoint (P2MP) networks and require mappings between IP
addresses and link-layer addresses to be configured during the configuration of static
routes. In this case, no outbound interface needs to be specified.
l For a broadcast interface (such as an Ethernet interface) and a virtual template (VT)
interface, specify a next-hop IP address. Ethernet interfaces are broadcast interfaces, and
VT interfaces can be associated with several virtual access (VA) interfaces. If an
Ethernet interface or a VT interface is specified as the outbound interface, there will be
multiple next hops, and the system will not be able to decide which next hop to use.

Static Route Preference


Different static routes can be configured with different preference values. A smaller value
indicates a higher preference. Specifying the same preference value for static routes with the

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 41


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

same destination implements load balancing among these routes. Conversely, specifying
different preference values for static routes with the same destination implements route
backup among the routes. For details, see 2.3.1 Load Balancing and Route Backup.

2.2.2 BFD for Static Routes


Unlike dynamic routes, static routes do not have a dedicated fault detection mechanism. If a
link fault occurs on the network, the administrator needs to rectify it. Bidirectional
Forwarding Detection (BFD) for static routes can be used to bind a static route to a BFD
session so that the BFD session can detect the status of the link associated with the static
route. The detailed procedure is as follows:

l If the BFD session bound to a static route detects a link fault, BFD reports the fault to the
system. The system then sets the route to inactive, and this route is no longer available in
the IP routing table.
l If the BFD session bound to a static route detects that the faulty link has been re-
established, BFD reports a message to the system. The system then sets the route to
active, and this route becomes available in the IP routing table again.

For more details about BFD, see "BFD Configuration - Principles" in Configuration Guide -
Reliability.

2.2.3 NQA for Static Routes


As mentioned previously, static routes do not have a dedicated fault detection mechanism. If a
fault occurs on a non-directly connected link, the corresponding static route will not be
automatically deleted from the IP routing table. This cannot ensure in-time link switchover
and can interrupt services for a significant amount of time. The network administrator must
delete the corresponding static route to allow traffic to switch to an available link.

An effective method is required to detect faults in links related to static routes. BFD for static
routes is applicable only to the scenario where both communicating devices support BFD. If
either of the two communicating devices supports NQA, NQA for static routes can be used to
detect link faults.

NQA for static routes refers to the association between a static route and an NQA test
instance. The system can use the NQA test instance to check the link status and determines an
optimal route in time according to the NQA test result to prevent communication interruption
and ensure service quality. NQA for static routes functions as follows:
l If the NQA test instance detects a link fault, the system sets the static route to inactive.
The route becomes unavailable and is deleted from the IP routing table.
l If the NQA test instance finds that the link recovers, the system sets the static route to
active. The route becomes available and is added to the IP routing table.

For details about NQA, see "NQA Configuration - Principles" in the Configuration Guide -
Network Management and Monitoring.

NOTE

When a static route is associated with an NQA test instance, only ICMP test instances are used to test
whether there are reachable routes between the source and destination.
Each static route can be associated with only one NQA test instance.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 42


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Application Scenario
On the network shown in Figure 2-1, each access switch provides access services for 10
users, and a total of 100 users are connected to the network. Because dynamic routing
protocols are unavailable for communication between RouterB and users, static routes
destined for users are configured on RouterB. For network stability, RouterC, functioning as
the backup for RouterB, is configured with static routes to the same destination. RouterA,
RouterB, and RouterC run a dynamic routing protocol to learn routes from each other.
RouterB and RouterC import static routes using a dynamic routing protocol and have different
costs for these static routes. After the configuration is complete, RouterA can use the dynamic
routing protocol to learn routes destined for users from RouterB and RouterC. RouterA uses
the link related to the static route with a lower cost as the active link and the other link as the
standby link.
NQA for static routes is configured on RouterB. NQA tests are performed to check the active
link of RouterB → SwitchA → SwitchC (SwitchD). If the active link fails, the corresponding
static route is deleted from the routing table, and traffic diverts to the standby link of RouterC
→ SwitchB → SwitchC (SwitchD). If both links work properly, traffic travels along the active
link.

Figure 2-1 Networking diagram for applying NQA for static routes

IP Network

RouterA

RouterB RouterC
SwitchA SwitchB

......
SwitchC SwitchD

...... ......

Client 1 Client10 Client91 Client100

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 43


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

2.2.4 Permanent Advertisement of Static Routes


Permanent advertisement of static routes provides a low-cost and simple link detection
mechanism and improves compatibility between Huawei and non-Huawei devices. If service
traffic needs to be forwarded along a specified path, you can ping the destination addresses of
static routes to detect the link connectivity and monitor services.
Link connectivity determines the stability and availability of a network. Therefore, link
detection plays an important role in network maintenance. BFD, as a link detection
mechanism, is inapplicable to certain scenarios. For example, a simpler and more natural
method is required for link detection between ISPs.
After permanent advertisement of static routes is configured, the static routes that cannot be
advertised are still preferred and added to the routing table in the following cases:
l If an outbound interface configured with an IP address is specified for a static route, the
static route is always preferred and added to the routing table regardless of whether the
outbound interface is Up or Down.
l If no outbound interface is specified for a static route, the static route is always preferred
and added to the routing table regardless of whether the static route can be iterated to an
outbound interface.
In this way, you can enable IP packets to be always forwarded by controlling the preference
and prefix length of this static route. The permanent advertisement mechanism provides a way
for you to detect link connectivity.

A device enabled with this feature always stores static routes in its IP routing table, regardless
of whether the static routes are reachable. If a path is unreachable, the corresponding static
route may become a blackhole route.

Application Scenarios
In Figure 2-2, BR1, BR2, and BR3 belong to ISP1, ISP2, and ISP3 respectively. There are
two reachable links (Link A and Link B) between BR1 and BR2. ISP1, however, requires that
service traffic be forwarded to ISP2 over Link A without traveling through ISP3.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 44


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Figure 2-2 Networking diagram for applying permanent advertisement of static routes

ISP2

BR2
10.1.1.2/24
LinkA

BR1

ISP1 BR3
LinkB
ISP3

The External Border Gateway Protocol (EBGP) peer relationship is established between BR1
and BR2. For service monitoring, a static route destined for the BGP peer (BR2) at
10.1.1.2/24 is configured on BR1, and permanent advertisement of static routes is enabled.
The interface that connects BR1 to BR2 is specified as the outbound interface of the static
route. Then, the network monitoring system periodically pings 10.1.1.2 to determine the
status of Link A.
If Link A works properly, ping packets are forwarded over Link A. If Link A becomes faulty,
although service traffic can reach BR2 over Link B, the static route is still preferred because
permanent advertisement of static routes is enabled. Therefore, ping packets are still
forwarded over Link A, but packet forwarding fails. This scenario is also applicable to BGP
packets. That is, a link fault causes the BGP peer relationship to be interrupted. The network
monitoring system detects service faults as returned in the ping result and prompts
maintenance engineers to rectify the faults before services are affected.

2.3 Application Scenarios for Static Routes

2.3.1 Load Balancing and Route Backup


Load Balancing
If the same preference is specified for multiple routes to the same destination, load balancing
is implemented.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 45


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Figure 2-3 Load balancing

RouterB

Preference=60

Preference=60
RouterA RouterC

RouterD

In Figure 2-3, there are two static routes with the same preference from RouterA to RouterC.
The two routes are stored in the routing table and used to forward data.

Route Backup
If different preferences are specified for multiple routes to the same destination, route backup
is implemented.

Figure 2-4 Route backup

RouterB

Preference=60

Preference=100
RouterA RouterC

RouterD

In Figure 2-4, there are two static routes with different preferences from RouterA to RouterC.
Static route B with the next hop RouterB has a higher preference, and its link therefore
functions as the active link. Static route D with the next hop RouterD has a lower preference,
and its link therefore functions as the standby link.
l In normal situations, static route B is activated, and the active link forwards data. Static
route D is not shown in the routing table.
l If a fault occurs on the active link, static route B is deleted from the routing table. Static
route D, functioning as the backup route, is activated, and the standby link forwards data.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 46


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

l When the active link restores, static route B is activated again, and the active link
forwards data. Static route D is deleted from the routing table and functions as the
backup route. Static route D is also called a floating static route.

2.3.2 Static Default Routes


A default route has all 0s as its destination IP address. The default route can be automatically
generated by a routing protocol or manually configured. The manually configured default
route simplifies network configuration. If the destination address of a packet fails to match
any entry in the routing table, the router selects the default route to forward the packet.

Figure 2-5 Networking diagram of static routes

2 4
RouterB
1 5

RouterA RouterC

In Figure 2-5, if no static default route is configured, you need to configure static routes
destined for networks 3, 4, and 5 on RouterA, configure static routes destined for networks 1
and 5 on RouterB, and configure static routes destined for networks 1, 2, and 3 on RouterC. In
this way, RouterA, RouterB, and RouterC can communicate with each other.
The next hop of the packets sent by RouterA to networks 3, 4, and 5 is RouterB. Therefore, a
default route configured on RouterA can replace the three static routes destined for networks
3, 4, and 5 in the preceding example. Similarly, just one default route from RouterC to
RouterB can replace the three static routes destined for networks 1, 2, and 3 in the preceding
example.

2.4 Summary of Static Route Configuration Tasks


Table 2-1 describes the static route configuration tasks.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 47


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Table 2-1 Static route configuration tasks


Scenario Description Task

Configuring static routes Static routes are manually l 2.7 Configuring IPv4
configured by the Static Routes
administrator to ensure l 2.8 Configuring IPv6
normal operation of simple Static Routes
networks and bandwidth for
important network
applications.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 48


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Scenario Description Task

Configuring fault detection In actual networking, static l 2.7.6 (Optional)


protocols for static routes routes are associated with Configuring Dynamic
fault detection protocols to BFD for IPv4 Static
improve network Routes
performance. l 2.7.7 (Optional)
l BFD for static routes: Configuring Static BFD
Unlike dynamic routing for IPv4 Static Routes
protocols, static routes l 2.8.4 (Optional)
do not have the detection Configuring Static BFD
mechanism. If a fault for IPv6 Static Routes
occurs on the network,
the administrator needs l 2.9.4 Example for
to rectify it. BFD for Configuring Dynamic
static routes enables a BFD for IPv6 Static
BFD session to detect the Routes
link status of the static l 2.7.9 (Optional)
route and performs Associating IPv4 Static
millisecond-level fault Routes with NQA
detection.
l NQA for static routes: In
actual networking, link
status must be detected
in real time to ensure
network stability, and a
link switchover can be
performed according to
link status changes. In
most cases, ARP and
BFD are used to detect
link status. IGP
convergence can also be
used. However, the
preceding solutions are
not applicable to the
following scenarios:
– If only one link rather
than links of every
user on the network
needs to be detected,
ARP detection is not
applicable.
– If any device on the
network does not
support BFD, BFD
detection cannot be
implemented.
– If either end of a link
is a Layer 2 device,

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 49


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Scenario Description Task

dynamic routing
protocols cannot be
configured and
therefore IGP
convergence cannot
be implemented.
NQA for static routes
only requires one end of
the interconnected
devices to support NQA
and can be used even if
there are Layer 2
devices. In this case, the
preceding issues are
resolved. When a link is
faulty, an NQA test
instance can immediately
detect the link change
and delete the static route
associated with the NQA
test instance from the IP
routing table, affecting
traffic forwarding.

Configuring FRR for static On traditional IP networks, l 2.7.8 (Optional)


routes it takes the routing system Configuring FRR for
several seconds to complete IPv4 Static Routes
route convergence after a l 2.8.5 (Optional)
link fault is detected. For Configuring FRR for
services that require low IPv6 Static Routes
delay and low packet loss
rate, the second-level
convergence time is
unacceptable as it may lead
to a service interruption. For
example, VoIP services can
tolerate only millisecond-
level network interruption.
When a fault is detected at
the physical layer or link
layer, FRR for static routes
implements millisecond-
level convergence, reducing
the impact on services.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 50


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

2.5 Licensing Requirements and Limitations for Static


Routes
Involved Network Elements
Other network elements are not required.

Licensing Requirements
Static routing is a basic feature of the CE12800 and CE12800E series switches and is not
under license control.

Version Requirements

Table 2-2 Products and minimum version supporting static routes


Product Minimum Version Required

CE12804/CE12808/CE12812 V100R001C00

CE12816 V100R003C00

CE12804S/CE12808S V100R005C00

CE12804E/CE12808E/CE12816E V200R002C50

Feature Limitations
If a switch has FD, FDA, FD1, FG, FG1, and SD cards installed, IP packet forwarding
through the default route referenced in a VPN instance may fail because of insufficient
routing and forwarding entries.
During an upgrade from V200R001C00SPC100 to a later version, if a static route's next hop
is iterated to a remote VPN cross route and the next hop is a VXLAN tunnel, the static route
is inactive in the source version but will become active in the target version. This
modification will cause inconsistent traffic transmission paths before and after the upgrade.
To prevent this issue, check whether a static route's next hop is iterated to a remote VPN cross
route and the next hop is a VXLAN tunnel. If so, delete this static route.

2.6 Default Settings for Static Routes


Table 2-3 describes the default settings for static routes.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 51


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Table 2-3 Default settings for static routes


Parameter Default Setting

Static route preference 60

2.7 Configuring IPv4 Static Routes

Pre-configuration Tasks
Before configuring IPv4 static routes, complete the following task:
l Configure link layer parameters and IP addresses for interfaces to ensure network-layer
communication between neighbor nodes.

Configuration Procedure
You can perform the following configuration tasks (excluding the task of Verifying the IPv4
Static Route Configuration) in any sequence as required.

2.7.1 Creating IPv4 Static Routes


Context
When creating a static route, you can specify both the outbound interface and next hop.
Alternatively, you can specify only the outbound interface or next hop based on the outbound
interface type.
l Specify the outbound interface for a P2P interface.
l Specify the next hop for a non broadcast multiple access (NBMA) interface.
l Specify the next hop for a broadcast interface (for example, an Ethernet interface).
If you specify the same preference for static routes to the same destination, load balancing
among these routes is implemented. If you specify different preferences for static routes, route
backup among the routes is implemented.
If the destination IP address and mask are set to all 0s, an IPv4 static default route is
configured. By default, no IPv4 static default route is configured.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Configure IPv4 static routes.
l Run ip route-static ip-address { mask | mask-length } { nexthop-address | vpn-instance
vpn-instance-name nexthop-address } [ recursive-lookup host-route [ arp-vlink-
only ] ] [ preference preference | tag tag ] * [ bfd enable | track { bfd-session cfg-name
| nqa admin-name test-name } | inherit-cost | permanent ] [ description text ]
An IPv4 static route is configured on the public network.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 52


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

l Run ip route-static ip-address { mask | mask-length } interface-type interface-number


[ nexthop-address ] [ preference preference | tag tag ] * [ bfd enable | track { bfd-
session cfg-name | nqa admin-name test-name } | permanent ] [ description text ]
An IPv4 static route is configured on the public network.
l Run ip route-static ip-address { mask | mask-length } vpn-instance vpn-instance-name
[ preference preference | tag tag ] * [ description text ]
An IPv4 static route is configured on the public network.
l Run ip route-static vpn-instance vpn-source-name destination-address { mask | mask-
length } interface-type interface-number [ nexthop-address ] [ preference preference |
tag tag ] * [ bfd enable | track { bfd-session cfg-name | nqa admin-name test-name } |
permanent ] [ description text ]
An IPv4 static route is configured in a VPN instance.
l Run ip route-static vpn-instance vpn-source-name destination-address { mask | mask-
length } { vpn-instance vpn-destination-name nexthop-address | nexthop-address
[ public ] } [ recursive-lookup host-route [ arp-vlink-only ] ] [ preference preference |
tag tag ] * [ bfd enable | track { bfd-session cfg-name | nqa admin-name test-name } |
inherit-cost | permanent ] [ description text ]
An IPv4 static route is configured in a VPN instance.
l Run ip route-static vpn-instance vpn-source-name destination-address { mask | mask-
length } { public | vpn-instance vpn-destination-name } [ preference preference | tag
tag ] * [ description text ]
An IPv4 static route is configured in a VPN instance.

Step 3 Run commit

The configuration is committed.

----End

2.7.2 (Optional) Setting the Default Preference for an IPv4 Static


Route

Context
The default preference of an IPv4 static route affects route selection. When an IPv4 static
route is configured, the default preference is used if no preference is specified for the static
route.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ip route-static default-preference preference

The default preference of static routes is set.

By default, the preference of static routes is 60.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 53


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

NOTE

After the default preference is reconfigured, the new default preference is valid only for new IPv4 static
routes.

Step 3 Run commit


The configuration is committed.

----End

2.7.3 (Optional) Configuring Static Route Selection Based on


Iteration Depth
Context
Route iteration refers to the process of finding the directly-connected outbound interface
based on the next hop of a route. The iteration depth indicates the number of times the system
searches for routes. A smaller number of the times indicates a smaller iteration depth.
When there are multiple static routes with the same prefix but different iteration depths, the
system selects the static route with the smallest iteration depth as the active route and delivers
it to the FIB table after static route selection based on iteration depth is configured. The other
static routes then become inactive. A smaller iteration depth indicates a more stable route.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ip route-static selection-rule relay-depth
Static route selection based on iteration depth is configured.
By default, static routes are not selected based on iteration depth.
Step 3 Run commit
The configuration is committed.

----End

2.7.4 (Optional) Configuring a Device to Iterate Static Routes to


ARP Vlink Routes
Context
Configuring a device to iterate static routes to ARP Vlink routes prevents traffic loss caused
by a black-hole route in a scenario where a Layer 2 VPN accesses a Layer 3 VPN.

Procedure
Step 1 Run system-view
The system view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 54


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Step 2 Run ip route recursive-lookup arp vlink-direct-route protocol static

The device is configured to iterate static routes to ARP Vlink routes.

By default, static routes cannot be iterated to ARP Vlink routes.

NOTE

To configure a device to iterate static routes to ARP Vlink routes, both the ip route-static with
recursive-lookup host-route [ arp-vlink-only ] specified and ip route recursive-lookup arp vlink-
direct-route protocol static commands must be run.

Step 3 Run commit

The configuration is committed.

----End

2.7.5 (Optional) Enabling the Function of Comparing the Costs of


Inherited Routes During Static Route Selection

Context
By default, a device does not compare the costs of inherited routes during static route
selection, and static routes with different costs work in load-balancing mode. To enable the
device to compare the costs of inherited routes and select only the static route with the
smallest cost, configure the device to compare the costs of inherited routes during static route
selection.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ip route-static selection-rule compare-inherit-cost

The device is enabled to compare the costs of inherited routes during static route selection.

Step 3 Run commit

The configuration is committed.

----End

2.7.6 (Optional) Configuring Dynamic BFD for IPv4 Static Routes

Pre-configuration Tasks
Before configuring dynamic BFD for IPv4 static routes, complete the following task:

l Configure link layer parameters and IP addresses for interfaces to ensure that the link
layer protocol on the interfaces is Up.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 55


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run bfd
BFD is enabled globally.
Step 3 Run quit
Return to the system view.
Step 4 (Optional) Run ip route-static default-bfd [ min-rx-interval min-rx-interval ] [ min-tx-
interval min-tx-interval ] [ detect-multiplier multiplier ]
Global BFD parameters are configured for static routes.
By default, the values of min-rx-interval, min-tx-interval, and detect-multiplier are 1000
ms, 1000 ms, and 3 respectively.
Step 5 Run ip route-static bfd [ interface-type interface-number ] nexthop-address [ local-address
address ] [ min-rx-interval min-rx-interval | min-tx-interval min-tx-interval | detect-
multiplier multiplier ] *
BFD parameters are configured for an IPv4 static route.

NOTE

If interface-type interface-number is not specified, local-address address must be specified.


If none of min-rx-interval, min-tx-interval, and detect-multiplier is specified, the global default
values of BFD parameters are used.

Step 6 Run ip route-static ip-address { mask | mask-length } { nexthop-address | interface-type


interface-number [ nexthop-address ] } [ preference preference | tag tag ] * bfd enable
[ description text ]
A public network static IPv4 route is bound to a BFD session.

NOTE

When the type and number of the outbound interface of a static route are specified, and the VPN
instance name is specified, a static route searches the routing table of the VPN instance for an outbound
interface according to nexthop-address. Run the ip route-static vpn-instance vpn-source-name
destination-address { mask | mask-length } interface-type interface-number [ nexthop-address ]
[ preference preference | tag tag ] * bfd enable [ description text ] command to bind a dynamic BFD
session to static routes.

Step 7 Run commit


The configuration is committed.

----End

Verifying the Configuration


Run the following command to verify the configuration.
l Run the display bfd session { all | discriminator discr-value } [ verbose ] command to
check information about the BFD session.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 56


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

2.7.7 (Optional) Configuring Static BFD for IPv4 Static Routes

Pre-configuration Tasks
Before configuring static BFD for IPv4 static routes, complete the following tasks:

l Configure link layer parameters and IP addresses for interfaces to ensure network-layer
communication between neighbor nodes.
l Configure BFD sessions.
For details, see "BFD Configuration" in the CloudEngine 12800 and 12800E Series
Switches - Configuration Guide - Reliability.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run either of the following commands as required:


l Run ip route-static ip-address { mask | mask-length } { nexthop-address | interface-type
interface-number [ nexthop-address ] | vpn-instance vpn-instance-name nexthop-
address } track bfd-session cfg-name [ description text ]
A BFD session is bound to an IPv4 static route on the public network.
l Run ip route-static vpn-instance vpn-source-name destination-address { mask | mask-
length } { nexthop-address | interface-type interface-number [ nexthop-address ] | vpn-
instance vpn-instance-name nexthop-address } track bfd-session cfg-name
[ description text ]
A BFD session is bound to an IPv4 static route on the VPN network.
NOTE

Before binding a static route to a BFD session, ensure that the BFD session and the static route reside on
the same link.

Step 3 Run commit

The configuration is committed.

----End

Verifying the Configuration


Run the following commands to verify the configuration.

l Run the display bfd session all [ verbose ] command to check information about the
BFD session.

2.7.8 (Optional) Configuring FRR for IPv4 Static Routes

Pre-configuration Tasks
Before configuring FRR for IPv4 static routes, complete the following task:

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 57


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

l Configure link layer parameters and IP addresses for interfaces to ensure that the link
layer protocol on the interfaces is Up.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ip route-static frr [ vpn-instance vpn-instance-name ]
FRR is enabled for public network IPv4 static routes.

NOTE

FRR is implemented only on the static routes that are manually configured. That is, FRR cannot be
implemented on iterated next hops.
To implement route backup by configuring FRR for static routes, specify different preferences for these
static routes.
To enable FRR for an Ethernet interface's static route and other static routes, configure the outbound
interface and next hop.

Step 3 Run commit


The configuration is committed.

----End

Verifying the Configuration


Run the following commands to verify the configuration.
l Run the display ip routing-table verbose command to check detailed information about
the backup outbound interfaces and backup next hops of routes in the routing table.
l Run the display ip routing-table ip-address [ mask | mask-length ] [ longer-match ]
verbose command to check detailed information about the backup outbound interfaces
and backup next hops of the routes with specified destination address and mask in the
routing table.
l Run the display ip routing-table ip-address1 { mask1 | mask-length1 } ip-address2
{ mask2 | mask-length2 } verbose command to check detailed information about the
backup outbound interfaces and backup next hops of routes with specified IP address
range in the routing table.

2.7.9 (Optional) Associating IPv4 Static Routes with NQA

Pre-configuration Tasks
Before associating IPv4 static routes with NQA, complete the following task:
l Configure link layer parameters for interfaces to ensure that the link layer protocol on the
interfaces is Up.

Procedure
Step 1 Configure an ICMP NQA test instance.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 58


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

1. Run system-view
The system view is displayed.
2. Run nqa test-instance admin-name test-name
An NQA test instance is created, and the view of the test instance is displayed.
3. Run test-type icmp
The test type is set to ICMP.

NOTE

When a static route is associated with an NQA test instance, only ICMP test instances are used to
test whether there are reachable routes between the source and destination.
4. Run destination-address ipv4 ip-address
The destination address is set.
In an NQA test instance, you can specify an NQA server by running the destination-
address command to configure a destination address for the NQA test instance.
5. (Optional) Run frequency interval
The interval for automatically performing an NQA test is set.
By default, no interval is set, that is, only one test is performed.
6. (Optional) Run probe-count number
The number of probes to be sent each time is set for the NQA test instance.
By default, the number of probes is 3.
By sending probes multiple times in an NQA test instance, you can accurately estimate
network quality based on the collected statistics.
7. Run start
The NQA test instance is started.
The start command can configure an NQA test instance to be started immediately, at a
specified time, after a specified delay, or every day. You can perform one of the
following operations as required:
– Run start now [ end { at [ yyyy/mm/dd ] hh:mm:ss | delay { seconds second |
hh:mm:ss } | lifetime { seconds second | hh:mm:ss } } ]
The NQA test instance is started immediately.
– Run start at [ yyyy/mm/dd ] hh:mm:ss [ end { at [ yyyy/mm/dd ] hh:mm:ss | delay
{ seconds second | hh:mm:ss } | lifetime { seconds second | hh:mm:ss } } ]
The NQA test instance is started at a specified time.
– Run start delay { seconds second | hh:mm:ss } [ end { at [ yyyy/mm/dd ] hh:mm:ss
| delay { seconds second | hh:mm:ss } | lifetime { seconds second | hh:mm:ss } } ]
The NQA test instance is started after a specified delay.
– Run start daily hh:mm:ss to hh:mm:ss [ begin { yyyy-mm-dd | yyyy/mm/dd } ]
[ end { yyyy-mm-dd | yyyy/mm/dd } ]
The NQA test instance is started every day.
8. Run commit
The configuration is committed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 59


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

9. Run quit

Return to the system view.

Step 2 Associate static routes with an NQA test instance.


1. Run ip route-static ip-address { mask | mask-length } { nexthop-address | interface-type
interface-number [ nexthop-address ] } [ preference preference | tag tag ] * track nqa
admin-name test-name [ description text ]

IPv4 static routes are associated with an NQA test instance.

NOTE

The destination address of an NQA test instance cannot be the destination address of an associated
static route.
If the static route associated with an NQA test instance is associated with another NQA test
instance, the static route is disassociated from the first NQA test instance.
2. Run commit

The configuration is committed.

----End

Verifying the Configuration


After IPv4 static routes are associated with NAQ, run the following commands to verify the
configuration.

l Run the display current-configuration | include nqa command to check the


configuration of association between static routes and NQA.
l Run the display nqa results [ collection ] [ test-instance admin-name test-name ]
command to check the NQA test result.
The NQA test result cannot be displayed automatically. You must run the display nqa
results command to view the NQA test result. By default, the command output shows
the results of the latest five NQA tests.

2.7.10 Verifying the IPv4 Static Route Configuration

Procedure
l Run the display static-route routing-table command to check information about static
routes.
l Run the display ip routing-table command to check brief information about the IPv4
routing table.
l Run the display ip routing-table verbose command to check detailed information about
the IPv4 routing table.

----End

2.8 Configuring IPv6 Static Routes

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 60


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Pre-configuration Tasks
Before configuring IPv6 static routes, complete the following task:
l Configure link layer parameters and IPv6 addresses for interfaces to ensure network-
layer communication between neighbor nodes.

Configuration Procedure
You can perform the following configuration tasks (excluding the task of Verifying the IPv6
Static Route Configuration) in any sequence as required.

2.8.1 Creating IPv6 Static Routes


Context
When creating IPv6 static routes, you can specify both the outbound interface and next hop.
Alternatively, you can specify only the outbound interface or next hop based on the outbound
interface type.
l Specify the outbound interface for a P2P interface.
l Specify the next hop for an NBMA interface.
l Specify the outbound interface for a broadcast interface. If the next hop address is also
specified, it does not need to be a link-local address.
If you specify the same preference for IPv6 static routes to the same destination, load
balancing among these routes is implemented. If you specify different preferences for the
IPv6 static routes, route backup among the routes is implemented.
If the destination IP address and mask are set to all 0s, an IPv6 static default route is
configured. By default, no IPv6 static default route is configured.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Configure IPv6 static routes.
l Run ipv6 route-static dest-ipv6-address prefix-length { interface-type interface-number
[ nexthop-ipv6-address ] | vpn-instance vpn-instance-name nexthop-ipv6-address |
nexthop-ipv6-address } [ preference preference | tag tag ] * [ bfd enable | track { bfd-
session cfg-name | nqa admin-name test-name } ] [ description text ]
An IPv6 static route is configured on the public network.
l Run ipv6 route-static dest-ipv6-address prefix-length [ vpn-instance vpn-instance-
name ] nexthop-ipv6-address [ preference preference | tag tag ] * inherit-cost
[ description text ]
An IPv6 static route is configured on the public network.
l Run ipv6 route-static dest-ipv6-address prefix-length vpn-instance vpn-instance-name
[ preference preference | tag tag ] [ description text ]
An IPv6 static route is configured on the public network.
l Run ipv6 route-static vpn-instance vpn-source-name dest-ipv6-address prefix-length
{ interface-type interface-number [ nexthop-ipv6-address ] | vpn-instance vpn-

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 61


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

destination-name nexthop-ipv6-address | nexthop-ipv6-address [ public ] } [ preference


preference | tag tag ] * [ bfd enable | track { bfd-session cfg-name | nqa admin-name
test-name } ] [ description text ]
An IPv6 static route is configured in a VPN instance.
l Run ipv6 route-static vpn-instance vpn-source-name dest-ipv6-address prefix-length
{ vpn-instance vpn-destination-name | public } [ preference preference | tag tag ]
[ description text ]
An IPv6 static route is configured in a VPN instance.
l Run ipv6 route-static vpn-instance vpn-source-name dest-ipv6-address prefix-length
{ vpn-instance vpn-destination-name dest-ipv6-address | dest-ipv6-address [ public ] }
[ preference preference | tag tag ] * inherit-cost [ description text ]
An IPv6 static route is configured in a VPN instance.
Step 3 Run commit
The configuration is committed.

----End

2.8.2 (Optional) Setting the Default Preference for IPv6 Static


Routes
Context
The default preference of IPv6 static routes affects route selection. When an IPv6 static route
is configured, the default preference is used if no preference is specified for the static route.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ipv6 route-static default-preference preference
The default preference of IPv6 static routes is set.
By default, the preference of static routes is 60.
After the default preference is reconfigured, the new default preference is valid only for new
IPv6 static routes.
Step 3 Run commit
The configuration is committed.

----End

2.8.3 (Optional) Configuring Dynamic BFD for IPv6 Static Routes

Applicable Environment
Preferred IPv6 static routes are delivered to the forwarding table for packet forwarding. An
IPv6 static route, however, is incapable of detecting whether the link to the next hop is

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 62


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

working properly. Binding the IPv6 static route to a BFD session can address this problem,
because a BFD session is capable of detecting link changes and informing the routing
management module of the changes. If a BFD session detects that a link is interrupted, the
routing management module immediately withdraws the IPv6 static route that is bound to the
BFD session from the forwarding table and recalculates another active route. In this manner,
fast route convergence is implemented.

Pre-configuration Tasks
Before configuring dynamic BFD for IPv6 static routes, complete the following task:

l Configuring link layer protocol parameters and IPv6 addresses for interfaces to ensure
that the link layer protocol on the interfaces is Up

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run bfd

Global BFD is enabled on the node.

Step 3 Run quit

Return to the system view.

Step 4 (Optional) Run ipv6 route-static default-bfd { min-rx-interval min-rx-interval | min-tx-


interval min-tx-interval | detect-multiplier multiplier }*

The global BFD parameters of the IPv6 static routes on the device are set.

The default values of the global BFD parameters min-rx-interval, min-tx-interval, and
multiplier are 1000 ms, 1000 ms, and 3 respectively.

Step 5 Run ipv6 route-static bfd [ interface-type interface-number ] nexthop-address [ local-


address ipv6-address ] [ detect-multiplier multiplier | min-rx-interval min-rx-interval | min-
tx-interval min-tx-interval ]*

The BFD parameters of an IPv6 static route are set.

NOTE

If interface-type interface-number is not set, local-address ipv6-address must be specified.


If none of min-rx-interval, min-tx-interval, and detect-multiplier is specified, the global default values of
the BFD parameters are used.

Step 6 Run ipv6 route-static dest-ipv6-address prefix-length { interface-type interface-number


[ nexthop-ipv6-address ] | vpn-instance vpn-instance-name nexthop-ipv6-address | nexthop-
ipv6-address } [ preference preference | tag tag ]* bfd enable [ description text ]

A BFD session is bound to an IPv6 static route.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 63


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

NOTE

When the type and number of the outbound interface of a static route are specified, and the VPN
instance name is specified, a static route searches the routing table of the VPN instance for an outbound
interface according to nexthop-address. Run the ipv6 route-static vpn-instance vpn-source-name dest-
ipv6-address prefix-length { interface-type interface-number [ nexthop-ipv6-address ] | vpn-instance
vpn-destination-name nexthop-ipv6-address | nexthop-ipv6-address [ public ] } [ preference preference |
tag tag ]* bfd enable [ description text ] command to bind a dynamic BFD session to static routes.

Step 7 Run commit


The configuration is committed.

----End

Verifying the Configuration


Information about a BFD session can be viewed only after the parameters of the BFD session
are set and the BFD session is established.
Run the following commands to check the previous configuration.
l Run the display bfd session { all | discriminator discr-value } [ verbose ] command to
check information about BFD sessions.
l Run the display current-configuration | include bfd command to check configurations
of BFD for IPv6 static routes.

2.8.4 (Optional) Configuring Static BFD for IPv6 Static Routes

Usage Scenario
To use BFD sessions to provide link detection for IPv6 static routes, you can bind IPv6 static
routes to BFD sessions. One IPv6 static route can be bound to one BFD session.
Optimal IPv6 static routes are delivered to the forwarding table for packet forwarding.
However, IPv6 static routes cannot detect the status of the link to the next hop. You can bind
IPv6 static routes to BFD sessions. A BFD session can quickly detect changes over a link and
inform the routing management system of the changes. The routing management system
immediately deletes the static route that is bound to the BFD session from the forwarding
table and recalculates another active route. In this manner, fast route convergence is
implemented.

Pre-configuration Tasks
Before configuring static BFD for IPv6 static routes, complete the following tasks:
l Configure link layer protocol parameters and IP addresses for interfaces and ensure that
the link layer protocol on the interfaces is Up.
l Configure a BFD Session. For details, see "BFD Configuration" in the CloudEngine
12800 and 12800E Series Switches Configuration Guide-Reliability

Procedure
Step 1 Run system-view
The system view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 64


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Step 2 Run either of the following commands as required:


l Run ipv6 route-static dest-ipv6-address prefix-length { interface-type interface-number
[ nexthop-ipv6-address ] | vpn-instance vpn-instance-name nexthop-ipv6-address |
nexthop-ipv6-address } [ preference preference | tag tag ] * track bfd-session cfg-name
[ description text ]
A BFD session is bound to an IPv6 static route on the public network.
l Run ipv6 route-static vpn-instance vpn-source-name dest-ipv6-address prefix-length
{ interface-type interface-number [ nexthop-ipv6-address ] | vpn-instance vpn-
destination-name nexthop-ipv6-address | nexthop-ipv6-address [ public ] } [ preference
preference | tag tag ]* track bfd-session cfg-name [ description text ]
A BFD session is bound to an IPv6 static route on the VPN network.

Step 3 Run commit

The configuration is committed.

----End

Verifying the Configuration


Run the following commands to verify the configuration.

Information about a BFD session can be viewed only after parameters of the BFD session are
set and the BFD session is established.

l Run the display bfd session { all | discriminator discr-value } [ verbose ] command to
check information about BFD sessions.
l Run the display current-configuration | include bfd command to check configurations
of BFD for IPv6 static routes.

2.8.5 (Optional) Configuring FRR for IPv6 Static Routes

Pre-configuration Tasks
Before configuring FRR for IPv6 static routes, complete the following task:

l Configure link layer parameters and IPv6 addresses for interfaces to ensure that the link
layer protocol on the interfaces is Up.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ipv6 route-static frr [ vpn-instance vpn-instance-name ]

FRR is enabled for public network IPv6 static routes.

NOTE

To implement route backup by configuring FRR for ipv6 static routes, specify different preferences for
these static routes.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 65


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Step 3 Run commit


The configuration is committed.

----End

Verifying the Configuration


Run the display ipv6 routing-table verbose command to check information about the backup
outbound interfaces and backup next hops of static routes in the routing table.

2.8.6 (Optional) Associating IPv6 Static Routes with NQA

Pre-configuration Tasks
Before associating IPv6 static routes with NQA, complete the following task:
l Configure link layer parameters and IPv6 addresses for interfaces to ensure that the link
layer protocol on the interfaces is Up.

Procedure
Step 1 Configure an ICMP NQA test instance.
1. Run system-view
The system view is displayed.
2. Run nqa test-instance admin-name test-name
An NQA test instance is created, and the view of the test instance is displayed.
3. Run test-type icmp
The test type is set to ICMP.
4. Run destination-address ipv6 ipv6-address
A destination address is configured.
In an NQA test instance, you can specify an NQA server by running the destination-
address command to configure a destination address for the NQA test instance.
5. (Optional) Run frequency interval
The interval for automatically performing an NQA test is set.
By default, no interval is set, that is, only one test is performed.
6. (Optional) Run probe-count number
The number of probes to be sent each time is set for the NQA test instance.
By default, the number of probes is 3.
By sending probes multiple times in an NQA test instance, you can accurately estimate
network quality based on the collected statistics.
7. (Optional) Run interval seconds interval
The interval at which probe packets are sent is set.
The default interval is 4 seconds for an NQA ICMP test instance.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 66


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Set the interval based on network quality:


– If network quality is unsatisfactory, increase the interval to prevent network
deterioration caused during the operation of test instances.
– If network quality is satisfactory, decrease the interval to accelerate the running
speed of test instances.
8. (Optional) Run timeout time
A timeout period is set for the NQA test instance.
The default timeout period is 3 seconds.
9. (Optional) Run fail-percent percent
A probe failure percentage is set for the NQA test instance.
The default probe failure percentage is 100%. That is, the test is considered failed only
when all probes fail. You can set a probe failure percentage based on network quality.

NOTE

no result may be returned if the following condition is met:


Interval at which the NQA test is automatically performed ≤ Interval at which probe packets are
sent x (Number of sent packets - 1) + Timeout period
The number of packets sent in an NQA ICMP test instance is the number of probes specified using
the probe-count number command.
10. Run start
The NQA test instance is started.
The start command can configure an NQA test instance to be started immediately, at a
specified time, or after a specified delay. You can perform one of the following
operations as required:
– Run start now [ end { at [ yyyy/mm/dd ] hh:mm:ss | delay { seconds second |
hh:mm:ss } | lifetime { seconds second | hh:mm:ss } } ]
The NQA test instance is started immediately.
– Run start at [ yyyy/mm/dd ] hh:mm:ss [ end { at [ yyyy/mm/dd ] hh:mm:ss | delay
{ seconds second | hh:mm:ss } | lifetime { seconds second | hh:mm:ss } } ]
The NQA test instance is started at a specified time.
– Run start delay { seconds second | hh:mm:ss } [ end { at [ yyyy/mm/dd ] hh:mm:ss
| delay { seconds second | hh:mm:ss } | lifetime { seconds second | hh:mm:ss } } ]
The NQA test instance is started after a specified delay.
– Run start daily hh:mm:ss to hh:mm:ss [ begin { yyyy-mm-dd | yyyy/mm/dd } ]
[ end { yyyy-mm-dd | yyyy/mm/dd } ]
The NQA test instance is started every day.
11. Run commit
The configuration is committed.
12. Run quit
Return to the system view.
Step 2 Associate static routes with an NQA test instance.
1. Run ipv6 route-static dest-ipv6-address prefix-length { interface-type interface-number
[ nexthop-ipv6-address ] | vpn-instance vpn-instance-name nexthop-ipv6-address |

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 67


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

nexthop-ipv6-address } [ preference preference | tag tag ]* track nqa admin-name test-


name [ description text ]

IPv6 static routes are associated with an NQA test instance.

NOTE

The destination address of an NQA test instance cannot be the destination address of an associated
IPv6 static route.
If the IPv6 static route associated with an NQA test instance is associated with another NQA test
instance, the IPv6 static route is disassociated from the first NQA test instance.
2. Run commit

The configuration is committed.

----End

Verifying the Configuration


After IPv6 static routes are associated with NAQ, run the following commands to verify the
configuration.

l Run the display current-configuration | include nqa command to check the


configuration of association between static routes and NQA.
l Run the display nqa results [ test-instance admin-name test-name ] command to check
the NQA test result.
The NQA test result cannot be displayed automatically. You must run the display nqa
results command to view the NQA test result. By default, the command output shows
the results of the latest five NQA tests.

2.8.7 Verifying the IPv6 Static Route Configuration

Procedure
l Run the display static-route ipv6 routing-table command to check information about
IPv6 static routes.
l Run the display ipv6 routing-table command to check brief information about the IPv6
routing table.
l Run the display ipv6 routing-table verbose command to check detailed information
about the IPv6 routing table.

----End

2.9 Configuration Examples for Static Routes


This section only provides configuration examples for individual features. For details about
multi-feature configuration examples, feature-specific configuration examples, interoperation
examples, protocol or hardware replacement examples, and industry application examples, see
the Typical Configuration Examples.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 68


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

2.9.1 Example for Configuring IPv4 Static Routes

Networking Requirements
Servers on different network segments are connected using several Switchs. Every two
servers on different network segments can communicate with each other without using
dynamic routing protocols.

Figure 2-6 Networking diagram for configuring IPv4 static routes

Server2
10.1.2.2/24
10GE1/0/3
VLANIF40
10.1.2.1/24
10GE1/0/1 10GE1/0/2
VLANIF10 VLANIF20
10.1.4.2/30 10.1.4.5/30
SwitchB
SwitchA SwitchC
10GE1/0/1 10GE1/0/1
VLANIF10 VLANIF20
10.1.4.1/30 10.1.4.6/30
10GE1/0/2 10GE1/0/2
VLANIF30 VLANIF50
10.1.1.1/24 10.1.3.1/24
Server1 Server3
10.1.1.2/24 10.1.3.2/24

Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs, add interfaces to the VLANs, and assign IPv4 addresses to VLANIF
interfaces so that directly-connected interfaces can communicate with each other.
2. Configure the IPv4 default gateway on each server, and configure IPv4 static routes and
default routes on each Switch so that servers on different network segments can
communicate with each other.

Procedure
Step 1 Create VLANs and add interfaces to the VLANs.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan 10
[*SwitchA-vlan10] quit
[*SwitchA] vlan 30
[*SwitchA-vlan30] quit
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10ge 1/0/2

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 69


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

[*SwitchA-10GE1/0/2] port default vlan 30


[*SwitchA-10GE1/0/2] quit
[*SwitchA] commit

The configurations of SwitchB and SwitchC are similar to that of SwitchA, and are not
mentioned here.
Step 2 Assign IPv4 addresses to the VLANIF interfaces.
[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ip address 10.1.4.1 30
[*SwitchA-Vlanif10] quit
[*SwitchA] interface vlanif 30
[*SwitchA-Vlanif30] ip address 10.1.1.1 24
[*SwitchA-Vlanif30] quit
[*SwitchA] commit

The configurations of SwitchB and SwitchC are similar to that of SwitchA, and are not
mentioned here.
Step 3 Configure servers.
Set the Server1 default gateway to 10.1.1.1, the Server2 default gateway to 10.1.2.1, and the
Server3 default gateway to 10.1.3.1.
Step 4 Configure static routes.
# Configure an IPv4 default route on SwitchA.
[~SwitchA] ip route-static 0.0.0.0 0.0.0.0 10.1.4.2
[*SwitchA] commit

# Configure two IPv4 static routes on SwitchB.


[~SwitchB] ip route-static 10.1.1.0 255.255.255.0 10.1.4.1
[*SwitchB] ip route-static 10.1.3.0 255.255.255.0 10.1.4.6
[*SwitchB] commit

# Configure an IPv4 default route on SwitchC.


[~SwitchC] ip route-static 0.0.0.0 0.0.0.0 10.1.4.5
[*SwitchC] commit

Step 5 Verify the configuration.


# Check the IP routing table on SwitchA.
[~SwitchA] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R - relay, D - download to fib, T - to vpn-instance
------------------------------------------------------------------------------
Routing Table: _public_
Destinations : 10 Routes : 10

Destination/Mask Proto Pre Cost Flags NextHop Interface

0.0.0.0/0 Static 60 0 RD 10.1.4.2 Vlanif10


10.1.1.0/24 Direct 0 0 D 10.1.1.1 Vlanif30
10.1.1.1/32 Direct 0 0 D 127.0.0.1 Vlanif30
10.1.4.0/30 Direct 0 0 D 10.1.4.1 Vlanif10
10.1.4.1/32 Direct 0 0 D 127.0.0.1 Vlanif10
10.1.4.2/32 Direct 0 0 D 10.1.4.2 Vlanif10
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

# Run the ping command to verify the connectivity.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 70


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

[~SwitchA] ping 10.1.3.1


PING 1.1.3.1: 56 data bytes, press CTRL_C to break
Reply from 10.1.3.1: bytes=56 Sequence=1 ttl=254 time=62 ms
Reply from 10.1.3.1: bytes=56 Sequence=2 ttl=254 time=63 ms
Reply from 10.1.3.1: bytes=56 Sequence=3 ttl=254 time=63 ms
Reply from 10.1.3.1: bytes=56 Sequence=4 ttl=254 time=62 ms
Reply from 10.1.3.1: bytes=56 Sequence=5 ttl=254 time=62 ms

--- 10.1.3.1 ping statistics ---


5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 62/62/63 ms

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10 30
#
interface Vlanif10
ip address 10.1.4.1 255.255.255.252
#
interface Vlanif30
ip address 10.1.1.1 255.255.255.0
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port default vlan 30
#
ip route-static 0.0.0.0 0.0.0.0 10.1.4.2
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 10 20 40
#
interface Vlanif10
ip address 10.1.4.2 255.255.255.252
#
interface Vlanif20
ip address 10.1.4.5 255.255.255.252
#
interface Vlanif40
ip address 10.1.2.1 255.255.255.0
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/3
port default vlan 40
#
ip route-static 10.1.1.0 255.255.255.0 10.1.4.1

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 71


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

ip route-static 10.1.3.0 255.255.255.0 10.1.4.6


#
return

l Configuration file of SwitchC


#
sysname SwitchC
#
vlan batch 20 50
#
interface Vlanif20
ip address 10.1.4.6 255.255.255.252
#
interface Vlanif50
ip address 10.1.3.1 255.255.255.0
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/2
port default vlan 50
#
ip route-static 0.0.0.0 0.0.0.0 10.1.4.5
#
return

2.9.2 Example for Configuring IPv6 Static Routes


Networking Requirements
On an IPv6 network, hosts on different network segments are connected through several
Switches. Every two hosts on different network segments can communicate with each other
without using dynamic routing protocols.

Figure 2-7 Networking diagram for configuring IPv6 static routes


PC2
FC00:0:0:2002::2/64
10GE1/0/3
VLANIF30
FC00:0:0:2002::1/64
10GE1/0/1 10GE1/0/2
VLANIF20 VLANIF40
FC00:0:0:2004::2/64 FC00:0:0:2005::2/64
SwitchA SwitchB
SwitchC
10GE1/0/1 10GE1/0/1
10GE1/0/2 VLANIF20 VLANIF40
FC00:0:0:2004::1/64
VLANIF10 FC00:0:0:2005::1/64 10GE1/0/2
FC00:0:0:2001::1/64 VLANIF50
FC00:0:0:2003::1/64
PC1 PC3
FC00:0:0:2001::2/64 FC00:0:0:2003::2/64

Configuration Roadmap
The configuration roadmap is as follows:

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 72


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

1. Create VLANs, add interfaces to the VLANs, and assign IPv6 addresses to VLANIF
interfaces so that devices can communicate with each other.
2. Configure the IPv6 default gateway on each host, and configure IPv6 static routes and
default static routes on each Switch so that hosts on different network segments can
communicate with each other without using dynamic routing protocols.

Procedure
Step 1 Add interfaces to VLANs.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*SwitchA] vlan batch 10 20
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/2] commit
[~SwitchA-10GE1/0/2] quit
[~SwitchA] interface 10ge 1/0/1
[~SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 20
[*SwitchA-10GE1/0/1] commit
[~SwitchA-10GE1/0/1] quit

The configurations of SwitchB and SwitchC are similar to that of SwitchA. The detailed
configurations are not mentioned here.
Step 2 Assign IP addresses to the VLANIF interfaces.
[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ipv6 enable
[*SwitchA-Vlanif10] ipv6 address fc00:0:0:2001::1/64
[*SwitchA-Vlanif10] commit
[~SwitchA-Vlanif10] quit
[~SwitchA] interface vlanif 20
[*SwitchA-Vlanif20] ipv6 enable
[*SwitchA-Vlanif20] ipv6 address fc00:0:0:2004::1/64
[*SwitchA-Vlanif20] commit
[~SwitchA-Vlanif20] quit

The configurations of SwitchB and SwitchC are similar to that of SwitchA. The detailed
configurations are not mentioned here.
Step 3 Configure the host addresses and gateways.
Configure an IPv6 address for each host according to the networking diagram. Configure the
default gateway of PC1 to FC00:0:0:2001::1, that of PC2 to FC00:0:0:2002::1, and that of
Host3 to FC00:0:0:2003::1.
Step 4 Configure static IPv6 routes.

# Configure a default IPv6 route on SwitchA.


[~SwitchA] ipv6 route-static :: 0 vlanif20 fc00:0:0:2004::2
[*SwitchA] commit

# Configure two IPv6 static routes on SwitchB.


[~SwitchB] ipv6 route-static fc00:0:0:2001:: 64 vlanif20 fc00:0:0:2004::1
[*SwitchB] ipv6 route-static fc00:0:0:2003:: 64 vlanif40 fc00:0:0:2005::1
[*SwitchB] commit

# Configure a default IPv6 route on SwitchC.


[~SwitchC] ipv6 route-static :: 0 vlanif40 FC00:0:0:2005::2
[*SwitchC] commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 73


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Step 5 Verify the configuration.


# Check the IPv6 routing table on SwitchA.
[~SwitchA] display ipv6 routing-table
Route
Flags: R - relay, D - download to fib, T - to
vpn-instance, B - black hole route
---------------------------------------------------------------------------------
Routing Table :
_public_

Destinations : 6 Routes :
6

Destination : :: PrefixLength :
0
NextHop : FC00:0:0:2004::2 Preference :
60
Cost : 0 Protocol :
Static
RelayNextHop : :: TunnelID :
0x0
Interface : Vlanif20 Flags :
D

Destination : FC00:0:0:2001:: PrefixLength :


64
NextHop : FC00:0:0:2001::1 Preference :
0
Cost : 0 Protocol :
Direct
RelayNextHop : :: TunnelID :
0x0
Interface : Vlanif10 Flags :
D

Destination : FC00:0:0:2001::1 PrefixLength :


128
NextHop : ::1 Preference :
0
Cost : 0 Protocol :
Direct
RelayNextHop : :: TunnelID :
0x0
Interface : Vlanif10 Flags :
D

Destination : FC00:0:0:2004:: PrefixLength :


64
NextHop : FC00:0:0:2004::1 Preference :
0
Cost : 0 Protocol :
Direct
RelayNextHop : :: TunnelID :
0x0
Interface : Vlanif20 Flags :
D

Destination : FC00:0:0:2004::1 PrefixLength :


128
NextHop : ::1 Preference :
0
Cost : 0 Protocol :

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 74


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Direct
RelayNextHop : :: TunnelID :
0x0
Interface : Vlanif20 Flags :
D

Destination : FE80:: PrefixLength :


10
NextHop : :: Preference :
0
Cost : 0 Protocol :
Direct
RelayNextHop : :: TunnelID :
0x0
Interface : NULL0 Flags : D

# Run the ping command.


[~SwitchA] ping ipv6 fc00:0:0:2003::1
PING FC00:0:0:2003::1 : 56 data bytes, press CTRL_C to break
Reply from FC00:0:0:2003::1
bytes=56 Sequence=1 hop limit=63 time = 63 ms
Reply from FC00:0:0:2003::1
bytes=56 Sequence=2 hop limit=63 time = 62 ms
Reply from FC00:0:0:2003::1
bytes=56 Sequence=3 hop limit=63 time = 62 ms
Reply from FC00:0:0:2003::1
bytes=56 Sequence=4 hop limit=63 time = 63 ms
Reply from FC00:0:0:2003::1
bytes=56 Sequence=5 hop limit=63 time = 63 ms

--- fc00:0:0:2003::1 ping statistics ---


5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 62/62/63 ms

# Run the tracert command.


[~SwitchA] tracert ipv6 fc00:0:0:2003::1
traceroute to FC00:0:0:2003::1 30 hops max,60 bytes packet
1 FC00:0:0:2004::2 31 ms 32 ms 31 ms
2 FC00:0:0:2003::1 62 ms 63 ms 62 ms

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10 20
#
interface Vlanif10
ipv6 enable
ipv6 address FC00:0:0:2001::1/64
#
interface Vlanif20
ipv6 enable
ipv6 address FC00:0:0:2004::1/64
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/2

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 75


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

port link-type trunk


port trunk allow-pass vlan 10
#
ipv6 route-static :: 0 vlanif20 FC00:0:0:2004::2
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 20 30 40
#
interface Vlanif20
ipv6 enable
ipv6 address FC00:0:0:2004::2/64
#
interface Vlanif30
ipv6 enable
ipv6 address FC00:0:0:2002::1/64
#
interface Vlanif40
ipv6 enable
ipv6 address FC00:0:0:2005::2/64
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 40
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 30
#
ipv6 route-static FC00:0:0:2001:: 64 Vlanif20 FC00:0:0:2004::1
ipv6 route-static FC00:0:0:2003:: 64 Vlanif40 FC00:0:0:2005::1
#
return

l Configuration file of SwitchC


#
sysname SwitchC
#
vlan batch 40 50
#
interface Vlanif40
ipv6 enable
ipv6 address FC00:0:0:2005::1/64
#
interface Vlanif50
ipv6 enable
ipv6 address FC00:0:0:2003::1/64
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 40
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 50
#
ipv6 route-static :: 0 Vlanif40 FC00:0:0:2005::2
#
return

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 76


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

2.9.3 Example for Configuring Dynamic BFD for IPv4 Static


Routes
Networking Requirements
As shown in Figure 2-8, a static route with destination address 8.1.1.0/24 is configured on
SwitchA, and a static route with destination address 7.1.1.0/24 is configured on SwitchB. To
improve convergence speed, users require link faults between SwitchA and SwitchB to be
detected at the millisecond level.

Figure 2-8 Networking diagram for configuring dynamic BFD for IPv4 static routes

10GE1/0/2 10GE1/0/1 10GE1/0/1 10GE1/0/2


VLANIF20 VLANIF10 VLANIF10 VLANIF30
10.7.1.1/24 192.168.1.1/24 192.168.1.2/24 10.8.1.1/24

SwitchA SwitchB

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure dynamic BFD for IPv4 static routes to implement millisecond-level link fault
detection between SwitchA and SwitchB. This configuration can improve convergence
speed of static routes.

Procedure
Step 1 Add interfaces to VLANs.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan 10
[*SwitchA-vlan10] quit
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/1] quit
[*SwitchA] vlan 20
[*SwitchA-vlan20] quit
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] port trunk allow-pass vlan 20
[*SwitchA-10GE1/0/2] quit
[*SwitchA] commit

The configuration of SwitchB is similar to that of SwitchA, and is not mentioned here.
Step 2 Assign IP addresses to the VLANIF interfaces.
[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ip address 192.168.1.1 24
[*SwitchA-Vlanif10] quit
[*SwitchA] interface vlanif 20
[*SwitchA-Vlanif20] ip address 10.7.1.1 24

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 77


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

[*SwitchA-Vlanif20] quit
[*SwitchA] commit

The configuration of SwitchB is similar to that of SwitchA, and is not mentioned here.

Step 3 Configure static routes.

# Configure a static route to 10.8.1.1/24 on SwitchA.


[~SwitchA] ip route-static 10.8.1.1 24 192.168.1.2
[*SwitchA] commit

# Configure a static route to 10.7.1.1/24 on SwitchB.


[~SwitchB] ip route-static 10.7.1.1 24 192.168.1.1
[*SwitchB] commit

Step 4 Configure dynamic BFD for static routes.

# Bind a static route to a BFD session on SwitchA.


[~SwitchA] bfd
[*SwitchA-bfd] quit
[*SwitchA] ip route-static bfd 192.168.1.2 local-address 192.168.1.1
[*SwitchA] ip route-static 10.8.1.1 24 192.168.1.2 bfd enable
[*SwitchA] commit

# Bind a static route to a BFD session on SwitchB.


[~SwitchB] bfd
[*SwitchB-bfd] quit
[*SwitchB] ip route-static bfd 192.168.1.1 local-address 192.168.1.2
[*SwitchB] ip route-static 10.7.1.1 24 192.168.1.1 bfd enable
[*SwitchB] commit

Step 5 Verify the configuration.

# When the configuration is complete, run the display bfd session all verbose command on
SwitchA and SwitchB. The command output shows that the BFD session is established, the
BFD session status is Up, and static routes are bound to BFD sessions.

Take the display on SwitchA as an example.


[~SwitchA] display bfd session all verbose
(w): State in WTR
(*): State is invalid
Total UP/DOWN Session Number : 1/0
--------------------------------------------------------------------------------
Name : dyn_16390 (Multiple Hops) State : Up
--------------------------------------------------------------------------------
Local Discriminator : 16390 Remote Discriminator : 16388
Session Detect Mode : Asynchronous Mode Without Echo Function
BFD Bind Type : Peer IP Address
Bind Session Type : Dynamic
Bind Peer IP Address : 192.168.1.2
Bind Interface : -
Bind Source IP Address : 192.168.1.1
FSM Board ID : 1 ToS-EXP : 7
Min Tx Interval (ms) : 1000 Min Rx Interval (ms) : 1000
Actual Tx Interval (ms): 1000 Actual Rx Interval (ms): 1000
WTR Interval (ms) : - Detect Interval (ms) : 3000
Local Detect Multi : 3 Active Multi : 3
Destination Port : 4784 TTL : 253
Process PST : Disable Config PST : Disable
Last Local Diagnostic : No Diagnostic
Bind Application : STATICRT
Session Description : -

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 78


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

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

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10 20
#
bfd
#
interface Vlanif10
ip address 192.168.1.1 255.255.255.0
#
interface Vlanif20
ip address 10.7.1.1 255.255.255.0
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
ip route-static bfd 192.168.1.2 local-address 192.168.1.1
ip route-static 10.8.1.1 255.255.255.0 192.168.1.2 bfd enable
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 10 30
#
bfd
#
interface Vlanif10
ip address 192.168.1.2 255.255.255.0
#
interface Vlanif30
ip address 10.8.1.1 255.255.255.0
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
ip route-static bfd 192.168.1.1 local-address 192.168.1.2
ip route-static 10.7.1.1 255.255.255.0 192.168.1.1 bfd enable
#
return

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 79


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

2.9.4 Example for Configuring Dynamic BFD for IPv6 Static


Routes
Networking Requirements
As shown in Figure 2-9, SwitchA and SwitchB connect to each other and have static routes
configured between them. Customers require that a link fault between SwitchA and SwitchB
be detected within milliseconds and SwitchA and SwitchB dynamically update their routing
tables.

Figure 2-9 Networking diagram for configuring dynamic BFD for IPv6 static routes
10GE1/0/2 10GE1/0/1 10GE1/0/2
FC00:0:0:2007::1/64 FC00:0:0:2200::1/64 FC00:0:0:2008::1/64

SwitchA 10GE1/0/1 SwitchB


FC00:0:0:2200::2/64

Configuration Roadmap
To meet the preceding requirement, configure dynamic BFD for IPv6 static routes. The
configuration roadmap is as follows:
1. Configure dynamic BFD for IPv6 static routes so that link faults between SwitchA and
SwitchB can be detected within milliseconds to speed up route convergence.

Procedure
Step 1 Configure IPv6 addresses for interfaces. The configuration details are not provided here.

Step 2 Configure static IPv6 routes.


# Configure a static route destined for FC00:0:0:2008::1/64 on SwitchA.
[~SwitchA] ipv6 route-static fc00:0:0:2008:: 64 fc00:0:0:2200::2
[*SwitchA] commit

# Configure a static route destined for FC00:0:0:2007::1/64 on SwitchB.


[~SwitchB] ipv6 route-static fc00:0:0:2007:: 64 fc00:0:0:2200::1
[*SwitchB] commit

Step 3 Configure dynamic BFD for IPv6 static routes.


# Bind the static route to a BFD session on SwitchA.
[~SwitchA] bfd
[*SwitchA-bfd] quit
[*SwitchA] ipv6 route-static bfd fc00:0:0:2200::2 local-address fc00:0:0:2200::1
[*SwitchA] ipv6 route-static fc00:0:0:2008:: 64 fc00:0:0:2200::2 bfd enable
[*SwitchA] commit

# Bind the static route to a BFD session on SwitchB.


[~SwitchB] bfd
[*SwitchB-bfd] quit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 80


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

[*SwitchB] ipv6 route-static bfd fc00:0:0:2200::1 local-address fc00:0:0:2200::2


[*SwitchB] ipv6 route-static fc00:0:0:2007:: 64 fc00:0:0:2200::1 bfd enable
[*SwitchB] commit

Step 4 Verify the configuration.


# After the configurations are complete, run the display bfd session all verbose command on
SwitchA or SwitchB. You can view that the BFD session is established and in Up state. The
static route is bound to the BFD session.
Take the display information on SwitchA as an example. The command output shows that a
BFD session is set up.
<SwitchA> display bfd session all verbose
(w): State in WTR
(*): State is invalid
Total UP/DOWN Session Number : 1/0
--------------------------------------------------------------------------------
Name : dyn_16385 (Multiple Hops) State : Up
--------------------------------------------------------------------------------
Local Discriminator : 16385 Remote Discriminator : 16385
Session Detect Mode : Asynchronous Mode Without Echo Function
BFD Bind Type : Peer IP Address
Bind Session Type : Dynamic
Bind Peer IP Address : FC00:0:0:2200::2
Bind Interface : -
Bind Source IP Address : FC00:0:0:2200::1
FSM Board ID : 3 ToS-EXP : 6
Min Tx Interval (ms) : 1000 Min Rx Interval (ms) : 1000
Actual Tx Interval (ms): 1000 Actual Rx Interval (ms): 1000
WTR Interval (ms) : - Detect Interval (ms) : -
Local Detect Multi : 3 Active Multi : -
Destination Port : 4784 TTL : 253
Process PST : Disable Config PST : Disable
Last Local Diagnostic : No Diagnostic
Bind Application : STATICRTV6
Session Description : -
--------------------------------------------------------------------------------

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
bfd
#
interface 10GE1/0/1
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:2200::1/64
#
interface 10GE1/0/2
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:2007::1/64
#
ipv6 route-static bfd FC00:0:0:2200::2 local-address FC00:0:0:2200::1
ipv6 route-static FC00:0:0:2008:: 64 FC00:0:0:2200::2 bfd enable
#
return

l Configuration file of SwitchB


#
sysname SwitchB

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 81


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

#
bfd
#
interface 10GE1/0/1
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:2200::2/64
#
interface 10GE1/0/2
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:2008::1/64
#
ipv6 route-static bfd FC00:0:0:2200::1 local-address FC00:0:0:2200::2
ipv6 route-static FC00:0:0:2007:: 64 FC00:0:0:2200::1 bfd enable
#
return

2.9.5 Example for Configuring Static BFD for IPv4 Static Routes
Networking Requirements
As shown in Figure 2-10, you can configure the default static route on SwitchA so that
SwitchA can connect to the external network. Millisecond-level link fault detection must be
implemented between SwitchA and SwitchB to improve convergence speed.

Figure 2-10 Networking diagram for configuring static BFD for static routes

10GE1/0/1 10GE1/0/1 10GE1/0/2


VLANIF10 VLANIF10 VLANIF20
10.1.1.1/24 10.1.1.2/24 10.2.2.2/24

SwitchA SwitchB

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a BFD session between SwitchA and SwitchB.
2. Configure a default route from SwitchA to another device and bind a BFD session to the
default route. This configuration can implement millisecond-level link fault detection
and improve convergence speed of static routes.

Procedure
Step 1 Create VLANs, add interfaces to the VLANs, and assign IP addresses to the VLANIF
interfaces. (Details are not mentioned here.)
Step 2 Configure device names. (Details are not mentioned here.)

Step 3 Configure a BFD session between SwitchA and SwitchB.


# Create a BFD session on SwitchA.
<SwitchA> system-view
[~SwitchA] bfd

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 82


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

[*SwitchA-bfd] quit
[*SwitchA] bfd aa bind peer-ip 10.1.1.2
[*SwitchA-bfd-session-aa] discriminator local 10
[*SwitchA-bfd-session-aa] discriminator remote 20
[*SwitchA-bfd-session-aa] commit
[~SwitchA-bfd-session-aa] quit

# Create a BFD session on SwitchB.


<SwitchB> system-view
[~SwitchB] bfd
[*SwitchB-bfd] quit
[*SwitchB] bfd bb bind peer-ip 10.1.1.1
[*SwitchB-bfd-session-bb] discriminator local 20
[*SwitchB-bfd-session-bb] discriminator remote 10
[*SwitchB-bfd-session-bb] commit
[~SwitchB-bfd-session-bb] quit

Step 4 Configure a default static route and bind a BFD session to the default static route.
# Configure a default static route to the external network on SwitchA and bind the default
static route to the BFD session named aa.
[~SwitchA] ip route-static 0.0.0.0 0 10.1.1.2 track bfd-session aa
[*SwitchA] commit

Step 5 Verify the configuration.


# After the configuration is complete, run the display bfd session all command on SwitchA
and SwitchB. The command output shows that the BFD session has been established and its
status is Up. Run the display current-configuration | include bfd command. The command
output shows that the BFD session has been bound to the static route.
Take the display information on SwitchA as an example.
[~SwitchA] display bfd session all
S: Static session
D: Dynamic session
IP: IP session
IF: Single-hop session
PEER: Multi-hop session
AUTO: Automatically negotiated session
--------------------------------------------------------------------------------
Local Remote PeerIpAddr State Type InterfaceName
--------------------------------------------------------------------------------
10 20 10.1.1.2 Up S/IP-PEER -
--------------------------------------------------------------------------------
[~SwitchA] display current-configuration | include bfd
bfd
bfd aa bind peer-ip 10.1.1.2
ip route-static 0.0.0.0 0.0.0.0 10.1.1.2 track bfd-session aa

# Check the IP routing table on SwitchA, and you can find that the static route exists in the
routing table.
[~SwitchA] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table: _Public_
Destinations : 3 Routes : 3
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 10.1.1.2 Vlanif10
10.1.1.0/24 Direct 0 0 D 10.1.1.1 Vlanif10
10.1.1.1/32 Direct 0 0 D 127.0.0.1 Vlanif10

Run the shutdown command on 10GE1/0/1 of SwitchB to simulate a link fault.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 83


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

[~SwitchB] interface 10GE 1/0/1


[~SwitchB-10GE1/0/1] shutdown
[*SwitchB-10GE1/0/1] commit

# Check the routing table on SwitchA, and you can find that the default static route 0.0.0.0/0
does not exist. This is because when the default static route is bound to a BFD session, BFD
rapidly notifies that the bound static route is unavailable after BFD detects a link fault.
[~SwitchA] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table: _Public_
Destinations : 2 Routes : 2
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.1.1.0/24 Direct 0 0 D 10.1.1.1 Vlanif10
10.1.1.1/32 Direct 0 0 D 127.0.0.1 Vlanif10

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10
#
bfd
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
ip route-static 0.0.0.0 0.0.0.0 10.1.1.2 track bfd-session aa
#
bfd aa bind peer-ip 10.1.1.2
discriminator local 10
discriminator remote 20
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 10 20
#
bfd
#
interface Vlanif10
ip address 10.1.1.2 255.255.255.0
#
interface Vlanif20
ip address 10.2.2.2 255.255.255.0
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 84


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

bfd bb bind peer-ip 10.1.1.1


discriminator local 20
discriminator remote 10
#
return

2.9.6 Example for Configuring Static BFD for IPv6 Static Routes
Networking Requirements
As shown in Figure 2-11, SwitchA and SwitchB connect to each other and have static routes
configured between them. Customers require that a link fault between SwitchA and SwitchB
be detected within milliseconds and SwitchA and SwitchB dynamically update their routing
tables.

Figure 2-11 Networking diagram for configuring static BFD for IPv6 static routes

10GE1/0/1 10GE1/0/2
FC00:0:0:2001::1/64 FC00:0:0:2002::1/64
10GE1/0/1
SwitchA FC00:0:0:2001::2/64 SwitchB

Configuration Roadmap
To meet the preceding requirement, configure static BFD for IPv6 static routes. The
configuration roadmap is as follows:
1. Configure a BFD session between SwitchA and SwitchB to implement millisecond-level
fault detection.
2. Configure a static route from SwitchA to SwitchB and bind the static route to the BFD
session so that SwitchA and SwitchB can update their routing tables after a fault is
detected.

Procedure
Step 1 Configure IPv6 addresses for interfaces. The configuration details are not provided here.
Step 2 Configure a BFD session between SwitchA and SwitchB.
# On SwitchA, create a BFD session with SwitchB.
<SwitchA> system-view
[~SwitchA] bfd
[*SwitchA-bfd] quit
[*SwitchA] bfd aa bind peer-ipv6 fc00:0:0:2001::2
[*SwitchA-bfd-session-aa] discriminator local 10
[*SwitchA-bfd-session-aa] discriminator remote 20
[*SwitchA-bfd-session-aa] commit
[~SwitchA-bfd-session-aa] quit

# On SwitchB, create a BFD session with SwitchA.


<SwitchB> system-view
[~SwitchB] bfd
[*SwitchB-bfd] quit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 85


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

[*SwitchB] bfd bb bind peer-ipv6 fc00:0:0:2001::1


[*SwitchB-bfd-session-bb] discriminator local 20
[*SwitchB-bfd-session-bb] discriminator remote 10
[*SwitchB-bfd-session-bb] commit
[~SwitchB-bfd-session-bb] quit

Step 3 Configure a default static route and bind the route to the BFD session.

# On SwitchA, configure a default static route to SwitchB and bind the route to the BFD
session named aa.
[~SwitchA] ipv6 route-static 0::0 0 fc00:0:0:2001::2 track bfd-session aa
[*SwitchA] commit
[~SwitchA] quit

Step 4 Verify the configuration.

# After the configurations are complete, run the display bfd session all command on SwitchA
or SwitchB. You can view that the BFD session has been established and in Up state. Run the
display current-configuration | include bfd command in the system view. You can view that
the default static route has already been bound to the BFD session.

Take the display on SwitchA as an example:


<SwitchA> display bfd session all
S: Static
session

D: Dynamic
session

IP: IP
session

IF: Single-hop
session

PEER: Multi-hop
session

LDP: LDP
session

LSP: Label switched


path

TE: Traffic
Engineering

AUTO: Automatically negotiated


session

VXLAN: VXLAN
session

VSI: VSI PW
session

(w): State in
WTR

(*): State is
invalid

Total UP/DOWN Session Number :


1/0

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

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 86


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Local Remote PeerIpAddr State Type


InterfaceName
--------------------------------------------------------------------------------

10 20
FC00:0:0:2004::2

Up S/IP-PEER
-
--------------------------------------------------------------------------------

<SwitchA> display current-configuration | include bfd


bfd
bfd aa bind peer-ipv6 FC00:0:0:2001::2
ipv6 route-static :: 0 FC00:0:0:2001::2 track bfd-session aa

# Check the IPv6 routing table on SwitchA. You can view that the default static route exists in
the routing table.
<SwitchA> display ipv6 routing-table
Route
Flags: R - relay, D - download to fib, T - to
vpn-instance, B - black hole route
----------------------------------------------------------------------------
Routing Table : _public_
Destinations : 5 Routes : 5

Destination : :: PrefixLength : 0
NextHop : FC00:0:0:2001::2 Preference : 60
Cost : 0 Protocol : Static
RelayNextHop : :: TunnelID : 0x0
Interface : 10GE1/0/1 Flags : RD

Destination : ::1 PrefixLength : 128


NextHop : ::1 Preference : 0
Cost : 0 Protocol : Direct
RelayNextHop : :: TunnelID : 0x0
Interface : InLoopBack0 Flags : D

Destination : FC00:0:0:2001:: PrefixLength : 64


NextHop : FC00:0:0:2001::1 Preference : 0
Cost : 0 Protocol : Direct
RelayNextHop : :: TunnelID : 0x0
Interface : 10GE1/0/1 Flags : D

Destination : FC00:0:0:2001::1 PrefixLength : 128


NextHop : ::1 Preference : 0
Cost : 0 Protocol : Direct
RelayNextHop : :: TunnelID : 0x0
Interface : 10GE1/0/1 Flags : D

Destination : FE80:: PrefixLength : 10


NextHop : :: Preference : 0
Cost : 0 Protocol : Direct
RelayNextHop : :: TunnelID : 0x0
Interface : NULL0 Flags : D

# Run the shutdown command on 10GE1/0/1 of SwitchB to simulate a link fault.


[~SwitchB] interface 10ge1/0/1
[~SwitchB-10GE1/0/1] shutdown
[*SwitchB-10GE1/0/1] commit

# Check the routing table on SwitchA. You can view that the default static route 0::0/0 does
not exist. This is because the default static route is bound to the BFD session. After BFD
detects a link fault, BFD rapidly notifies SwitchA that the static route is unavailable.
<SwitchA> display ipv6 routing-table

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 87


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Route
Flags: R - relay, D - download to fib, T - to
vpn-instance, B - black hole route
----------------------------------------------------------------------------
Routing Table : _public_
Destinations : 1 Routes : 1

Destination : ::1 PrefixLength : 128


NextHop : ::1 Preference : 0
Cost : 0 Protocol : Direct
RelayNextHop : :: TunnelID : 0x0
Interface : InLoopBack0 Flags : D

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
bfd
#
interface 10GE1/0/1
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:2001::1/64
#
bfd aa bind peer-ipv6 FC00:0:0:2001::2
discriminator local 10
discriminator remote 20
#
ipv6 route-static :: 0 FC00:0:0:2001::2 track bfd-session aa
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
bfd
#
interface 10GE1/0/1
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:2001::2/64
#
interface 10GE1/0/2
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:2002::1/64
#
bfd bb bind peer-ipv6 FC00:0:0:2001::1
discriminator local 20
discriminator remote 10
#
return

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 88


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

2.9.7 Example for Configuring FRR for IPv4 Static Routes on the
Public Network

Networking Requirements
As shown in Figure 2-12, two static routes with next hops being SwitchA and SwitchB
respectively are configured on SwitchT. Link B functions as the backup of link A. If link A is
faulty, traffic can be switched to link B in a timely manner.

Figure 2-12 Networking diagram for configuring FRR for IPv4 static routes on the public
network

10GE1/0/1 10GE1/0/2
VLANIF20 VLANIF40
192.168.10.2/24 192.168.11.2/24
10GE1/0/2 10GE1/0/2
VLANIF20
SwitchA VLANIF40
192.168.10.1/24 Link A 192.168.11.1/24

10GE1/0/1 SwitchT SwitchC 10GE1/0/1


VLANIF10 10GE1/0/3 Link B 10GE1/0/3 VLANIF60
172.16.1.1/24 VLANIF30 VLANIF50 172.17.1.1/24
SwitchB
192.168.20.1/24 192.168.21.1/24
10GE1/0/1 10GE1/0/2
VLANIF30 VLANIF50
192.168.20.2/24 192.168.21.2/24

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure two static routes with next hops being SwitchA and SwitchB respectively on
SwitchT so that the devices can communicate with each other.
2. Set a higher preference for link A on SwitchT to ensure that link A functions as the
primary link and link B functions as the backup of link A.
3. Enable FRR for static routes on SwitchT so that traffic can be quickly switched to link B
if link A is faulty.

Procedure
Step 1 Create VLANs, add interfaces to the VLANs, and assign IP addresses to the VLANIF
interfaces. (Details are not mentioned here.)
Step 2 Configure device names. (Details are not mentioned here.)

Step 3 Configure static routes.


# Configure static routes on SwitchA.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 89


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

[~SwitchA] ip route-static 172.16.1.0 24 vlanif 20 192.168.10.1


[*SwitchA] ip route-static 172.17.1.0 24 vlanif 40 192.168.11.1
[*SwitchA] commit

# Configure static routes on SwitchB.


[~SwitchB] ip route-static 172.16.1.0 24 vlanif 30 192.168.20.1
[*SwitchB] ip route-static 172.17.1.0 24 vlanif 50 192.168.21.1
[*SwitchB] commit

Configure static routes on Switch C.


[~SwitchC] ip route-static 172.16.1.0 24 vlanif 40 192.168.11.2
[*SwitchC] ip route-static 172.16.1.0 24 vlanif 50 192.168.21.2
[*SwitchC] commit

# Configure static routes on SwitchT.


[~SwitchT] ip route-static 172.17.1.0 24 vlanif 20 192.168.10.2
[*SwitchT] ip route-static 172.17.1.0 24 vlanif 30 192.168.20.2
[*SwitchT] commit

# Check the IP routing table on SwitchT. You can view that the two static routes are in load
balancing mode.
[~SwitchT] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table : _public_
Destinations : 11 Routes : 12

Destination/Mask Proto Pre Cost Flags NextHop Interface

127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0


127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
172.17.1.0/24 Static 60 0 D 192.168.10.2 Vlanif20
Static 60 0 D 192.168.20.2 Vlanif30
192.168.10.0/24 Direct 0 0 D 192.168.10.1 Vlanif20
192.168.10.1/32 Direct 0 0 D 127.0.0.1 Vlanif20
192.168.10.255/32 Direct 0 0 D 127.0.0.1 Vlanif20
192.168.20.0/24 Direct 0 0 D 192.168.20.1 Vlanif30
192.168.20.1/32 Direct 0 0 D 127.0.0.1 Vlanif30
192.168.20.255/32 Direct 0 0 D 127.0.0.1 Vlanif30

Step 4 Change the preferences of IPv4 static routes.


# Change the preferences of static routes on SwitchT.
[~SwitchT] ip route-static 172.17.1.0 24 vlanif 20 192.168.10.2 preference 40
[*SwitchT] commit

# Check the IP routing table on SwitchT, and you can view that preferences of the static
routes are changed.
[~SwitchT] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table : _public_
Destinations : 10 Routes : 10

Destination/Mask Proto Pre Cost Flags NextHop Interface

127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0


127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 90


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0


172.17.1.0/24 Static 40 0 D 192.168.10.2 Vlanif20
192.168.10.0/24 Direct 0 0 D 192.168.10.1 Vlanif20
192.168.10.1/32 Direct 0 0 D 127.0.0.1 Vlanif20
192.168.10.255/32 Direct 0 0 D 127.0.0.1 Vlanif20
192.168.20.0/24 Direct 0 0 D 192.168.20.1 Vlanif30
192.168.20.1/32 Direct 0 0 D 127.0.0.1 Vlanif30
192.168.20.255/32 Direct 0 0 D 127.0.0.1 Vlanif30

Step 5 Enable FRR for IPv4 static routes.

# Enable FRR for static routes on SwitchT.


[~SwitchT] ip route-static frr
[*SwitchT] commit

# Check information about the backup outbound interface and backup next hop on SwitchT.
[~SwitchT] display ip routing-table 172.17.1.0 verbose
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table : _public_
Summary Count : 1

Destination: 172.17.1.0/24
Protocol: Static Process ID: 0
Preference: 40 Cost: 0
NextHop: 192.168.10.2 Neighbour: 0.0.0.0
State: Active Adv Age: 00h00m03s
Tag: 0 Priority: medium
Label: NULL QoSInfo: 0x0
IndirectID: 0x31000032
RelayNextHop: 0.0.0.0 Interface: Vlanif20
TunnelID: 0x0 Flags: D
BkNextHop: 192.168.20.2 BkInterface: Vlanif30
BkLabel: NULL SecTunnelID: 0x0
BkPETunnelID: 0x0 BkPESecTunnelID: 0x0
BkIndirectID: 0x32000033

Step 6 If link A is faulty, traffic can be quickly switched to link B.


[~SwitchT] interface 10GE 1/0/2
[~SwitchT-10GE1/0/2] shutdown
[*SwitchT-10GE1/0/2] commit
[~SwitchT-10GE1/0/2] quit

# Check information about the route to 172.17.1.0/24 on SwitchT.


[~SwitchT] display ip routing-table 172.17.1.0 verbose
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table : _public_
Summary Count : 1

Destination: 172.17.1.0/24
Protocol: Static Process ID: 0
Preference: 60 Cost: 0
NextHop: 192.168.20.2 Neighbour: 0.0.0.0
State: Active Adv Age: 00h00m07s
Tag: 0 Priority: medium
Label: NULL QoSInfo: 0x0
IndirectID: 0x32000033
RelayNextHop: 0.0.0.0 Interface: Vlanif30
TunnelID: 0x0 Flags: D

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 91


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 20 40
#
interface Vlanif20
ip address 192.168.10.2 255.255.255.0
#
interface Vlanif40
ip address 192.168.11.2 255.255.255.0
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 40
#
ip route-static 172.16.1.0 255.255.255.0 vlanif 20 192.168.10.1
ip route-static 172.17.1.0 255.255.255.0 vlanif 40 192.168.11.1
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 30 50
#
interface Vlanif30
ip address 192.168.20.2 255.255.255.0
#
interface Vlanif50
ip address 192.168.21.2 255.255.255.0
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 30
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 50
#
ip route-static 172.16.1.0 255.255.255.0 vlanif 30 192.168.20.1
ip route-static 172.17.1.0 255.255.255.0 vlanif 50 192.168.21.1
#
return

l Configuration file of SwitchC


#
sysname SwitchC
#
vlan batch 40 50 60
#
interface Vlanif40
ip address 192.168.11.1 255.255.255.0
#
interface Vlanif50
ip address 192.168.21.1 255.255.255.0
#
interface Vlanif60
ip address 172.17.1.1 255.255.255.0
#
interface 10GE1/0/1
port link-type trunk

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 92


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

port trunk allow-pass vlan 60


#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 40
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 50
#
ip route-static 172.16.1.0 255.255.255.0 vlanif 40 192.168.11.2
ip route-static 172.16.1.0 255.255.255.0 vlanif 50 192.168.21.2
#
return

l Configuration file of SwitchT


#
sysname SwitchT
#
vlan batch 10 20 30
#
interface Vlanif10
ip address 172.16.1.1 255.255.255.0
#
interface Vlanif20
ip address 192.168.10.1 255.255.255.0
#
interface Vlanif30
ip address 192.168.20.1 255.255.255.0
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 30
#
ip route-static frr
ip route-static 172.17.1.0 255.255.255.0 vlanif 20 192.168.10.2 preference 40
ip route-static 172.17.1.0 255.255.255.0 vlanif 30 192.168.20.2
#
return

2.9.8 Example for Configuring NQA for IPv4 Static Routes


Networking Requirements
As shown in Figure 2-13, static routes destined for clients are configured on SwitchB and
SwitchC. SwitchB is the master switch and SwitchC is the backup switch. Normally, traffic
must be forwarded along the primary link SwitchB→SwitchD. If the primary link fails, traffic
is switched to the backup link SwitchC→SwitchD.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 93


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Figure 2-13 Networking diagram for configuring NQA for static IPv4 routes

IP Network

10GE1/0/1 10GE1/0/2
VLANIF30 VLANIF40
172.16.3.1/24 172.16.4.1/24
SwitchA
10GE1/0/1 GE1/0/2
VLANIF30 VLANIF40
172.16.3.2/24 172.16.4.2/24
SwitchB /3 SwitchC
E 1/0 0
10GE1/0/2 G 6 10GE1/0/1
10
GE 10 ANIF .1/24
VLANIF10 V
1 LA 1/0 VL 16.6 VLANIF20
172.16.1.1/24 72.1 NIF /3 2. V 172.16.2.1/24
6.5 50 17 17 LAN
.1/ 2.1 IF
VLANIF10 24 0 6.5 50 VLANIF20
172.16.1.2/24 I F6 /24 .2/
24 172.16.2.2/24
L AN .6.2
V 16
VLANIF70 2. VLANIF80
17
172.16.7.1/24 SwitchD SwitchE 172.16.8.1/24

...... ......

Client1 Client10 Client91 Client100

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure IP addresses and OSPF on each switch, and configure the cost of each link so
that SwitchB functions as the master switch and SwitchC functions as the backup switch.
2. Create an ICMP NQA test instance to monitor the link between SwitchB and SwitchD,
and configure static routes destined for clients on SwitchB SwitchC. Associate the static
route with the NQA test instance to implement fast link fault detection and service
switchover.
NOTE

When a static route is associated with an NQA test instance, only ICMP test instances are used to test
whether there are reachable routes between the source and destination.

Procedure
Step 1 Create VLANs and add interfaces to the VLANs.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan 30
[*SwitchA-vlan30] quit
[*SwitchA] vlan 40
[*SwitchA-vlan40] quit
[*SwitchA] interface 10ge 1/0/1

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 94


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

[*SwitchA-10GE1/0/1] port link-type trunk


[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 30
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] port trunk allow-pass vlan 40
[*SwitchA-10GE1/0/2] quit
[*SwitchA] commit

The configurations of SwitchB and SwitchC are similar to that of SwitchA, and are not
mentioned here.
Step 2 Assign IPv4 addresses to the VLANIF interfaces.
[~SwitchA] interface vlanif 30
[*SwitchA-Vlanif30] ip address 172.16.3.1 24
[*SwitchA-Vlanif30] quit
[*SwitchA] interface vlanif 40
[*SwitchA-Vlanif40] ip address 172.16.4.1 24
[*SwitchA-Vlanif40] quit
[*SwitchA] commit

The configurations of SwitchB and SwitchC are similar to that of SwitchA, and are not
mentioned here.
Step 3 Create an NQA test instance on SwitchB to test the link between SwitchB and SwitchD.
[~SwitchB] nqa test-instance user test
[*SwitchB-nqa-user-test] test-type icmp
[*SwitchB-nqa-user-test] destination-address ipv4 172.16.1.2
[*SwitchB-nqa-user-test] frequency 10
[*SwitchB-nqa-user-test] probe-count 2
[*SwitchB-nqa-user-test] interval seconds 5
[*SwitchB-nqa-user-test] timeout 4
[*SwitchB-nqa-user-test] start now
[*SwitchB-nqa-user-test] commit
[~SwitchB-nqa-user-test] quit

Step 4 Configure IPv4 static routes.


# Configure an IPv4 static route on SwitchB and associate it with the NQA test instance.
[~SwitchB] ip route-static 172.16.7.0 255.255.255.0 vlanif 10 172.16.1.2 track
nqa user test
[*SwitchB] commit

# Configure an IPv4 static route on SwitchC.


[~SwitchC] ip route-static 172.16.7.0 255.255.255.0 vlanif 60 172.16.6.2
[*SwitchC] commit

Step 5 Configure a dynamic routing protocol on SwitchA, SwitchB, and SwitchC. OSPF is used in
this example.
# Configure OSPF on SwitchA.
[~SwitchA] ospf 1
[*SwitchA-ospf-1] area 0.0.0.0
[*SwitchA-ospf-1-area-0.0.0.0] network 172.16.3.0 0.0.0.255
[*SwitchA-ospf-1-area-0.0.0.0] network 172.16.4.0 0.0.0.255
[*SwitchA-ospf-1-area-0.0.0.0] quit
[*SwitchA-ospf-1] quit
[*SwitchA] commit

# Configure OSPF on SwitchB.


[~SwitchB] ospf 1
[*SwitchB-ospf-1] area 0.0.0.0
[*SwitchB-ospf-1-area-0.0.0.0] network 172.16.3.0 0.0.0.255
[*SwitchB-ospf-1-area-0.0.0.0] quit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 95


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

[*SwitchB-ospf-1] quit
[*SwitchB] commit

# Configure OSPF on SwitchC.


[~SwitchC] ospf 1
[*SwitchC-ospf-1] area 0.0.0.0
[*SwitchC-ospf-1-area-0.0.0.0] network 172.16.4.0 0.0.0.255
[*SwitchC-ospf-1-area-0.0.0.0] quit
[*SwitchC-ospf-1] quit
[*SwitchC] commit

Step 6 Configure OSPF on SwitchB and SwitchC to import static routes.


# Configure OSPF on SwitchB to import a static route, and set the cost of the static route to
10.
[~SwitchB] ospf 1
[*SwitchB-ospf-1] import-route static cost 10
[*SwitchB-ospf-1] commit
[~SwitchB-ospf-1] quit

# Configure OSPF on SwitchC to import a static route, and set the cost of the static route to
20.
[~SwitchC] ospf 1
[*SwitchC-ospf-1] import-route static cost 20
[*SwitchC-ospf-1] commit
[~SwitchC-ospf-1] quit

Step 7 Verify the configuration.


After the configuration is complete, run the display current-configuration | include nqa
command in the system view on SwitchB. The command output shows that the IPv4 static
route has been associated with the NQA test instance. Run the display nqa results command.
The command output shows that an NQA test instance has been created.
# Display configurations of NQA for IPv4 static routes.
[~SwitchB] display current-configuration | include nqa
ip route-static 172.16.7.0 255.255.255.0 Vlanif 10 172.16.1.2 track nqa user test
nqa test-instance user test

# Display the NQA test results.


[~SwitchB] display nqa results test-instance user test

NQA entry(user, test) : test flag is active ,test type is ICMP


1 . Test 6645 result The test is finished
Send operation times: 2 Receive response times: 2
Completion:success RTD over thresholds number:0
Attempts number:1 Drop operation number:0
Disconnect operation number:0 Operation timeout number:0
System busy operation number:0 Connection fail number:0
Operation sequence errors number:0 RTT Stats errors number:0
Destination ip address:172.16.1.2
Min/Max/Average completion Time: 1/1/1
Sum/Square-Sum completion time: 2/2
Last response packet receiving time: 2012-11-14 04:20:36.9
Lost packet ratio: 0 %

The command output shows "Lost packet ratio 0 %", indicating that the link is running
properly.
# Check the routing table on SwitchB.
[~SwitchB] display ip routing-table

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 96


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Proto: Protocol Pre: Preference


Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table : _public_
Destinations : 15 Routes : 15

Destination/Mask Proto Pre Cost Flags NextHop Interface

127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0


127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
172.16.1.0/24 Direct 0 0 D 172.16.1.1 Vlanif10
172.16.1.1/32 Direct 0 0 D 127.0.0.1 Vlanif10
172.16.1.255/32 Direct 0 0 D 127.0.0.1 Vlanif10
172.16.3.0/24 Direct 0 0 D 172.16.3.2 Vlanif30
172.16.3.2/32 Direct 0 0 D 127.0.0.1 Vlanif30
172.16.3.255/32 Direct 0 0 D 127.0.0.1 Vlanif30
172.16.4.0/24 OSPF 10 2 D 172.16.3.1 Vlanif30
172.16.5.0/24 Direct 0 0 D 172.16.5.1 Vlanif50
172.16.5.1/32 Direct 0 0 D 127.0.0.1 Vlanif50
172.16.5.255/32 Direct 0 0 D 127.0.0.1 Vlanif50
172.16.7.0/24 Static 60 0 D 172.16.1.2 Vlanif10
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

The command output shows that the static route exists in the routing table.
# Check the routing table on SwitchA.
[~SwitchA] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table : _public_
Destinations : 11 Routes : 11

Destination/Mask Proto Pre Cost Flags NextHop Interface

127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0


127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
172.16.3.0/24 Direct 0 0 D 172.16.3.1 Vlanif30
172.16.3.1/32 Direct 0 0 D 127.0.0.1 Vlanif30
172.16.3.255/32 Direct 0 0 D 127.0.0.1 Vlanif30
172.16.4.0/24 Direct 0 0 D 172.16.4.1 Vlanif40
172.16.4.1/32 Direct 0 0 D 127.0.0.1 Vlanif40
172.16.4.255/32 Direct 0 0 D 127.0.0.1 Vlanif40
172.16.7.0/24 O_ASE 150 10 D 172.16.3.2 Vlanif30
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

The command output shows that a route to 172.16.7.0/24 exists in the routing table. The
route's next hop address is 172.16.3.2 and cost is 10. Traffic is preferentially transmitted along
the link SwitchB->SwitchD.
# Shut down 10GE1/0/2 on SwitchB to simulate a link fault.
[~SwitchB] interface 10ge 1/0/2
[~SwitchB-10GE1/0/2] shutdown
[*SwitchB-10GE1/0/2] commit
[~SwitchB] quit

# Check the NQA test results.


[~SwitchB] display nqa results test-instance user test

NQA entry(user, test) : testflag is active ,testtype is ICMP


1 . Test 7160 result The test is finished
Send operation times: 2 Receive response times: 0

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 97


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Completion:failed RTD over thresholds number:0


Attempts number:1 Drop operation number:0
Disconnect operation number:0 Operation timeout number:2
System busy operation number:0 Connection fail number:0
Operation sequence errors number:0 RTT Stats errors number:0
Destination ip address:172.16.1.2
Min/Max/Average completion Time: 0/0/0
Sum/Square-Sum completion time: 0/0
Last response packet receiving time: 0000-00-00 00:00:00.0
Lost packet ratio: 100 %

The command output shows "Completion:failed" and "Lost packet ratio: 100 %," indicating
that the link is faulty.

# Check the routing table on SwitchB.


[~SwitchB] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table : _public_
Destinations : 12 Routes : 12

Destination/Mask Proto Pre Cost Flags NextHop Interface

127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0


127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
172.16.3.0/24 Direct 0 0 D 172.16.3.2 Vlanif30
172.16.3.2/32 Direct 0 0 D 127.0.0.1 Vlanif30
172.16.3.255/32 Direct 0 0 D 127.0.0.1 Vlanif30
172.16.4.0/24 OSPF 10 2 D 172.16.3.1 Vlanif30
172.16.5.0/24 Direct 0 0 D 172.16.5.1 Vlanif50
172.16.5.1/32 Direct 0 0 D 127.0.0.1 Vlanif50
172.16.5.255/32 Direct 0 0 D 127.0.0.1 Vlanif50
172.16.7.0/24 O_ASE 150 20 D 172.16.3.1 Vlanif30
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

The command output shows that the static route has been deleted.

# Check the routing table on SwitchA.


[~SwitchA] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table : _public_
Destinations : 11 Routes : 11

Destination/Mask Proto Pre Cost Flags NextHop Interface

127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0


127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
172.16.3.0/24 Direct 0 0 D 172.16.3.1 Vlanif30
172.16.3.1/32 Direct 0 0 D 127.0.0.1 Vlanif30
172.16.3.255/32 Direct 0 0 D 127.0.0.1 Vlanif30
172.16.4.0/24 Direct 0 0 D 172.16.4.1 Vlanif40
172.16.4.1/32 Direct 0 0 D 127.0.0.1 Vlanif40
172.16.4.255/32 Direct 0 0 D 127.0.0.1 Vlanif40
172.16.7.0/24 O_ASE 150 20 D 172.16.4.2 Vlanif40
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

On SwitchB, the NQA test instance is associated with a static route. When NQA detects a link
fault, it immediately notifies SwitchB that the static route bound to the link is unreachable.
SwitchA cannot learn the route to 172.16.7.0/24 from SwitchB, but it can learn the route to

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 98


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

172.16.7.0/24 from SwitchC. Therefore, you can view that the route to 172.16.7.0/24 has a
next hop 172.16.4.2 and cost 20. Service traffic is then switched to the link SwitchC-
>SwitchD.

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 30 40
#
interface Vlanif30
ip address 172.16.3.1 255.255.255.0
#
interface Vlanif40
ip address 172.16.4.1 255.255.255.0
#
interface 10GE1/0/1
port link-type
trunk
port trunk allow-pass vlan 30
#
interface 10GE1/0/2
port link-type
trunk
port trunk allow-pass vlan 40
#
ospf 1
area 0.0.0.0
network 172.16.3.0 0.0.0.255
network 172.16.4.0 0.0.0.255
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 10 30 50
#
interface Vlanif10
ip address 172.16.1.1 255.255.255.0
#
interface Vlanif30
ip address 172.16.3.2 255.255.255.0
#
interface Vlanif50
ip address 172.16.5.1 255.255.255.0
#
interface 10GE1/0/1
port link-type
trunk
port trunk allow-pass vlan 30
#
interface 10GE1/0/2
port link-type
trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/3
port link-type
trunk
port trunk allow-pass vlan 50
#

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 99


CloudEngine 12800 and 12800E Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

ospf 1
import-route static cost 10
area 0.0.0.0
network 172.16.3.0 0.0.0.255
#
ip route-static 172.16.7.0 255.255.255.0 Vlanif 10 172.16.1.2 track nqa user
test
#
nqa test-instance user test
test-type icmp
destination-address ipv4 172.16.1.2
interval seconds 5
timeout 4
probe-count 2
frequency 10
start now
#
return

l Configuration file of Switch C


#
sysname SwitchC
#
vlan batch 20 40 60
#
interface Vlanif20
ip address 172.16.2.1 255.255.255.0
#
interface Vlanif40
ip address 172.16.4.2 255.255.255.0
#
interface Vlanif60
ip address 172.16.6.1 255.255.255.0
#
interface 10GE1/0/1
port link-type
trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/2
port link-type
trunk
port trunk allow-pass vlan 40
#
interface 10GE1/0/3
port link-type
trunk
port trunk allow-pass vlan 60
#
ospf 1
import-route static cost 20
area 0.0.0.0
network 172.16.4.0 0.0.0.255
#
ip route-static 172.16.7.0 255.255.255.0 Vlanif 60 172.16.6.2
#
return

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 100

You might also like