6.1. IP Unicast-Routing Commands

6.1.1. ip address

Command Purpose

To set a primary or secondary IP address for an interface, use the ip address command in interface configuration mode. To remove an IP address or disable IP processing, use the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

ip address ( ADDRESS WILDCARD-MASK | ADDRESS /PREFIX-LENGTH ) ( secondary | )

Parameter

Parameter Description

Parameter Value

ADDRESS

IPv4 address of the interface

IPv4 address

WILDCARD-MASK

Mask for the associated IP subnet

Mask in IPv4 address format

PREFIX-LENGTH

Prefix length of the address

1-32

secondary

(Optional) Specifies that the configured address is a secondary IP address. If this keyword is omitted, the configured address is the primary IP address

-

Command Mode

Interface Configuration

Default

No IP address is defined for the interface.

Usage

An interface can have one primary IP address and multiple secondary IP addresses. Packets generated by the switch always use the primary IP address. Therefore, all switches and access servers on a segment should share the same primary network number.

Hosts can determine subnet masks using the Internet Control Message Protocol (ICMP) mask request message. Switch respond to this request with an ICMP mask reply message.

You can disable IP processing on a particular interface by removing its IP address with the no ip address command. If the software detects another host using one of its IP addresses, it will print an error message on the console.

The optional secondary keyword allows you to specify up to 8 secondary addresses. Secondary addresses are treated like primary addresses, except the system never generates datagrams other than routing updates with secondary source addresses. IP broadcasts and Address Resolution Protocol (ARP) requests are handled properly, as are interface routes in the IP routing table.

Secondary IP addresses can be used in a variety of situations. The following are the most common applications:

There may not be enough host addresses for a particular network segment. For example, your subnet allows up to 254 hosts per logical subnet, but on one physical subnet you need 300 host addresses. Using secondary IP addresses on the switches or access servers allows you to have two logical subnets using one physical subnet.

Many older networks were built using Level 2 bridges. The judicious use of secondary addresses can aid in the transition to a subnet and router-based network. Switches on an older, bridged segment can be easily made aware that many subnets are on that segment.

Two subnets of a single network might otherwise be separated by another network. This situation is not permitted when subnets are in use. In these instances, the first network is extended, or layered on top of the second network using secondary addresses.

Examples

In the following example, 10.108.1.27 is the primary address and 192.31.7.17 and 192.31.8.17 are secondary addresses for eth-0-1:

Switch# configure terminal
Switch(config)# interface eth-0-1
Switch(config-if)# ip address 10.108.1.27 255.255.255.0
Switch(config-if)# ip address 192.31.7.17/24 secondary
Switch(config-if)# ip address 192.31.8.17 255.255.255.0 secondary

6.1.2. ip icmp error-interval

Command Purpose

To set the interval of ICMP error messages generated by the switch, use the ip icmp error-interval command in Global Config mode. To restore the default value, use the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

ip icmp error-interval INTERVAL

no ip icmp error-interval

Parameter

Parameter Description

Parameter Value

INTERVAL

The interval in milliseconds.

0 - 2147483647 milliseconds

Command Mode

Global Config

Default

Default is 1000 milliseconds.

Usage

None

Examples

In the following example, user sets the error interval to 10 seconds, which means only one ICMP error message was generated per 10 seconds:

Switch# configure terminal
Switch(config)# ip icmp error-interval 10000

Related Commands

ip redirects

ip unreachables

6.1.3. ip redirects

Command Purpose

To enable send the ICMP redirect messages generated by the switch, use the ip redirects command in interface configuration mode. To restore the default value, use the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

ip redirects

no ip redirects

Command Mode

Interface Configuration

Default

IP redirect is enabled by default.

Usage

None

Examples

In the following example, users disable to send the ICMP redirect message:

Switch# configure terminal
Switch(config)# interface eth-0-1
Switch(config-if)# no switchport
Switch(config-if)# ip address 10.10.10.1/24
Switch(config-if)# no ip redirects

Related Commands

ip unreachables

ip icmp error-interval

6.1.4. ip unreachables

Command Purpose

To enable send the ICMP unreachable messages generated by the switch, use the ip unreachables command in interface configuration mode. To restore the default value, use the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

ip unreachables

no ip unreachables

Command Mode

Interface Configuration

Default

IP unreachable is enabled by default.

Usage

None

Examples

In the following example, users disable to send the ICMP unreachable message:

Switch# configure terminal
Switch(config)# interface eth-0-1
Switch(config-if)# no switchport
Switch(config-if)# ip address 10.10.10.1/24
Switch(config-if)# no ip unreachables

Related Commands

ip redirects

ip icmp error-interval

6.1.5. ip verify unicast reverse-path

Command Purpose

