Export (0) Print
Expand All

Netsh Routing IP Context Commands

Updated: June 3, 2009

Applies To: Windows Server 2008, Windows Server 2008 R2

The following commands are specific to the routing IP context within the Netsh environment. The commands in this context are specific to IP version 4. For commands that configure routing for IPv6, see the routing ipv6 context.

To view the command syntax, click a command:

Add commands

Delete commands

Set commands

Show commands

The following entries provide details for each command.

Displays the routing IP context configuration of the remote access server in script form.

dump

  • You can dump the contents of the current routing IP context configuration to a file that can be used to restore altered configuration settings.

The following commands save the current configuration as a script in the c:\test\routingipcfg.dmp file.

  • From the command prompt:

    netsh routing ip dump > c:\test\routingipcfg.dmp

  • From the netsh routing IP context prompt:

    set file open c:\test\routingipcfg.dmp

    dump

    set file close

You can use the netsh exec command to run the script created by the netsh dump command.

Resets IP routing to a clean state.

reset

Updates auto-static routes on the specified interface.

update

name = ] InterfaceName

name = ] InterfaceName
Required. Specifies, by name, the interface on which you want to update autostatic routes.

Adds a multicast scope boundary on an interface.

add boundary

name = ] InterfaceName

grpaddr = ] IPAddress

grpmask = ] SubnetMask

or

add boundary

name = ] Name

scopename = ] ScopeName

name = ] InterfaceName
Required. Specifies, by name, the interface on which you want to add the boundary. If the name includes spaces, then you must surround the name with quotation marks.

grpaddr = ] IPAddress
Specifies the multicast group address of the boundary to add.

grpmask = ] SubnetMask
Specifies the subnet mask of the boundary address to add.

scopename = ] ScopeName
Specifies the name of the multicast scope to be added to the specified interface. To use this form of syntax you must first create a multicast scope using the add scope command.

The following shows two different examples of adding a multicast scope boundary.

add boundary name=Internal grpaddr=239.0.0.1 grpmask=255.255.255.255

add boundary name="Local Area Connection" scopename="My Mcast Scope"

Adds a packet filter to the specified interface.

add filter

name = ] InterfaceName

filtertype = ] { input | output | dial }

srcaddr = ] IPAddress

srcmask = ] SubnetMask

dstaddr = ] IPAddress

dstmask = ] SubnetMask

{ [ proto = ] any |

   [ proto = ] { tcp | tcp-est | udp } [ srcport = ] Portdstport = ] Port |

   [ proto = ] icmptype = ] ICMPTypeFieldcode = ] ICMPCodeField }

name = ] InterfaceName
Required. Specifies, by name, the interface on which you want to add the filter.

filtertype = ] { input | output | dial }
Required. Specifies the type of packet filter.

  • input specifies that the filter being modified filters input.

  • output specifies that the filter being modified filters output.

  • dial specifies that the filter being modified filters a dial-up interface connection.

srcaddr = ] IPv4Address
Required. Specifies the IPv4 source address field of the packet to be filtered.

srcmask = ] SubnetMask
Required. Specifies the source subnet mask of the packet to be filtered. An address and mask of all zeros means ANY.

dstaddr = ] IPAddress
Required. Specifies the IPv4 destination address field of the packet to be filtered.

dstmask = ] SubnetMask
Required. Specifies the destination subnet mask of the packet to be filtered.

proto = ] any | [ proto = ] { tcp | tcp-est | udp | [ proto = ] ICMP }
Required. Specifies the protocol type for the packet to be filtered.

srcport = ] Port
Specifies the source port field of the packet to be filtered. A value of zero means ANY.

dstport = ] Port
Specifies the destination port field of the packet to be filtered. A value of zero means ANY.

type = ] ICMPTypeField
Specifies the ICMP type field of the packet to be filtered. A value of 255 means ANY.

code =] ICMPCodeField
Specifies the ICMP code field of the packet to be filtered. A value of 255 means ANY.

The following shows two different examples of adding a packet filter.

