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

Netsh commands for routing IP

The following entries provide details for each command.

dump

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

Syntax

dump

Remarks

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

Example

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.

reset

Resets IP routing to a clean state.

Syntax

reset

update

Updates auto-static routes on the specified interface.

Syntax

update

name = ] InterfaceName

Parameters

name = ] InterfaceName

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

add boundary

Adds a multicast scope boundary on an interface.

Syntax

add boundary

name = ] InterfaceName

grpaddr = ] IPAddress

grpmask = ] SubnetMask

or

add boundary

name = ] Name

scopename = ] ScopeName

Parameters

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 netsh routing ipv4 add scope command.

Examples

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"

add filter

Adds a packet filter to the specified interface.

Syntax

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 }

Parameters

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.

Examples

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

add interface

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

Syntax

add interface

name= ] InterfaceName

[ [ state = ] { enable | disable } ]

Parameters

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.

Example

The following adds and enables IP forwarding on an interface.

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

add persistentroute

Adds a persistent static route on the specified interface.

Syntax

add persistentroute

dest = ] IPAddress

mask = ] SubnetMask

name = ] InterfaceName

[ [ nhop = ] IPAddress ]

[ [ proto = ] { static | nondod } ]

[ [ preference = ] Preference

[ [ metric = ] RouteMetric ]

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

Parameters

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.

Example

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"

add preferenceforprotocol

Adds a preference level to a specified routing protocol.

Syntax

add preferenceforprotocol

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

preflevel = ] PreferenceLevel

Parameters
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.

Note
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.
Example

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

add preferenceforprotocol proto=rip preflevel=10

add rtmroute

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

Syntax

add rtmroute

dest = ] IPAddress

mask = ] SubnetMask

nameorindex = ] InterfaceNameorIndexNumber

[ [ nhop = ]=IPAddress ]

[ [ preference = ] { static | nondod } ]

[ [ metric = ] RouteMetric ]

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

Parameters

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.

Example

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"

add scope

Adds a multicast scope to the IP routing configuration.

Syntax

add scope

grpaddr = ] IPAddress

grpmask = ] SubnetMask

scopename = ] ScopeName

Parameters

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.

Example

The following adds the specified multicast scope.

add scope 239.1.1.0 255.255.255.224 "My Multicast Scope"

delete boundary

Deletes a multicast scope boundary from an interface.

Syntax

delete boundary

name = ] InterfaceName

grpaddr = ] IPAddress

grpmask = ] SubnetMask

Parameters

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.

Examples

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"

delete filter

Deletes a packet filter from the specified interface.

Syntax

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 }

Parameters

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.

Examples

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

delete interface

Removes IPv4 forwarding from an interface.

Syntax

delete interface

name = ] InterfaceName

Parameters

name = ] InterfaceName

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

Example

The following removes IPv4 forwarding from the specified interface.

delete interface name="Local Area Connection"

delete persistentroute

Deletes a persistent static route from the specified interface.

Syntax

delete persistentroute

dest = ] IPAddress

mask = ] SubnetMask

name = ] InterfaceName

[ [ nhop = ] IPAddress ]

Parameters

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.

Example

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

delete persistentroute 192.168.1.0 255.255.255.0 "Dial-up Connection"

delete preferenceforprotocol

Deletes a preference level from a specified routing protocol.

Syntax

delete preferenceforprotocol

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

Parameters

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

Required. Specifies the routing protocol for which you want to remove a preference level.
Note
OSPF is supported RRAS on Windows Server 2008 and Windows Server 2003 only. It is not supported on RRAS on Windows Server 2008 R2.

Example

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

delete preferenceforprotocol proto=rip

delete rtmroute

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

Syntax

delete rtmroute

dest = ] IPAddress

mask = ] SubnetMask

name = ] InterfaceName

[ [ nhop = ] IPAddress ]

Parameters

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.

Example

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

delete scope

Deletes a multicast scope from the IPv4 routing configuration.

Syntax

delete scope

grpaddr = ] IPAddress

grpmask = ] SubnetMask

or

delete scope

scopename = ] ScopeName

Parameters

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.

Example

The following deletes the specified multicast scope.

delete scope 239.1.1.0 255.255.255.224 "My Multicast Scope"

set filter

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

Syntax

set filter

name = ] InterfaceName

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

action = ] { drop | forward } ]

[ [ fragcheck = ] { enable | disable } ]

