178 CHAPTER 7: IP SERVICES COMMANDS
set ip route Adds a static route to the IP route table.
Syntax —
set ip route {default | ip-addr mask |
ip-addr/mask-length} gateway metric
default — Default route. A WX switch uses the default route if an
explicit route is not available for the destination.
Default is an alias for IP address 0.0.0.0/0.
ip-addr mask — IP address and subnet mask for the route
destination, in dotted decimal notation (for example, 10.10.10.10
255.255.255.0).
ip-addr/mask-length — IP address and subnet mask length in CIDR
format (for example, 10.10.10.10/24).
gateway — IP address, DNS hostname, or alias of the next-hop router.
metric — Cost for using the route. You can specify a value from
0 through 2,147,483,647. Lower-cost routes are preferred over
higher-cost routes.
Defaults — The HTTPS server is enabled by default.
Access — Enabled.
Usage — MSS can use a static route only if a direct route in the route
table resolves the static route. MSS adds routes with next-hop types Local
and Direct when you add an IP interface to a VLAN, if the VLAN is up. If
one of these added routes can resolve the static route, MSS can use the
static route.
Before you add a static route, use the display interface command to
verify that the WX switch has an IP interface in the same subnet as the
route’s next-hop router. If not, the VLAN:Interface field of the display ip
route command output shows that the route is down.
You can configure a maximum of 4 routes per destination. This includes
default routes, which have destination 0.0.0.0/0. Each route to a given
destination must have a unique gateway address. When the route table
contains multiple default or explicit routes to the same destination, MSS
uses the route with the lowest cost. If two or more routes to the same
destination have the lowest cost, MSS selects the first route in the route
table.