06-Layer 3—IP Routing Configuration Guide

HomeSupportSwitchesS12500R SeriesConfigure & DeployConfiguration GuidesH3C S12500R Switch Router Series Configuration Guides(R51xx)-6W10106-Layer 3—IP Routing Configuration Guide
01-Basic IP routing configuration
Title Size Download
01-Basic IP routing configuration 160.89 KB

Contents

Configuring basic IP routing· 1

About IP routing· 1

Routing table· 1

Route categories· 1

Dynamic routing protocols· 1

Route preference· 2

Load sharing· 2

Route backup· 3

Route recursion· 3

Route redistribution· 3

Extension attribute redistribution· 3

Configuring load sharing· 3

Configuring load sharing mode· 3

Enabling IPv4 bandwidth-based load sharing· 4

Enabling symmetric load sharing· 4

Verifying and maintaining load sharing· 5

Setting the maximum lifetime for routes and labels in the RIB· 5

Setting the maximum lifetime for routes in the FIB· 6

Enabling the RIB to flush route attribute information to the FIB· 6

Enabling the enhanced ECMP mode· 7

About enhanced ECMP mode· 7

Restrictions and guidelines for enabling the enhanced ECMP mode· 7

Enabling the IPv4 and IPv6 enhanced ECMP mode· 7

Configuring RIB NSR· 7

Configuring inter-protocol FRR· 8

Enabling IPv6 route fast switchover 9

Configuring routing policy-based recursive lookup· 9

Configuring next hop recursion loop suppression· 10

About next hop recursion loop suppression· 10

Restrictions and guidelines for configuring next hop recursion loop suppression· 10

Disabling suppression for next hop recursion loop (IPv4) 10

Setting the interval for clearing the recursion loop counter (IPv4) 11

Disabling suppression for next hop recursion loop (IPv6) 11

Setting the interval for clearing the recursion loop counter (IPv6) 11

Setting the maximum number of active routes supported by the device· 12

Verifying and maintaining basic IP routing (IPv4) 12

Displaying IPv4 routing table information· 12

Displaying ECMP route information· 13

Displaying IPv4 RIB information· 13

Displaying and clearing IPv4 routing table statistics· 13

Verifying and maintaining basic IP routing (IPv6) 14

Displaying IPv6 routing table information· 14

Displaying IPv6 ECMP route information· 14

Displaying IPv6 RIB information· 14

Displaying and clearing IPv6 routing table statistics· 15

Basic IP routing configuration examples· 15

Example: Configuring load sharing based on source and destination addresses· 15

 


Configuring basic IP routing

About IP routing

IP routing directs IP packet forwarding on routers. Based on the destination IP address in the packet, a router looks up a route for the packet in a routing table and forwards the packet to the next hop. Routes are path information used to direct IP packets.

Routing table

A RIB contains the global routing information and related information, including route recursion, route redistribution, and route extension information. The router selects optimal routes from the routing table and puts them into the FIB table. It uses the FIB table to forward packets. For more information about the FIB table, see Layer 3—IP Services Configuration Guide.

Route categories

Table 1 categorizes routes by different criteria.

Table 1 Route categories

Criterion

Categories

Origin

·     Direct route—A direct route is discovered by the data link protocol on an interface, and is also called an interface route.

·     Static route—A static route is manually configured by an administrator.

·     Dynamic route—A dynamic route is dynamically discovered by a routing protocol.

Destination

·     Network route—The destination is a network. The subnet mask is less than 32 bits.

·     Host route—The destination is a host. The subnet mask is 32 bits.

Whether the destination is directly connected

·     Direct route—The destination is directly connected.

·     Indirect route—The destination is indirectly connected.

 

Dynamic routing protocols

Static routes work well in small, stable networks. They are easy to configure and require fewer system resources. However, in networks where topology changes occur frequently, a typical practice is to configure a dynamic routing protocol. Compared with static routing, a dynamic routing protocol is complicated to configure, requires more router resources, and consumes more network resources.

Dynamic routing protocols dynamically collect and report reachability information to adapt to topology changes. They are suitable for large networks.

Dynamic routing protocols can be classified by different criteria, as shown in Table 2.

