07-Layer 3 - IP Routing Command Reference

HomeSupportSwitchesH3C S12500 Switch SeriesReference GuidesCommand ReferencesH3C S12500 Command References-Release1828P04-6W18207-Layer 3 - IP Routing Command Reference
01-Basic IP Routing Commands
Title Size Download
01-Basic IP Routing Commands 166.71 KB

display ip routing-table

Syntax

display ip routing-table [ vpn-instance vpn-instance-name ] [ verbose ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31 characters. If no VPN is specified, the information of the public network is displayed.

verbose: Displays detailed information about all routes, including both active and inactive routes. With this keyword absent, the command displays only brief information about active routes.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display ip routing-table to display brief information about active routes in the routing table.

This command displays brief information about a routing table, with a route entry contained in one line. The information displayed includes destination IP address/mask length, protocol, priority, cost, next hop and output interface. This command only displays active routes.

Use display ip routing-table verbose to display detailed information about all routes in the routing table.

This command displays detailed information about all active and inactive routes, including the statistics of the entire routing table and information for each route.

Examples

# Display brief information about active routes in the routing table.

<Sysname> display ip routing-table

Routing Tables: Public

         Destinations : 9        Routes : 9

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

1.1.1.1/32          Direct 0    0            127.0.0.1       InLoop0

127.0.0.0/8         Direct 0    0            127.0.0.1       InLoop0

127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0

192.168.1.0/24      Direct 0    0            192.168.1.100   Vlan10

192.168.1.100/32    Direct 0    0            127.0.0.1       InLoop0

192.168.2.0/24      Direct 0    0            192.168.2.200   Vlan1000

192.168.2.200/32    Direct 0    0            127.0.0.1       InLoop0

192.168.3.0/24      Direct 0    0            192.168.3.1     Vlan2000

192.168.3.1/32      Direct 0    0            127.0.0.1       InLoop0

Table 1 Command output

Field

Description

Destinations

Number of destination addresses.

Routes

Number of routes.

Destination/Mask

Destination address/mask length.

Proto

Protocol that presents the route.

Pre

Priority of the route.

Cost

Cost of the route.

NextHop

Address of the next hop on the route.

Interface

Output interface for packets to be forwarded along the route.

 

# Display detailed information about all routes in the routing table.

<Sysname> display ip routing-table verbose

Routing Tables: Public

         Destinations : 9        Routes : 11

 

  Destination: 1.1.1.1/32

     Protocol: Direct          Process ID: 0

   Preference: 0                     Cost: 0

 IpPrecedence:                    QosLcId:

      NextHop: 127.0.0.1        Interface: InLoopBack0

    BkNextHop: 0.0.0.0        BkInterface:

  RelyNextHop: 0.0.0.0          Neighbor : 0.0.0.0

    Tunnel ID: 0x0                  Label: NULL

  BKTunnel ID: 0x0                BKLabel: NULL

        State: Active Adv             Age: 01h29m07s

          Tag: 0

 

  Destination: 1.1.1.1/32

     Protocol: OSPF            Process ID: 1

   Preference: 10                    Cost: 0

 IpPrecedence:                    QosLcId:

      NextHop: 1.1.1.1          Interface: LoopBack0

    BkNextHop: 0.0.0.0        BkInterface:

  RelyNextHop: 0.0.0.0          Neighbor : 0.0.0.0

    Tunnel ID: 0x0                  Label: NULL

  BKTunnel ID: 0x0                BKLabel: NULL

        State: Invalid Adv            Age: 01h29m02s

          Tag: 0

 

  Destination: 127.0.0.0/8

     Protocol: Direct          Process ID: 0

   Preference: 0                     Cost: 0

 IpPrecedence:                    QosLcId:

      NextHop: 127.0.0.1        Interface: InLoopBack0

    BkNextHop: 0.0.0.0        BkInterface:

  RelyNextHop: 0.0.0.0          Neighbor : 0.0.0.0

    Tunnel ID: 0x0                  Label: NULL

  BKTunnel ID: 0x0                BKLabel: NULL

        State: Active NoAdv           Age: 01h29m12s

          Tag: 0

 

  Destination: 127.0.0.1/32

     Protocol: Direct          Process ID: 0

   Preference: 0                     Cost: 0

 IpPrecedence:                    QosLcId:

      NextHop: 127.0.0.1        Interface: InLoopBack0

    BkNextHop: 0.0.0.0        BkInterface:

  RelyNextHop: 0.0.0.0          Neighbor : 0.0.0.0

    Tunnel ID: 0x0                  Label: NULL

  BKTunnel ID: 0x0                BKLabel: NULL

        State: Active NoAdv           Age: 01h29m13s

          Tag: 0

 

  Destination: 192.168.1.0/24

     Protocol: Direct          Process ID: 0

   Preference: 0                     Cost: 0

 IpPrecedence:                    QosLcId:

      NextHop: 192.168.1.100    Interface: Vlan-interface10

    BkNextHop: 0.0.0.0        BkInterface:

  RelyNextHop: 0.0.0.0          Neighbor : 0.0.0.0

    Tunnel ID: 0x0                  Label: NULL

  BKTunnel ID: 0x0                BKLabel: NULL

        State: Active Adv             Age: 01h27m23s

          Tag: 0

 

  Destination: 192.168.1.100/32

     Protocol: Direct          Process ID: 0

   Preference: 0                     Cost: 0

 IpPrecedence:                    QosLcId:

      NextHop: 127.0.0.1        Interface: InLoopBack0

    BkNextHop: 0.0.0.0        BkInterface:

  RelyNextHop: 0.0.0.0          Neighbor : 0.0.0.0

    Tunnel ID: 0x0                  Label: NULL

  BKTunnel ID: 0x0                BKLabel: NULL

        State: Active NoAdv           Age: 01h27m23s

          Tag: 0

 

  Destination: 192.168.2.0/24

     Protocol: Direct          Process ID: 0

   Preference: 0                     Cost: 0

 IpPrecedence:                    QosLcId:

      NextHop: 192.168.2.200    Interface: Vlan-interface1000

    BkNextHop: 0.0.0.0        BkInterface:

  RelyNextHop: 0.0.0.0          Neighbor : 0.0.0.0

    Tunnel ID: 0x0                  Label: NULL

  BKTunnel ID: 0x0                BKLabel: NULL

        State: Active Adv             Age: 01h27m23s

          Tag: 0

 

  Destination: 192.168.2.0/24

     Protocol: OSPF            Process ID: 1

   Preference: 10                    Cost: 1

 IpPrecedence:                    QosLcId:

      NextHop: 192.168.2.200    Interface: Vlan-interface1000

    BkNextHop: 0.0.0.0        BkInterface:

  RelyNextHop: 0.0.0.0          Neighbor : 0.0.0.0

    Tunnel ID: 0x0                  Label: NULL

  BKTunnel ID: 0x0                BKLabel: NULL

        State: Invalid Adv            Age: 01h27m19s

          Tag: 0

 

  Destination: 192.168.2.200/32

     Protocol: Direct          Process ID: 0

   Preference: 0                     Cost: 0

 IpPrecedence:                    QosLcId:

      NextHop: 127.0.0.1        Interface: InLoopBack0

    BkNextHop: 0.0.0.0        BkInterface:

  RelyNextHop: 0.0.0.0          Neighbor : 0.0.0.0

    Tunnel ID: 0x0                  Label: NULL

  BKTunnel ID: 0x0                BKLabel: NULL

        State: Active NoAdv           Age: 01h27m24s

          Tag: 0

 

  Destination: 192.168.3.0/24

     Protocol: Direct          Process ID: 0

   Preference: 0                     Cost: 0

 IpPrecedence:                    QosLcId:

      NextHop: 192.168.3.1      Interface: Vlan-interface2000

    BkNextHop: 0.0.0.0        BkInterface:

  RelyNextHop: 0.0.0.0          Neighbor : 0.0.0.0

    Tunnel ID: 0x0                  Label: NULL

  BKTunnel ID: 0x0                BKLabel: NULL

        State: Active Adv             Age: 01h27m22s

          Tag: 0

 

  Destination: 192.168.3.1/32

     Protocol: Direct          Process ID: 0

   Preference: 0                     Cost: 0

 IpPrecedence:                    QosLcId:

      NextHop: 127.0.0.1        Interface: InLoopBack0

    BkNextHop: 0.0.0.0        BkInterface:

  RelyNextHop: 0.0.0.0          Neighbor : 0.0.0.0

    Tunnel ID: 0x0                  Label: NULL

  BKTunnel ID: 0x0                BKLabel: NULL

        State: Active NoAdv           Age: 01h27m22s

          Tag: 0

Displayed first are statistics for the whole routing table, followed by detailed description of each route (in sequence).

Table 2 Command output

Field

Description

Destination

Destination address/mask length.

Protocol

Protocol that presents the route.

Process ID

Process ID.

Preference

Priority of the route.

Cost

Cost of the route.

IpPrecedence

IP precedence.

QosLcId

QoS-local ID.

NextHop

Address of the next hop on the route.

Interface

Output interface for packets to be forwarded along the route.

BkNextHop

Backup next hop.

BkInterface

Backup output interface.

RelyNextHop

Recursive next hop.

Neighbor

Neighboring address.

Tunnel ID

Tunnel ID.

Label

Label.

BKTunnel ID

Backup tunnel ID.

BKLabel

Backup label.

State

Route status:

·     Active—This is an active unicast route.

·     Adv—This route can be advertised.

·     Delete—This route is deleted.

·     Gateway—This is an indirect route.

·     Holddown—Number of holddown routes. Holddown is a route advertisement policy used in some distance vector (D-V) routing protocols, such as RIP, to avoid the propagation of some incorrect routes. It distributes a Holddown route during a period regardless of whether a new route to the same destination is found. For detailed information, see corresponding routing protocols.

·     Int—The route was discovered by an Interior Gateway Protocol (IGP).

·     NoAdv—The route is not advertised when the router advertises routes based on policies.

·     NotInstallIn normal cases, among routes to a destination, the route with the highest priority is installed into the core routing table and advertised, while a NotInstall route cannot be installed into the core routing table but can be advertised.

·     Reject—The packets matching a Reject route will be dropped. Besides, the router sends ICMP unreachable messages to the sources of the dropped packets. The Reject routes are usually used for network testing.

·     Static—A static route is not lost when you perform the save operation and then restart the router. Routes configured manually are marked as static.

·     Unicast—Unicast routes.

·     Inactive—Inactive routes.

·     Invalid—Invalid routes.

·     WaitQ—The route is the WaitQ during route recursion.

·     TunE—Tunnel.

·     GotQ—The route is in the GotQ during route recursion.

Age

Time for which the route has been in the routing table, in the sequence of hour, minute, and second from left to right.

Tag

Route tag.

 

display ip routing-table acl

Syntax

display ip routing-table [ vpn-instance vpn-instance-name ] acl acl-number [ verbose ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31 characters. If no VPN is specified, the information of the public network is displayed.

acl-number: Specifies a basic ACL by its number in the range of 2000 to 2999.

verbose: Displays detailed information about all routes. With this argument absent, the command displays only brief information about active routes.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display ip routing-table acl to display information about routes permitted by a specified basic ACL.

This command is intended for the follow-up display of routing policies.

For more information about routing policy, see Layer 3—IP Routing Configuration Guide.

If the specified ACL does not exist or it has no rules configured, the entire routing table is displayed.

Examples

# Define basic ACL 2000 and set the route filtering rules.

<Sysname> system-view

[Sysname] acl number 2000

[Sysname-acl-basic-2000] rule permit source 10.1.0.0 0.0.255.255

[Sysname-acl-basic-2000] rule deny source any

# Display brief information about active routes permitted by basic ACL 2000.

[Sysname-acl-basic-2000] display ip routing-table acl 2000

Routes Matched by Access list : 2000

Summary Count : 6

 

Destination/Mask    Proto  Pre  Cost         NextHop       Interface

 

10.1.1.0/24         Direct 0    0            10.1.1.2      Vlan1

10.1.1.2/32         Direct 0    0            127.0.0.1     InLoop0

10.1.2.0/24         Direct 0    0            10.1.2.1      Vlan11

10.1.2.1/32         Direct 0    0            127.0.0.1     InLoop0

10.1.3.0/24         Direct 0    0            10.1.3.1      Vlan12

10.1.3.1/32         Direct 0    0            127.0.0.1     InLoop0

For output description, see Table 1.

# Display detailed information about all routes permitted by basic ACL 2000.

<Sysname> display ip routing-table acl 2000 verbose

Routes Matched by Access list : 2000

Summary Count: 6

 

Destination: 10.1.1.0/24

     Protocol: Direct          Process ID: 0

   Preference: 0                     Cost: 0

 IpPrecedence:                    QosLcId:

      NextHop: 10.1.1.2         Interface: Vlan-interface1

    BkNextHop: 0.0.0.0        BkInterface:

  RelyNextHop: 0.0.0.0          Neighbor : 0.0.0.0

    Tunnel ID: 0x0                  Label: NULL

  BKTunnel ID: 0x0                BKLabel: NULL

        State: Active Adv             Age: 1d00h25m32s

          Tag: 0

 

Destination: 10.1.1.2/32

     Protocol: Direct          Process ID: 0

   Preference: 0                     Cost: 0

 IpPrecedence:                    QosLcId:

      NextHop: 127.0.0.1        Interface: InLoop0

    BkNextHop: 0.0.0.0        BkInterface:

  RelyNextHop: 0.0.0.0          Neighbor : 0.0.0.0

    Tunnel ID: 0x0                  Label: NULL

  BKTunnel ID: 0x0                BKLabel: NULL

        State: Active NoAdv           Age: 1d00h41m34s

          Tag: 0

 

Destination: 10.1.2.0/24

     Protocol: Direct          Process ID: 0

   Preference: 0                     Cost: 0

 IpPrecedence:                    QosLcId:

      NextHop: 10.1.2.1         Interface: Vlan-interface11

    BkNextHop: 0.0.0.0        BkInterface:

  RelyNextHop: 0.0.0.0          Neighbor : 0.0.0.0

    Tunnel ID: 0x0                  Label: NULL

  BKTunnel ID: 0x0                BKLabel: NULL

        State: Active Adv             Age: 1d00h05m42s

          Tag: 0

 

Destination: 10.1.2.1/32

     Protocol: Direct          Process ID: 0

   Preference: 0                     Cost: 0

 IpPrecedence:                    QosLcId:

      NextHop: 127.0.0.1        Interface: InLoop0

    BkNextHop: 0.0.0.0        BkInterface:

  RelyNextHop: 0.0.0.0          Neighbor : 0.0.0.0

    Tunnel ID: 0x0                  Label: NULL

  BKTunnel ID: 0x0                BKLabel: NULL

        State: Active NoAdv           Age: 1d00h05m42s

          Tag: 0

 

Destination: 10.1.3.0/24

     Protocol: Direct          Process ID: 0

   Preference: 0                     Cost: 0

 IpPrecedence:                    QosLcId:

      NextHop: 10.1.3.1         Interface: Vlan-interface12

    BkNextHop: 0.0.0.0        BkInterface:

  RelyNextHop: 0.0.0.0          Neighbor : 0.0.0.0

    Tunnel ID: 0x0                  Label: NULL

  BKTunnel ID: 0x0                BKLabel: NULL

        State: Active Adv             Age: 1d00h05m31s

          Tag: 0

 

Destination: 10.1.3.1/32

     Protocol: Direct          Process ID: 0

   Preference: 0                     Cost: 0

 IpPrecedence:                    QosLcId:

      NextHop: 127.0.0.1        Interface: InLoop0

    BkNextHop: 0.0.0.0        BkInterface:

  RelyNextHop: 0.0.0.0          Neighbor : 0.0.0.0

    Tunnel ID: 0x0                  Label: NULL

  BKTunnel ID: 0x0                BKLabel: NULL

        State: Active NoAdv           Age: 1d00h05m32s

          Tag: 0

For output description, see Table 2.

display ip routing-table ip-address

Syntax

display ip routing-table [ vpn-instance vpn-instance-name ] ip-address [ mask | mask-length ] [ longer-match ] [ verbose ] [ | { begin | exclude | include } regular-expression ]

display ip routing-table [ vpn-instance vpn-instance-name ] ip-address1 { mask | mask-length } ip-address2 { mask | mask-length } [ verbose ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31 characters. If no VPN is specified, the information of the public network is displayed.

ip-address: Specifies a destination IP address, in dotted decimal notation.

mask: Specifies the IP address mask in dotted decimal notation.

mask-length: Specifies the IP address mask length in the range of 0 to 32.

longer-match: Displays the route with the longest mask.

verbose: Displays detailed information about all routes. With this argument absent, the command displays only brief information about active routes.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display ip routing-table ip-address to display information about routes to a specified destination address.

Executing the command with different parameters yields different output:

·     display ip routing-table ip-address

¡     The system ANDs the input destination IP address with the subnet mask in each route entry;

¡     The system ANDs the destination IP address in each route entry with its corresponding subnet mask;

¡     If the two operations yield the same result for an entry and this entry is active, it is displayed.

·     display ip routing-table ip-address mask

¡     The system ANDs the input destination IP address with the input subnet mask;

¡     The system ANDs the destination IP address in each route entry with the input subnet mask;

¡     If the two operations yield the same result for an entry and the entry is active with a subnet mask less than or equal to the input subnet mask, the entry is displayed.

Only route entries that exactly match the input destination address and mask are displayed.

·     display ip routing-table ip-address longer-match

¡     The system ANDs the input destination IP address with the subnet mask in each route entry;

¡     The system ANDs the destination IP address in each route entry with its corresponding subnet mask;

¡     If the two operations yield the same result for multiple entries that are active, the one with longest mask length is displayed.

·     display ip routing-table ip-address mask longer-match

¡     The system ANDs the input destination IP address with the input subnet mask;

¡     The system ANDs the destination IP address in each route entry with the input subnet mask;

¡     If the two operations yield the same result for multiple entries with a mask less than or equal to the input subnet mask, the one that is active with longest mask length is displayed.

Use display ip routing-table ip-address1 { mask-length | mask } ip-address2 { mask-length | mask } to display route entries with destination addresses within a specified range.

Examples

# Display route entries for the destination IP address 11.1.1.1.

<Sysname> display ip routing-table 11.1.1.1

Routing Table : Public

Summary Count : 4

 

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

 

0.0.0.0/0           Static 60   0            0.0.0.0         NULL0

11.0.0.0/8          Static 60   0            0.0.0.0         NULL0

11.1.0.0/16         Static 60   0            0.0.0.0         NULL0

11.1.1.0/24         Static 60   0            0.0.0.0         NULL0

# Display route entries by specifying a destination IP address and mask.

<Sysname> display ip routing-table 11.1.1.1 24

Routing Table : Public

Summary Count : 3

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

11.0.0.0/8          Static 60   0            0.0.0.0         NULL0

11.1.0.0/16         Static 60   0            0.0.0.0         NULL0

11.1.1.0/24         Static 60   0            0.0.0.0         NULL0

# Display route entries by specifying a destination IP address and the longer-match keyword.

<Sysname> display ip routing-table 11.1.1.1 longer-match

Routing Table : Public

Summary Count : 1

 

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

 

11.1.1.0/24         Static 60   0            0.0.0.0         NULL0

# Display route entries by specifying a destination IP address and mask and the longer-match keyword.

[Sysname] display ip routing-table 11.1.1.1 24 longer-match

Routing Table : Public

Summary Count : 1

 

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

 

11.1.1.0/24         Static 60   0            0.0.0.0         NULL0

# Display route entries for destination addresses in the range of 1.1.1.0 to 5.5.5.0.

<Sysname> display ip routing-table 1.1.1.0 24 5.5.5.0 24

Routing Table : Public

 

Destination/Mask    Proto  Pre  Cost         NextHop       Interface

 

1.1.1.0/24          Direct 0    0            1.1.1.1       Vlan1

1.1.1.1/32          Direct 0    0            127.0.0.1     InLoop0

2.2.2.0/24          Direct 0    0            2.2.2.1       Vlan2

3.3.3.0/24          Direct 0    0            3.3.3.1       Vlan3

3.3.3.1/32          Direct 0    0            127.0.0.1     InLoop0

4.4.4.0/24          Direct 0    0            4.4.4.1       Vlan4

4.4.4.1/32          Direct 0    0            127.0.0.1     InLoop0

For output description, see Table 1.

display ip routing-table ip-prefix

Syntax

display ip routing-table [ vpn-instance vpn-instance-name ] ip-prefix ip-prefix-name [ verbose ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

vpn-instance vpn-instance-name: Specifies an MPLS L3VPN. vpn-instance-name is a case-sensitive string of 1 to 31 characters. If no VPN is specified, the information of the public network is displayed.

ip-prefix-name: Specifies an IP prefix list by its name, a string of 1 to 19 characters.

verbose: Displays detailed information about all routes. With this argument absent, the command displays only brief information about active routes.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display ip routing-table ip-prefix to display information about routes permitted by a specified prefix list.

This command is intended for the follow-up display of routing policies. If the specified prefix list is not configured, detailed information about all routes (with the verbose keyword) or brief information about all active routes (without the verbose keyword) is displayed.

Examples

# Configure a prefix list named test, permitting routes with a prefix of 2.2.2.0 and a mask length between 24 and 32.

<Sysname> system-view

[Sysname] ip ip-prefix test permit 2.2.2.0 24 less-equal 32

# Display brief information about active routes permitted by the prefix list test.

[Sysname] display ip routing-table ip-prefix test

Routes Matched by Prefix list : test

Summary Count : 2

Destination/Mask   Proto  Pre  Cost        NextHop         Interface

2.2.2.0/24         Direct  0    0          2.2.2.1         Vlan2

2.2.2.1/32         Direct  0    0          127.0.0.1       InLoop0

For output description, see Table 1.

# Display detailed information about all routes permitted by IP prefix list test.

[Sysname] display ip routing-table ip-prefix test verbose

Routes Matched by Prefix list  test :

Summary Count : 2

 

Destination: 2.2.2.0/24

     Protocol: Direct          Process ID: 0

   Preference: 0                     Cost: 0

 IpPrecedence:                    QosLcId:

      NextHop: 2.2.2.1          Interface: Vlan-interface2

    BkNextHop: 0.0.0.0        BkInterface:

  RelyNextHop: 0.0.0.0          Neighbor : 0.0.0.0

    Tunnel ID: 0x0                  Label: NULL

  BKTunnel ID: 0x0                BKLabel: NULL

        State: Active Adv             Age: 1d00h20m52s

          Tag: 0

 

Destination: 2.2.2.1/32

     Protocol: Direct          Process ID: 0

   Preference: 0                     Cost: 0

 IpPrecedence:                    QosLcId:

      NextHop: 127.0.0.1        Interface: InLoop0

    BkNextHop: 0.0.0.0        BkInterface:

  RelyNextHop: 0.0.0.0          Neighbor : 0.0.0.0

    Tunnel ID: 0x0                  Label: NULL

  BKTunnel ID: 0x0                BKLabel: NULL

        State: Active NoAdv           Age: 1d00h20m52s

          Tag: 0

For output description, see Table 2.

display ip routing-table protocol

Syntax

display ip routing-table [ vpn-instance vpn-instance-name ] protocol protocol [ inactive | verbose ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31 characters. If no VPN is specified, the information of the public network is displayed.

protocol: Specifies a routing protocol. It can be bgp, direct, isis, ospf, rip, static, or guard.

inactive: Displays information about only inactive routes. With this argument absent, the command displays information about all routes.

verbose: Displays detailed routing table information. With this argument absent, the command displays brief routing table information.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display ip routing-table protocol to display routing information of a specified routing protocol.

Examples

# Display brief information about direct routes.

<Sysname> display ip routing-table protocol direct

Public Routing Table : Direct

Summary Count : 6

 

Direct Routing Table Status : < Active>

Summary Count :  6

 

Destination/Mask    Proto  Pre  Cost       NextHop         Interface

 

2.2.2.0/24          Direct 0    0          2.2.2.1         Vlan2

2.2.2.2/32          Direct 0    0          127.0.0.1       InLoop0

127.0.0.0/8         Direct 0    0          127.0.0.1       InLoop0

127.0.0.1/32        Direct 0    0          127.0.0.1       InLoop0

192.168.80.0/24     Direct 0    0          192.168.80.10   Vlan11

192.168.80.10/32    Direct 0    0          127.0.0.1       InLoop0

 

Direct Routing Table Status : < Inactive>

Summary Count : 0

# Display brief information about static routes.

<Sysname> display ip routing-table protocol static

Public Routing Table : Static

Summary Count : 2

 

Static Routing Table Status : < Active>

Summary Count :  0

 

Static Routing table Status : < Inactive>

Summary Count : 2

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

1.2.3.0/24          Static 60   0            1.2.4.5         Vlan10

3.0.0.0/8           Static 60   0            2.2.2.2         Vlan11

For output description, see Table 1.

display ip routing-table statistics

Syntax

display ip routing-table [ vpn-instance vpn-instance-name ] statistics [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

vpn-instance vpn-instance-name: Specifies an MPLS L3VPN. vpn-instance-name is a case-sensitive string of 1 to 31 characters. If no VPN is specified, the information of the public network is displayed.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display ip routing-table statistics to display the route statistics of the routing table.

Examples

# Display route statistics in the routing table.

<Sysname> display ip routing-table statistics

Proto      route       active      added       deleted       freed

DIRECT     24          4           25          1             0

STATIC     4           1           4           0             0

RIP        0           0           0           0             0

OSPF       0           0           0           0             0

IS-IS      0           0           0           0             0

BGP        0           0           0           0             0

Total      28          5           29          1             0

Table 3 Command output

Field

Description

Proto

Origin of the routes.

route

Number of routes from the origin.

active

Number of active routes from the origin.

added

Number of routes added into the routing table since the router started up or the routing table was last cleared.

deleted

Number of routes marked as deleted, which will be freed after a period.

freed

Number of routes that got freed, that is, got removed permanently.

Total

Total number.

 

display ipv6 routing-table

Syntax

display ipv6 routing-table [ vpn-instance vpn-instance-name ] [ verbose ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

vpn-instance vpn-instance-name: Specifies an MPLS L3VPN. vpn-instance-name is a case-sensitive string of 1 to 31 characters. If no VPN is specified, the information of the public network is displayed.

verbose: Displays detailed information about all IPv6 routes, including both active and inactive routes. With this argument absent, the command displays only brief information about active routes.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display ipv6 routing-table to display brief IPv6 routing table information, including destination IP address and prefix, protocol type, priority, metric, next hop and output interface.

The command displays only active routes, namely, the brief information about the current optimal routes.

Use display ipv6 routing-table verbose to display detailed information about all IPv6 routes, including both active and inactive routes. The output shows the statistics of the entire routing table, and then the detailed information of each route.

Examples

# Display brief routing table information

<Sysname> display ipv6 routing-table

Routing Table : Public

        Destinations : 1        Routes : 1

 

Destination : ::1/128                           Protocol    : Direct

NextHop     : ::1                               Preference  : 0

Interface   : InLoop0                           Cost        : 0

Table 4 Command output

Field

Description

Destination

IPv6 address of the destination network/host.

NextHop

Next hop address.

Preference

Route priority.

Interface

Output interface.

Protocol

Routing protocol.

Cost

Route cost.

 

# Display detailed routing table information.

<Sysname> display ipv6 routing-table verbose

Routing Table : Public

         Destinations : 1        Routes : 1

 

 Destination  : ::1                                     PrefixLength : 128

 NextHop      : ::1                                     Preference   : 0

 IpPrecedence :                                         QosLcId      :

 RelayNextHop : ::                                      Tag          : 0H

 Neighbor     : ::                                      ProcessID    : 0

 Interface    : InLoopBack0                             Protocol     : Direct

 State        : Active NoAdv                            Cost         : 0

 Tunnel ID    : 0x0                                     Label        : NULL

 Age          : 22161sec

Table 5 Command output

Field

Description

Destination

IPv6 address of the destination network/host.

PrefixLength

Prefix length of the address.

NextHop

Next hop.

Preference

Route priority.

IpPrecedence

IP precedence.

QosLcId

QoS-local ID.

RelayNextHop

Recursive next hop.

Tag

Tag of the route.

Neighbor

Neighbor address.

ProcessID

Process ID.

Interface

Output interface.

Protocol

Routing protocol.

State

State of the route: Active, Inactive, Adv (advertised), or NoAdv (not advertised)

Cost

Route cost.

Tunnel ID

Tunnel ID.

Label

Label.

Age

Time that has elapsed since the route was generated.

 

display ipv6 routing-table acl

Syntax

display ipv6 routing-table [ vpn-instance vpn-instance-name ] acl acl6-number [ verbose ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

vpn-instance vpn-instance-name: Specifies an MPLS L3VPN. vpn-instance-name is a case-sensitive string of 1 to 31 characters. If no VPN is specified, the information of the public network is displayed.

acl6-number: Specifies a basic IPv6 ACL by its number in the range of 2000 to 2999.

verbose: Displays detailed information about all routes permitted by the ACL. Without this keyword, only brief information about active routes is displayed.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display ipv6 routing-table acl to display routing information permitted by the IPv6 ACL.

If the specified IPv6 ACL is not available, all routing information is displayed.

Examples

# Display brief routing information permitted by ACL 2000.

<Sysname> display ipv6 routing-table acl 2000

Routes Matched by Access list  2000  :

Summary Count : 2

Destination : ::1/128                           Protocol   : Direct

NextHop     : ::1                               Preference : 0

Interface   : InLoop0                           Cost       : 0

Destination : 1:1::/64                          Protocol   : Static

NextHop     : ::                                Preference : 60

Interface   : NULL0                             Cost       : 0

For output description, see Table 4.

display ipv6 routing-table ipv6-address

Syntax

display ipv6 routing-table [ vpn-instance vpn-instance-name ] ipv6-address prefix-length [ longer-match ] [ verbose ] [ | { begin | exclude | include } regular-expression ]

display ipv6 routing-table [ vpn-instance vpn-instance-name ] ipv6-address1 prefix-length1 ipv6-address2 prefix-length2 [ verbose ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

vpn-instance vpn-instance-name: Specifies an MPLS L3VPN. vpn-instance-name is a case-sensitive string of 1 to 31 characters. If no VPN is specified, the information of the public network is displayed.

ipv6-address: Specifies a destination IPv6 address.

prefix-length: Specifies the prefix length in the range of 0 to 128.

longer-match: Displays the matched route having the longest prefix length.

ipv6-address1/ipv6-address2: Specifies an IPv6 address range from IPv6 address1 to IPv6 address2.

prefix-length1/prefix-length2: Specifies a prefix length in the range of 0 to 128.

verbose: Displays detailed information about all routes. Without this keyword, only brief information about active routes is displayed.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display ipv6 routing-table ipv6-address to display routing information about the specified destination IPv6 address.

Executing the command with different parameters yields different outputs:

·     display ipv6 routing-table ipv6-address

¡     The system ANDs the input destination IPv6 address with the prefix length in each route entry;

¡     The system ANDs the destination IPv6 address in each route entry with the prefix length in each entry;

¡     If the two operations yield the same result for an entry and this entry is active, it is displayed.

·     display ipv6 routing-table ipv6-address prefix-length

¡     The system ANDs the input destination IPv6 address with the input prefix length;

¡     The system ANDs the destination IPv6 address in each route entry with the input prefix length;

¡     If the two operations yield the same result for an entry and the entry is active with a prefix length less than or equal to the input prefix length, the entry is displayed.

Only route entries that exactly match the input destination address and prefix length are displayed.

·     display ipv6 routing-table ipv6-address prefix-length longer-match

¡     The system ANDs the input destination IPv6 address with the input prefix length;

¡     The system ANDs the destination IPv6 address in each route entry with the input prefix length;

¡     If the two operations yield the same result for multiple entries with a prefix length less than or equal to the input prefix length, the one that is active with the longest prefix length is displayed.

Use display ipv6 routing-table ipv6-address1 ipv6-address2 to display routes whose destinations are in the specified IPv6 address range.

Examples

# Display brief information about the routes with destination IPv6 address 10::1.

<Sysname> display ipv6 routing-table 10::1

Routing Table: Public

Summary Count: 3

 

Destination: 10::/64                                    Protocol  : Static

NextHop    : ::                                         Preference: 60

Interface  : NULL0                                      Cost      : 0

 

Destination: 10::/68                                    Protocol  : Static

NextHop    : ::                                         Preference: 60

Interface  : NULL0                                      Cost      : 0

 

Destination: 10::/120                                    Protocol  : Static

NextHop    : ::                                          Preference: 60

Interface  : NULL0                                       Cost      : 0

# Display brief information about the route with destination IPv6 address 10::1 and prefix length 100.

<Sysname> display ipv6 routing-table 10::1 100

Routing Table: Public

Summary Count: 3

 

Destination: 10::/64                                     Protocol  : Static

NextHop    : ::                                          Preference: 60

Interface  : NULL0                                       Cost      : 0

 

Destination: 10::/68                                     Protocol  : Static

NextHop    : ::                                          Preference: 60

Interface  : NULL0                                       Cost      : 0

# Display brief information about the route with destination IPv6 address 10:: and the longest prefix length.

<Sysname> display ipv6 routing-table 10:: longer-match

Routing Tables: Public

Summary Count : 1

Destination: 10::/120                                    Protocol  : Static

NextHop    : ::                                          Preference: 60

Interface  : NULL0                                       Cost      : 0

# Display brief information about the route matching destination IPv6 address 10::1, prefix length 100, and the longest prefix length.

<Sysname> display ipv6 routing-table 10::1 100 longer-match

Routing Table: Public

Summary Count: 1

Destination: 10::/68                                     Protocol  : Static

NextHop    : ::                                          Preference: 60

Interface  : NULL0                                       Cost      : 0

# Display routes whose destinations are in the specified IPv6 address range.

<Sysname> display ipv6 routing-table 100:: 64 300:: 64

Routing Table : Public

Summary Count : 3

 

Destination: 100::/64                                    Protocol  : Static

NextHop    : ::                                          Preference: 60

Interface  : NULL0                                       Cost      : 0

 

Destination: 200::/64                                    Protocol  : Static

NextHop    : ::                                          Preference: 60

Interface  : NULL0                                       Cost      : 0

 

Destination: 300::/64                                    Protocol  : Static

NextHop    : ::                                          Preference: 60

Interface  : NULL0                                       Cost      : 0

For output description, see Table 4.

display ipv6 routing-table ipv6-prefix

Syntax

display ipv6 routing-table [ vpn-instance vpn-instance-name ] ipv6-prefix ipv6-prefix-name [ verbose ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

vpn-instance vpn-instance-name: Specifies an MPLS L3VPN. vpn-instance-name is a case-sensitive string of 1 to 31 characters. If no VPN is specified, the information of the public network is displayed.

ipv6-prefix-name: Specifies an IPv6 prefix list by its name, a string of 1 to 19 characters.

verbose: Displays detailed information about all routes. Without this keyword, only brief information about active routes is displayed.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display ipv6 routing-table ipv6-prefix to display routes permitted by the IPv6 prefix list.

Examples

# Display brief active routing information permitted by the IPv6 prefix list test2.

<Sysname> display ipv6 routing-table ipv6-prefix test2

Routes Matched by Prefix list  test2  :

Summary Count : 1

 

Destination: 100::/64                                    Protocol  : Static

NextHop    : ::                                          Preference: 60

Interface  : NULL0                                       Cost      : 0

For output description, see Table 4.

display ipv6 routing-table protocol

Syntax

display ipv6 routing-table [ vpn-instance vpn-instance-name ] protocol protocol [ inactive | verbose ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

vpn-instance vpn-instance-name: Specifies an MPLS L3VPN. vpn-instance-name is a case-sensitive string of 1 to 31 characters. If no VPN is specified, the information of the public network is displayed.

protocol: Displays routes of a routing protocol, which can be bgp4+, direct, isisv6, ospfv3, ripng, or static.

inactive: Displays only inactive routes. Without the keyword, all routes are displayed.

verbose: Displays detailed information about all routes. Without this keyword, only brief information about active routes is displayed.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display ipv6 routing-table protocol to display IPv6 routes of a specified routing protocol.

Examples

# Display brief information about all direct routes.

<Sysname> display ipv6 routing-table protocol direct

Public Routing Table : Direct

Summary Count : 1

 

Direct Routing Table Status : <Active>

Summary Count : 1

 

Destination: ::1/128                                     Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : InLoop0                                     Cost      : 0

 

Direct Routing Table Status : <Inactive>

Summary Count : 0

For output description, see Table 4.

display ipv6 routing-table statistics

Syntax

display ipv6 routing-table [ vpn-instance vpn-instance-name ] statistics [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

vpn-instance vpn-instance-name: Specifies an MPLS L3VPN. vpn-instance-name is a case-sensitive string of 1 to 31 characters. If no VPN is specified, the information of the public network is displayed.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display ipv6 routing-table statistics to display IPv6 routing statistics, including total route number, added route number and deleted route number.

Examples

# Display routing statistics.

<Sysname> display ipv6 routing-table statistics

Protocol   route      active     added      deleted     freed

DIRECT     1          1          1          0           0

STATIC     3          0          3          0           0

RIPng      0          0          0          0           0

OSPFv3     0          0          0          0           0

IS-ISv6    0          0          0          0           0

BGP4+      0          0          0          0           0

Total      4          1          4          0           0

Table 6 Command output

Field

Description

Protocol

Routing protocol.

route

Route number of the protocol.

active

Number of active routes.

added

Routes added after the last startup of the router.

deleted

Deleted routes, which will be released after a specified time.

freed

Released (totally removed from the routing table) route number.

Total

Total number of routes.

 

max-ecmp-num

Syntax

max-ecmp-num number

undo max-ecmp-num

View

System view

Default level

2: System level

Parameters

number: Specifies the maximum number of ECMP routes. The value can be 16 or 32.

Description

Use max-ecmp-num to configure the maximum number of ECMP routes.

Use undo max-ecmp-num to restore the default.

By default, the maximum number of ECMP routes is 16.

Examples

# Configure the maximum number of ECMP routes as 32.

<Sysname> system-view

[Sysname] max-ecmp-num 32

reset ip routing-table statistics protocol

Syntax

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

View

User view

Default level

2: System level

Parameters

vpn-instance vpn-instance-name: Specifies an MPLS L3VPN. vpn-instance-name is a case-sensitive string of 1 to 31 characters. If no VPN is specified, the routing statistics of the public network is cleared.

protocol: Clears statistics for the routing protocol, which can be bgp, direct, is-is, ospf, rip, or static.

all: Clears statistics for all routing protocols.

Description

Use reset ip routing-table statistics protocol to clear routing statistics for the routing table.

Examples

# Clear routing statistics in the routing table of VPN instance Sysname1.

<Sysname> reset ip routing-table statistics protocol vpn-instance Sysname1 all

reset ipv6 routing-table statistics

Syntax

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

View

User view

Default level

2: System level

Parameters

vpn-instance vpn-instance-name: Specifies an MPLS L3VPN. vpn-instance-name is a case-sensitive string of 1 to 31 characters. If no VPN is specified, the routing statistics of the public network is cleared.

protocol: Clears statistics for the routing protocol, which can be bgp4+, direct, isisv6, ospfv3, ripng, or static.

all: Clears statistics for all routing protocols.

Description

Use reset ipv6 routing-table statistics to clear the route statistics of the routing table.

Examples

# Clear statistics for all routing protocols.

<Sysname> reset ipv6 routing-table statistics protocol all

  • 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 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
新华三官网