add filter name="Virtual Private Connection" filtertype=input srcaddr=0.0.0.0 srcmask=255.255.255.255 dstaddr=169.254.0.0 dstmask=255.255.0.0 proto=any

add filter "Virtual Private Connection" input 0.0.0.0 0.0.0.0 169.254.0.0 255.255.0.0 any

Adds IP forwarding on an interface and enables or disables IP forwarding.

add interface

name= ] InterfaceName

[ [ state = ] { enable | disable } ]

name = ] InterfaceName
Required. Specifies, by name, the interface for which you want to enable IP forwarding.

[ [ state = ] { enable | disable } ]
The enable parameter (default) enables the IP interface as you add it. The disable parameter disables the IP interface as you add it.

The following adds and enables IP forwarding on an interface.

add interface name="Local Area Connection" state=enable

Adds a persistent static route on the specified interface.

add persistentroute

dest = ] IPAddress

mask = ] SubnetMask

name = ] InterfaceName

[ [ nhop = ] IPAddress ]

[ [ proto = ] { static | nondod } ]

[ [ preference = ] Preference

[ [ metric = ] RouteMetric ]

[ [ view = ] { unicast | multicast | both } ]

dest = ] IPAddress
Required. Specifies the destination IPv4 address for the specified route.

mask = ] SubnetMask
Required. Specifies the subnet mask for the destination address.

name = ] InterfaceName
Required. Specifies, by name, the outgoing interface to be used for the route.

nhop = ] IPAddress
Specifies the next hop IPv4 address for the route. For routes over point-to-point interface, this value should not be specified.

proto = ] { static | nondod }
Specifies the demand-dial connection state.

  • static specifies that demand-dial connections are triggered.

  • nondod specifies that demand-dial connections are not triggered.

preference = ] Preference
An integer that specifies the preference for the route.

metric = ] RouteMetric
An integer that specifies the route metric.

view = ] { unicast | multicast | both }
Specifies valid traffic for the route.

  • unicast specifies that the route is valid for unicast traffic only.

  • multicast specifies that the route is valid for multicast traffic only.

  • both (default) specifies that the route is valid for both unicast and multicast traffic.

The following adds a persistent static route to the network 192.168.1.0/24 using the “Virtual Private Connection” demand-dial interface.

add persistentroute 192.168.1.0 255.255.255.0 "Virtual Private Connection"

Adds a preference level to a specified routing protocol.

add preferenceforprotocol

proto = ] { autostatic | local | netmgmt | nondod | ospf | rip | static }

preflevel = ] PreferenceLevel

proto = ] { autostatic | local | netmgmt | nondod | ospf | rip | static }
Required. Specifies the routing protocol for which a preference level is set.

  • autostatic adds an autostatic routing preference.

  • local adds a local routing preference.

  • netmgmt adds a routing preference for a network management protocol.

  • nondod adds a preference for a routing protocol not able to use demand-dial.

  • ospf adds a routing protocol preference for Open Shortest Path First (OSPF).

  • rip adds a routing preference for Routing Information Protocol (RIP).

  • static adds a static routing preference.

noteNote
OSPF is supported in RRAS on Windows Server 2008 and Windows Server 2003 only. It is not supported in RRAS on Windows Server 2008 R2.

preflevel = ] PreferenceLevel
Required. An integer that specifies the preference level.

The following adds a preference level of 10 for the RIP routing protocol.

add preferenceforprotocol proto=rip preflevel=10

Adds a non-persistent network management route for the specified interface or next hop count.

add rtmroute

dest = ] IPAddress

mask = ] SubnetMask

nameorindex = ] InterfaceNameorIndexNumber

[ [ nhop = ]=IPAddress ]

[ [ preference = ] { static | nondod } ]

[ [ metric = ] RouteMetric ]

[ [ view = ] { unicast | multicast | both } ]

dest = ] IPAddress
Required. Specifies the IPv4 destination address for the specified route.

mask = ] SubnetMask
Required. Specifies the subnet mask for the destination address.

nameorindex = ] InterfaceName
Required. Specifies, by name or index number, the interface where the route is to be added.

nhop = ] IPAddress
Specifies the next hop IPv4 address for the route. For routes over point-to-point interface, this value should not be specified.