Table 2 Categories of dynamic routing protocols

Criterion

Categories

Operation scope

·     IGPs—Work within an AS. Examples include RIP, OSPF, and IS-IS.

·     EGPs—Work between ASs. The most popular EGP is BGP.

Routing algorithm

·     Distance-vector protocols—Examples include RIP and BGP. BGP is also considered a path-vector protocol.

·     Link-state protocols—Examples include OSPF and IS-IS.

Destination address type

Unicast routing protocols—Examples include RIP, OSPF, BGP, and IS-IS.

IP version

·     IPv4 routing protocols—Examples include RIP, OSPF, BGP, and IS-IS.

·     IPv6 routing protocols—Examples include RIPng, OSPFv3, IPv6 BGP, and IPv6 IS-IS.

 

An AS refers to a group of routers that use the same routing policy and work under the same administration.

Route preference

Routing protocols, including static and direct routing, each by default have a preference. If they find multiple routes to the same destination, the router selects the route with the highest preference as the optimal route.

The preference of a direct route is always 0 and cannot be changed. You can configure a preference for each static route and each dynamic routing protocol. The following table lists the route types and default preferences. The smaller the value, the higher the preference.

Table 3 Route types and default route preferences

Route type

Preference

Direct route

0

OSPF

10

IS-IS

15

Unicast static route

60

RIP

100

OSPF ASE

150

OSPF NSSA

150

IBGP

255

EBGP

255

Unknown (route from an untrusted source)

256

 

Load sharing

A routing protocol might find multiple optimal equal-cost routes to the same destination. You can use these routes to implement equal-cost multi-path (ECMP) load sharing.

Static routing, IPv6 static routing, RIP, RIPng, OSPF, OSPFv3, BGP, IPv6 BGP, IS-IS, and IPv6 IS-IS support ECMP load sharing.

Route backup

Route backup can improve network availability. Among multiple routes to the same destination, the route with the highest priority is the primary route and others are secondary routes.

The router forwards matching packets through the primary route. When the primary route fails, the route with the highest preference among the secondary routes is selected to forward packets. When the primary route recovers, the router uses it to forward packets.

Route recursion

To use a BGP, static, or RIP route that has an indirectly connected next hop, a router must perform route recursion to find the output interface to reach the next hop.

Link-state routing protocols, such as OSPF and IS-IS, do not need route recursion, because they obtain directly connected next hops through route calculation.

The RIB records and saves route recursion information, including brief information about related routes, recursive paths, and recursion depth.

Route redistribution

Route redistribution enables routing protocols to learn routing information from each other. A dynamic routing protocol can redistribute routes from other routing protocols, including direct and static routing. For more information, see the respective chapters on those routing protocols in this configuration guide.

The RIB records redistribution relationships of routing protocols.

Extension attribute redistribution

Extension attribute redistribution enables routing protocols to learn route extension attributes from each other, including BGP extended community attributes, OSPF area IDs, route types, and router IDs.

The RIB records extended attributes of each routing protocol and redistribution relationships of different routing protocol extended attributes.

Configuring load sharing

Configuring load sharing mode

About this task

Load sharing can be implemented on a per-flow basis.

In the per-flow load sharing mode, the device forwards flows over equal-cost routes. Packets of one flow travel along the same routes. You can configure the device to identify a flow based on the following criteria: source IP address, destination IP address, source port number, destination port number, and IP protocol number.

In a complex network, when the criteria cannot distinguish flows, you can use the algorithm keyword to specify an algorithm to identify flows.

Procedure

1.     Enter system view.

system-view

2.     Configure load sharing.

ip load-sharing mode per-flow [ [ level level-number ] algorithm algorithm-number [ seed seed-number ] [ shift shift-number ] | [ dest-ip | dest-port | ip-pro | src-ip | src-port ] * ] { global | slot slot-number }

By default, the device performs per-flow load sharing based on the following criteria: source IP address, destination IP address, source port number, destination port number, and IP protocol number.

Enabling IPv4 bandwidth-based load sharing

About this task

This feature load shares flow traffic among multiple output interfaces based on their load percentages. The device calculates the load percentage for each output interface in terms of the interface expected bandwidth.

