Windows Network Command Rollup

Source: Internet
Author: User
Tags net command dns names name database nslookup nslookup command fully qualified domain name

Category: Network technology 2011-10-26 09:43 2557 People read review (0) Favorite Report

Windows network router DNS server Internetinterface

ping command:

The ping command checks the connection to another computer by sending an ICMP echo request message.

This is a test command to troubleshoot connection failures, and displays help if no parameters are present.

The syntax for the ping command is as follows:

C:/>ping/?

Usage:

ping [-t] [-a] [-N Count] [-l size] [-f] [-I TTL] [-v TOS]

[-R Count] [-S Count] [[-j host-list] | [-K Host-list]]

[-w timeout] [-R] [-S srcaddr] [-4] [-6] Target_name

Options:

-T Ping the specified host until it stops.
To view the statistics and continue the operation-please type control-break;
To stop-please type control-c.

-a resolves the address to a host name.

-N Count the number of ECHO requests to send.

-L size Send buffer.

-F Sets the "Do not Fragment" flag in the packet (for IPV4 only).

-I TTL time to live.

-V TOS Service type (only available for IPv4. This setting is deprecated and

Has no effect on the service field type in the IP header).

-R Count records the route of the Count hop (applies to IPv4 only).

-S The timestamp of Count hop (applies to IPv4 only).

-j host-list Loose source routing along with the host list (IPV4 only).

-K host-list Strict source routing with the host list (for IPV4 only).

-w timeout waits for the time-out (in milliseconds) for each reply.

-R also uses the route header to test for reverse routing (IPV6 only).

-S srcaddr the source address to use.

-4 Force the use of IPV4.

-6 Force the use of IPV6.

ipconfig command:

The ipconfig command is equivalent to the graphical command winipcfg in Windows 9x, which is the most common Windows utility that can display TCP/IP configuration parameters for all network cards, refresh Dynamic Host Configuration Protocol (DHCP), and domain

Settings for the name System.

C:/>ipconfig/?

Usage:

ipconfig [/allcompartments] [/? |/all |

/renew [Adapter] | /release [Adapter] |

/RENEW6 [Adapter] | /RELEASE6 [Adapter] |

/flushdns | /displaydns | /registerdns |

/SHOWCLASSID Adapter |

/SETCLASSID adapter [ClassID] |

/SHOWCLASSID6 Adapter |

/SETCLASSID6 adapter [ClassID]]

which

Adapter Connection Name

(wildcards * and? are allowed, see examples)

Options:

/? Show this help message

/ALL Displays full configuration information.

/release releases the IPV4 address of the specified adapter.

/release6 releases the IPV6 address of the specified adapter.

/renew updates the IPV4 address of the specified adapter.

/RENEW6 updates the IPV6 address of the specified adapter.

/flushdns clears the DNS resolver cache.

/registerdns refreshing all DHCP leases and re-registering DNS names

/DISPLAYDNS Displays the contents of the DNS resolver cache.

/SHOWCLASSID Displays all allowed DHCP class IDs for the adapter.

/setclassid Modify the DHCP class ID.

/SHOWCLASSID6 Displays all IPv6 DHCP class IDs that are allowed by the adapter.

/setclassid6 modifies the IPv6 DHCP class ID.

By default, only the IP address, subnet mask, and default gateway of the adapter bound to TCP/IP are displayed.

For release and Renew, if the adapter name is not specified, all IP address leases for adapters bound to TCP/IP are freed or updated.

For Setclassid and Setclassid6, if ClassId is not specified, ClassId is removed.

Example:

> ipconfig ... Display information

> Ipconfig/all ... Show more information

> Ipconfig/renew ... Update all adapters

> Ipconfig/renew el* ... Update all connections with names beginning with EL

> Ipconfig/release *con* ... To release all matching connections

For example "Local area Connection 1" or "Local area Connection 2"

> Ipconfig/allcompartments ... Display information about all segments

> Ipconfig/allcompartments/all ... Display detailed information about all the segments

ARP command:

The ARP command is used to display and modify the contents of the Address Resolution Protocol cache table, and the cache table entry is the IP address and the network card address pair.

If you use an ARP command that does not contain parameters, the Help information is displayed.

The syntax for ARP is as follows:

C:/>arp/?

Displays and modifies the "IP-to-physical" address translation table used by the Address Resolution Protocol (ARP).

Arp-s inet_addr eth_addr [if_addr]

Arp-d inet_addr [if_addr]

arp-a [INET_ADDR] [-N if_addr] [-v]

-a displays the current ARP entry by asking for the current protocol data.

If you specify INET_ADDR, only the IP address and physical address of the specified computer are displayed. If more than one network interface uses ARP, the entry for each ARP table is displayed.

-G is the same as-a.

-V Displays the current ARP entry in verbose mode. All invalid entries and items on the loopback interface are displayed.

INET_ADDR Specifies the Internet address.

-N if_addr Displays the ARP entry for the specified network interface if_addr.

-D deletes the host specified by inet_addr. INET_ADDR can be a wildcard * to remove all hosts.

