Windows Network Commands

Source: Internet
Author: User
Tags dns names nslookup nslookup command

Windows Network Commands

Ping

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.

ping  [-t] // Ping 指定的主机,直到停止  [-a] // 将地址解析成主机名  [-n count] // 要发送的回显请求数  [-l size] // 发送缓冲区大小  [-f] // 在数据包中设置“不分段”标志(仅适用于 IPv4)  [-i TTL] // 生存时间  [-r count] // 记录计数跃点的路由(仅适用于 IPv4)。  [-s count] // 计数跃点的时间戳(仅适用于 IPv4)。  [    [-j host-list] | // 与主机列表一起的松散源路由(仅适用于 IPv4)。    [-k host-list]   // 与主机列表一起的严格源路由(仅适用于 IPv4)。  ]  [-w timeout] // 等待每次回复的超时时间(毫秒)  [-R] // 同样使用路由标头测试反向路由(仅适用于 IPv6)  [-S srcaddr] // 要使用的源地址  [-4] // 强制使用 IPv4  [-6] // 强制使用 IPv6target_name
Ipconfig

ipconfig [/allcompartments] [/? |//Display Help message/all |//Display full configuration information.    /renew [Adapter] |  Update the IPV4 address of the specified adapter/release [Adapter] |   Releases the IPV4 address of the specified adapter/RENEW6 [Adapter] | Update the IPV6 address of the specified adapter/RELEASE6 [Adapter] | Releases the IPV6 address of the specified adapter/flushdns | Clear the DNS resolver cache/displaydns | Display the contents of the DNS resolver cache/registerdns | Refresh all DHCP leases and reregister DNS names/showclassid Adapter | Display all allowed DHCP classes for the adapter ID/SETCLASSID adapter [ClassID] | Modify DHCP class Id/showclassid6 Adapter | Display adapter allows all IPV6 DHCP classes ID/SETCLASSID6 adapter [ClassID]//Modify IPV6 DHCP class ID]//adapter Connection name (wildcards * and?) are allowed 

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 ... Release all matching connections, such as "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

ARP -s inet_addr eth_addr [if_addr]// 添加主机并且将 Internet 地址 inet_addr与物理地址 eth_addr 相关联。物理// 地址是用连字符分隔的 6 个十六进制字节。该项是永久的。// // eth_addr 指定物理地址。// // if_addr 如果存在,此项指定地址转换表应修改的接口的 Internet 地址。如果// 不存在,则使用第一个适用的接口。ARP -d inet_addr [if_addr]// 删除 inet_addr 指定的主机。inet_addr 可以是通配符 *,以删除所有主机ARP -a [inet_addr] [-N if_addr] [-v]// 通过询问当前协议数据,显示当前 ARP 项。// // 如果指定 inet_addr,则只显示指定计算机的 IP 地址和物理地址。如果不止一// 个网络接口使用 ARP,则显示每个 ARP 表的项。
Example
    • Arp-s 157.55.85.212 00-aa-00-62-c6-09 .... Add static items.

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

Netstat

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.

NETSTAT  [-a] // 显示所有链接和侦听端口  [-b] // 显示在创建每个连接或侦听端口时涉及的可执行程序  [-e] // 显示以太网统计。此选项可以与 -s 选项结合使用。  [-f] // 显示外部地址的完全限定域名  [-n] // 以数字形式显示地址和端口号  [-o] // 显示与连接相关的进程 ID  [-p proto] // proto 显示 proto 指定的协议的连接;proto 可以是下列任何一             // 个: TCP、UDP、TCPv6 或 UDPv6  [-r] // 显示路由表  [-s] // 显示每个协议的统计。默认情况下,显示IP、IPv6、ICMP、ICMPv6、TCP、       // TCPv6、UDP 和 UDPv6的统计;-p 选项可用于指定默认的子网。-t 显示       // 当前连接卸载状态  [-t]  [interval] // interval 重新显示选定的统计,各个显示间暂停的间隔秒数
Tracert

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.

tracert  [-d] // 不将地址解析成主机名  [-h maximum_hops] // 设置最大跳跃数  [-j host-list] // 设置松散路由  [-w timeout] // 设置每个等待的超时时间  [-R] // 跟踪往返行程路径  [-S srcaddr] // 设置要使用的源地址  [-4] // ipv4  [-6] // ipv6target_name // 目标名
PathPing

PathPing is a combination of Ping and Trace.

NbtStat

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 the NetBIOS name cache to refresh the registered WINS name.

Route

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

ROUTE [-f] [-p] [-4|-6] command [destination][MASK netmask] [gateway] [METRIC metric] [IF interface]
Nslookup

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.

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"

Windows Network Commands

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.