H3C S6116 Ultra-Low Latency Switch Series Command References-Release 671x-6W101

HomeSupportSwitchesS6116 SeriesReference GuidesCommand ReferencesH3C S6116 Ultra-Low Latency Switch Series Command References-Release 671x-6W101
14-Static routing commands
Title Size Download
14-Static routing commands 112.88 KB

Static routing commands

You can specify only a management Ethernet interface for a static route as the output interface, and you cannot specify a service interface as the output interface.

delete static-routes all

Use delete static-routes all to delete all static routes.

Syntax

delete static-routes all

Views

System view

Predefined user roles

network-admin

Usage guidelines

CAUTION

CAUTION:

Deleting all static routes with caution. This operation might cause network connectivity failure and packet forwarding failure.

 

When you use this command, the system will prompt you to confirm the operation before deleting all the static routes.

To delete one static route, use the undo ip route-static command. To delete all static routes, including the default route, use the delete static-routes all command.

Examples

# Delete all static routes.

<Sysname> system-view

[Sysname] delete static-routes all

This will erase all IPv4 static routes and their configurations, you must reconfigure all static routes.

Are you sure?[Y/N]:y

Related commands

ip route-static

display route-static nib

Use display route-static nib to display static route next hop information.

Syntax

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

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

nib-id: Specifies a NIB by its ID, a hexadecimal string of 1 to ffffffff. If you do not specify this argument, the command displays all static route next hop information.

verbose: Displays detailed static route next hop information. If you do not specify this keyword, the command displays brief static route next hop information.

Examples

# Displays brief static route next hop information.

<Sysname> display route-static nib

Total number of nexthop(s): 44

 

      NibID: 0x11000000        Sequence: 0

       Type: 0x21               Flushed: Yes

        Age: 00h01m50s

   UserKey0: 0x111              VrfNthp: 0

   UserKey1: 0x0                Nexthop: 0.0.0.0

    IFIndex: 0x111            LocalAddr: 0.0.0.0

     NewUK0: 0x0                 NewUK1: 0x0

     NewUK2: 0x0                 NewUK3: 0x0

     NewUK4: 0x0                 NewUK5: 0x0

     NewUK6: 0x0                 NewUK7: 0x0

   TopoNthp: 0                  ExtType: 0x0

    FIRType: Normal           Threshold: 0

 

      NibID: 0x11000001        Sequence: 1

       Type: 0x41               Flushed: Yes

        Age: 00h01m50s

   UserKey0: 0x0                VrfNthp: 5

   UserKey1: 0x0                Nexthop: 2.2.2.2

    IFIndex: 0x0              LocalAddr: 0.0.0.0

     NewUK0: 0x0                 NewUK1: 0x0

     NewUK2: 0x0                 NewUK3: 0x0

     NewUK4: 0x0                 NewUK5: 0x0

     NewUK6: 0x0                 NewUK7: 0x0

   TopoNthp: 0                  ExtType: 0x0

    FIRType: Normal           Threshold: 0

 

...

Table 1 Command output

Field

Description

NibID

ID of the NIB.

Sequence

Sequence number of the NIB.

Type

Type of the NIB.

Flushed

Indicates whether the route with the NIB has been flushed to the FIB.

Age

Elapsed time since the next hop information was last updated.

UserKey0

Reserved data 1.

UserKey1

Reserved data 2.

VrfNthp

This field is not supported in the current software version.

Index of the VPN instance that the next hop belongs to. This field displays 0 if the next hop is on the public network.

Nexthop

Next hop address.

IFIndex

Interface index

LocalAddr

Local interface address.

NewUK0

New reserved data 1.

NewUK1

New reserved data 2.

NewUK2

New reserved data 3.

NewUK3

New reserved data 4.

NewUK4

New reserved data 5.

NewUK5

New reserved data 6.

NewUK6

New reserved data 7.

NewUK7

New reserved data 8.

TopoNthp

This field is not supported in the current software version.

Index of the topology that contains the next hop. This field displays 0 if the next hop is on the public network.

ExtType