Devices that run load sharing protocols, such as Locator/ID Separation Protocol (LISP), implement load sharing based on the ratios defined by these protocols.

Restrictions and guidelines

By default, the bandwidth of a VLAN interface is 10 Gbps. If this feature load shares traffic among a VLAN interface and other type of high-speed output interfaces, only a small portion of packets will be distributed to the VLAN interface. You can increase the bandwidth of the VLAN interface for this feature to distribute more packets to the VLAN interface.

Procedure

1.     Enter system view.

system-view

2.     Enable IPv4 bandwidth-based load sharing.

bandwidth-based-sharing

By default, the IPv4 bandwidth-based load sharing is disabled.

3.     (Optional.) Configure the expected bandwidth of the interface.

a.     Enter interface view.

interface interface-type interface-number

b.     Configure the expected bandwidth of the interface.

bandwidth bandwidth

By default, the expected bandwidth is the physical bandwidth of the interface.

Enabling symmetric load sharing

About this task

Symmetric load sharing ensures that bidirectional traffic specific to a source and destination address pair flow along the same path.

Procedure

1.     Enter system view.

system-view

2.     Enable symmetric load sharing.

ip load-sharing symmetric enable

By default, symmetric load sharing is disabled.

Verifying and maintaining load sharing

Perform display tasks in any view.

·     Display the load sharing mode in use.

display ip load-sharing mode slot slot-number

·     Display the load sharing path selected for a flow.

display ip load-sharing path ingress-port interface-type interface-number packet-format { ipv4oe dest-ip ip-address [ src-ip ip-address ] | ipv6oe dest-ipv6 ipv6-address [ src-ipv6 ipv6-address ] } [ dest-port port-id | ip-pro protocol-id | src-port port-id | vpn-instance vpn-instance-name ] *

Setting the maximum lifetime for routes and labels in the RIB

About this task

Perform this task to prevent routes of a certain protocol from being aged out due to slow protocol convergence resulting from a large number of route entries or long GR period.

Restrictions and guidelines for setting the maximum lifetime for routes and labels in the RIB

The configuration takes effect at the next protocol or RIB process switchover.

Procedure (IPv4)

1.     Enter system view.

system-view

2.     Enter RIB view.

rib

3.     Create the RIB IPv4 address family and enter its view.

address-family ipv4

4.     Set the maximum lifetime for IPv4 routes and labels in the RIB.

protocol protocol [ instance instance-name ] lifetime seconds

By default, the maximum lifetime for routes and labels in the RIB is 480 seconds.

Procedure (IPv6)

1.     Enter system view.

system-view

2.     Enter RIB view.

rib

3.     Create the RIB IPv6 address family and enter its view.

address-family ipv6

4.     Set the maximum lifetime for IPv6 routes and labels in the RIB.

protocol protocol [ instance instance-name ] lifetime seconds

By default, the maximum lifetime for routes and labels in the RIB is 480 seconds.

Setting the maximum lifetime for routes in the FIB

About this task

When GR or NSR is disabled, FIB entries must be retained for some time after a protocol process switchover or RIB process switchover. When GR or NSR is enabled, FIB entries must be removed immediately after a protocol or RIB process switchover to avoid routing issues. Perform this task to meet such requirements.

Procedure (IPv4)

1.     Enter system view.

system-view

2.     Enter RIB view.

rib

3.     Create the RIB IPv4 address family and enter its view.

address-family ipv4

4.     Set the maximum lifetime for IPv4 routes in the FIB.

fib lifetime seconds

By default, the maximum lifetime for routes in the FIB is 600 seconds.

Procedure (IPv6)

1.     Enter system view.

system-view

2.     Enter RIB view.

rib

3.     Create the RIB IPv6 address family and enter its view.

address-family ipv6

4.     Set the maximum lifetime for IPv6 routes in the FIB.

fib lifetime seconds

By default, the maximum lifetime for routes in the FIB is 600 seconds.

Enabling the RIB to flush route attribute information to the FIB

1.     Enter system view.

system-view

2.     Enter RIB view.

rib

3.     Create the RIB IPv4 address family and enter its view.

address-family ipv4

4.     Enable the RIB to flush route attribute information to the FIB.

