Operation Manual

IP Services Commands
Mobility System Software Command Reference Guide
Version 7.3
8 – 110
Defaults
None.
Access
Enabled.
History
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 available. If one of the added routes can resolve the static route, MSS can use the
static route.
Before you add a static route, use the show interface command to verify that the MX has an IP
interface in the same subnet as the next-hop router. If not, the VLAN:Interface field of the show
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 router 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.
When you add multiple routes to the same destination, MSS groups the routes and lists them from
lowest cost at the top of the group to highest cost at the bottom of the group. If you add a new
route with the same destination and cost as a route already in the table, MSS places the new route
at the top of the group of routes with the same cost.
Examples
The following command adds a default route that uses default router 10.5.4.1 and gives
the route a cost of 1:
MX# set ip route default 10.5.4.1 1
success: change accepted.
The following commands add two default routes, and configure MSS to always use the route
through 10.2.4.69 when the MX interface to that default router is up:
MX# set ip route default 10.2.4.69 1
success: change accepted.
MX# set ip route default 10.2.4.17 2
success: change accepted.
The following command adds an explicit route from an MX to any host on the 192.168.4.x subnet
through the local router 10.5.4.2, and gives the route a cost of 1:
MX# set ip route 192.168.4.0 255.255.255.0 10.5.4.2 1
success: change accepted.
The following command adds another explicit route, using CIDR notation to specify the subnet
mask:
MX# set ip route 192.168.5.0/24 10.5.5.2 1
success: change accepted.
clear ip route on page 8-95
show interface on page 8-135
default-router 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.
Version 1.0 Command introduced
Version 1.1
Support added for CIDR notation
Support added for up to 4 default routes and four static routes to an explicit
destination