NIB extension type.

FIRType

This field is not supported in the current software version.

Type of the link for the next hop in FIR ECMP mode:

·     Normal.

·     Primary.

·     Secondary.

Threshold

This field is not supported in the current software version.

Bandwidth usage level of primary links in FIR ECMP mode.

 

# Displays detailed static route next hop information.

<Sysname> display route-static nib verbose

Total number of nexthop(s): 44

 

      NibID: 0x11000000        Sequence: 0

       Type: 0x21               Flushed: Yes

        Age: 00h01m50s

   UserKey0: 0x111              VrfNthp: 0

   UserKey1: 0x0                Nexthop: 0.0.0.0

    IFIndex: 0x111            LocalAddr: 0.0.0.0

     NewUK0: 0x0                 NewUK1: 0x0

     NewUK2: 0x0                 NewUK3: 0x0

     NewUK4: 0x0                 NewUK5: 0x0

     NewUK6: 0x0                 NewUK7: 0x0

   TopoNthp: 0                  ExtType: 0x0

    FIRType: Normal           Threshold: 0

     RefCnt: 2              FlushRefCnt: 0

       Flag: 0x2                Version: 1

    ExtFlag: 0x0

 1 nexthop(s):

PrefixIndex: 0              OrigNexthop: 0.0.0.0

  RelyDepth: 0              RealNexthop: 0.0.0.0

  Interface: NULL0            LocalAddr: 0.0.0.0

  TunnelCnt: 0                      Vrf: default-vrf

   TunnelID: N/A               Topology: base

     Weight: 1000000              Flags: 0x0

RealFIRType: Normal           RealThres: 0

 

      NibID: 0x11000001        Sequence: 1

       Type: 0x41               Flushed: Yes

        Age: 00h01m50s

   UserKey0: 0x0                VrfNthp: 5

   UserKey1: 0x0                Nexthop: 2.2.2.2

    IFIndex: 0x0              LocalAddr: 0.0.0.0

     NewUK0: 0x0                 NewUK1: 0x0

     NewUK2: 0x0                 NewUK3: 0x0

     NewUK4: 0x0                 NewUK5: 0x0

     NewUK6: 0x0                 NewUK7: 0x0

   TopoNthp: 0                  ExtType: 0x0

    FIRType: Normal           Threshold: 0

     RefCnt: 1              FlushRefCnt: 0

       Flag: 0x12               Version: 1

    ExtFlag: 0x0

 2 nexthop(s):

PrefixIndex: 0              OrigNexthop: 2.2.2.2

  RelyDepth: 9              RealNexthop: 0.0.0.0

  Interface: NULL0            LocalAddr: 0.0.0.0

  TunnelCnt: 0                      Vrf: default-vrf

   TunnelID: N/A               Topology: base

     Weight: 1000000              Flags: 0x0

RealFIRType: Normal           RealThres: 0

 

...

Table 2 Command output

Field

Description

NibID

ID of the NIB.

Sequence

Sequence number of the NIB.

Type

Type of the NIB.

Flushed

Indicates whether the route with the NIB has been flushed to the FIB.

Age

Elapsed time since the next hop information was last updated.

UserKey0

Reserved data 1.

VrfNthp

This field is not supported in the current software version.

Index of the VPN instance that the next hop belongs to. This field displays 0 if the next hop is on the public network.

UserKey1

Reserved data 2.

Nexthop

Next hop address.

IFIndex

Interface index

LocalAddr

Local interface address.

NewUK0

New reserved data 1.

NewUK1

New reserved data 2.

NewUK2

New reserved data 3.

NewUK3

New reserved data 4.

NewUK4

New reserved data 5.

NewUK5

New reserved data 6.

NewUK6

New reserved data 7.

NewUK7

New reserved data 8.

TopoNthp

This field is not supported in the current software version.

Index of the topology that contains the next hop. This field displays 0 if the next hop is on the public network.

ExtType

NIB extension type.

FIRType

This field is not supported in the current software version.

Type of the link for the next hop in FIR ECMP mode:

·     Normal.