flush route-attribute protocol

By default, the RIB does not flush route attribute information to the FIB.

Enabling the enhanced ECMP mode

About enhanced ECMP mode

When one or multiple ECMP routes fail, the default ECMP mode enables the device to reallocate all traffic to the remaining routes.

The enhanced ECMP mode enables the device to reallocate only the traffic of the failed routes to the remaining routes, which ensures forwarding continuity.

Restrictions and guidelines for enabling the enhanced ECMP mode

This configuration takes effect at reboot. Make sure the reboot does not impact your network.

Enabling the IPv4 and IPv6 enhanced ECMP mode

1.     Enter system view.

system-view

2.     Enable the IPv4 and IPv6 enhanced ECMP mode.

ecmp mode enhanced

By default, the IPv4 and IPv6 enhanced ECMP mode is disabled.

Configuring RIB NSR

About this task

When an active/standby switchover occurs, nonstop routing (NSR) backs up routing information from the active process to the standby process to avoid routing flapping and ensure forwarding continuity.

RIB NSR provides faster route convergence than protocol NSR during an active/standby switchover.

Prerequisites for RIB NSR

Use this feature with protocol GR or NSR to avoid route timeouts and traffic interruption.

Procedure (IPv4)

1.     Enter system view.

system-view

2.     Enter RIB view.

rib

3.     Create the RIB IPv4 address family and enter its view.

address-family ipv4

4.     Enable IPv4 RIB NSR.

non-stop-routing

By default, RIB NSR is disabled.

Procedure (IPv6)

1.     Enter system view.

system-view

2.     Enter RIB view.

rib

3.     Create the RIB IPv6 address family and enter its view.

address-family ipv6

4.     Enable IPv6 RIB NSR.

non-stop-routing

By default, RIB NSR is disabled.

Configuring inter-protocol FRR

About this task

Inter-protocol fast reroute (FRR) enables fast rerouting between routes of different protocols. A backup next hop is automatically selected to reduce the service interruption time caused by unreachable next hops. When the next hop of the primary link fails, the traffic is redirected to the backup next hop.

Among the routes to the same destination in the RIB, a router adds the route with the highest preference to the FIB table. For example, if a static route and an OSPF route in the RIB have the same destination, the router adds the OSPF route to the FIB table by default. The next hop of the static route is selected as the backup next hop for the OSPF route. When the next hop of the OSPF route is unreachable, the backup next hop is used.

Restrictions and guidelines for inter-protocol FRR

This feature uses the next hop of a route from a different protocol as the backup next hop, which might cause loops.

Procedure (IPv4)

1.     Enter system view.

system-view

2.     Enter RIB view.

rib

3.     Create the RIB IPv4 address family and enter its view.

address-family ipv4

4.     Enable IPv4 RIB inter-protocol FRR.

inter-protocol fast-reroute [ vpn-instance vpn-instance-name ]

By default, inter-protocol FRR is disabled.

If you do not specify a VPN instance, inter-protocol FRR is enabled for the public network.

Procedure (IPv6)

1.     Enter system view.

system-view

2.     Enter RIB view.

rib

3.     Create the RIB IPv6 address family and enter its view.

address-family ipv6

4.     Enable IPv6 RIB inter-protocol FRR.

inter-protocol fast-reroute [ vpn-instance vpn-instance-name ]

By default, inter-protocol FRR is disabled.

If you do not specify a VPN instance, inter-protocol FRR is enabled for the public network.

Enabling IPv6 route fast switchover

About this task

This feature applies to a device that provides the same physical output interface for large numbers of routes, including ECMP routes and primary/secondary routes. When a link failure occurs on the interface, the device must perform the following tasks before switching the traffic to another route:

1.     Deletes all ND entries for the link.

2.     Instructs the FIB to delete the associated FIB entries.

This procedure is time consuming and interrupts traffic for a long time. To resolve this issue, you can enable IPv6 route fast switchover. This feature allows the device to instruct the FIB to delete the invalid FIB entries for route switchover first.

Procedure

1.     Enter system view.

system-view

2.     Enable IPv6 route fast switchover.

ipv6 route fast-switchover enable

By default, IPv6 route fast switchover is disabled.