Parameters

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.

Examples

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

set interface

Sets IPv4 forwarding on the specified interface.

Syntax

set interface

name = ] InterfaceName

[ [ state = ] { enable | disable } ]

Parameters

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.

Example

The following sets IPv4 forwarding on the specified interface.

set interface "Local Area Connection"

set loglevel

Sets the global logging level.

Syntax

set loglevel

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

Parameters

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.

Example

The following sets global logging to log errors only.

set loglevel loglevel=error

set persistentroute

Modifies a persistent static route on the specified interface.

Syntax

set persistentroute

dest = ] IPAddress

mask = ] SubnetMask

name = ] InterfaceName

[ [ nhop = ] IPAddress ]

[ [ proto = ] { static | nondod } ]

[ [ metric = ] RouteMetric ]

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

Parameters

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.

Example

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

set persistentroute 192.168.1.0 255.255.255.0 "Virtual Private Connection"

set preferenceforprotocol

Sets a new preference level to a specified routing protocol.

Syntax

set preferenceforprotocol

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

preflevel = ] PreferenceLevel

Parameters

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.

Note
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.

Example

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

set preferenceforprotocol proto=rip preflevel=20

set rtmroute

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

Syntax

add rtmroute

dest = ] IPAddress

mask = ] SubnetMask

nameorindex = ] InterfaceNameOrIndexNumber

[ [ nhop = ] IPAddress ]

[ [ metric = ] RouteMetric ]

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

Parameters

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.

Example

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"

set scope

Sets the name of a multicast scope.

Syntax

set scope

grpaddr = ] IPAddress

grpmask = ] SubnetMask

scopename = ] ScopeName

Parameters

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.

Example

The following sets the multicast scope to the specified name.

set scope 239.1.1.0 255.255.255.224 "My Multicast Scope"

set updateroutes

Updates the routing information for the specified interface.

Syntax

set updateroutes

name = ] InterfaceName

Parameters

name = ] InterfaceName

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

Example

The following updates routing information for all interfaces.

set updateroutes

show boundary

Displays the configured multicast scope boundaries.

Syntax

show boundary

show boundarystats

Displays the current IP multicast boundaries.

Syntax

show boundarystats

rr = ] RefreshRate

Parameters

[rr=] RefreshRate

Specifies the refresh rate time, in seconds.

Example

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

show filter

Displays packet filter information for the specified interface.

Syntax

show filter

name = ] InterfaceName

Parameters

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.

Examples

The following shows two different examples of displaying filter information.

show filter

show filter name="Local Area Connection"

show interface

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

Syntax

show interface

name = ] InterfaceName

Parameters

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").

Examples

The following shows two different examples of displaying interface information.

show interface

show interface name="Local Area Connection"

show loglevel

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

Syntax

show loglevel

show mfe

Displays multicast forwarding entries (MFE).

Syntax

show mfe

[ [ grpaddr = ] IPAddressgrpmask = ] SubnetMask ]

[ [ srcaddr =] IPAddresssrcmask = ] SubnetMask ]

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

[ [ rr = ] RefreshRate ]

Parameters

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.

Examples

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

show mfestats

Displays multicast forwarding entry (MFE) statistics.

Syntax

show mfestats

[ [ grpaddr = ] IPAddressgrpmask = ] SubnetMask ]

[ [ srcaddr = ] IPAddresssrcmask = ] SubnetMask ]

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

[ [ stats = ] all ]

[ [ rr = ] RefreshRate ]

Parameters

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.

Examples

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

show persistentroutes

Displays information about persistent static routes for the specified interface.

Syntax

show persistentroutes

name = ] InterfaceName

Parameters

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.

Examples

The following shows two different examples of displaying interface information.

show persistentroutes

show persistentroutes name="Local Area Connection"

show preferenceforprotocol

Displays preference levels for all protocols.

Syntax

show preferenceforprotocol

show protocol

Displays all configured IP protocols.

Syntax

show protocol

show rtmdestinations

Displays destinations in the routing table.

Syntax

show rtmdestinations

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

[ [ dest = ] IPAddressmask = ] SubnetMask ]

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

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

Parameters

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.

Examples

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

show rtmroutes

Displays routes in the routing table.

Syntax

show rtmroutes

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

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

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

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

Parameters

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.

Examples

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

show scope

Displays the multicast scopes configured on the router.

Syntax

show scope