·     Primary.

·     Secondary.

Threshold

This field is not supported in the current software version.

Bandwidth usage level of primary links in FIR ECMP mode.

RefCnt

Reference count of the next hop.

FlushRefCnt

Reference count of the next hop that is flushed to the FIB.

Flag

Flag of the next hop.

Version

Version of the next hop.

ExtFlag

Extended flag of the next hop.

x nexthop(s)

Number of next hops.

PrefixIndex

Prefix index of the next hop for an ECMP route.

OrigNexthop

Original next hop.

RelyDepth

Recursion depth.

RealNexthop

Real next hop.

Interface

Output interface.

localAddr

Local interface address.

TunnelCnt

This field is not supported in the current software version.

Number of tunnels after route recursion.

Vrf

This field is not supported in the current software version.‌

VPN instance name. For the public network, this field displays default-vrf.

TunnelID

This field is not supported in the current software version.

ID of the tunnel after route recursion.

Topology

This field is not supported in the current software version.

Topology name. The topology name for the public network is base.

Weight

ECMP route weight. This field displays 0 for non-ECMP routes.

Flags

Flags of the next hop.

RealFIRType

This field is not supported in the current software version.

Type of the link for the real next hop in FIR ECMP mode:

·     Normal.

·     Primary.

·     Secondary.

The real next hop is the direct next hop found after route recursion.

RealThres

This field is not supported in the current software version.

Bandwidth usage level of the primary link to which the real next hop is attached in FIR ECMP mode.

display route-static routing-table

Use display route-static routing-table to display static routing table information.

Syntax