Configuring routing policy-based recursive lookup

About this task

Configure routing policy-based recursive lookup to control route recursion results. For example, when a route changes, the routing protocol has to perform a route recursion if the next hop is indirectly connected. The routing protocol might select an incorrect path, which can cause traffic loss. To prevent this problem, you can use a routing policy to filter out incorrect routes. The routes that pass the filtering of the routing policy will be used for route recursion.

Restrictions and guidelines for routing policy-based recursive lookup

The apply clauses in the specified routing policy cannot take effect.

Make sure a minimum of one related route can match the routing policy for correct traffic forwarding.

Procedure (IPv4)

1.     Enter system view.

system-view

2.     Enter RIB view.

rib

3.     Create the RIB IPv4 address family and enter its view.

address-family ipv4

4.     Configure routing policy-based recursive lookup.

protocol protocol nexthop recursive-lookup route-policy route-policy-name

By default, routing policy-based recursive lookup is not configured.

Procedure (IPv6)

1.     Enter system view.

system-view

2.     Enter RIB view.

rib

3.     Create the RIB IPv6 address family and enter its view.

address-family ipv6

4.     Configure routing policy-based recursive lookup.

protocol protocol nexthop recursive-lookup route-policy route-policy-name

By default, routing policy-based recursive lookup is not configured.

Configuring next hop recursion loop suppression

About next hop recursion loop suppression

A recursion loop occurs when a route recurses to a related route that recurses back to the route. It causes a route recursion failure and further lookup for a related route. If recursion loop persists, continuous route flapping will cause high system resource consumption and CPU utilization.

This feature enables the system to use a counter to record the number of route recursion failures. When the counter reaches 20, the system suppresses route recursion for a specified period of time to save system resources on the device.

Restrictions and guidelines for configuring next hop recursion loop suppression

The configuration of disabling next hop recursion loop suppression takes effect immediately.

The setting of clearing the recursion loop counter takes effect for the next recursion loop suppression.

Disabling suppression for next hop recursion loop (IPv4)

1.     Enter system view.

system-view

2.     Enter RIB view.

rib

3.     Create the RIB IPv4 address family and enter its view.

address-family ipv4

4.     Disable next hop recursion loop suppression.

nexthop recursive-lookup restrain disable

By default, next hop recursion loop suppression is enabled.

Setting the interval for clearing the recursion loop counter (IPv4)

1.     Enter system view.

system-view

2.     Enter RIB view.

rib

3.     Create the RIB IPv4 address family and enter its view.

address-family ipv4

4.     Set the interval for clearing the recursion loop counter.

nexthop recursive-lookup restrain clear-interval interval

By default, the interval for clearing the recursion loop counter is 600 seconds.

Disabling suppression for next hop recursion loop (IPv6)

1.     Enter system view.

system-view

2.     Enter RIB view.

rib

3.     Create the RIB IPv6 address family and enter its view.

address-family ipv6

4.     Disable next hop recursion loop suppression.

nexthop recursive-lookup restrain disable

By default, next hop recursion loop suppression is enabled.

Setting the interval for clearing the recursion loop counter (IPv6)

1.     Enter system view.

system-view

2.     Enter RIB view.

rib

3.     Create the RIB IPv6 address family and enter its view.

address-family ipv6

4.     Set the interval for clearing the recursion loop counter.

nexthop recursive-lookup restrain clear-interval interval

By default, the interval for clearing the recursion loop counter is 600 seconds.

Setting the maximum number of active routes supported by the device

About this task

The feature allows you to set the maximum number of active IPv4/IPv6 routes supported by the device. When the maximum number of active IPv4/IPv6 routes is exceeded, the device still accepts new active routes but generates a system log message. You can take relevant actions based on the message to save system resources.

Procedure (IPv4)

1.     Enter system view.

system-view

2.     Enter RIB view.

rib

3.     Create the RIB IPv4 address family and enter its view.

address-family ipv4

4.     Set the maximum number of active IPv4 routes supported by the device.

routing-table limit number simply-alert

By default, the maximum number of active IPv4 routes is not set for the device.

Configuration in RIB IPv4 address family view limits the number of active IPv4 routes for the public network and all VPN instances.

 