metric = ] RouteMetric
Specifies the route metric.

view = ] { unicast | multicast | both }
Specifies valid traffic for the route.

  • unicast specifies that the route is valid for unicast traffic only.

  • multicast specifies that the route is valid for multicast traffic only.

  • both (default) specifies that the route is valid for both unicast and multicast traffic.

The following adds a non-persistent network management route to the specified interface.

add rtmroute 192.168.1.0 255.255.255.0 "Virtual Private Connection"

Adds a multicast scope to the IP routing configuration.

add scope

grpaddr = ] IPAddress

grpmask = ] SubnetMask

scopename = ] ScopeName

grpaddr = ] IPAddress
Required. Specifies the multicast scope or group IPv4 address.

grpmask = ] SubnetMask
Required. Specifies the subnet mask of the multicast scope address.

scopename = ] ScopeName
Required. Specifies the name of the multicast scope to be added.

The following adds the specified multicast scope.

add scope 239.1.1.0 255.255.255.224 "My Multicast Scope"

Deletes a multicast scope boundary from an interface.

delete boundary

name = ] InterfaceName

grpaddr = ] IPAddress

grpmask = ] SubnetMask

name = ] InterfaceName
Required. Specifies, by name, the interface on which you want to delete the boundary.

grpaddr = ] IPAddress
Specifies the multicast group IPv4 address of the boundary to delete.

grpmask = ] SubnetMask
Specifies the subnet mask of the boundary address to delete.

scopename = ] ScopeName
Specifies the name of the bounded multicast scope.

The following shows two different examples of deleting a multicast scope boundary.

delete boundary "Local Area Connection" 239.2.2.2 255.255.255.255

delete boundary "Local Area Connection" "My Mcast Scope"

Deletes a packet filter from the specified interface.

delete filter

name = ] InterfaceName

filtertype = ] {input | output | dial}

srcaddr = ] IPAddress

srcmask = ] SubnetMask

dstaddr = ] IPAddress

dstmask = ] SubnetMask

{ [ proto = ] any |

   [ proto = ] { tcp | tcp-est | udp } [ srcport = ] Portdstport = ] Port |

   [ proto = ] icmptype = ] ICMPTypeFieldcode = ] ICMPCodeField }

name = ] InterfaceName
Required. Specifies, by name, the interface from which you want to delete the filter.

filtertype = ] { input | output | dial }
Required. Specifies the type of packet filter.

  • input specifies that the filter being modified filters input.

  • output specifies that the filter being modified filters output.

  • dial specifies that the filter being modified filters a dial-up interface connection.

srcaddr = ] IPAddress
Required. Specifies the source IPv4 address field of the packet to be filtered.

srcmask = ] SubnetMask
Required. Specifies the source subnet mask of the packet to be filtered. An address and mask of all zeros means ANY.

dstaddr = ] IPAddress
Required. Specifies the destination IPv4 address field of the packet to be filtered.

dstmask = ] SubnetMask
Required. Specifies the destination subnet mask of the packet to be filtered.

proto = ] any | [ proto = ] { tcp | tcp-est | udp } | [ proto = ] icmp
Required. Specifies the protocol type for the packet to be filtered.

srcport = ] Port
Specifies the source port field of the packet to be filtered. A value of zero means ANY.

dstport = ] Port
Specifies the destination port field of the packet to be filtered. A value of zero means ANY.

type = ] ICMPTypeField
Specifies the ICMP type field of the packet to be filtered. A value of 255 means ANY.

code = ] ICMPCodeField
Specifies the Internet Control Message Protocol (ICMP) code field of the packet to be filtered. A value of 255 means ANY.

The following shows two different examples of adding a packet filter.

delete filter name="Virtual Private Connection" filtertype=input srcaddr=0.0.0.0 srcmask=255.255.255.255 dstaddr=169.254.0.0 dstmask=255.255.0.0 proto=any

delete filter "Virtual Private Connection" input 0.0.0.0 0.0.0.0 169.254.0.0 255.255.0.0 any

Removes IPv4 forwarding from an interface.