To enable URPF check to the interface, use the command ip verify unicast reverse-path in interface configuration mode. To restore the default value, use the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

ip verify unicast reverse-path

no ip verify unicast reverse-path

Command Mode

Interface Configuration

Default

URPF check is disabled by default.

Usage

None

Examples

In the following example, users enable URPF check in interface eth-0-1:

Switch# configure terminal
Switch(config)# interface eth-0-1
Switch(config-if)# no switchport
Switch(config-if)# ip address 10.10.10.1/24
Switch(config-if)# ip verify unicast reverse-path

Related Commands

ip redirects

ip icmp error-interval

6.1.6. unicast reverse-path check-type (strict| loose (allow-default-route|))

Command Purpose

Use this command to configure URPF check type to the interface in interface configuration mode.To restore the default value, use the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

unicast reverse-path check-type ( strict | loose ( allow-default-route| ) )

no unicast reverse-path check-type

Command Mode

Interface Configuration

Default

URPF check-type is strict by default.

Usage

URPF check-type takes effort for both ipv4 and ipv6.

Examples

In the following example, users configure URPF check-type loose in interface eth-0-1:

Switch# configure terminal
Switch(config)# interface eth-0-1
Switch(config-if)# no switchport
Switch(config)# unicast reverse-path check-type loose

Related Commands

None

6.1.7. router-id (global)

Command Purpose

To use a fixed router ID for all routing protocols, use the router-id command in Global Config mode. To let switch select the router ID automatically, use the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

router-id IP-ADDRESS

no router-id

Parameter

Parameter Description

Parameter Value

IP-ADDRESS

Router ID in IP address format

IPv4 address

Command Mode

Global Config

Default

No router ID is defined.

Usage

You can configure an arbitrary value in the IP address format for each switch. However, each router ID must be unique.

Examples

The following example specifies a fixed router-id:

Switch# configure terminal
Switch(config)# router-id 1.1.1.1

Related Commands

router-id (router)

6.1.8. ip route

Command Purpose

To establish static routes, use the ip route command in global configuration mode. To remove static routes, use the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

ip route ( PREFIX MASK | PREFIX/PREFIX-LENGTH ) ( NH-ADDRESS | vrf VRF-NAME NH-ADDRESS | IFNAME | REMOTE-VTEP ) ( DISTANCE | ) ( bind bfd BFD-NAME | track NUMBER | )

no ip route ( PREFIX MASK | PREFIX/PREFIX-LENGTH ) ( ( vrf VRF-NAME | ) NH-ADDRESS | IFNULL | ) ( bind bfd | track | )

no ip route ( PREFIX MASK | PREFIX/PREFIX-LENGTH ) ( IFTUNNEL | REMOTE-VTEP )

Parameter

Parameter Description

Parameter Value

VRF-NAME

VRF instance name

A string up to 16 characters

PREFIX

IP route prefix for the destination

IPv4 address

MASK

Prefix mask for the destination

Mask in IPv4 address format

PREFIX-LENGTH

Prefix length for the destination

1-32

NH-ADDRESS

IP address of the next hop that can be used to reach that network

IPv4 address

IFNAME

Interface name of the next hop that can be used to reach that network

-

IFTUNNEL

tunnel port

-

IFNULL

NULL 0 port

-

REMOTE-VTEP

Overlay tunnel of the next hop that can be used to reach that network.

remote-vtep index

DISTANCE

(Optional) An administrative distance. The default administrative distance for a static route is 1

1-255

BFD-NAME

Specify the name of bfd

A string up to 16 characters

track NUMBER

Specify the ID of track object

1-500

Command Mode

Global Config

Default

No static routes are established.

Usage

The establishment of a static route is appropriate when the switch cannot dynamically build a route to the destination.

Examples

The following example establishes a static route:

Switch# configure terminal
Switch(config)# ip route 172.31.0.0 255.255.0.0 172.31.6.6

The following example establishes a static route which nexthop is blackhole:

Switch# configure terminal
Switch(config)# ip route 10.1.1.1/32 null 0

Related Commands

show ip route

6.1.9. show ip route

Command Purpose

To display the current state of the routing table, use the show ip route command in user EXEC or privileged EXEC mode.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

show ip route ( VRF NAME | ) ( IP-ADDRESS | PREFIX/PREFIX-LENGTH | PROTOCOL | )

Parameter

Parameter Description

Parameter Value

VRF NAME

VRF instance name

A string up to 15 characters

IP-ADDRESS

(Optional) Address about which routing information should be displayed

IPv4 address

PREFIX

IP route prefix

IPv4 address

PREFIX-LENGTH

Prefix length for the route

1-32

PROTOCOL