Procedure (IPv6)

1.     Enter system view.

system-view

2.     Enter RIB view.

rib

3.     Create the RIB IPv6 address family and enter its view.

address-family ipv6

4.     Set the maximum number of active IPv6 routes supported by the device.

routing-table limit number simply-alert

By default, the maximum number of active IPv6 routes is not set for the device.

Configuration in RIB IPv6 address family view limits the number of active IPv6 routes for the public network and all VPN instances.

Verifying and maintaining basic IP routing (IPv4)

Displaying IPv4 routing table information

Perform display tasks in any view.

·     Display routing table information.

display ip routing-table [ all-vpn-instance | vpn-instance vpn-instance-name ] [ verbose ]

display ip routing-table [ all-routes ]

·     Display information about routes permitted by an IPv4 basic ACL.

display ip routing-table [ vpn-instance vpn-instance-name ] acl ipv4-acl-number [ verbose ]

·     Display information about routes to a specific destination address.

display ip routing-table [ vpn-instance vpn-instance-name ] ip-address [ mask-length | mask ] [ longer-match ] [ verbose ]

·     Display information about routes to a range of destination addresses.

display ip routing-table [ vpn-instance vpn-instance-name ] ip-address1 to ip-address2 [ verbose ]

·     Display information about routes permitted by an IP prefix list.

display ip routing-table [ vpn-instance vpn-instance-name ] prefix-list prefix-list-name [ verbose ]

·     Display information about routes installed by a protocol.

display ip routing-table [ vpn-instance vpn-instance-name ] protocol protocol [ inactive | verbose ]

·     Display brief routing table information, including maximum number of ECMP routes, maximum number of active routes, and number of remaining active routes.

display ip routing-table [ vpn-instance vpn-instance-name ] summary

Displaying ECMP route information

Perform display tasks in any view.

·     Display ECMP mode information.

display ecmp mode

Displaying IPv4 RIB information

Perform display tasks in any view.

·     Display route attribute information in the RIB.

display rib attribute [ attribute-id ]

·     Display RIB GR state information.

display rib graceful-restart

·     Display next hop information in the RIB.

display rib nib [ self-originated ] [ nib-id ] [ verbose ]

display rib nib protocol protocol [ verbose ]

·     Display next hop information for direct routes.

display route-direct nib [ nib-id ] [ verbose ]

Displaying and clearing IPv4 routing table statistics

To display IPv4 route or route prefix statistics, execute the following command in any view:

display ip routing-table [ all-routes | all-vpn-instance | vpn-instance vpn-instance-name ] [ prefix ] statistics

To clear route statistics, execute the following commands in user view:

·     reset ip routing-table statistics protocol [ vpn-instance vpn-instance-name ] { protocol | all }

·     reset ip routing-table [ all-routes | all-vpn-instance ] statistics protocol { protocol | all }

Verifying and maintaining basic IP routing (IPv6)

Displaying IPv6 routing table information

Perform display tasks in any view.

·     Display IPv6 routing table information.

display ipv6 routing-table [ all-vpn-instance | vpn-instance vpn-instance-name ] [ verbose ]

display ipv6 routing-table all-routes

·     Display information about routes to an IPv6 destination address.

display ipv6 routing-table [ vpn-instance vpn-instance-name ] ipv6-address [ prefix-length ] [ longer-match ] [ verbose ]

·     Display information about routes permitted by an IPv6 basic ACL.

display ipv6 routing-table [ vpn-instance vpn-instance-name ] acl ipv6-acl-number [ verbose ]

·     Display information about routes to a range of IPv6 destination addresses.

display ipv6 routing-table [ vpn-instance vpn-instance-name ] ipv6-address1 to ipv6-address2 [ verbose ]

·     Display information about routes permitted by an IPv6 prefix list.

display ipv6 routing-table [ vpn-instance vpn-instance-name ] prefix-list prefix-list-name [ verbose ]

·     Display information about routes installed by an IPv6 protocol.

display ipv6 routing-table [ vpn-instance vpn-instance-name ] protocol protocol [ inactive | verbose ]

·     Display brief IPv6 routing table information, including maximum number of ECMP routes, maximum number of active routes, and number of remaining active routes.