-S adds the host and associate the Internet address inet_addr with the physical address eth_addr. The physical address is a 6 hexadecimal byte separated by hyphens. The item is permanent.

ETH_ADDR Specifies the physical address.

If_addr if present, this entry specifies the Internet address of the interface to which the address translation table should be modified. If it does not exist, the first applicable interface is used.

Example:

> Arp-s 157.55.85.212 00-aa-00-62-c6-09 .... Add static items.

> Arp-a .... Displays the ARP table.

Netstat command:

The netstat command is used to display TCP connections, the ports the computer is listening on, Ethernet statistics, IP routing tables, IPV4 statistics (including protocols such as IP, ICMP protocol, TCP, and UDP), and IPV6 statistics (including

IPv6, ICMPV6, TCP over IPv6, and UDP over IPV6, etc.).

If you do not use a parameter, the active TCP connection is displayed.

The syntax of the netstat command is as follows:

C:/>netstat/?

Displays protocol statistics and current TCP/IP network connections.

NETSTAT [-A] [-b] [-e] [-f] [-n] [-O] [-P proto] [-r] [-S] [-t] [interval]

-a displays all connections and listening ports.

-B Displays the executable program involved in creating each connection or listening port.

In some cases, it is known that an executable program hosts multiple independent components, in which case the sequence of components involved in creating a connection or listening port is displayed. In this case, the name of the executable program is located at the bottom [], and the group that it calls

At the top of the piece until TCP/IP is reached. Note that this option can be time-consuming and may fail if you do not have sufficient permissions.

-e Displays Ethernet statistics. This option can be used in conjunction with the-s option.

-F Displays the fully qualified domain name (FQDN) of the external address.

-N Displays the address and port number in digital form.

-O Displays the ID of the process that you have associated with each connection.

-p proto shows the connection to the protocol specified by proto; Proto can be any of the following: TCP, UDP, TCPv6, or UDPV6.

If used with the-s option to display statistics for each protocol, Proto can be any one of the following: IP, IPv6, ICMP, ICMPv6, TCP, TCPV6, UDP, or UDPV6.

-r Displays the routing table.

-S displays statistics for each protocol. By default, statistics are displayed for IP, IPV6, ICMP, ICMPv6, TCP, TCPv6, UDP, and UDPv6, and the-p option can be used to specify a default subnet. -T displays the current connection offload status.

Interval re-displays the selected statistics, the number of seconds between each display pause. Press CTRL + C to stop displaying the statistics again. If omitted, netstat prints the current configuration information once.

TRACERT command:

The function of the TRACERT command is to determine the path to the destination and to display the IP address of each intermediate router on the path.

By sending an ICMP echo request message to the target multiple times, each router's time can be determined by increasing the value of the TTL field in the IP header. The address shown is the port address on the side of the router approaching the source.

The syntax of the TRACERT command is as follows:

C:/>tracert/?

Usage:

tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout]

[-R] [-S srcaddr] [-4] [-6] Target_name

Options:

-D does not resolve addresses to host names.

-h maximum_hops The maximum number of hops for the search target.

-j host-list Loose source routing along with the host list (IPV4 only).

-w timeout waits for the time-out (in milliseconds) for each reply.

-R tracks the round trip path (only for IPv6).

-S srcaddr the source address to use (only for IPv6).

-4 Force the use of IPV4.

-6 Force the use of IPV6.

The diagnostic tool uses multiple ICMP echo Request messages to determine the path to the destination, and the value of the TTL field in each message is different.

Routers on the path must first subtract the TTL field before forwarding the IP datagram, and if the TTL is 0, the router returns a timeout (time exceeded) message to the source and discards the previously forwarded message. In tracert first

Send the Echo request message in the ttl=1, and then add 1 each time, so that each router along the way back to receive the super-times text, until the target returned by the ICMP echo response message.

If some routers do not return the super-times, then the router is not visible, the display list is denoted by an asterisk "*".

Pathping command:

The Pathping combines the functions of ping and tracert two commands to show the latency and packet loss rate for each subnet on the communication line. Pathping sends multiple echo Request messages to each router in the path for a period of time, and then the root

The statistics are calculated based on the packets returned by each router. Because the Pathping command shows the extent to which each router (or link) loses packets, users can determine which routers or subnets have communication problems.

The syntax of the Pathping command is as follows:

C:/users/wangquan>pathping/?

Usage:

Pathping [-G host-list] [-H maximum_hops] [-I address] [-n]

[-P period] [-Q num_queries] [-w timeout]

[-4] [-6] Target_name

Options:

-G host-list a loose source route along with the host list.

-h maximum_hops The maximum number of hops for the search target.

-I address uses the specified source addresses.

-N does not resolve addresses to host names.

-P period the time (in milliseconds) to wait between pings two times.

-Q num_queries The number of queries per hop.

The time-out (in milliseconds) to wait for the-w timeout for each reply.

-4 Force the use of IPV4.

-6 Force the use of IPV6.