display route-static routing-table [ ip-address { mask-length | mask } ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

ip-address: Specifies the destination IP address in dotted decimal notation. If you do not specify this argument, the command displays all static routing table information.

mask-length: Specifies the mask length, an integer in the range of 0 to 32.

mask: Specifies the subnet mask in dotted decimal notation.

Examples

# Display static routing table information.

<Sysname> display route-static routing-table

Total number of routes: 24

 

Status: * - valid

 

*Destination: 0.0.0.0/0

       NibID: 0x1100000a        NextHop: 2.2.2.10

   MainNibID: N/A             BkNextHop: N/A

     BkNibID: N/A             Interface: N/A

     TableID: 0x2           BkInterface: N/A

        Flag: 0x82d01          BfdSrcIp: N/A

     DbIndex: 0xd            BfdIfIndex: 0x0

        Type: Normal        BfdVrfIndex: 0

  TrackIndex: 0xffffffff          Label: NULL

  Preference: 60            vrfIndexDst: 0

     BfdMode: N/A            vrfIndexNH: 0

   Permanent: 0                     Tag: 0

     FIRType: Normal          Threshold: 0

  MicroSegID: 0          RecurseMaskLen: N/A

  FIRLicense: Unrestricted

 

...

Table 3 Command output

Field

Description

destination

Destination address/prefix.

NibID

ID of the NIB.

MainNibID

ID of the primary next hop for static route FRR.

BkNibID

ID of the backup next hop for static route FRR.

NextHop

Next hop address.

BkNextHop

Backup next hop address.

Interface

Output interface of the route.

BkInterface

This field is not supported in the current software version.

Backup output interface.

TableID

ID of the table to which the route belongs.

Flag

Flag of the route.

DbIndex

Index of the database to which the route belongs.

Type

Route type. The value is Normal.

BfdSrcIp

This field is not supported in the current software version.

Source IP address of the indirect BFD session.

BfdIfIndex

This field is not supported in the current software version.

Index of the interface where BFD is enabled.

BfdVrfIndex

This field is not supported in the current software version.

Index of the VPN instance where BFD is enabled. This field displays 0 if BFD is enabled for the public network.

BfdMode

This field is not supported in the current software version.

BFD session mode:

·     N/A—No BFD session is configured.

·     Ctrl—Control packet mode

·     Echo—Echo packet mode.

TrackIndex

This field is not supported in the current software version.

NQA Track index.

vrfIndexDst

This field is not supported in the current software version.

Index of VPN instance that the destination belongs to. For the public network, this field displays 0.

vrfIndexNH

This field is not supported in the current software version.

Index of the VPN instance that the next hop belongs to. For the public network, this field displays 0.

Permanent

This field is not supported in the current software version.

Permanent static route flag. 1 indicates a permanent static route.

Tag

This field is not supported in the current software version.

Route tag.

FIRType

This field is not supported in the current software version.

Type of the link for the next hop in FIR ECMP mode:

·     Normal.

·     Primary.

·     Secondary.

Threshold

This field is not supported in the current software version.

Bandwidth usage level of primary links in FIR ECMP mode.

MicroSegID

This field is not supported in the current software version.

Microsegment ID in the route.

RecurseMaskLen

This field is not supported in the current software version.

Exact mask length for route recursion. If the device uses the longest match principle for route recursion, this field displays N/A.

FIRLicense

This field is not supported in the current software version.

License process status for the static route FIR mode:

·     Unrestricted—The static route FIR mode is not controlled by license.

·     Disconnected—The static route FIR mode is controlled by license, but the static route is not connected to the license process. Please check whether the license process is abnormal.

·     Active—The license for controlling the static route FIR mode is active.

·     Inactive—The license for controlling the static route FIR mode is inactive.

 

ip route-static

Use ip route-static to configure a static route.

Use undo ip route-static to delete a static route.

Syntax

ip route-static dest-address { mask-length | mask } interface-type interface-number [ next-hop-address ] [ description text ]

ip route-static dest-address { mask-length | mask } next-hop-address [ description text ]

undo ip route-static dest-address { mask-length | mask } [ interface-type interface-number [ next-hop-address ] | next-hop-address ]

Default

No static route is configured.

Views

System view

Predefined user roles

network-admin

Parameters

dest-address: Specifies the destination IP address of the static route, in dotted decimal notation.

mask-length: Specifies the mask length, an integer in the range of 0 to 32.

mask: Specifies the subnet mask in dotted decimal notation.

interface-type interface-number: Specifies an output interface by its type and number. For more information, see the configuration guide for the device.

next-hop-address: Specifies the IP address of the next hop, in dotted decimal notation. For more information, see the configuration guide for the device.

description text: Configures a description of 1 to 60 characters for the static route. The description can include special characters, such as the space, except the question mark (?).

Usage guidelines

If the destination IP address and the mask are both 0.0.0.0 (or 0), the configured route is a default route. The default route is used for forwarding a packet matching no entry in the routing table.

Follow these guidelines when you specify the output interface or the next hop address of the static route:

·     If the output interface is a Null 0 interface, no next hop address is required.

·     If the output interface is a point-to-point interface, you can specify only the output interface. You do not need to change the configuration of the route even if the peer address is changed.

·     NBMA or P2MP interfaces need IP address-to-link layer address mappings for successful packet delivery. As a best practice, specify the next hop address for the route at the same time if the output interface is an NBMA or P2MP interface.

·     If the output interface is a broadcast interface, the device uses the next hop IP address to obtain the MAC address of the next hop. Therefore, you must specify both the output interface and next hop IP address.

Examples

# Configure a static route, whose destination address is 1.1.1.1/24, next hop address is 2.2.2.2, and description information is for internet.

<Sysname> system-view

[Sysname] ip route-static 1.1.1.1 24 2.2.2.2 description for internet

ip route-static default-preference

Use ip route-static default-preference to configure a default preference for static routes.

Use undo ip route-static default-preference to restore the default.

Syntax

ip route-static default-preference default-preference

undo ip route-static default-preference

Default

The default preference of static routes is 60.

Views

System view

Predefined user roles

network-admin

Parameters

default-preference: Specifies a default preference for static routes, in the range of 1 to 255.

Usage guidelines

If no preference is specified for a static route, the default preference applies.

When the default preference is reconfigured, it applies only to newly added static routes.

Examples

# Set a default preference of 120 for static routes.

<Sysname> system-view

[Sysname] ip route-static default-preference 120

 

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