delete interface

name = ] InterfaceName

name = ] InterfaceName
Required. Specifies, by name, the interface from which you want to delete IP forwarding.

The following removes IPv4 forwarding from the specified interface.

delete interface name="Local Area Connection"

Deletes a persistent static route from the specified interface.

delete persistentroute

dest = ] IPAddress

mask = ] SubnetMask

name = ] InterfaceName

[ [ nhop = ] IPAddress ]

dest = ] IPAddress
Required. Specifies the destination address for the specified route.

mask = ] SubnetMask
Required. Specifies the subnet mask for the destination address.

name = ] InterfaceName
Required. Specifies, by name, the interface from which the route is to be deleted.

nhop = ] IPAddress ]
Specifies the next hop address for the route. For routes over point-to-point interface, this value should not be specified.

The following removes a persistent static route from the specified interface.

delete persistentroute 192.168.1.0 255.255.255.0 "Dial-up Connection"

Deletes a preference level from a specified routing protocol.

delete preferenceforprotocol

proto = ] { autostatic  | local | netmgmt | nondod | ospf | rip | static }

proto = ] { autostatic | local | netmgmt | nondod | ospf | rip | static }
Required. Specifies the routing protocol for which you want to remove a preference level.

noteNote
OSPF is supported RRAS on Windows Server 2008 and Windows Server 2003 only. It is not supported on RRAS on Windows Server 2008 R2.

The following removes the preference level from the RIP routing protocol.

delete preferenceforprotocol proto=rip

Deletes a non-persistent network management route from the specified interface or next hop count.

delete rtmroute

dest = ] IPAddress

mask = ] SubnetMask

name = ] InterfaceName

[ [ nhop = ] IPAddress ]

dest = ] IPAddress
Required. Specifies the destination IPv4 address for the specified route.

mask = ] SubnetMask
Required. Specifies the subnet mask for the destination address.

nameorindex = ] InterfaceNameorIndexNumber
Required. Specifies, by name or index number, the interface from which the route is to be removed.

nhop = ] IPAddress
Specifies the next hop IPv4 address for the route. For routes over point-to-point interface, this value should not be specified.

The following deletes a non-persistent static route from the specified interface and next hop address.

delete rtmroute 192.168.1.0 255.255.255.0 "Virtual Private Connection" nhop=10.0.0.1

Deletes a multicast scope from the IPv4 routing configuration.

delete scope

grpaddr = ] IPAddress

grpmask = ] SubnetMask

or

delete scope

scopename = ] ScopeName

grpaddr = ] IPAddress
Required. Specifies the multicast scope or group IPv4 address.

grpmask = ] SubnetMask
Required. Specifies the subnet mask of the multicast scope address.

scopename = ] ScopeName
Required. Specifies the name of the multicast scope to be added.

The following deletes the specified multicast scope.

delete scope 239.1.1.0 255.255.255.224 "My Multicast Scope"

Changes the default action for the filter type or fragment check setting for the specified interface.

set filter

name = ] InterfaceName

[ [ filtertype = ] { input | output | dial }

action = ] { drop | forward } ]

[ [ fragcheck = ] { enable | disable } ]

name = ] InterfaceName
Required. Specifies, by name, the interface for which you want to set the filter.

filtertype = ] { input | output | dial } [ action = ] { drop | forward }
Required. Specifies the type of packet filter and the action to be taken.

  • input specifies that the filter being modified filters input.

  • output specifies that the filter being modified filters output.

  • dial specifies the that filter being modified filters a dial-up interface connection.

  • action specifies the action that is to be taken when a packet does not match any filter.

fragcheck = ] { enable | disable }
Specifies whether fragment checking is enabled or disabled.

The following shows two different examples of setting filter action.

set filter name="Dial-up Connection" filtertype=dial action =forward

set filter name="Virtual Private Connection" fragcheck=disable

Sets IPv4 forwarding on the specified interface.

set interface

name = ] InterfaceName

[ [ state = ] { enable | disable } ]

name = ] InterfaceName
Required. Specifies, by name, the interface for which you want to configure IPv4 forwarding.