Nbtstat command:

The nbtstat command displays statistics for the NetBT (NetBIOS over TCP/IP) protocol, including the NetBIOS name table for the local computer and the remote computer, and the NetBIOS name cache. Nbtstat can also refresh NetBIOS names

Cache to refresh the name of the wins that have already been registered.

The syntax of the nbtstat command is as follows:

C:/users/wangquan>nbtstat/?

Displays protocol statistics and TCP/IP connections that are currently using NBI (NetBIOS on TCP/IP).

NBTSTAT [[-A remotename] [-a IP address] [-c] [-n][-r] [-R] [-RR] [-S] [-S] [interval]]

-A (adapter status) lists the name table of the remote machine with the specified name

-A (adapter status) lists the name table of the remote machine that specifies the IP address.

-C (Cache) lists the remote [computer] name and the NBT cache for its IP address

-N (name) lists the local NetBIOS name.

-R (Resolved) lists names resolved by broadcast and through WINS

-R (Reload) clear and Reload Remote Cache name table

-S (session) lists the session table with the destination IP address

-S (session) lists the session tables that convert the destination IP address to the NETBIOS name of the computer.

-RR (release refresh) sends a name-release package to WINS and then initiates a refresh

RemoteName the remote host computer name.

IP address with dot-delimited decimal representation.

Interval displays the number of seconds between the selected statistics and the pause between each display.

Press CTRL + C to stop displaying the statistics again.

Route command:

The function of the route command is to display and modify the local IP routing table, and if no parameters are present, the help information is given.

The route command syntax is as follows:

C:/>route/?

Manipulate the network routing table.

ROUTE [-f] [-P] [ -4|-6] command [destination]

[MASK netmask] [Gateway] [METRIC METRIC] [IF Interface]

-F Clears the routing table for all gateway entries. If used in conjunction with a command, the routing table should be cleared before running the command.

-P is used in conjunction with the ADD command to set the route to remain unchanged during system boot. By default, the route is not saved when the system is restarted. All other commands are ignored, which always affects the corresponding permanent route.

Windows 95 does not support this option.

-4 Force the use of IPV4.

-6 Force the use of IPV6.

command One of them:

Print route

Add route

Delete Remove route

Change to modify an existing route

destination Specifies the host.

MASK Specifies the network mask value for the next parameter.

NETMASK Specifies the subnet mask value for this route entry.

If not specified, the default setting is 255.255.255.255.

Gateway to specify gateways.

interface specifies the interface number of the route.

METRIC Specifies the number of hops, such as the cost of the target.

All symbol names used for the target can be found in the network database file NETWORKS. The symbol name used for the gateway can be found in the host name database file hosts.

If the command is PRINT or DELETE. The destination or gateway can be a wildcard character (the wildcard is specified as an asterisk "*") or the gateway parameter may be ignored.

If the Dest contains a * or?, it is treated as Shell mode and only the matching destination route is printed. "*" matches any string, while "?" matches any one character. Examples: 157.*.1, 157.*, 127.*, *224*.

Pattern matching is only allowed in the PRINT command.

Diagnostic Information Note:

An invalid MASK produces an error, that is, when (DEST & MASK)! = DEST.

Example: > Route ADD 157.0.0.0 MASK 155.0.0.0 157.55.80.1 IF 1

Route add failed: The specified mask parameter is invalid.

(Destination & Mask)! = Destination.

Example:

> Route PRINT

> Route PRINT-4

> Route PRINT-6

> Route PRINT 157* .... Only those items that match 157* are printed

> Route ADD 157.0.0.0 MASK 255.0.0.0 157.55.80.1 METRIC 3 IF 2

destination^ ^mask ^gateway metric^ ^interface^

If the if is not given, it will attempt to find the best interface for a given gateway.

> Route ADD 3ffe::/32 3ffe::1

> Route change 157.0.0.0 MASK 255.0.0.0 157.55.80.5 METRIC 2 IF 2

Change is used only to modify the gateway and/or metric.

> Route DELETE 157.0.0.0

> Route DELETE 3FFE::/32

nslookup command:

The nslookup command is used to display DNS query information, diagnose and troubleshoot DNS failures.

Use this tool to familiarize yourself with how the DNS server works.

Nslookup has both interactive and non-interactive modes of work.

The syntax for nslookup is as follows:

C:/>nslookup/?

Usage:

nslookup [-opt ...] # using the default server interaction mode

nslookup [-opt ...]-Server # Interactive mode using "Server"

nslookup [-opt ...] host # finds only "host" using the default server

nslookup [-opt ...] host server # finds only "host" using "Server"

NET command:

Network services in Windows use commands that start with net.

To enter net/? At the CMD.exe prompt, the list of display net commands is as follows:

C:/>net/?

The syntax for this command is:
NET

[ACCOUNTS | Computer | CONFIG | CONTINUE | FILE | GROUP | Help |

helpmsg | localgroup | PAUSE | SESSION | SHARE | START |

STATISTICS | STOP | Time | Use | USER | VIEW]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.