display ipv6 routing-table [ vpn-instance vpn-instance-name ] summary

Displaying IPv6 ECMP route information

To display ECMP mode information, execute the following command in any view:

display ecmp mode

Displaying IPv6 RIB information

Perform display tasks in any view.

·     Display route attribute information in the IPv6 RIB.

display ipv6 rib attribute [ attribute-id ]

·     Display IPv6 RIB GR state information.

display ipv6 rib graceful-restart

·     Display next hop information in the IPv6 RIB.

display ipv6 rib nib [ self-originated ] [ nib-id ] [ verbose ]

display ipv6 rib nib protocol protocol [ verbose ]

·     Display next hop information for IPv6 direct routes.

display ipv6 route-direct nib [ nib-id ] [ verbose ]

Displaying and clearing IPv6 routing table statistics

To display IPv6 route or route prefix statistics, execute the following command in any view:

display ipv6 routing-table [ all-routes | all-vpn-instance | vpn-instance vpn-instance-name ] [ prefix ] statistics

To clear IPv6 route statistics, execute the following commands in user view:

·     reset ipv6 routing-table statistics protocol [ vpn-instance vpn-instance-name ] { protocol | all }

·     reset ipv6 routing-table [ all-routes | all-vpn-instance ] statistics protocol { protocol | all }

Basic IP routing configuration examples

Example: Configuring load sharing based on source and destination addresses

Network configuration

As shown in Figure 1, Router A has two equal-cost routes to Router B. Configure load sharing based on source and destination addresses on Router A to forward packets through Router B to the destination IP address 1.2.3.4/24.

Figure 1 Network diagram

Prerequisites

IMPORTANT

IMPORTANT:

By default, interfaces on the devices are disabled (in ADM or Administratively Down state). To have an interface operate, you must use the undo shutdown command to enable that interface.

Procedure

# On Router A, configure IP addresses for HundredGigE 1/0/1 and HundredGigE 1/0/2.

<RouterA> system-view

[RouterA] interface hundredgige 1/0/1

[RouterA-HundredGigE1/0/1] ip address 10.1.1.1 24

[RouterA-HundredGigE1/0/1] quit

[RouterA] interface hundredgige 1/0/2

[RouterA-HundredGigE1/0/2] ip address 20.1.1.1 24

[RouterA-HundredGigE1/0/2] quit

# On Router B, configure IP addresses for HundredGigE 1/0/1 and HundredGigE 1/0/2.

<RouterB> system-view

[RouterB] interface hundredgige 1/0/1

[RouterB-HundredGigE1/0/1] ip address 10.1.1.2 24

[RouterB-HundredGigE1/0/1] quit

[RouterB] interface hundredgige 1/0/2

[RouterB-HundredGigE1/0/2] ip address 20.1.1.2 24

[RouterB-HundredGigE1/0/2] quit

# On Router A, configure two static routes to the destination IP address 1.2.3.4.

[RouterA] ip route-static 1.2.3.4 24 10.1.1.2

[RouterA] ip route-static 1.2.3.4 24 20.1.1.2

[RouterA] quit

# On Router A, display FIB entries matching the destination IP address 1.2.3.4.

<RouterA> display fib 1.2.3.4

 

FIB entry count: 2

 

Flag:

  U:Usable   G:Gateway   H:Host   B:Blackhole   D:Dynamic   S:Static

  R:Relay     F:FRR

 

Destination/Mask   Nexthop         Flag     OutInterface/Token       Label

1.2.3.0/24         10.1.1.2        USGR     HGE1/0/1                 Null

1.2.3.0/24         20.1.1.2        USGR     HGE1/0/2                 Null

# On Router A, configure per-flow load sharing based on source and destination IP addresses.

<RouterA> system-view

[RouterA] ip load-sharing mode per-flow dest-ip src-ip global

[RouterA] quit

Verifying the configuration

# Verify that Router A implements load sharing.

<RouterA> display counters outbound interface GigabitEthernet

Interface         Total (pkts)   Broadcast (pkts)   Multicast (pkts)  Err (pkts)

HGE1/0/1                 1045                  0                  0           0

HGE1/0/2                 1044                  0                  0           0

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网