state = ] { enable | disable }
The enable parameter enables IPv4 forwarding over the interface. The disable parameter disables IPv4 forwarding over the interface.

The following sets IPv4 forwarding on the specified interface.

set interface "Local Area Connection"

Sets the global logging level.

set loglevel

loglevel = ] { none | error | warn | info }

loglevel = ] { none | error | warn | info }
Required.

  • none turns off logging.

  • error sets the logging level to log errors only.

  • warn sets the logging level to include both error and warning messages.

  • info sets the logging level to include error, warning, and informational messages.

The following sets global logging to log errors only.

set loglevel loglevel=error

Modifies a persistent static route on the specified interface.

set persistentroute

dest = ] IPAddress

mask = ] SubnetMask

name = ] InterfaceName

[ [ nhop = ] IPAddress ]

[ [ proto = ] { static | nondod } ]

[ [ metric = ] RouteMetric ]

[ [ view = ] { unicast | multicast | both } ]

dest = ] IPAddress
Required. Specifies the destination IPv4 address for the specified route.

mask = ] SubnetMask
Required. Specifies the subnet mask for the destination address.

name = ] InterfaceName
Required. Specifies, by name, the interface where the route is to be added.

nhop = ] IPAddress
Specifies the next hop IPv4 address for the route. For routes over point-to-point interface, this value should not be specified.

proto = ] { static | nondod }
Specifies the demand-dial connection state.

  • static specifies that demand-dial connections are triggered.

  • nondod specifies that demand-dial connections are not triggered.

metric = ] RouteMetric
Specifies the route metric.

view = ] { unicast | multicast | both }
Specifies valid traffic for the route.

  • unicast specifies that the route is valid for unicast traffic only.

  • multicast specifies that the route is valid for multicast traffic only.

  • both (default) specifies that the route is valid for both unicast and multicast traffic.

The following modifies a persistent static route on the specified interface.

set persistentroute 192.168.1.0 255.255.255.0 "Virtual Private Connection"

Sets a new preference level to a specified routing protocol.

set preferenceforprotocol

proto = ] { autostatic | local | netmgmt | nondod | ospf | rip | static }

preflevel = ] PreferenceLevel

proto = ] { autostatic |local | netmgmt | nondod | ospf | rip | static }
Required. Specifies the routing protocol for which a preference level is set.

  • autostatic adds an autostatic routing preference.

  • local adds a local routing preference.

  • netmgmt adds a routing preference for a network management protocol.

  • nondod adds a preference for a routing protocol not able to use demand-dial.

  • ospf adds a routing protocol preference for OSPF.

  • rip adds a routing preference for RIP.

  • static adds a static routing preference.

noteNote
OSPF is supported on RRAS on Windows Server 2008 and Windows Server 2003 only. It is not supported on RRAS on Windows Server 2008 R2.

preflevel = ] PreferenceLevel
Required. An integer that specifies the preference level.

The following sets a preference level of 20 for the RIP routing protocol.

set preferenceforprotocol proto=rip preflevel=20

Modifies a non-persistent network management route for the specified interface or next hop count.

add rtmroute

dest = ] IPAddress

mask = ] SubnetMask

nameorindex = ] InterfaceNameOrIndexNumber

[ [ nhop = ] IPAddress ]

[ [ metric = ] RouteMetric ]

[ [ view = ] { unicast | multicast | both } ]

dest = ] IPAddress
Required. Specifies the destination IPv4 address for the specified route.

mask = ] SubnetMask
Required. Specifies the subnet mask for the destination address.

nameorindex = ] InterfaceNameOrIndexNumber
Required. Specifies, by name or index number, the interface where the route is to be added.

nhop = ] IPAddress
Specifies the next hop address for the route. For routes over point-to-point interface, this value should not be specified.

metric = ] RouteMetric
Specifies the route metric.

view = ] { unicast | multicast | both }
Specifies valid traffic for the route.

  • unicast specifies that the route is valid for unicast traffic only.

  • multicast specifies that the route is valid for multicast traffic only.

  • both (default) specifies that the route is valid for both unicast and multicast traffic.

