Netsh commands for Interface Internet Protocol version 4 (IPv4)
Applies To: Windows Server 2008
You can use commands in the Netsh Interface IP context to configure the TCP/IP protocol (including addresses, default gateways, DNS servers, and WINS servers) and to display configuration and statistical information.
You can run these commands at the command prompt for the netsh interface ip context. For these commands to work at the command prompt, you must type netsh interface ip before typing commands and parameters as they appear in the syntax below.
For more information on Netsh, see Netsh Overviewand Enter a Netsh Context.
To view the command syntax, click a command:
add address
add dnsserver
add neighbors
add route
add winsserver
delete address
delete arpcache
delete destinationcache
delete dnsserver
delete neighbors
delete route
delete winsserver
dump
install
reset
set address
set compartment
set dnsserver
set dynamicportrange
set global
set interface
set neighbors
set route
set subinterface
set winsserver
show address
show compartments
show config
show destinationcache
show dnsservers
show dynamicportrange
show global
show icmpstats
show interfaces
show ipaddresses
show ipnettomedia
show ipstats
show joins
show neighbors
show offload
show route
show subinterfaces
show tcpconnections
show tcpstats
show udpconnections
show udpstats
show winsservers
Adds an IP address and a default gateway on a specified interface configured with a static IP address.
add address [name=]InterfaceName [addr=]IPAddress [mask=]SubnetMask[[gateway=] DefaultGateway [gwmetric=]GatewayMetric]
- [name=] InterfaceName
Required. Specifies the name of the interface for which you want to add address and gateway 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").
- [ addr=] IPAddress[ mask=] SubnetMask
Required. Specifies the IP address to add and the subnet mask for that IP address.
- [ gateway=] DefaultGateway[ gwmetric=] GatewayMetric
Specifies the IP address of the default gateway to add and the metric for that default gateway.
- /?
Displays help at the command prompt.
Adds a DNS server to a list of DNS servers for a specified interface.
add dnsserver [name=]InterfaceName [addr=] DNSAddress [[index=]DNSIndex]
- [name=] InterfaceName
Required. Specifies the name of the interface for which you want to add DNS 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").
- [addr=] DNSAddress
Required. Specifies the IP address of the DNS server to add.
- [index=] DNSIndex
Specifies the position of the added DNS server in the list of DNS servers for the interface.
- /?
Displays help at the command prompt.
- A lower number for the DNSIndex parameter corresponds to a higher preference. If no index is specified, then the server is added with the lowest preference.
Specifies an entry in the neighbor cache.
add neighbors [interface=]<string>[address=]<IPv4Address> [neighbor=]<string> [subinterface=]<string>[[store=]active|persistent]
- [interface=]<string>
Specifies an interface name or index.
- [address=]<IPv4Address>
Specifies the address of the neighbor.
- [neighbor=]<string>
Specifies the link layer address of the neighbor.
- [subinterface=]<string>
Specifies the LUID of the subinterface. This is only needed on interfaces with multiple subinterfaces.
[[store=]active|persistent]
One of the following values:active: Address will disappear on next boot.
Persistent (default): Address will be persistent.
This example command adds an entry to the neighbor cache on the interface named "Private."
add neighbors "Private" "10.1.1.1" "12-34-56-78-9a-bc"
Adds a route for a specified prefix. Time values can be expressed in days (d), hours (h), minutes (m), and seconds (s). For example, 2d represents two days.
add route [prefix=]IP4Address**/**Integer [[interface=]String] [[nexthop=]IPv4Address] [[siteprefixlength=]Integer] [[metric=]Integer] [[validlifetime=]{Integer | infinite}] [[preferredlifetime=]{Integer | infinite}] [[store=]{active | persistent}]
- [ prefix=] IPv6Address/Integer
Required. Specifies the prefix for which to add a route. Integer specifies the prefix length.
- [[ interface=] String]
Specifies an interface name or index.
- [[ nexthop=] IPv6Address]
Specifies the gateway address, if the prefix is not on-link.
- [[ siteprefixlength=] Integer]
Specifies the prefix length for the entire site, if the prefix is not on-link.
- [[ metric=] Integer]
Specifies the route metric.
- [[ validlifetime=]{ Integer| infinite}]
Specifies the lifetime over which the route is valid. The default value is infinite.
- [[ preferredlifetime=]{ Integer| infinite}]
Specifies the lifetime over which the route is preferred. The default value is infinite.
- [[ store=]{ active| persistent}]
Specifies whether the change lasts only until the next boot (active) or is persistent (persistent). The default selection is persistent.
This example command adds a route on the interface named "Internet".
add route 10.2.0.0/16 "Internet" 10.0.0.1
Adds a WINS server to a list of WINS servers for a specified interface.
add winsserver [name=]InterfaceName [addr=] WINSAddress [[index=]WINSIndex]
- [ name=] InterfaceName
Required. Specifies the name of the interface for which you want to add WINS 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").
- [ addr=] WINSAddress
Required. Specifies the IP address of the WINS server to add.
- [ index=] WINSIndex
Specifies the position of the added WINS server in the WINS server list for that interface.
- /?
Displays help at the command prompt.
- A lower number for the WINSIndex parameter corresponds to a higher preference. If no index is specified, then the server is added with the lowest preference.
Deletes an IP address or a default gateway on a statically configured interface.
delete address [name=]InterfaceName [addr=] IPAddress [[gateway=]{DefaultGateway | all}]
- [ name=] InterfaceName
Required. Specifies the name of the interface for which you want to delete address and gateway 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").
- [ addr=] IPAddress
Required. Specifies the IP address to delete.
- [ gateway=]{ DefaultGateway| all}
Specifies whether to delete one default gateway or all default gateways. If only one default gateway should be deleted, DefaultGateway specifies the IP address of the default gateway to be deleted.
- /?
Displays help at the command prompt.
- This command will not delete the last IP address on the interface.
Removes the entries in the Address Resolution Protocol (ARP) cache for a specified interface. Used without parameters, delete arpcache removes the entries in the ARP caches of all interfaces.
delete arpcache [name=]<InterfaceName>
- [name=]<InterfaceName>
Specifies the name of the interface for which you want to remove the ARP cache entries. 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").
- /?
Displays help at the command prompt.
Clears the destination cache. If an interface is specified, clears the cache only on that interface. If an address is also specified, deletes only that destination cache entry.
delete destinationcache [[interface=]String] [[address=]IPv4Address]
- [[ interface=] String]
Specifies an interface name or index.
- [[ address=] IPv4Address]
Specifies the address of the destination.
When no parameters are specified, all entries in the destination caches for all interfaces are deleted.
This example command deletes the destination cache for the interface named "Private."
delete destinationcache "Private"
Deletes a DNS server or all DNS servers from a list of DNS servers for a specified interface or for all interfaces.
delete dnsserver [name=]InterfaceName [addr=]{DNSAddress | all}
- [ name=] InterfaceName
Required. Specifies the name of the interface for which you want to delete DNS 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").
- [ addr=]{ DNSAddress| all}
Required. Specifies whether to delete the address of one DNS server or all servers for all interfaces. If only one DNS server should be deleted, DNSAddress specifies the IP address of the DNS server to delete.
- /?
Displays help at the command prompt.
Specifies that all entries in the neighbor cache are deleted. If an interface is specified, clears the cache only on that interface. If an address is also specified, deletes only that neighbor cache entry.
delete neighbors [[interface=]String] [[address=]IPv4Address]
- [[ interface=] String]
Specifies an interface name or index.
- [[ address=] IPv4Address]
Specifies the address of the neighbor.
This example command removes all entries from the neighbor cache on the interface named "Private."
delete neighbors "Private"
Deletes an IPv4 route.
delete route [prefix=]IPv4Address**/**Integer [[interface=]String] [[nexthop=]IPv4Address] [[store=]{active | persistent}]
- [ prefix=] IPv4Address/Integer
Required. Specifies the prefix of the route to delete.
- [[ interface=] String]
Specifies an interface name or index.
- [[ nexthop=] IPv4Address]
Specifies the gateway address, if the prefix is not on-link.
- [[ store=]{ active| persistent}]
Specifies whether the deletion lasts only until the next boot (active) or is persistent (persistent). The default selection is persistent.
This example command deletes a route from the interface named "Internet."
delete route 10.2/16 "Internet" 10.0.0.1
Deletes a WINS server or servers from a list of WINS servers for a specified interface or all interfaces.
delete winsserver [name=]InterfaceName [addr=]{WINSAddress | all}
- [ name=] InterfaceName
Required. Specifies the name of the interface for which you want to delete a WINS server or servers. 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").
- [ addr=]{ WINSAddress| all}
Required. Specifies whether to delete only one server for an interface or all servers for all interfaces. If only one server should be deleted, WINSAddress specifies the IP address of the WINS server to delete.
- /?
Displays help at the command prompt.
Displays the current configuration as a series of Netsh Interface IP commands.
dump
none
- To create a configuration script file, redirect the output of this command to a file.
Installs the IPv4 protocol. A reboot is required for the installation to take effect.
install
Resets the IPv4 configuration state. A reboot is required for changes to take effect.
reset
Configures an IP address and a default gateway on a specified interface.
set address [name=]InterfaceName [source=]{dhcp | static [addr=]IPAddress[mask=]SubnetMask [gateway=]{none | DefaultGateway [[gwmetric=]GatewayMetric]}}
- [ name =] InterfaceName
Required. Specifies the name of the interface for which you want to configure address and gateway 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").
- [ source=]{ dhcp| static[ addr=] IPAddress[ mask=] SubnetMask[ gateway=]{ none| DefaultGateway[[ gwmetric=] GatewayMetric]}}
Required. Specifies whether the IP address to configure originates from a Dynamic Host Configuration Protocol (DHCP) server or is static. If the address is static, IPAddress specifies the address to configure, and SubnetMask specifies the subnet mask for the IP address being configured. If the address is static, you must also specify whether you want to leave the current default gateway (if any) in place or configure one for the address. If you configure a default gateway, DefaultGateway specifies the IP address of the default gateway to be configured, and GatewayMetric specifies the metric for the default gateway to be configured.
- /?
Displays help at the command prompt.
You can use this command to switch an interface between DHCP configuration and static configuration. If the interface is configured statically, the Domain Name System (DNS) and WINS server addresses for this interface must also be statically configured.
Omitting the DefaultGateway parameter does not clear gateway configuration but preserves whatever was previously configured.
Modifies compartment configuration parameters.
set compartment [compartment=]<integer> [defaultcurhoplimit=]<integer>[store=]active|persistent
- [compartment=]<integer>
Specifies an interface name or index.
- [defaultcurhoplimit=]<integer>[
Specifies the address of the neighbor.
[[store=]active|persistent]
One of the following values:active: Address will disappear on next boot.
Persistent (default): Address will be persistent.
set compartment compartment=1 defaultcurhoplimit=255 store=active
Configures a DNS server address for a specified interface.
set dnsserver [name=]InterfaceName [source=]{dhcp | static }[addr=]{IP Address | none} [register=]{none | primary | both}
- [ name=] InterfaceName
Required. Specifies the name of the interface for which you want to set DNS 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").
- [ source=]{ dhcp| static }
Required. Specifies whether the IP address of the DNS server is configured by DHCP or is static.
- [ addr=]{ IP Address| none }
If the IP address is static, IP Address specifies the IP address of the DNS server to configure, and none specifies that the DNS configuration should be removed.
- [ register=]{ none| primary| both }
None specifies whether to disable dynamic update. Primary registers the computer name under the primary DNS suffix only. Both register the computer name under both the primary DNS suffix as well as under the connection-specific suffix.
- /?
Displays help at the command prompt.
If the interface is already statically configured, the static parameter replaces the existing list of DNS server addresses with the one specified in the command.
Only if the [source] is static is the [addr] option available for configuring a static list of DNS server IP addresses for the specified interface.
set dnsserver name="Local Area Connection" source=dhcp
set dnsserver "Local Area Connection" static 10.0.0.1 primary
Modifies the range of ports used for dynamic port assignment. Dynamic port assignment is also known as wildcard port assignment.
set dynamicportrange [[protocol=]tcp|udp][startport=]<integer> [numberofports=]<integer>[[store=]active|persistent]
[[protocol=[tcp|udp]
One of the following values:- TCP: Display the dynamic port range for TCP.
UDP: Display the dynamic port range for UDP.
- [startport=]<integer>
Specifies the starting port for dynamic port assignment.
[numberofports=]<integer>
- Specifies the number of ports available for dynamic port assignment.
[[store=]active|persistent]
One of the following values:- Active: Address will disappear on next boot.
set dynamicportrange protocol=tcp startport=10000 numberofports=20000
Modifies global configuration parameters.
set global [[defaultcurhoplimit=]Integer] [[neighborcachelimit=]Integer][[routecachelimit=]Integer] [[reassemblylimit=]Integer] [[store=]{active | persistent}]
- [[defaultcurhoplimit=] Integer]
Specifies the default hop limit of packets sent.
- [[neighborcachelimit=] Integer
Required. Specifies the maximum number of neighbor cache entries.
- [[routecachelimit=] Integer]
Specifies the maximum number of route cache entries.
- [[reassemblylimit=] Integer]
Specifies the maximum size of the reassembly buffer.
- [[store=]active|persistent]
Specifies whether the change lasts only until the next boot (active) or is persistent (persistent). The default selection is persistent.
This example command sets global parameters for all IPv6-enabled interfaces on the computer. The default hop limit is set to 32, the maximum number of neighbor cache entries is set to 100, and the maximum number of route cache entries is 100,000.
set global 32 100 100000
Modifies interface configuration parameters.
set interface [[interface=]String] [[forwarding=]{enabled | disabled}] [[advertise=]{enabled | disabled}] [[mtu=]Integer] [[siteid=]Integer] [[metric=]Integer] [[firewall=]{enabled | disabled}] [[siteprefixlength=]Integer] [[store=]{active | persistent}]
- [[ interface=] String]
Specifies an interface name or index.
- [[ forwarding=]{ enabled| disabled}]
Specifies whether packets arriving on this interface can be forwarded to other interfaces. The default selection is disabled.
- [[ advertise=]{ enabled| disabled}]
Specifies whether Router Advertisements are sent on this interface. The default selection is disabled.
- [[ mtu=] Integer]
Specifies the Maximum Transfer Unit (MTU) of this interface. The default MTU is the natural MTU of the link.
- [[ siteid=] Integer]
Specifies the site scope zone identifier.
- [[ metric=] Integer]
Specifies the interface metric, which is added to route metrics for all routes over the interface.
- [[ firewall=]{ enabled| disabled}]
Specifies whether to operate in firewall mode.
- [[ siteprefixlength=] Integer]
Specifies the default length of the global prefix for the entire site.
- [[ store=]{ active| persistent}]
Specifies whether the change lasts only until the next boot (active) or is persistent (persistent). The default selection is persistent.
This example command sets the interface with the name "Private," with a siteid of two and a metric of two. All other parameter values are left at the default values.
set interface "Private" siteid=2 metric=2
Sets an entry in the neighbor cache.
set neighbors [[interface=]String] [[address=]IPv4Address] [neighbor=]<string> [[subinterface=]<string>][[store=]active*|*persistent]
- [[ interface=] String]
Specifies an interface name or index.
- [[ address=] IPv4Address]
Specifies the address of the neighbor.
- [neighbor=]<string>
Specifies the link layer address of the neighbor.
- [[subinterface=]<string>]
Specifies the LUID of the subinterface. This is only needed on interfaces with multiple subinterfaces.
[[store=]active|persistent]
One of the following values:active: Address will disappear on next boot.
Persistent (default): Address will be persistent.
This example command sets an entry to the neighbor cache on the interface named "Private."
set neighbors "Private" "10.1.1.1" "12-34-56-78-9a-bc"
Modifies route parameters. Time values can be expressed in days (d), hours (h), minutes (m), and seconds (s). For example, 2d represents two days.
set route [prefix=]IPv4Address**/**Integer [[interface=]String] [[nexthop=]IPv4Address] [[siteprefixlength=]Integer] [[metric=]Integer] [publish=]{no | yes | immortal}] [[validlifetime=]{Integer | infinite}] [[preferredlifetime=]{Integer | infinite}] [[store=]{active | persistent}]
- [ prefix=] IPv6Address/Integer
Required. Specifies the prefix (IPv6Address) and prefix length (Integer) of the route to modify.
- [[ interface=] String]
Specifies an interface name or index.
- [[ nexthop=] IPv6Address]
Specifies the gateway address, if the prefix is not on-link.
- [[ siteprefixlength=] Integer]
Specifies the prefix length for the entire site, if the prefix is not on-link.
- [[ metric=] Integer]
Specifies the route metric.
- [[ publish=]{ no| yes| immortal}]
Specifies whether routes are advertised (yes), advertised with an infinite lifetime (immortal), or not advertised (no) in Route Advertisements. The default selection is no.
- [[ validlifetime=]{ Integer| infinite}]
Specifies the lifetime over which the route is valid. The default value is infinite.
- [[ preferredlifetime=]{ Integer| infinite}]
Specifies the lifetime over which the route is preferred. The default value is infinite.
- [[ store=]{ active| persistent}]
Specifies whether the change lasts only until the next boot (active) or is persistent (persistent). The default selection is persistent.
This example command sets a route on the interface named "Internet."
set route 10.2.0.0/16 "Internet" 10.0.0.1 0 2 yes 5000 5000 store=active
Modifies subinterface configuration parameters.
set subinterface [interface=]<string> [[mtu=]<integer>] [[subinterface=]<string>] [[store=]active|persistent]
- [[ interface=] String]
Specifies an interface name or index.
- [[mtu=]<integer>]
Specifies the MTU of this subinterface. The default is the natural MTU of the link.
- [[subinterface=]<string>]
Specifies the subinterface LUID. This is only required on interfaces with multiple subinterfaces.
- [[ store=][active|persistent]
Specifies whether active (active) or persistent (persistent) addresses are displayed. The default selection is active.
set subinterface "1" mtu=1500 store=active
Sets WINS server configuration to either DHCP or static mode for a specified interface.
set winsserver [name=]InterfaceName [source=]{dhcp | static [addr=]{WINSAddress | none }}
- [ name=] InterfaceName
Required. Specifies the name of the interface for which you want to set WINS 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").
- [ source=]{ dhcp| static[ addr=]{ WINSAddress| none}}
Required. Specifies whether the IP address of the WINS server to configure should be assigned by DHCP or is static. If the IP address is static, WINSAddress specifies the IP address of the WINS server to configure, and none specifies that the WINS configuration should be removed.
- /?
Displays help at the command prompt.
- If the interface is already statically configured, the static parameter replaces the existing WINS server address list with the one specified in the set winsserver command.
Displays information about static IP addresses and default gateways on a specified interface. Used without parameters, show address displays address information for all interfaces.
show address [[name=]InterfaceName]
- [ name=] InterfaceName
Specifies the name of the interface for which you want to display address information. The InterfaceName 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").
- /?
Displays help at the command prompt.
- For interfaces configured using DHCP, use the ipconfig command to display the assigned IP addresses, lease parameters, and other DHCP information.
Displays information about all compartments, or about a given compartment if one is specified.
show compartments [compartment=]<integer> [[level=]normal*|*verbose] [store=]active|persistent
- [compartment=]<integer>
Specifies an interface name or index.
[[level=]normal|verbose]
One of the following values:normal: Display one line per compartment (default when no compartment is specified).
verbose: Display extra information about each compartment( default when a compartment is specified).
[[store=]active|persistent]
One of the following values:active: Address will disappear on next boot.
Persistent (default): Address will be persistent.
show compartments
Displays IP address and other configuration information for a specified interface. Used without parameters, show config displays configuration information for all interfaces.
show config [[name=]InterfaceName]
- [ name=] InterfaceName
Specifies the name of the interface for which you want to display configuration 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").
- /?
Displays help at the command prompt.
Displays destination cache entries. If an interface is specified, displays the cache only on that interface. If an address is also specified, displays only that destination cache entry.
show destinationcache [[interface=]String] [[address=]IPv4Address]
- [[ interface=] String]
Specifies an interface name or index.
- [[ address=] IPv4Address]
Specifies the address of the destination.
Displays the DNS configuration of a specified interface. Used without parameters, show dnsservers displays the DNS configurations of all interfaces.
show dnsservers [[name=]InterfaceName]
- [ name=] InterfaceName
Specifies the name of the interface whose DNS configuration you want to display. 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").
- /?
Displays help at the command prompt.
Displays dynamic port range configuration parameters.
show dynamicportrange [[protocol=]tcp|udp] [[store=]active|persistent]
[[protocol=[tcp|udp]
One of the following values:TCP: Show the dynamic port range for TCP.
UDP: Show the dynamic port range for UDP.
[[store=]active|persistent]
One of the following values:Active: Address will disappear on next boot.
Persistent (default): Address will be persistent.
show dynamicportrange
Displays global configuration parameters.
show global [[store=]{active | persistent}]
- [[ store=]{ active| persistent}]
Specifies whether active (active) or persistent (persistent) information is displayed. The default selection is active.
Displays ICMP statistics. Used without parameters, show icmp displays the statistics only once.
show icmpstats [[rr=]RefreshRate]
- [ rr=] RefreshRate
Specifies the refresh rate (the number of seconds between refreshing the display of the statistics).
- /?
Displays help at the command prompt.
Displays statistics for a specified interface. Used without parameters, show interfaces displays statistics for all interfaces only once.
show interfaces [[index=]InterfaceIndex] [[rr=]RefreshRate]
- [ index=] InterfaceIndex
Specifies the interface index, an integer that identifies the interface.
- [ rr=] RefreshRate
Specifies the refresh rate (the number of seconds between refreshing the display of the statistics).
- /?
Displays help at the command prompt.
- To obtain the interface index for an interface, review the output of the show interfaces command used without parameters.
Displays information for a specified IP address. Used without parameters, show ipaddresses displays information for all IP addresses on all interfaces once.
show ipaddresses [[index=]IPAddress] [[rr=]RefreshRate]
- [ index=] IPAddress
Specifies an IP address of an interface.
- [ rr=] RefreshRate
Specifies the refresh rate (the number of seconds between refreshing the display of the statistics).
- /?
Displays help at the command prompt.
- To obtain the IP addresses of all interfaces, review the display of the show ipaddresses command used without parameters.
Displays the contents of the Address Resolution Protocol (ARP) cache, which contains the hardware addresses of resolved next-hop IP addresses. Used without parameters, show ipnettomedia displays the information once.
show ipnettomedia [[rr=]RefreshRate]
- [ rr=] RefreshRate
Specifies the refresh rate (the number of seconds between refreshing the display of the statistics).
- /?
Displays help at the command prompt.
Displays IP statistics. Used without parameters, show ipstats displays the statistics once.
show ipstats [[rr=]RefreshRate]
- [ rr=] RefreshRate
Specifies the refresh rate (the number of seconds between refreshing the display of the statistics).
- /?
Displays help at the command prompt.
Displays IP multicast groups that have been joined for the specified IP address. Used without parameters, show joins displays information for all IP addresses.
show joins [[index=]IPAddress]
- [ index=] IPAddress
Specifies an IP address of an interface.
- /?
Displays help at the command prompt.
- To obtain the IP addresses for all interfaces, review the display of the show ipaddress command used without parameters.
Displays neighbor cache entries. If an interface is specified, the command displays the cache only on that interface. If a subinterface is also specified, the command shows only the cache for that subinterface. If an address is specified as well, the command displays only that specific neighbor cache entry.
show neighbors [[interface=]String] [[address=]IPv4Address] [neighbor=]<string> [[subinterface=]<string>][[store=]active*|persistent] [[level=]normal|*verbose]
- [[ interface=] String]
Specifies an interface name or index.
- [[ address=] IP4Address]
Specifies the address of the neighbor.
- [[subinterface=]<string>]
Specifies the LUID of the subinterface. This is only needed on interfaces with multiple subinterfaces.
[[store=]active|persistent]
One of the following values:active: Address will disappear on next boot.
Persistent (default): Address will be persistent.
[[level=]normal|verbose]
One of the following values:normal: Display one line per subinterface (default when no subinterface is specified).
verbose: Display extra information on each subinterface. (default when a subinterface is specified).
show neighbors
Displays the tasks that can be performed by the network adapter for the specified interface corresponding to installed network hardware. Used without parameters, show offload displays offload information for all interfaces corresponding to installed network hardware.
show offload [[name=]InterfaceName ]
- [ name=] InterfaceName
Specifies the name of the interface for which you want to display offload 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").
- /?
Displays help at the command prompt.
Displays route table entries.
show route [[level=]normal | verbose] [[store=]active | persistent]
- [[ level=] normal| verbose]
Specifies whether only normal routes (normal) or routes used for loopback (verbose) are displayed. The default selection is normal.
- [[ store=]active| persistent]
Specifies whether active (active) or persistent (persistent) routes are displayed. The default selection is active.
Displays information about all subinterfaces, or about all subinterfaces on a given interface if one is specified.
show subinterfaces [interface=]<string> [[ level=]normal| verbose] [[subinterface=]<string>] [[store=]active|persistent]
- [[ interface=] String]
Specifies an interface name or index.
- [[ level=]normal|verbose]
Specifies whether only normal routes (normal) or routes used for loopback (verbose) are displayed. The default selection is normal.
- [[subinterface=]<string>]
Specifies the subinterface LUID. This is only required on interfaces with multiple subinterfaces.
- [[ store=][active|persistent]
Specifies whether active (active) or persistent (persistent) addresses are displayed. The default selection is active.
show subinterfaces
Displays information on a specified TCP connection. Used without parameters, show tcpconnections displays information for all TCP connections once.
show tcpconnections [[index=]{LocalIPAddress | LocalPort | RemoteIPAddress | RemotePort}] [[rr=]RefreshRate]
- [ index=]{ LocalIPAddress| LocalPort| RemoteIPAddress| RemotePort}
Specifies the connection about which to display information. The LocalIPAddress parameter specifies an IP address of an interface. The LocalPort parameter specifies a TCP port for a local process. The RemoteIPAddress parameter specifies an IP address of a remote host. The RemotePort parameter specifies a TCP port for a remote process.
- [ rr=] RefreshRate
Specifies the refresh rate (the number of seconds between refreshing the display of the information).
- /?
Displays help at the command prompt.
Displays TCP statistics. Used without parameters, show tcpstats displays the statistics once.
show tcpstats [[rr=]RefreshRate]
- [ rr=] RefreshRate
Specifies the refresh rate (the number of seconds between refreshing the display of the statistics).
- /?
Displays help at the command prompt.
Displays information about the (User Datagram Protocol) UDP ports used for each IP address. Used without parameters, show udpconnections displays UDP port information for all IP addresses once.
show udpconnections [[index=]{LocalIPAddress | LocalPort}] [[rr=]RefreshRate]
- [ index=]{ LocalIPAddress| LocalPort}
Specifies the connection about which to display information. The LocalIPAddress parameter specifies an IP address of an interface. The LocalPort parameter specifies a UDP port for a local process.
- [ rr=] RefreshRate
Specifies the refresh rate (the number of seconds between refreshing the display of the statistics).
- /?
Displays help at the command prompt.
Displays UDP statistics. Used without parameters, show udpstats displays the statistics once.
show udpstats [[rr=]RefreshRate]
- [ rr=] RefreshRate
Specifies the refresh rate (the number of seconds between refreshing the display of the statistics).
- /?
Displays help at the command prompt.
Displays the WINS configuration for a specified interface. Used without parameters, show winsservers displays the WINS configuration for all interfaces.
show winsservers [[name=]InterfaceName]
- [ name=] InterfaceName
Specifies the name of the interface whose WINS information you want to display. 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").
- /?
Displays help at the command prompt.
The following command configures the interface named Local Area Connection with the static IP address 10.0.5.99, the subnet mask of 255.255.255.0, and a default gateway of 10.0.5.1:
set address name="Local Area Connection" source=static addr=10.0.5.99 mask=255.255.255.0 gateway=10.0.5.1 gwmetric=1
For information on how to interpret netsh command syntax, see Formatting Legend.