User`s manual
92
DWS-1008 User’s Manual
D-Link Systems, Inc.
Conguring and Managing IP Interfaces and Services
This example also shows two static routes, which have a next-hop type (NH-Type) value of
Router. Static routes have a gateway router, listed in the Gateway eld. The 0.0.0.0 destination
represents a default route. Here, gateway router 10.0.1.17 is reachable through the subnet on
VLAN 1. Route 10.0.1.1/24 resolves the static route that uses the gateway router. Gateway
router 10.0.2.17 is reachable through the subnet on VLAN 2 and route 10.0.2.1/24 resolves
the static route to that gateway.
MSS adds routes with next-hop types Direct and Local when you add an IP interface to
a VLAN, when the VLAN is up. Direct routes are for the locally attached subnets that the
switch’s IP addresses are in. Local routes are for destination interfaces congured on the
Switch itself.
MSS automatically adds the 224.0.0.0 route to support the IGMP snooping feature. If a VLAN
is administratively disabled or all of the links in the VLAN go down or are disabled, MSS
removes the VLAN’s routes from the route table. If the direct route required by a static route
goes down, MSS changes the static route state to Down. If the route table contains other
static routes to the same destination, MSS selects the resolved route that has the lowest
cost. In the following example, the default route to 10.0.1.17 is down, so MSS selects the
default route to 10.0.2.17.
DWS-1008# show ip route
Router table for IPv4
Destination/Mask Proto Metric NH-Type Gateway VLAN:Interface
------------------------------------------------------------------------------------------------------------------------
0.0.0.0/ 0 Static 1 Router 10.0.1.17 Down
0.0.0.0/ 0 Static 2 Router 10.0.2.17 vlan:2:ip
10.0.2.1/24 IP 0 Direct vlan:2:ip
10.0.2.1/32 IP 0 Direct vlan:2:ip:10.0.1.1/24
10.0.2.255/32 IP 0 Direct vlan:2:ip:10.0.1.1/24
224.0.0.0/ 4 IP 0 Local MULTICAST
Adding a Static Route
To add a static route, use the following command:
set ip route {default | ip-addr mask | ip-addr/mask-length} gateway metric
The metric (cost) can be any number between 0 and 2,147,483,647. Lower-cost routes are
preferred over higher-cost routes. When you add multiple routes to the same destination,
MSS groups the routes together 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.
To add a default route that uses gateway 10.5.4.1 and has a cost of 1, type the following
command:
DWS-1008# set ip route default 10.5.4.1 1
success: change accepted.