The following sets a non-persistent network management route for the specified interface.

set rtmroute 192.168.1.0 255.255.255.0 "Virtual Private Connection"

Sets the name of a multicast scope.

set scope

grpaddr = ] IPAddress

grpmask = ] SubnetMask

scopename = ] ScopeName

grpaddr = ] IPAddress
Required. Specifies the multicast scope or group IPv4 address.

grpmask = ] SubnetMask
Required. Specifies the subnet mask of the multicast scope address.

[scopename=] ScopeName
Required. Specifies the name of the multicast scope.

The following sets the multicast scope to the specified name.

set scope 239.1.1.0 255.255.255.224 "My Multicast Scope"

Updates the routing information for the specified interface.

set updateroutes

name = ] InterfaceName

name = ] InterfaceName
Required. Specifies, by name, the interface for which to update routing information. If no interface is specified, all interfaces are updated.

The following updates routing information for all interfaces.

set updateroutes

Displays the configured multicast scope boundaries.

show boundary

Displays the current IP multicast boundaries.

show boundarystats

rr = ] RefreshRate

[rr=] RefreshRate
Specifies the refresh rate time, in seconds.

The following shows the current IP multicast boundary statistics and refreshes the display every 3 seconds until CTRL+C is entered to exit the display cycle.

show boundarystats rr=3

Displays packet filter information for the specified interface.

show filter

name = ] InterfaceName

name = ] InterfaceName
Specifies, by name, the interface for which to display filter information. If no interface is specified, filter information for all interfaces is displayed.

The following shows two different examples of displaying filter information.

show filter

show filter name="Local Area Connection"

Displays interface information for the specified interface. Used without parameters, show interface displays configuration information for all interfaces.

show interface

name = ] InterfaceName

name = ] InterfaceName
Specifies, by name, the interface for which you want to display information. The InterfaceName parameter must match the name of the interface as specified in Network Connections. If InterfaceName contains spaces, use quotation marks around the text (for example, "Interface Name").

The following shows two different examples of displaying interface information.

show interface

show interface name="Local Area Connection"

Displays global logging level information such as whether logging is turned off and whether errors, warnings, and informational messages are being logged.

show loglevel

Displays multicast forwarding entries (MFE).

show mfe

[ [ grpaddr = ] IPAddress grpmask = ] SubnetMask ]

[ [ srcaddr =] IPAddresssrcmask = ] SubnetMask ]

[ [ type = ] { active | negative | both } ]

[ [ rr = ] RefreshRate ]

grpaddr = ] IPAddress
Specifies the group IPv4 address for the start of the range.

grpmask = ] SubnetMask
Specifies the subnet mask associated with the group IP address.

srcaddr = ] IPAddress
Specifies the source IPv4 address of the start of the range.

srcmask = ] SubnetMask
Specifies the subnet mask associated with the source IP address.

type = ] { active | negative | both }
Specifies the type of multicast forwarding entry.

  • active displays active MFE only.

  • negative displays negative MFE only.

  • both (default) displays both active and negative MFE.

rr = ] RefreshRate
Specifies the refresh rate in seconds.

The following shows two different examples of displaying multicast forwarding entries.

show mfe

show mfe grpaddr=239.0.0.1 mask=255.255.255.255

Displays multicast forwarding entry (MFE) statistics.

show mfestats

[ [ grpaddr = ] IPAddress grpmask = ] SubnetMask ]

[ [ srcaddr = ] IPAddresssrcmask = ] SubnetMask ]

[ [ type = ] { active | negative | both } ]

[ [ stats = ] all ]

[ [ rr = ] RefreshRate ]

grpaddr = ] IPAddress
Specifies the group IPv4 address for the start of the range.

grpmask = ] SubnetMask
Specifies the subnet mask associated with the group IP address.

srcaddr = ] IPAddress
Specifies the source IPv4 address of the start of the range.

srcmask = ] SubnetMask
Specifies the subnet mask associated with the source IP address.

type = ] { active | negative | both }
Specifies the type of multicast forwarding entry.

  • The active displays active MFE only.

  • The negative displays negative MFE only.

  • The both (default) displays both active and negative MFE.

