System information

69
DWS-1008 CLI Reference Guide
D-Link Systems, Inc.
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 DWS-1008 switch uses the default route if an explicit
route is not available for the destination.
Note: 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: None
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 show interface command to verify that the switch has
an IP interface in the same subnet as the route’s 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
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.
When you add multiple routes to the same destination, MSS groups the routes and orders
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 that has 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.