Page 3
Preface The H3C S5120-EI documentation set includes 10 command references, which describe the commands and command syntax options for the S5120-EI Series Ethernet Switches, Release2208. The Layer 3—IP Routing Command Reference describes routing configuration commands. This preface includes: • Audience •...
Page 4
An alert that calls attention to essential information. IMPORTANT An alert that contains additional or supplementary information. NOTE An alert that provides helpful information. About the H3C S5120-EI documentation set The H3C S5120-EI documentation set includes: Category Documents Purposes Marketing brochures Describe product specifications and benefits.
Page 5
Obtaining documentation You can access the most up-to-date H3C product documentation on the World Wide Web at http://www.h3c.com. Click the links on the top navigation bar to obtain different categories of product documentation: [Technical Support &...
IP routing basics configuration commands NOTE: router The term in this document refers to both routers and Layer 3 switches. IP routing basics configuration commands display ip routing-table Syntax display ip routing-table [ verbose ] [ | { begin | exclude | include } regular-expression ] View Any view Default level...
Page 8
Routing Tables: Public Destinations : 7 Routes : 7 Destination/Mask Proto Cost NextHop Interface 1.1.2.0/24 Direct 0 1.1.2.1 Vlan1 1.1.2.1/32 Direct 0 127.0.0.1 InLoop0 2.2.2.0/24 static 60 1.1.2.2 Vlan2 127.0.0.0/8 Direct 0 127.0.0.1 InLoop0 127.0.0.1/32 Direct 0 127.0.0.1 InLoop0 192.168.0.0/24 Direct 0 192.168.0.1 Vlan10...
Page 10
Table 2 Output description 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 NextHop Address of the next hop on the route Interface Outbound interface for packets to be forwarded along the route BkNextHop Backup next hop...
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. Time for which the route has been in the routing table, in the sequence of hour, minute, and second from left to right.
Page 12
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; and ANDs the destination IP address in each route entry with its own subnet mask. If the two operations yield the same result for an entry and this entry is active, it is displayed.
11.1.1.0/24 Static 60 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 Cost NextHop Interface 11.0.0.0/8 Static 60 0.0.0.0 NULL0 11.1.0.0/16 Static 60...
Page 14
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 the 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.
display ip routing-table statistics Syntax display ip routing-table statistics [ | { begin | exclude | include } regular-expression ] View Any view Default level 1: Monitor level Parameters |: Filters command output by specifying a regular expression. For more information about regular expressions, see the Fundamentals Configuration Guide.
display ipv6 routing-table Syntax display ipv6 routing-table [ | { begin | exclude | include } regular-expression ] View Any view Default level 1: Monitor level Parameters |: Filters command output by specifying a regular expression. For more information about regular expressions, see the Fundamentals Configuration Guide.
Description Use the display ipv6 routing-table protocol command to display routes of a specified routing protocol. Examples # Display brief information about all direct routes. <Sysname> display ipv6 routing-table protocol direct Direct Routing Table : Summary Count : 1 Direct Routing Table's Status : < Active > Summary Count : 1 Destination: ::1/128 Protocol...
STATIC Total Table 5 Output description 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...
Interface : InLoopBack0 Protocol : Direct State : Active NoAdv Cost Tunnel ID : 0x0 Label : NULL : 22161sec Table 6 Output description Field Description Destination Destination IPv6 address PrefixLength Prefix length of the address Nexthop Next hop Preference Route priority RelayNextHop Recursive next hop...
<Sysname> reset ip routing-table statistics protocol all reset ipv6 routing-table statistics Syntax reset ipv6 routing-table statistics protocol { protocol | all } View User view Default level 2: System level Parameters protocol: Clears statistics for the routing protocol, which can be direct or static. all: Clears statistics for all IPv6 routing protocols.
Static routing configuration commands NOTE: router The term in this document refers to both routers and Layer 3 switches. Static routing configuration commands delete static-routes all Syntax delete static-routes all View System view Default level 2: System level Parameters None Description Use the delete static-routes all command to delete all static routes.
Page 25
View System view Default level 2: System level Parameters dest-address: Destination IP address of the static route, in dotted decimal notation. mask: Mast of the IP address, in dotted decimal notation. mask-length: Mask length, in the range 0 to 32. next-hop-address: IP address of the next hop, in dotted decimal notation.
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 & intranet. <Sysname> system-view [Sysname] ip route-static 1.1.1.1 24 2.2.2.2 description for internet & intranet ip route-static default-preference Syntax ip route-static default-preference default-preference-value undo ip route-static default-preference...
IPv6 static routing configuration commands delete ipv6 static-routes all Syntax delete ipv6 static-routes all View System view Default level 2: System level Parameters None Description Use the delete ipv6 static-routes all command to delete all static routes including the default route. When using this command, you will be prompted whether to continue the deletion and only after you confirm the deletion will the static routes be deleted.
Page 28
preference-value: Route preference value, in the range of 1 to 255. The default is 60. Description Use the ipv6 route-static command to configure an IPv6 static route. Use the undo ipv6 route-static command to remove an IPv6 static route. An IPv6 static route that has the destination address configured as ::/0 (a prefix length of 0) is the default IPv6 route.
Index D I R display ipv6 routing-table statistics,14 display ipv6 routing-table verbose,15 delete ipv6 static-routes all,21 delete static-routes all,18 display ip routing-table,1 route-static,18 display ip routing-table ip-address,5 ip route-static default-preference,20 display ip routing-table protocol,7 ipv6 route-static,21 display ip routing-table statistics,9 display ipv6 routing-table,10 reset ip routing-table statistics...