show ip route

Displays the IP route table.

Syntax: show ip route [destination]

destination Route destination IP address, in dotted decimal notation.

Defaults: None.

Access: All.

Usage: When you add an IP interface to a VLAN that is up, MSS adds direct and local routes for the interface to the route table. If the VLAN is down, MSS does not add the routes. If you add an interface to a VLAN but the routes for that interface do not appear in the route table, use the show vlan config command to check the VLAN state.

If you add a static route and the route’s state is shown as Down, use the show interface command to verify that the has an IP interface in the default router’s (gateway’s) subnet. MSS cannot resolve a static route unless one of the switch’s VLANs has an interface in the default router’s subnet. If the switch has such an interface but the static route is still down, use the show vlan config command to check the state of the VLAN’s ports.

Examples: The following command shows all routes in a switch’s IP route table:

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

The table below describes the fields in this display.

Field

Description

 

 

Destination/Mask

IP address and subnet mask of the route destination. The 244.0.0.0 route is automatically

added by MSS and supports the IGMP snooping feature.

 

 

 

 

Protocol that added the route to the IP route table. The protocol can be one of the

Proto

following:

IP—MSS added the route.

 

 

Static—An administrator added the route.

 

 

Metric

Cost for using the route.

 

 

 

Next-hop type:

 

Local—Route is for a local interface. MSS adds the route when you configure an IP

 

address on the switch.

NH-Type

Direct—Route is for a locally attached subnet. MSS adds the route when you add an

 

interface in the same subnet to the switch.

 

Router—Route is for a remote destination. A switch forwards traffic for the destination to

 

the default router (gateway).

 

 

D-Link DWS-1008 CLI Manual

160

Page 163
Image 163
D-Link dws-1008 manual Show ip route, Syntax show ip route destination, DWS-1008# show ip route, Multicast