(Optional) The name of a routing protocol, or the keyword connected, static, or summary. If you specify a routing protocol, use one of the following keywords: bgp, ospf, and rip.

- bgp/connected /isis/ospf/rip/static

Command Mode

Privileged EXEC

Default

None

Usage

You can display all active dynamic and static routes with both the show ip route and show ip route static commands after these active routes are added in the main routing table.

Examples

The following is sample output from the show ip route command when entered without an address:

Switch# show ip route

Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
[*] - [AD/Metric]
* - candidate default
O 1.1.1.0/24 [110/2] via 10.10.1.1, eth-0-23, 00:34:17
O 2.2.2.0/24 [110/3] via 10.10.1.1, eth-0-23, 00:17:26
C 10.10.1.0/24 is directly connected, eth-0-23
C 10.10.1.23/32 is in local loopback, eth-0-23
O 10.10.2.0/24 [110/2] via 10.10.1.1, eth-0-23, 00:17:26
O 10.10.3.0/24 [110/3] via 10.10.1.1, eth-0-23, 00:17:26

Related Commands

ip route

show ip route database

6.1.10. show ip route database

Command Purpose

To display the Routing Information Base (RIB), use the show ip route database command in user EXEC or privileged EXEC mode.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

show ip route database ( VRF NAME | ) ( PROTOCOL | )

Parameter

Parameter Description

Parameter Value

VRF NAME

VRF instance name

A string up to 15 characters

PROTOCOL

(Optional) The name of a routing protocol, or the keyword connected, static, or summary. If you specify a routing protocol, use one of the following keywords: bgp, ospf, and rip.

- bgp/connected /isis/ospf/rip/static

Command Mode

Privileged EXEC

Default

None

Usage

You can display all active dynamic and static routes with both the show ip route database and show ip route database static commands after these active routes are added in the Routing Information Base (RIB).

Examples

The following is sample output from the show ip route database command:

Switch# show ip route database

Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
[*] - [AD/Metric]
> - selected route, * - FIB route, p - stale info
O *> 1.1.1.0/24 [110/2] via 10.10.1.1, eth-0-23, 00:48:58
O *> 2.2.2.0/24 [110/3] via 10.10.1.1, eth-0-23, 00:32:07
S 6.6.6.0/24 [1/0] via 3.3.3.3 inactive
C *> 10.10.1.0/24 is directly connected, eth-0-23
C *> 10.10.1.23/32 is in local loopback, eth-0-23
O *> 10.10.2.0/24 [110/2] via 10.10.1.1, eth-0-23, 00:32:07
O *> 10.10.3.0/24 [110/3] via 10.10.1.1, eth-0-23, 00:32:07

Related Commands

ip route

show ip route

6.1.11. show ip protocols

Command Purpose

To display the parameters and current state of the active routing protocol process, use the show ip protocols command in privileged EXEC mode.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

show ip protocols ( vrf NAME | ) ( PROTOCOL | )

Parameter

Parameter Description

Parameter Value

VRF NAME

VRF instance name

A string up to 15 characters

PROTOCOL

(Optional) The name of a routing protocol. If you specify a routing protocol, use one of the following keywords: bgp, ospf, isis and rip.

bgp/ospf/rip/isis

Command Mode

Privileged EXEC

Default

None

Usage

The information displayed by the show ip protocols command is useful in debugging routing operations. Information in the Routing Information Sources field of the show ip protocols output can help you identify a switch suspected of delivering bad routing information.

Examples

The following is sample output from the show ip protocols command:

Switch# show ip protocols

Routing Protocol is "ospf 0"
Redistributing:
Routing for Networks:
3.3.3.0/24
10.10.1.0/24
10.10.4.0/24
Distance: (default is 110)

Related Commands

show ip route

6.1.12. show ip route summary

Command Purpose

To display the total route count and different types of route count, use the show ip route summary command in privileged EXEC mode.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

show ip route ( vrf NAME | ) summary

Parameter

Parameter Description

Parameter Value

VRF NAME

VRF instance name

A string up to 15 characters

Command Mode

Privileged EXEC

Default

None

Usage

None

Examples

The following is sample output from the show ip route summary command:

Switch# show ip route summary

IP routing table name is Default-IP-Routing-Table(0)
IP routing table maximum-paths is 8
Route source networks
connected 2
static 1
Total 3

Related Commands

show ip route

6.1.13. show ip route add-fib-fail

Command Purpose

Use this command to display the routes which can not forward packet because of TCAM resource full. Use the show ip route add-fib-fail command in privileged EXEC mode.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

show ip route add-fib-fail ( count | )

Parameter

Parameter Description

Parameter Value

count

number of add-fib-fail route entries

-

Command Mode

Privileged EXEC

Default

None

Usage