stats = ] all
Specify all to show all detailed MFE statistics.

rr = ] RefreshRate
Specifies the refresh rate for MFE statistics in seconds.

The following shows two different examples of displaying multicast forwarding entry statistics.

show mfestats

show mfestats grpaddr=239.0.0.1 mask=255.255.255.255

Displays information about persistent static routes for the specified interface.

show persistentroutes

name = ] InterfaceName

name = ] InterfaceName
Specifies, by name, the interface for which to display persistent static route information. If no interface is specified, information for all interfaces is displayed.

The following shows two different examples of displaying interface information.

show persistentroutes

show persistentroutes name="Local Area Connection"

Displays preference levels for all protocols.

show preferenceforprotocol

Displays all configured IP protocols.

show protocol

Displays destinations in the routing table.

show rtmdestinations

[ [ operator = ] { matching | shorterthan | longerthan } ]

[ [ dest = ] IPAddressmask = ] SubnetMask ]

[ [ view = ] { unicast | multicast | both } ]

[ [ proto = ] { autostatic | local | netmgmt | nondod | rip | static } ]

operator = ] { matching | shorterthan | longerthan }
Specifies the operator for the destination address.

  • matching displays routes matching the specified destination.

  • shorterthan displays routes less than the destination.

  • longerthan displays routes longer than the destination.

dest = ] IPAddress
Specifies the IPv4 address of the destination.

mask = ] SubnetMask
Specifies the subnet mask for the destination address.

view = ] { unicast | multicast | both }
Specifies the type of traffic viewed.

  • unicast displays only routes used for unicast traffic.

  • multicast displays only routes used for multicast traffic.

  • both (default) displays routes used for both unicast and multicast traffic.

proto = ] { autostatic | local | netmgmt | nondod | rip | static }
Specifies displaying routes added by a specific routing protocol.

  • autostatic displays only autostatic protocol routes.

  • local displays only local protocol routes.

  • netmgmt displays only network management protocol routes.

  • nondod displays only routes not able to use demand-dial.

  • rip displays only RIP protocol routes.

  • static displays only static protocol routes.

The following displays all prefixes in the routing table.

show rtmdestinations

The following displays all prefixes shorter than 10.0.0.1.

show rtmdestinations sh 10.0.0.1

The following displays all prefixes in the 172.0.0.0/8 subtree.

show rtmdestinations lo 172/8

Displays routes in the routing table.

show rtmroutes

[ [ operator = ] { matching | shorterthan | longerthan } ]

[ [ dest = ] IPAddress [mask = ] SubnetMask ]

[ [ view = ] { unicast | multicast | both } ]

[ [ proto = ] { autostatic | local | netmgmt | nondod | rip | static } ]

operator = ] { matching | shorterthan | longerthan }
Specifies the operator for the destination address.

  • matching displays routes matching the specified destination.

  • shorterthan displays routes less than the destination.

  • longerthan displays routes longer than the destination.

dest = ] IPAddress
Specifies the IPv4 address of the destination.

mask = ] SubnetMask
Specifies the subnet mask for the destination address.

view = ] { unicast | multicast | both }
Specifies the type of traffic viewed.

  • unicast displays only routes used for unicast traffic.

  • multicast displays only routes used for multicast traffic.

  • both displays routes used for both unicast and multicast traffic.

proto = ] { autostatic | local | netmgmt | nondod | rip | static }
Specifies displaying routes added by a specific routing protocol.

  • autostatic displays only autostatic protocol routes.

  • local displays only local protocol routes.

  • netmgmt displays only network management protocol routes.

  • nondod displays only routes not able to use demand-dial.

  • rip displays only RIP protocol routes.

  • static displays only static protocol routes.

The following displays all routes in the routing table.

show rtmroutes

The following displays all routes shorter than 10.0.0.1.

show rtmroutes sh 10.0.0.1

The following displays all routes in the 172.0.0.0/8 subtree.

show rtmroutes lo 172/8

Displays the multicast scopes configured on the router.

show scope

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft