Commands related to network configuration
This module provides procedures to retrieve network information
This module provides commands to retrieve various network-related data for the local system including DNS and DHCP information, type and configuration of network interfaces, traffic statistics and various other information. The module also provides some client side name resolution lookup functions including nonblocking name and address lookups. Many of these commands and some options are not available on all platforms as noted in each command description.
-ifindex INTERFACEINDEX | Limits the returned entries to those in the ARP table for the specified network interface with index INTERFACEINDEX. |
-sort | Returns the entries sorted by interface index, then IP address. |
-validonly | Skips entries that are marked invalid. |
-adapterdescription | Returns a description of the adapter associated with the interface. This option is supported on Windows 2000 and higher. |
-adapterindex | Returns the index of the adapter associated with the interface. This option is supported on Windows 2000 and higher. |
-adaptername | Returns the name of the adapter associated with the interface. This option is supported on Windows 2000 and higher. |
-adminstatus | Returns 1 or 0 depending on whether the interface has been administratively enabled or not. |
-all | Returns all option values. |
-autoconfigactive | Returns 1 if the interface has been autoconfigured with an address, and 0 otherwise. This option is supported on Windows 2000 and higher. |
-autoconfigenabled | Returns 1 if autoconfiguration is enabled on the interface if a DHCP server cannot be found, and 0 otherwise. This option is supported on Windows 2000 and higher. |
-defaultgateway | Returns the address of the default gateway on the interface. This option is supported on Windows 2000 and higher. |
-description | Returns a description of the interface. |
-dhcpenabled | Returns 1 if DHCP is enabled on the interface, else 0. This option is supported on Windows 2000 and higher. |
-dhcpleaseend | Returns the time, in seconds since Jan 1, 1970, that the DHCP lease will expire. This option is supported on Windows 2000 and higher. |
-dhcpleasestart | Returns the time, in seconds since Jan 1, 1970, that the DHCP lease was obtained. This option is supported on Windows 2000 and higher. |
-dhcpserver | Returns the address of the DHCP server on the network interface. This option is supported on Windows 2000 and higher. |
-dnsservers | Returns a list of DNS servers on that interface. This option is supported on Windows 2000 and higher. |
-havewins | Returns 1 if the interface uses WINS, else 0. This option is supported on Windows 2000 and higher. |
-ifindex | Returns the interface index. This is the same as INTERFACEINDEX unless the latter is specified as a name. |
-ifname | Returns the name of the network interface. |
-inbytes | Returns the number of bytes received through this interface. |
-indiscards | Returns the number of incoming packets on this interface that were discarded even though they had no errors. |
-inerrors | Returns the number of incoming packets on this interface that were discarded because of errors. |
-innonunicastpkts | Returns the number of broadcast or multicast packets received through this interface. |
-inunicastpkts | Returns the number of unicast packets received through this interface. |
-inunknownprotocols | Returns the number of incoming packets on this interface that were discarded because of the protocol was unknown. |
-laststatuschange | Returns the last time the operational status changed. |
-ipaddresses | Returns a list sublists containing the IP addresses and masks for the interface. |
-mtu | Returns the maximum transmission unit of the interface. |
-operstatus | Returns the operational status of the interface. This is one of the values nonoperational, wanunreachable, disconnected, wanconnecting, wanconnected, operational. |
-outbytes | Returns the number of bytes transmitted through this interface. |
-outdiscards | Returns the number of outgoing packets on this interface that were discarded even though they had no errors. |
-outerrors | Returns the number of outgoing packets on this interface that were discarded because of errors. |
-outnonunicastpkts | Returns the number of broadcast or multicast packets transmitted through this interface. |
-outqlen | Returns the output queue length on this interface. |
-outunicastpkts | Returns the number of unicast packets transmitted through this interface. |
-physicaladdress | Returns the physical address of the network interface. |
-primarywins | Returns the address of the primary WINS server, if any. |
-reassemblysize | Returns the maximum size of a reassembled packet that is supported by the interface. |
-secondarywins | Returns the address of the secondary WINS server, if any. |
-speed | Returns the speed of the network interface in bits per second. |
-type | Returns the network interface type. This is one of ethernet, tokenring, fddi, ppp, loopback, slip or other. |
-all | Returns all values. |
-arpproxyenabled | Returns 1 if ARP proxying is enabled and 0 otherwise. |
-dhcpscopeid | Returns the DHCP scope id. |
-dnsenabled | Returns 1 if DNS name resolution is enabled on the system and 0 otherwise. |
-dnsservers | Returns a list of DNS server addresses used for name resolution. |
-domain | Returns the system domain. |
-hostname | Returns the host name of the system. |
-routingenabled | Returns 1 if routing is enabled on the system and 0 otherwise. |
-dest DESTADDR | Specifies the destination address for which the route is to be returned. If unspecified, defaults to 0.0.0.0 which corresponds to the default route. |
-source SRCADDR | Specifies the source address to be used. This can affect the route selected. Defaults to 0.0.0.0 which indicates the source address should not affect which route is selected. |
-addr | The destination address that together with the -mask field specifies the address range to which the route applies. |
-age | The age of the route in seconds. This is valid only if the Routing and Remote Access service is running and the protocol is netmgmt. |
-ifindex | The interface index for this route. |
-mask | The network mask that together with -dest specifies the address range to which the route applies. |
-metric1 | A routing protocol specific metric value. |
-metric2 | A routing protocol specific metric value. |
-metric3 | A routing protocol specific metric value. |
-metric4 | A routing protocol specific metric value. |
-metric5 | A routing protocol specific metric value. |
-nexthop | The IP address of next hop in the route to the destination. |
-nexthopas | The autonomous system number of the next hop. |
-policy | Multi-path route selector condition, typically in IP TOS format as defined in RFC 1354. |
-protocol | Protocol that generated the route. |
-type | The type of the route. This is one of local, remote, other or invalid. |
-all | Returns all fields for a connection. This option is assumed if no other field option is specified. |
-bindtime | Returns the time at which the last bind operation was done on the socket, or 0 if no bind has been done. On some platforms, this may not be available in which case, an empty string is returned for the value. |
-localaddr | Returns the local address being used for the connection. |
-localport | Returns the local port number being used for the connection. |
-modulename | Returns the name of the process module that owns the socket. On some platforms, this may not be available in which case, an empty string is returned for the value. |
-modulepath | Returns the path to the process module that owns the socket. On some platforms, this may not be available in which case, an empty string is returned for the value. |
-pid | Returns the PID of the process communicating on the port. On some platforms, this may not be available in which case, an empty string is returned for the value. |
-remoteaddr | Returns the address of the remote end of the connection. |
-remoteport | Returns the port number of the remote end of the connection. |
-state | Returns the connection state. This is one of closed, listen, syn_sent, syn_rcvd, estab, fin_wait1, fin_wait2, close_wait, closing, last_ack, time_wait or delete_tcb. |
-matchlocaladdr HOSTLIST | Only returns those connections whose local address is one of those specified in HOSTLIST. Each element of HOSTLIST may be either an IP address or a host name. |
-matchlocalport PORTNUMBER | Only returns those connections whose local port is the specified number. |
-matchpid PID | Only returns those connections owned by the process with the specified PID. On platforms where the PID is not available, specifying this option will generate an error. |
-matchremoteaddr HOSTLIST | Only returns those connections whose remote address is one of those specified in HOSTLIST. Each element of HOSTLIST may be either an IP address or a host name. |
-matchremoteport PORTNUMBER | Only returns those connections whose remote port is PORTNUMBER. |
matchstate STATELIST | Only returns those connections whose state is one those specified in STATELIST which should be a list of connection state values (see above). |
-all | Returns all fields for a connection. This option is assumed if no other field option is specified. |
-bindtime | Returns the time at which the last bind operation was done on the socket, or 0 if no bind has been done. On some platforms, this may not be available in which case, an empty string is returned for the value. |
-localaddr | Returns the local address being used for the connection. |
-localport | Returns the local port number being used for the connection. |
-modulename | Returns the name of the process module that owns the socket. On some platforms, this may not be available in which case, an empty string is returned for the value. |
-modulepath | Returns the path to the process module that owns the socket. On some platforms, this may not be available in which case, an empty string is returned for the value. |
-pid | Returns the PID of the process communicating on the port. On some platforms, this may not be available in which case, an empty string is returned for the value. |
-matchlocaladdr HOSTLIST | Only returns those connections whose local address is one of those specified in HOSTLIST. Each element of HOSTLIST may be either an IP address or a host name. |
-matchlocalport PORTNUMBER | Only returns those connections whose local port is the specified number. |
-matchpid PID | Only returns those connections owned by the process with the specified PID. On platforms where the PID is not available, specifying this option will generate an error. |
-matchlocaladdr IPADDR | Only matches those connections whose local address is bound to IPADDR. |
-matchlocalport PORTNUMBER | Only matches those connections whose local port is the specified number. |
-matchpid PID | Only matches those connections owned by the process with the specified PID. On platforms where the PID is not available, specifying this option will generate an error. |
-matchremoteaddr IPADDR | Only matches those connections whose remote address is bound to IPADDR. |
-matchremoteport PORTNUMBER | Only matches those connections whose remote port is PORTNUMBER. |
matchstate STATELIST | Only matches those connections whose state is one those specified in STATELIST which should be a list of connection state values. See get_tcp_connections for a list of valid values. |
Copyright © 2004-2009, Ashok P. Nadkarni