Networking

Network Commands in CMD: A Practical Guide

This article covers essential CMD network commands for diagnosing, troubleshooting, and managing network connectivity, with examples and practical use cases.

3 min read
  • پشتیبانی شبکه
  • شبکه
  • جدول
  • مسیر
  • ARP
  • MAC
  • دستورات
  • مدیریت
Network Commands in CMD: A Practical Guide

خلاصه تخصصی مقاله

This article covers essential CMD network commands for diagnosing, troubleshooting, and managing network connectivity, with examples and practical use cases.

موضوعات اصلی: پشتیبانی شبکه، شبکه، جدول، مسیر، ARP، MAC

Network commands in CMD

Command Prompt (CMD) provides a practical set of commands for diagnosing, troubleshooting, and managing network connectivity on Windows. Below we summarize key CMD network commands and explain what each does and when to use it.

Commonly used commands

  • Hostname — show the host computer name.
  • Ping — verify connectivity to an IP address or domain using ICMP packets.
  • PathPing — assess the route and performance of intermediate routers.
  • NETSTAT — display active connections and protocol statistics.
  • Ipconfig — display IP configuration and interface status.
  • NSLookup — query DNS for a domain.
  • Tracert — show the path packets take to a destination.
  • Tasklist — list running processes related to networking.
  • Taskkill — terminate a specific process.
  • arp — view and manage the ARP cache (IP-to-MAC mappings).
  • net view — view computers on the local network or Workgroup.
  • getmac — display MAC addresses of your network adapters.
  • route print — display the system routing table.

Practical notes on ARP and other commands

ARP is useful for viewing and managing IP-to-MAC address mappings. For example, running arp -a shows entries in the ARP cache.

Table of 20 important network commands in CMD

No.CommandMain useUsage exampleSuitable for
1pingTest connectivity to a destinationping 8.8.8.8Check internet connectivity
2ping -tContinuous connectivity testping -t google.comLive monitoring
3ipconfigShow current IP configurationipconfigView system IP
4ipconfig /allShow full network detailsipconfig /allVerify DHCP and DNS
5ipconfig /releaseRelease IP addressipconfig /releaseResolve IP conflicts
6ipconfig /renewRenew IP addressipconfig /renewObtain new DHCP lease
7ipconfig /flushdnsClear DNS cacheipconfig /flushdnsDNS resolution issues
8tracertShow path to destinationtracert google.comDiagnose path latency
9pathpingPath analysis with packet losspathping 8.8.8.8Advanced troubleshooting
10nslookupDNS lookup for a domainnslookup google.comDNS resolution problems
11netstatShow active connectionsnetstatMonitor open ports
12netstat -anoShow PID and portsnetstat -anoProcess-network mapping
13arp -aShow ARP tablearp -aView ARP mappings
14getmacShow MAC addressesgetmacIdentify network hardware MAC
15hostnameShow system namehostnameIdentify host name
16route printShow routing tableroute printCheck Default Gateway
17net viewShow network computersnet viewWorkgroup discovery
18net useManage network drivesnet useConnect to a network share
19tasklistShow running taskstasklistReview network-related processes
20taskkillTerminate a specific processtaskkill /f /IM chrome.exeStop problematic program

برای ارزیابی پایداری، امنیت و نگهداری این زیرساخت، راهنمای پشتیبانی شبکه را نیز مطالعه کنید.