HP L3 Commands PDF
HP L3 Commands PDF
Layer 3 - IP Routing
Command Reference
i
Basic IP routing commands
The term "router" in this chapter refers to both routers and Layer 3 switches.
display ip routing-table
Syntax
display ip routing-table [ verbose ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
verbose: Displays detailed routing table information, including inactive routes. Without this keyword, 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 routing entry contained in one line.
The information displayed includes destination IP address/mask length, protocol, priority, cost, next hop,
and outbound interface. This command displays only the optimal routes in use.
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 : 6 Routes : 6
1
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.0.0/24 Direct 0 0 192.168.0.1 Vlan1
192.168.0.1/32 Direct 0 0 127.0.0.1 InLoop0
Field Description
Destinations Number of destination addresses
Destination: 1.1.2.0/24
Protocol: Direct Process ID: 0
Preference: 0 Cost: 0
IpPrecedence: QosLcId:
NextHop: 1.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: 06h46m22s
Tag: 0
Destination: 1.1.2.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: 06h46m22s
Tag: 0
Destination: 127.0.0.0/8
2
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: 06h46m36s
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: 06h46m37s
Tag: 0
Destination: 192.168.0.0/24
Protocol: Direct Process ID: 0
Preference: 0 Cost: 0
IpPrecedence: QosLcId:
NextHop: 192.168.0.1 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: 06h46m35s
Tag: 0
Destination: 192.168.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: 06h46m35s
Tag: 0
Displayed first are statistics for the whole routing table, followed by a detailed description of each route
(in sequence).
3
Table 2 Command output
Field Description
Destination Destination address/mask length.
IpPrecedence IP precedence.
Label Label.
4
Field Description
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.
• 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.
• NotInstall—Among routes to a destination, the route with the highest priority is
installed into the core routing table and advertised. A NotInstall route cannot be
State 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.
Time for which the route has been in the routing table, in the sequence of hour, minute,
Age
and second from left to right.
5
longer-match: Displays the route with the longest mask.
verbose: Displays detailed routing table information, including both active and inactive routes. Without
this argument, 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 own 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 own subnet mask.
If the two operations yield the same result for multiple entries that are active, the one with the
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
6
Destination/Mask Proto Pre Cost NextHop Interface
# 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
# 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
# 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
7
display ip routing-table protocol
Syntax
display ip routing-table protocol protocol [ inactive | verbose ] [ | { begin | exclude | include }
regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
protocol: Specifies the routing protocol. It can be direct or static.
inactive: Displays information about only inactive routes. Without this argument, the command displays
information about both active and inactive routes.
verbose: Displays detailed routing table information. Without this argument, 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
8
Summary Count : 0
9
Table 3 Command output
Field Description
Proto Origin of the routes
Number of routes added into the routing table since the router started up or the routing
added
table was last cleared
deleted Number of routes marked as deleted, which will be freed after a period
10
Destinations : 1 Routes : 1
Destination: ::1/128 Protocol : Direct
NextHop : ::1 Preference: 0
Interface : InLoop0 Cost : 0
Field Description
Destination IPv6 address of the destination network/host
Field Description
Destination IPv6 address of the destination network/host
IpPrecedence IP precedence
QosLcId QoS-local ID
ProcessID Process ID
11
Field Description
Protocol Routing protocol
Tunnel ID Tunnel ID
Label Label
Age Time that has elapsed since the route was generated
12
• 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 fall
into the specified IPv6 address range.
Examples
# Display brief information about the route matching the specified destination IPv6 address.
<Sysname> display ipv6 routing-table 10::1 127
Routing Table: Public
Summary Count: 3
# Display brief information about the matched route with the longest prefix length.
<Sysname> display ipv6 routing-table 10:: 127 longer-match
Routing Tables: Public
Summary Count : 1
Destination: 10::/120 Protocol : Static
NextHop : :: Preference: 60
Interface : NULL0 Cost : 0
# Display routes whose destinations fall into the specified IPv6 address range.
<Sysname> display ipv6 routing-table 100:: 64 300:: 64
Routing Table : Public
Summary Count : 3
13
Interface : NULL0 Cost : 0
14
Destination: ::1/128 Protocol : Direct
NextHop : ::1 Preference: 0
Interface : InLoop0 Cost : 0
Field Description
Protocol Routing protocol
15
Field Description
deleted Deleted routes, which will be released after a specified time
freed Released (totally removed from the routing table) route number
16
Static routing configuration commands
The term "router" in this chapter refers to both routers and Layer 3 switches.
ip route-static
Syntax
ip route-static dest-address { mask | mask-length } { next-hop-address [ track track-entry-number ] |
interface-type interface-number [ next-hop-address ] } [ preference preference-value ] [ permanent ]
[ description description-text ]
undo ip route-static dest-address { mask | mask-length } [ next-hop-address | interface-type
interface-number [ next-hop-address ] ] [ preference preference-value ]
View
System view
Default level
2: System level
17
Parameters
dest-address: Specifies the destination IP address of the static route, in dotted decimal notation.
mask: Specifies the mask of the IP address, in dotted decimal notation.
mask-length: Specifies the mask length, in the range of 0 to 32.
next-hop-address: Specifies the IP address of the next hop, in dotted decimal notation.
interface-type interface-number: Specifies the output interface by its type and number. If the output
interface is a broadcast interface, such as a VLAN interface, the next hop address must be specified.
preference preference-value : Specifies the preference of the static route, in the range of 1 to 255 and
defaults to 60.
permanent: Specifies the route as a permanent static route. If the output interface is down, the permanent
static route is still active.
description description-text: Configures a description for the static route, which consists of 1 to 60
characters, including special characters like space, but excluding question marks (?).
track track-entry-number: Associates the static route with a track entry. Use the track-entry-number
argument to specify a track entry number, in the range of 1 to 1024.
Description
Use ip route-static to configure a unicast static route.
Use undo ip route-static to delete a unicast static route.
When you configure a unicast static route, follow these 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 will be used for forwarding a packet if no route is available for the packet
in the routing table.
• Implement different routing policies by tuning route preference. For example, to enable them to back
up one another, assign different preferences to them.
• Specify the output interface or the next hop address of the static route as needed.
{ If the output interface supports network address-to-link layer address resolution or is a
point-to-point interface, you may specify only the interface or the next hop address.
{ If the output interface is a Null 0 interface, no next hop address is required.
{ If you specify a broadcast interface (such as a VLAN interface) as the output interface for a
static route, you must specify the corresponding next hop of the interface at the same time.
• The next hop address cannot be the IP address of a local interface (such as a VLAN interface).
Otherwise, the static route does not take effect.
• If a static route needs route recursion, the associated track entry must monitor the next hop of the
recursive route instead of that of the static route. Otherwise, a valid route may be mistakenly
considered invalid.
• Do not specify the permanent keyword together with the track keyword.
Related commands: display ip routing-table and ip route-static default-preference.
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
18
ip route-static default-preference
Syntax
ip route-static default-preference default-preference-value
undo ip route-static default-preference
View
System view
Default level
2: System level
Parameters
default-preference-value: Specifies the default preference for static routes, in the range of 1 to 255.
Description
Use ip route-static default-preference to configure the default preference for static routes.
Use undo ip route-static default-preference to restore the default.
By default, the default preference of static routes is 60.
If no preference is specified when configuring a static route, the default preference is used.
When the default preference is re-configured, it applies only to newly added static routes.
Related commands: display ip routing-table and ip route-static.
Examples
# Set the default preference of static routes to 120.
<Sysname> system-view
[Sysname] ip route-static default-preference 120
19
IPv6 static routing configuration commands
The term "router" in this chapter refers to both routers and Layer 3 switches.
ipv6 route-static
Syntax
ipv6 route-static ipv6-address prefix-length { interface-type interface-number [ next-hop-address ] |
next-hop-address } [ preference preference-value ]
undo ipv6 route-static ipv6-address prefix-length [ interface-type interface-number [ next-hop-address ] |
next-hop-address ] [ preference preference-value ]
View
System view
Default level
2: System level
20
Parameters
ipv6-address prefix-length: Specifies the IPv6 address and prefix length.
interface-type interface-number: Specifies an output interface by its type and number. If the output
interface is a non-P2P interface, such as an NBMA interface or broadcast interface (for example, a
VLAN interface), the next hop address must be specified.
nexthop-address: Specifies the next hop IPv6 address.
preference preference-value: Specifies the route preference value, in the range of 1 to 255. The default
is 60.
Description
Use ipv6 route-static to configure an IPv6 static route.
Use undo ipv6 route-static 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. If the destination address of an IPv6 packet does not match any entry in the routing table, this
default route will be used to forward the packet.
If you specify a broadcast interface, such as a VLAN interface, as the output interface for a static route,
you must specify the next hop address.
Related commands: delete ipv6 static-routes all and display ipv6 routing-table.
Examples
# Configure a static IPv6 route, with the destination address being 1:1:2::/24 and next hop being
1:1:3::1.
<Sysname> system-view
[Sysname] ipv6 route-static 1:1:2:: 24 1:1:3::1
21
Support and other resources
Contacting HP
For worldwide technical support information, see the HP support website:
http://www.hp.com/support
Before contacting HP, collect the following information:
• Product model names and numbers
• Technical support registration number (if applicable)
• Product serial numbers
• Error messages
• Operating system type and revision level
• Detailed questions
Subscription service
HP recommends that you register your product at the Subscriber's Choice for Business website:
http://www.hp.com/go/wwalerts
After registering, you will receive email notification of product enhancements, new driver versions,
firmware updates, and other product resources.
Related information
Documents
To find related documents, browse to the Manuals page of the HP Business Support Center website:
http://www.hp.com/support/manuals
• For related documentation, navigate to the Networking section, and select a networking category.
• For a complete list of acronyms and their definitions, see HP FlexNetwork Technology Acronyms.
Websites
• HP.com http://www.hp.com
• HP Networking http://www.hp.com/go/networking
• HP manuals http://www.hp.com/support/manuals
• HP download drivers and software http://www.hp.com/support/downloads
• HP software depot http://www.software.hp.com
• HP Education http://www.hp.com/learn
22
Conventions
This section describes the conventions used in this documentation set.
Command conventions
Convention Description
Boldface Bold text represents commands and keywords that you enter literally as shown.
Italic Italic text represents arguments that you replace with actual values.
[] Square brackets enclose syntax choices (keywords or arguments) that are optional.
Braces enclose a set of required syntax choices separated by vertical bars, from which
{ x | y | ... }
you select one.
Square brackets enclose a set of optional syntax choices separated by vertical bars, from
[ x | y | ... ]
which you select one or none.
The argument or keyword and argument combination before the ampersand (&) sign can
&<1-n>
be entered 1 to n times.
GUI conventions
Convention Description
Window names, button names, field names, and menu items are in bold text. For
Boldface
example, the New User window appears; click OK.
> Multi-level menus are separated by angle brackets. For example, File > Create > Folder.
Symbols
Convention Description
An alert that calls attention to important information that if not understood or followed can
WARNING result in personal injury.
An alert that calls attention to important information that if not understood or followed can
CAUTION result in data loss, data corruption, or damage to hardware or software.
23
Network topology icons
Represents a generic switch, such as a Layer 2 or Layer 3 switch, or a router that supports
Layer 2 forwarding and other Layer 2 features.
24
Index
DIRSW
D ip route-static,17
ip route-static default-preference,19
delete ipv6 static-routes all,20
ipv6 route-static,20
delete static-routes all,17
display ip routing-table,1 R
display ip routing-table ip-address,5 reset ip routing-table statistics protocol,16
display ip routing-table protocol,8 reset ipv6 routing-table statistics,16
display ip routing-table statistics,9 S
display ipv6 routing-table,10
Subscription service,22
display ipv6 routing-table ipv6-address,12
display ipv6 routing-table protocol,14 W
display ipv6 routing-table statistics,15 Websites,22
Documents,22
I
25