If both of the command line “show ip route” and “show ip route add-fib-file” could show the same route. It represents that the route is not able to inset into the Forwarding Information Table(FIB) due to the hareware resource limit, this route is not able to forward any packets. You could delete and reconfigure this routing when some hardware resource is free.

Examples

The following is sample output from the show ip route add-fib-fail command:

Switch# show ip route add-fib-fail
======================================
VRF Route
default 1.1.1.1/32
default 1.1.1.0/24
test 2.2.2.2/32
test 2.2.2.0/24

Related Commands

show ip route

6.1.14. max-static-routes

Command Purpose

To configure the maximum static routes in system, use the max-static-routes command in Global Config mode. To configure the maximum static routes to default value, use the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

max-static-routes COUNT

no max-static-routes COUNT

Parameter

Parameter Description

Parameter Value

COUNT

maximum static routes in system

The range is <1-65535>, default value is 1024

Command Mode

Global Config

Default

1024

Usage

Users should not configure the maximum static routes more than system profile of FIB. Also, users should not configure the maximum static routes less than the current static routes count.

Examples

The following example displays how to change maximum static routes to 10:

Switch# confi terminal

Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# max-static-routes 10

Related Commands

show ip route summary

6.1.15. show resource fib

Command Purpose

Use this command to display the resources used by routes.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

show resource fib

Command Mode

Privileged EXEC

Default

None

Usage

None

Examples

The following is sample output from the show resource fib command:

Switch# show resource fib

RIBFIB
Resource Used Capability
=============================================================
Indirect Routes 3 8192
Host Routes 1 4096
Static Routes 0 1024
IPv6 Indirect routes 0 1536
IPv6 Host routes 0 4096
IPv6 Static routes 0 1024
L3 Vlan interfaces 0 256

Related Commands

show ip route summary

6.1.16. ecmp load-balance-mode dynamic

Command Purpose

Use this command to configure ecmp dynamic load balance.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

ecmp load-balance-mode dynamic

no ecmp load-balance-mode dynamic

Command Mode

Global Config

Default

Static load balance mode

Usage

When configure or cancel ecmp load balance, the route information must be empty.

Examples

The following example displays how to configure ecmp dynamic load balance:

Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# ecmp load-balance-mode dynamic

Related Commands

None

6.1.17. ecmp load-balance-mode dynamic (efd-only|tcp-only)

Command Purpose

Use this command to configure only tcp flows do ecmp dynamic load or only efd flows do ecmp dynamic load.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

ecmp load-balance-mode dynamic ( efd-only | tcp-only )

no ecmp load-balance-mode dynamic

Command Mode

Global Config

Default

Flows of every type can do ecmp dynamic load.

Usage

None

Examples

The following example displays how to configure only tcp flows do ecmp dynamic load:

Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# ecmp load-balance-mode dynamic tcp-only

Related Commands

None

6.1.18. ecmp load-balance-mode static

Command Purpose

Use this command to configure ecmp static load balance.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

ecmp load-balance-mode static

Command Mode

Global Config

Default

None

Usage

When configure ecmp load balance, the route information must be empty.

Examples

The following example displays how to configure ecmp static load balance:

Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# ecmp load-balance-mode static

Related Commands

None

6.1.19. ecmp load-balance-mode static self-healing

Command Purpose

Use this command to configure ecmp self-healing load balance.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

ecmp load-balance-mode static self-healing

no ecmp load-balance-mode static self-healing

Command Mode

Global Config

Default

None

Usage

None

Examples

The following example displays how to configure ecmp self-healing load balance:

Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# ecmp load-balance-mode static self-healing

Related Commands

None

6.1.20. ecmp load-balance-mode round-robin

Command Purpose

Use this command to configure ecmp round robin load balance.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

ecmp load-balance-mode round-robin ( vrf NAME | ) A.B.C.D/M

no ecmp load-balance-mode round-robin ( vrf NAME | ) A.B.C.D/M

Parameter

Parameter Description

Parameter Value

VRF NAME

VRF instance name

A string up to 15 characters

A.B.C.D/M

IP destination prefix (e.g. 10.0.0.0/8)

IPv4 address and mask length in A.B.C.D/M format

Command Mode

Global Config

Default

None

Usage

When configure or cancel ecmp load balance, the route information must be empty.

All vrf’s prefix cannot add up to more than 15.

Examples

The following example displays how to configure ecmp round robin load balance:

Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# ecmp load-balance-mode round-robin 1.1.1.0/24

Related Commands

None

6.1.21. show ecmp information

Command Purpose

Use this command to display ecmp configure information.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

show ecmp information

Command Mode

Privileged EXEC

Default

None

Usage

None

Examples

The following example shows the output of the command:

Switch# show ecmp information
ECMP load balance enable mode: Static

Related Commands

None