I Commands


This chapter describes the Cisco NX-OS unicast Routing Information Base (RIB) and the Forwarding Information Base (FIB) commands that begin with I.

ip load-sharing address

To configure the load-sharing algorithm used by the unicast Forwarding Information Base (FIB), use the ip load-sharing address command. To restore the default, use the no form of this command.

ip load-sharing address {destination port destination | source-destination [port source-destination]} [universal-id seed]

no ip load-sharing address {destination port destination | source-destination [port source-destination]} [universal-id seed]

Syntax Description

destination port destination

Sets the load-sharing algorithm based on the destination address and port.

source-destination

Sets the load-sharing algorithm based on the source and destination address.

port source-destination

(Optional) Sets the load-sharing algorithm based on the source and destination address and port address.

universal-id seed

(Optional) Sets the random seed for the load sharing hash algorithm. The range is from 1 to 4294967295.


Command Default

Destination address and port address

Command Modes

Command HistoryGlobal configuration mode

Release
Modification

5.0(3)N1(1)

This command was introduced.


Usage Guidelines

Use the ip load-sharing address command to set the load-sharing algorithm that the unicast FIB uses to select a path from the equal-cost paths in the Routing Information Base (RIB).

Examples

This example shows how to set the load-sharing algorithm to use the source and destination address:

switch(config)# ip load-sharing address source-destination
 
   

Related Commands

Command
Description

show ip load-sharing

Displays the load-sharing algorithm.

show routing hash

Displays the path the RIB and FIB select for a source/destination pair.


ip route

To configure a static route, use the ip route command. To remove the static route, use the no form of this command.

ip route ip-prefix/mask {[interface] next-hop} [preference] [tag id]

no ip route ip-prefix/mask {[interface] next-hop} [preference] [tag id]

Syntax Description

ip-prefix/mask

IP prefix and prefix mask. The format is x.x.x.x/length. The length is 1 to 32.

interface

(Optional) Interface on which all packets are sent to reach this route. Use ? to display a list of supported interfaces.

next-hop

IP address of the next hop that can be used to reach that network. You can specify an IP address and an interface type and interface number. The format is x.x.x.x/length. The length is 1 to 32.

preference

(Optional) Route preference that is used as the administrative distance to this route. The range is from 1 to 255. The default is 1.

tag id

(Optional) Assigns a route tag that can be used to match against in a route map. The range is from 0 to 4294967295. The default is 0.


Command Default

None

Command Modes

Command HistoryGlobal configuration mode

Release
Modification

5.0(3)N1(1)

This command was introduced.


Usage Guidelines

Static routes have a default administrative distance of 1. If you want a dynamic routing protocol to take precidence over a static route, you must configure the static route preference argument to be greater than the administrative distance of the dynamic routing protocol. For example, routes derived with the Enhanced Interior Gateway Routing Protocol (EIGRP) have a default administrative distance of 100. To have a static route that would be overridden by an EIGRP dynamic route, you should specify an administrative distance greater than 100.

Examples

This example shows how to create a static route for destinations with the IP address prefix 192.168.1.1/32, reachable through the next-hop address 10.0.0.2:

switch(config)# ip route 192.168.1.1/32 10.0.0.2
 
   

This example shows how to assign a tag to the previous example so that you can configure a route map that can match on this static route:

switch(config)# ip route 192.168.1.1/32 10.0.0.2 tag 5
 
   

This example shows how to choose a preference of 110. In this case, packets for prefix 10.0.0.0 are routed to a router at 172.31.3.4 if dynamic route information with an administrative distance less than 110 is not available.

switch# configure terminal
switch(config)# ip route 10.0.0.0/8 172.31.3.4 110
switch(config)#
 
   

Related Commands

Command
Description

match tag

Matches the tag value associated with a route.