Explore Courses
Liverpool Business SchoolLiverpool Business SchoolMBA by Liverpool Business School
  • 18 Months
Bestseller
Golden Gate UniversityGolden Gate UniversityMBA (Master of Business Administration)
  • 15 Months
Popular
O.P.Jindal Global UniversityO.P.Jindal Global UniversityMaster of Business Administration (MBA)
  • 12 Months
New
Birla Institute of Management Technology Birla Institute of Management Technology Post Graduate Diploma in Management (BIMTECH)
  • 24 Months
Liverpool John Moores UniversityLiverpool John Moores UniversityMS in Data Science
  • 18 Months
Popular
IIIT BangaloreIIIT BangalorePost Graduate Programme in Data Science & AI (Executive)
  • 12 Months
Bestseller
Golden Gate UniversityGolden Gate UniversityDBA in Emerging Technologies with concentration in Generative AI
  • 3 Years
upGradupGradData Science Bootcamp with AI
  • 6 Months
New
University of MarylandIIIT BangalorePost Graduate Certificate in Data Science & AI (Executive)
  • 8-8.5 Months
upGradupGradData Science Bootcamp with AI
  • 6 months
Popular
upGrad KnowledgeHutupGrad KnowledgeHutData Engineer Bootcamp
  • Self-Paced
upGradupGradCertificate Course in Business Analytics & Consulting in association with PwC India
  • 06 Months
OP Jindal Global UniversityOP Jindal Global UniversityMaster of Design in User Experience Design
  • 12 Months
Popular
WoolfWoolfMaster of Science in Computer Science
  • 18 Months
New
Jindal Global UniversityJindal Global UniversityMaster of Design in User Experience
  • 12 Months
New
Rushford, GenevaRushford Business SchoolDBA Doctorate in Technology (Computer Science)
  • 36 Months
IIIT BangaloreIIIT BangaloreCloud Computing and DevOps Program (Executive)
  • 8 Months
New
upGrad KnowledgeHutupGrad KnowledgeHutAWS Solutions Architect Certification
  • 32 Hours
upGradupGradFull Stack Software Development Bootcamp
  • 6 Months
Popular
upGradupGradUI/UX Bootcamp
  • 3 Months
upGradupGradCloud Computing Bootcamp
  • 7.5 Months
Golden Gate University Golden Gate University Doctor of Business Administration in Digital Leadership
  • 36 Months
New
Jindal Global UniversityJindal Global UniversityMaster of Design in User Experience
  • 12 Months
New
Golden Gate University Golden Gate University Doctor of Business Administration (DBA)
  • 36 Months
Bestseller
Ecole Supérieure de Gestion et Commerce International ParisEcole Supérieure de Gestion et Commerce International ParisDoctorate of Business Administration (DBA)
  • 36 Months
Rushford, GenevaRushford Business SchoolDoctorate of Business Administration (DBA)
  • 36 Months
KnowledgeHut upGradKnowledgeHut upGradSAFe® 6.0 Certified ScrumMaster (SSM) Training
  • Self-Paced
KnowledgeHut upGradKnowledgeHut upGradPMP® certification
  • Self-Paced
IIM KozhikodeIIM KozhikodeProfessional Certification in HR Management and Analytics
  • 6 Months
Bestseller
Duke CEDuke CEPost Graduate Certificate in Product Management
  • 4-8 Months
Bestseller
upGrad KnowledgeHutupGrad KnowledgeHutLeading SAFe® 6.0 Certification
  • 16 Hours
Popular
upGrad KnowledgeHutupGrad KnowledgeHutCertified ScrumMaster®(CSM) Training
  • 16 Hours
Bestseller
PwCupGrad CampusCertification Program in Financial Modelling & Analysis in association with PwC India
  • 4 Months
upGrad KnowledgeHutupGrad KnowledgeHutSAFe® 6.0 POPM Certification
  • 16 Hours
O.P.Jindal Global UniversityO.P.Jindal Global UniversityMaster of Science in Artificial Intelligence and Data Science
  • 12 Months
Bestseller
Liverpool John Moores University Liverpool John Moores University MS in Machine Learning & AI
  • 18 Months
Popular
Golden Gate UniversityGolden Gate UniversityDBA in Emerging Technologies with concentration in Generative AI
  • 3 Years
IIIT BangaloreIIIT BangaloreExecutive Post Graduate Programme in Machine Learning & AI
  • 13 Months
Bestseller
IIITBIIITBExecutive Program in Generative AI for Leaders
  • 4 Months
upGradupGradAdvanced Certificate Program in GenerativeAI
  • 4 Months
New
IIIT BangaloreIIIT BangalorePost Graduate Certificate in Machine Learning & Deep Learning (Executive)
  • 8 Months
Bestseller
Jindal Global UniversityJindal Global UniversityMaster of Design in User Experience
  • 12 Months
New
Liverpool Business SchoolLiverpool Business SchoolMBA with Marketing Concentration
  • 18 Months
Bestseller
Golden Gate UniversityGolden Gate UniversityMBA with Marketing Concentration
  • 15 Months
Popular
MICAMICAAdvanced Certificate in Digital Marketing and Communication
  • 6 Months
Bestseller
MICAMICAAdvanced Certificate in Brand Communication Management
  • 5 Months
Popular
upGradupGradDigital Marketing Accelerator Program
  • 05 Months
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Corporate & Financial Law
  • 12 Months
Bestseller
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in AI and Emerging Technologies (Blended Learning Program)
  • 12 Months
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Intellectual Property & Technology Law
  • 12 Months
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Dispute Resolution
  • 12 Months
upGradupGradContract Law Certificate Program
  • Self paced
New
ESGCI, ParisESGCI, ParisDoctorate of Business Administration (DBA) from ESGCI, Paris
  • 36 Months
Golden Gate University Golden Gate University Doctor of Business Administration From Golden Gate University, San Francisco
  • 36 Months
Rushford Business SchoolRushford Business SchoolDoctor of Business Administration from Rushford Business School, Switzerland)
  • 36 Months
Edgewood CollegeEdgewood CollegeDoctorate of Business Administration from Edgewood College
  • 24 Months
Golden Gate UniversityGolden Gate UniversityDBA in Emerging Technologies with Concentration in Generative AI
  • 36 Months
Golden Gate University Golden Gate University DBA in Digital Leadership from Golden Gate University, San Francisco
  • 36 Months
Liverpool Business SchoolLiverpool Business SchoolMBA by Liverpool Business School
  • 18 Months
Bestseller
Golden Gate UniversityGolden Gate UniversityMBA (Master of Business Administration)
  • 15 Months
Popular
O.P.Jindal Global UniversityO.P.Jindal Global UniversityMaster of Business Administration (MBA)
  • 12 Months
New
Deakin Business School and Institute of Management Technology, GhaziabadDeakin Business School and IMT, GhaziabadMBA (Master of Business Administration)
  • 12 Months
Liverpool John Moores UniversityLiverpool John Moores UniversityMS in Data Science
  • 18 Months
Bestseller
O.P.Jindal Global UniversityO.P.Jindal Global UniversityMaster of Science in Artificial Intelligence and Data Science
  • 12 Months
Bestseller
IIIT BangaloreIIIT BangalorePost Graduate Programme in Data Science (Executive)
  • 12 Months
Bestseller
O.P.Jindal Global UniversityO.P.Jindal Global UniversityO.P.Jindal Global University
  • 12 Months
WoolfWoolfMaster of Science in Computer Science
  • 18 Months
New
Liverpool John Moores University Liverpool John Moores University MS in Machine Learning & AI
  • 18 Months
Popular
Golden Gate UniversityGolden Gate UniversityDBA in Emerging Technologies with concentration in Generative AI
  • 3 Years
Rushford, GenevaRushford Business SchoolDoctorate of Business Administration (AI/ML)
  • 36 Months
Ecole Supérieure de Gestion et Commerce International ParisEcole Supérieure de Gestion et Commerce International ParisDBA Specialisation in AI & ML
  • 36 Months
Golden Gate University Golden Gate University Doctor of Business Administration (DBA)
  • 36 Months
Bestseller
Ecole Supérieure de Gestion et Commerce International ParisEcole Supérieure de Gestion et Commerce International ParisDoctorate of Business Administration (DBA)
  • 36 Months
Rushford, GenevaRushford Business SchoolDoctorate of Business Administration (DBA)
  • 36 Months
Liverpool Business SchoolLiverpool Business SchoolMBA with Marketing Concentration
  • 18 Months
Bestseller
Golden Gate UniversityGolden Gate UniversityMBA with Marketing Concentration
  • 15 Months
Popular
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Corporate & Financial Law
  • 12 Months
Bestseller
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Intellectual Property & Technology Law
  • 12 Months
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Dispute Resolution
  • 12 Months
IIITBIIITBExecutive Program in Generative AI for Leaders
  • 4 Months
New
IIIT BangaloreIIIT BangaloreExecutive Post Graduate Programme in Machine Learning & AI
  • 13 Months
Bestseller
upGradupGradData Science Bootcamp with AI
  • 6 Months
New
upGradupGradAdvanced Certificate Program in GenerativeAI
  • 4 Months
New
KnowledgeHut upGradKnowledgeHut upGradSAFe® 6.0 Certified ScrumMaster (SSM) Training
  • Self-Paced
upGrad KnowledgeHutupGrad KnowledgeHutCertified ScrumMaster®(CSM) Training
  • 16 Hours
upGrad KnowledgeHutupGrad KnowledgeHutLeading SAFe® 6.0 Certification
  • 16 Hours
KnowledgeHut upGradKnowledgeHut upGradPMP® certification
  • Self-Paced
upGrad KnowledgeHutupGrad KnowledgeHutAWS Solutions Architect Certification
  • 32 Hours
upGrad KnowledgeHutupGrad KnowledgeHutAzure Administrator Certification (AZ-104)
  • 24 Hours
KnowledgeHut upGradKnowledgeHut upGradAWS Cloud Practioner Essentials Certification
  • 1 Week
KnowledgeHut upGradKnowledgeHut upGradAzure Data Engineering Training (DP-203)
  • 1 Week
MICAMICAAdvanced Certificate in Digital Marketing and Communication
  • 6 Months
Bestseller
MICAMICAAdvanced Certificate in Brand Communication Management
  • 5 Months
Popular
IIM KozhikodeIIM KozhikodeProfessional Certification in HR Management and Analytics
  • 6 Months
Bestseller
Duke CEDuke CEPost Graduate Certificate in Product Management
  • 4-8 Months
Bestseller
Loyola Institute of Business Administration (LIBA)Loyola Institute of Business Administration (LIBA)Executive PG Programme in Human Resource Management
  • 11 Months
Popular
Goa Institute of ManagementGoa Institute of ManagementExecutive PG Program in Healthcare Management
  • 11 Months
IMT GhaziabadIMT GhaziabadAdvanced General Management Program
  • 11 Months
Golden Gate UniversityGolden Gate UniversityProfessional Certificate in Global Business Management
  • 6-8 Months
upGradupGradContract Law Certificate Program
  • Self paced
New
IU, GermanyIU, GermanyMaster of Business Administration (90 ECTS)
  • 18 Months
Bestseller
IU, GermanyIU, GermanyMaster in International Management (120 ECTS)
  • 24 Months
Popular
IU, GermanyIU, GermanyB.Sc. Computer Science (180 ECTS)
  • 36 Months
Clark UniversityClark UniversityMaster of Business Administration
  • 23 Months
New
Golden Gate UniversityGolden Gate UniversityMaster of Business Administration
  • 20 Months
Clark University, USClark University, USMS in Project Management
  • 20 Months
New
Edgewood CollegeEdgewood CollegeMaster of Business Administration
  • 23 Months
The American Business SchoolThe American Business SchoolMBA with specialization
  • 23 Months
New
Aivancity ParisAivancity ParisMSc Artificial Intelligence Engineering
  • 24 Months
Aivancity ParisAivancity ParisMSc Data Engineering
  • 24 Months
The American Business SchoolThe American Business SchoolMBA with specialization
  • 23 Months
New
Aivancity ParisAivancity ParisMSc Artificial Intelligence Engineering
  • 24 Months
Aivancity ParisAivancity ParisMSc Data Engineering
  • 24 Months
upGradupGradData Science Bootcamp with AI
  • 6 Months
Popular
upGrad KnowledgeHutupGrad KnowledgeHutData Engineer Bootcamp
  • Self-Paced
upGradupGradFull Stack Software Development Bootcamp
  • 6 Months
Bestseller
upGradupGradUI/UX Bootcamp
  • 3 Months
upGradupGradCloud Computing Bootcamp
  • 7.5 Months
PwCupGrad CampusCertification Program in Financial Modelling & Analysis in association with PwC India
  • 5 Months
upGrad KnowledgeHutupGrad KnowledgeHutSAFe® 6.0 POPM Certification
  • 16 Hours
upGradupGradDigital Marketing Accelerator Program
  • 05 Months
upGradupGradAdvanced Certificate Program in GenerativeAI
  • 4 Months
New
upGradupGradData Science Bootcamp with AI
  • 6 Months
Popular
upGradupGradFull Stack Software Development Bootcamp
  • 6 Months
Bestseller
upGradupGradUI/UX Bootcamp
  • 3 Months
PwCupGrad CampusCertification Program in Financial Modelling & Analysis in association with PwC India
  • 4 Months
upGradupGradCertificate Course in Business Analytics & Consulting in association with PwC India
  • 06 Months
upGradupGradDigital Marketing Accelerator Program
  • 05 Months

Best 21+ CMD Network Commands for IT Professionals in 2025

By Mukesh Kumar

Updated on Mar 04, 2025 | 26 min read

Share:

CMD network commands are built into Windows for managing and troubleshooting networks, but many, like ping and netstat, are also available on Linux and macOS. IT professionals often troubleshoot network issues and configure connections. Knowing the right networking commands can make a big difference in solving these problems quickly. 

In this guide, you’ll learn 21+ essential CMD network commands that will help you streamline network management and improve efficiency in your daily tasks.

Top 21+ CMD Network Commands for Managing Wireless Networks on Windows

At the core, networking commands are short text instructions that you input into the Command Prompt (CMD) to manage network activities. These commands enable you to interact directly with your network hardware, such as routers, switches, and wireless adapters, without the need for a graphical user interface.

Using CMD for network tasks helps diagnose and configure networks by enabling actions like checking connectivity (ping), tracing routes (tracert), and managing IP configurations (ipconfig).

While modern graphical tools are useful, CMD provides more control and flexibility, allowing you to access network settings quickly and precisely. 

How Networking Commands Help Improve Network Performance and Connectivity?

CMD network commands like ping and tracert help diagnose and troubleshoot connectivity issues, but they don't directly optimize wireless network performance.

By learning these commands, you can improve your network’s speed, diagnose potential issues, and make sure your connection stays stable.

Some key benefits of using CMD networking commands include:

  • Network diagnostics: Quickly identify network problems, such as slow speeds or disconnections.
  • Configuration and customization: Adjust your network settings to suit your needs, from IP configuration to wireless network setup.
  • Performance improvement: Analyze and optimize network performance using simple command-line tools. Commands like ping and tracert help diagnose network latency and congestion, enabling IT professionals to identify and resolve performance issues.
  • Connectivity restoration: Fix network connection issues without needing to reboot or use external software.

To deepen your understanding of networking concepts and cmd network commands, explore upGrad’s Software Engineering Courses. These courses cover both theoretical principles and hands-on projects, ensuring you're equipped to apply your knowledge to real-world networking scenarios.

Now that you understand the basics, let's dive into the key CMD commands that put you in control of your wireless network management.

1. ping

The ping command is a fundamental tool used to test the reachability of a host on an IP network.

Purpose: To verify network connectivity between your computer and another device.

Key Features:

  • Sends ICMP Echo Request messages to the target host.
  • Waits for an Echo Reply to confirm the host is reachable.
  • Measures the round-trip time for messages sent from the originating host to a destination computer.

Syntax: 

ping [destination IP address or hostname]

Functions:

  • Checks if a remote host is accessible.
  • Assists in diagnosing network issues.
  • Determines the time it takes for data to travel to the destination and back.

Use Cases and Examples:

  • Verifying Host Availability: To check if a specific device is online: 
 ping 192.168.1.1
  • Testing Domain Name Resolution: To ensure that a domain name resolves correctly: 
 ping www.example.com

Benefits and Challenges:

  • Benefits:
    • ping sends an ICMP echo request and waits for a reply, making it a key tool for quickly diagnosing network connectivity issues.
    • Helps identify network latency issues.
  • Challenges:
    • Some devices may block ICMP requests, leading to false negatives.
    • Does not provide detailed information about the nature of network issues.

2. tracert (Windows) / traceroute (Linux/macOS)

The tracert (or traceroute on Unix-based systems) command traces the path that your data takes to reach a destination.

Purpose: To identify the route and measure transit delays of packets across an IP network.

Key Features:

  • Displays each hop along the route to the destination.
  • Shows the round-trip time for each hop.
  • Helps in diagnosing routing issues and network congestion.

Syntax: 

tracert [destination IP address or hostname]

Functions:

  • Maps the path packets take to reach a destination.
  • Identifies points of failure or delays in the network path.
  • Assists in network performance analysis.

Use Cases and Examples:

  • Diagnosing Routing Issues: To trace the path to a website: 
 tracert www.example.com
  • Identifying Network Congestion: To find where delays occur in the network: 
 tracert 192.168.1.1

Benefits and Challenges:

  • Benefits:
    • Provides a clear view of the network path.
    • Helps pinpoint where issues occur in the network.
  • Challenges:
    • Some routers may be configured to ignore traceroute requests.
    • May not provide information beyond the first few hops due to network configurations.

 3. ipconfig (Windows) / ifconfig (Linux/macOS)

The ipconfig (or ifconfig on Unix-based systems) command displays the current network configuration of your computer.

Purpose: To view and manage network interface settings.

Key Features:

  • Displays IP address, subnet mask, and default gateway.
  • Shows DNS server information.
  • Allows for releasing and renewing DHCP leases.

Syntax: 

ipconfig

Functions:

  • Displays network configuration details.
  • Manages DHCP leases.
  • Flushes the DNS resolver cache.

Use Cases and Examples:

  • Viewing IP Configuration: To see your current network settings: 
 ipconfig
  • Releasing and Renewing DHCP Lease: To obtain a new IP address from the DHCP server: 
 ipconfig /release
  ipconfig /renew

Benefits and Challenges:

  • Benefits:
    • Quickly displays network configuration details.
    • Assists in troubleshooting network connectivity issues.
  • Challenges:
    • Does not provide detailed information about network performance.
    • May not reflect changes immediately if network interfaces are not refreshed.

4. netstat

The netstat command provides information about network connections, routing tables, and interface statistics.

Purpose: To display active network connections and listening ports.

Key Features:

  • Lists all active connections and their statuses.
  • Displays listening ports and the associated services.
  • Shows routing tables and interface statistics.

Syntax: 

netstat

Functions:

  • Displays active TCP connections and UDP listeners.
  • Shows network interface statistics, such as data received and sent.
  • Lists the network routes used by the system.

Use Cases and Examples:

  • View Active Network Connections: 

To see all active TCP connections: 

netstat -a
  • Check Listening Ports: 

To view ports that are currently being listened to by the system:

netstat -an | find "LISTEN"
  • View Interface Statistics: 

To display information about network interfaces: 

netstat -i

Benefits and Challenges:

  • Benefits:
    • Provides a quick overview of all network connections and their statuses.
    • Helps identify unauthorized or suspicious network connections.
  • Challenges:
    • The output can be overwhelming with a large number of connections, making it harder to identify specific issues.
    • netstat doesn't show application details by default, but the -b flag reveals which processes are listening on specific ports.

5. nslookup

The nslookup command is used to query Domain Name System (DNS) servers to obtain domain name or IP address mapping.

Purpose: To troubleshoot DNS-related issues and retrieve information about domain names or IP addresses.

Key Features:

  • Queries DNS records for a specified domain name or IP address.
  • Displays the corresponding IP address for a given domain or vice versa.
  • Provides detailed information on DNS servers and records.

Syntax: 

nslookup [domain name or IP address]

Functions:

  • Resolves a domain name into its corresponding IP address.
  • Helps troubleshoot DNS server issues by showing the path queries take to reach a DNS server.
  • Allows for querying specific DNS servers.

Use Cases and Examples:

  • Resolve a Domain Name to an IP Address: 

To find the IP address for a domain: 

nslookup www.example.com
  • Query a Specific DNS Server: 

To use a specific DNS server for the query: 

nslookup www.example.com 8.8.8.8

Benefits and Challenges:

  • Benefits:
    • Helps diagnose DNS resolution issues by showing DNS server responses.
    • Simplifies domain-to-IP resolution without needing external tools.
  • Challenges:
    • The output might not always be as detailed when querying complex DNS records.
    • Doesn’t provide much information about other potential network issues.

nslookup is an invaluable tool for network administrators when dealing with DNS errors or testing DNS configurations.

6. netsh

The netsh command allows you to view and modify the network configuration of a Windows computer.

Purpose: To configure network settings, troubleshoot issues, and manage network connections.

Key Features:

  • Provides access to a wide range of network configuration tasks.
  • Allows you to configure and reset network settings.
  • Supports both local and remote management of network settings.

Syntax: 

netsh [context] [command]

Functions:

  • Configures various network parameters such as IP, DNS, and gateway settings.
  • Resets the TCP/IP stack and other networking components.
  • Enables or disables network interfaces.

Use Cases and Examples:

  • Reset TCP/IP Stack: 

To reset the TCP/IP stack, often used for troubleshooting: 

netsh int ip reset
  • View Interface Configuration:

To see network settings of a specific network interface: 

netsh interface ipv4 show config
  • Configure Wireless Network Settings: 

To configure a wireless network: 

netsh wlan set hostednetwork mode=allow ssid=YourNetwork key=YourPassword

Benefits and Challenges:

  • Benefits:
    • Offers powerful control over a wide range of network configurations.
    • Essential for advanced network troubleshooting and adjustments.
  • Challenges:
    • The syntax can be complex, and incorrect configurations may disrupt network connectivity.
    • Requires elevated privileges to execute some commands, which may be challenging for less experienced users.

With netsh, you have comprehensive control over network configuration and troubleshooting on Windows, making it a critical tool for network professionals.

7. route

The route command is used to display and manipulate the network routing table in Windows.

Purpose: To add, delete, and display network routes used by your computer to send traffic.

Key Features:

  • Displays the routing table, including destinations, gateways, and network interfaces.
  • Allows you to manually add or delete network routes.
  • Supports advanced routing configurations.

Syntax: 

route [command] [parameters]

Functions:

  • Displays the current routing table.
  • Adds or deletes routes to influence the path that network traffic takes.
  • Allows for persistent routes that survive system reboots.

Use Cases and Examples:

  • Display Routing Table: 

To view the current network routes: 

route print
  • Add a Static Route: 

To add a static route for a specific destination: 

route add 192.168.1.0 mask 255.255.255.0 192.168.0.1
  • Delete a Route: 

To remove a specific route from the routing table: 

route delete 192.168.1.0

Benefits and Challenges:

  • Benefits:
    • Provides granular control over how traffic is routed on a network.
    • Essential for troubleshooting complex networking setups, like multi-homed or VPN configurations.
  • Challenges:
    • Misconfiguring routes can lead to network disruptions.
    • Requires administrative privileges, and the command syntax can be difficult for beginners to understand.

8. arp

The arp command is used to display and manipulate the ARP (Address Resolution Protocol) cache in your computer’s memory.

Purpose: To manage and display the ARP cache, which maps IP addresses to MAC addresses.

Key Features:

  • Displays the IP-to-MAC address mapping of devices on the local network.
  • Allows you to add, modify, or delete static ARP entries.
  • Useful for network troubleshooting and resolving IP conflicts.

Syntax:

arp [command] [parameters]

Functions:

  • Displays the current ARP cache.
  • Allows you to add or delete static ARP entries.
  • Enables network troubleshooting by resolving address issues.

Use Cases and Examples:

  • Display the ARP Cache:

To display the ARP cache:

arp -a
  • Delete an ARP Cache Entry:

To remove a specific ARP entry:

arp -d 192.168.1.1
  • Add a Static ARP Entry:

To add a static ARP entry:

arp -s 192.168.1.100 00-aa-bb-cc-dd-ee

Benefits and Challenges:

  • Benefits:
    • Helps in resolving network address conflicts and troubleshooting.
    • Allows for manual ARP cache management.
  • Challenges:
    • Misconfiguring ARP entries can lead to network connectivity issues.
    • Requires administrative privileges for some operations.

9. ip

The ip command is used for network configuration and management in Linux-based operating systems.

Purpose: To configure, display, and manage network interfaces, routes, and other network parameters.

Key Features:

  • Allows configuration of network interfaces, routes, and addresses.
  • Supports the management of advanced network settings, such as IP addresses and routing.
  • Can display detailed network statistics.

Syntax:

ip [command] [parameters]

Functions:

  • Displays network interface configurations.
  • Configures and manages network interfaces.
  • Adds, deletes, and manages network routes.

Use Cases and Examples:

  • Display Network Interfaces:

To display all network interfaces:

ip addr show
  • Add an IP Address to an Interface:

To add an IP address to a specific interface:

ip addr add 192.168.1.100/24 dev eth0
  • Delete an IP Address:

To remove an IP address from an interface:

ip addr del 192.168.1.100/24 dev eth0

Benefits and Challenges:

  • Benefits:
    • Provides powerful tools for managing complex network configurations.
    • Supports both IPv4 and IPv6 addresses.
  • Challenges:
    • Can be complex for beginners due to its extensive features.
    • Requires administrative privileges for some commands.

10. ssh

The ssh command is used to securely access and manage remote servers or network devices over a network.

Purpose: To provide secure, encrypted communication with remote devices.

Key Features:

  • Allows secure, encrypted access to remote systems.
  • Supports command execution, file transfers, and tunneling.
  • Provides a secure alternative to older, unencrypted protocols like telnet.

Syntax:

ssh [user]@[hostname]

Functions:

  • Provides remote login capabilities over a secure connection.
  • Enables remote execution of commands on the remote system.
  • Facilitates secure file transfers using SCP or SFTP.

Use Cases and Examples:

  • Remote Login:

To log in to a remote server:

ssh user@192.168.1.1
  • Copy a File to a Remote Server:

To copy a file to the remote server using SCP:

scp localfile.txt user@192.168.1.1:/remote/path
  • Tunneling:

To set up a secure tunnel for data traffic:

ssh -L 8080:localhost:80 user@192.168.1.1

Benefits and Challenges:

  • Benefits:
    • Ensures secure communications over untrusted networks.
    • Widely used for remote system administration.
  • Challenges:
    • Requires the remote system to have an SSH server configured.
    • Can be complex for users unfamiliar with secure key-based authentication.

Also Read: Kubernetes Networking: A Complete Guide to Understand Network Model

11. curl

The curl command is used to transfer data from or to a server, supporting various protocols like HTTP, FTP, and more.

Purpose: To interact with URLs for testing APIs, downloading files, or fetching web content.

Key Features:

  • Supports multiple protocols, including HTTP, HTTPS, FTP, and more.
  • Allows sending data to a server via GET, POST, PUT, and other HTTP methods.
  • Provides a variety of options for fine-tuning data transfer.

Syntax:

curl [options] [URL]

Functions:

  • Fetches data from a URL (like a webpage or API endpoint).
  • Allows sending HTTP requests with specific headers, data, and methods.
  • Downloads files or content from remote servers.

Use Cases and Examples:

  • Get Web Content:

To fetch the content of a webpage: 

curl https://example.com
  • Send POST Request with Data:

To send a POST request with data to an API: 

curl -X POST -d "name=John&age=30" https://example.com/api
  • Download a File:

To download a file from a URL: 

curl -O https://example.com/file.zip

Benefits and Challenges:

  • Benefits:
    • Supports multiple protocols, making it versatile for different use cases.
    • Simple and effective for testing APIs and downloading files.
  • Challenges:
    • Requires familiarity with options for advanced usage.
    • May not handle large data transfers as efficiently as other tools.

12. dig

The dig (Domain Information Groper) command is used for querying DNS (Domain Name System) records.

Purpose: To fetch information about DNS records for a domain or IP address.

Key Features:

  • Provides detailed DNS query results for various record types (A, MX, TXT, etc.).
  • Supports reverse DNS lookups to map IP addresses to domain names.
  • Allows querying specific DNS servers.
    Syntax:
    dig [@server] [domain] [record type]

Functions:

  • Retrieves DNS information for a given domain.
  • Performs reverse DNS lookups to identify domain names for IP addresses.
  • Allows querying specific DNS servers for more accurate results.

Use Cases and Examples:

  • Query DNS A Record:

To get the A record (IP address) for a domain: 

dig example.com A
  • Query DNS MX Record:

To fetch the mail exchange (MX) record for a domain: 

dig example.com MX

Reverse DNS Lookup:

To find the domain associated with an IP address: 

dig -x 8.8.8.8

Benefits and Challenges:

  • Benefits:
    • Offers detailed DNS information, helpful for troubleshooting.
    • Supports reverse DNS lookups and custom DNS servers.
  • Challenges:
    • Requires some understanding of DNS and its record types.
    • May not provide real-time information for all DNS queries.

13. hostname

The hostname command is used to display or set the system’s hostname in Linux/Unix-like operating systems.

Purpose: To view or change the system hostname.

Key Features:

  • Displays the current hostname of the machine.
  • Allows the user to set a new hostname for the system.
  • Can display both the short and fully qualified domain name (FQDN).

Syntax:

hostname [options] [hostname]

Functions:

  • Displays the current hostname of the system.
  • Allows you to change the system's hostname.
  • Retrieves the FQDN or short hostname of the machine.

Use Cases and Examples:

  • Display the Hostname:

To display the current hostname of your system: 

hostname
  • Change the Hostname:

To set a new hostname for your system: 

sudo hostname newhostname
  • Display FQDN:

To display the fully qualified domain name of the system: 

hostname -f

Benefits and Challenges:

  • Benefits:
    • Simple and easy way to display or modify a system’s hostname.
    • Essential for system identification in networked environments.
  • Challenges:
    • Changing the hostname may require a system reboot or additional configuration.
    • Not available in all environments, especially on non-Unix-based systems.

14. telnet

The telnet command is used to connect to remote systems over the Telnet protocol, providing a command-line interface for interaction.

Purpose: To access remote devices and troubleshoot network issues via a command-line interface.

Key Features:

  • Provides unencrypted access to remote systems.
  • Supports command-line interaction with network devices.
  • Can be used for simple network testing, such as checking open ports.

Syntax:

telnet [hostname] [port]

Functions:

  • Allows remote login and interaction with a system over Telnet.
  • Supports testing open ports on remote servers for troubleshooting.
  • Enables basic communication between systems on the same network.

Use Cases and Examples:

  • Connect to a Remote Host:

To connect to a remote server via Telnet: 

telnet example.com 23
  • Test Port Connectivity:

To test if a specific port is open on a remote server: 

telnet example.com 80

Benefits and Challenges:

  • Benefits:
    • Quick and easy to test network connectivity to a remote system.
    • Useful for troubleshooting basic network and server issues.
  • Challenges:
    • Telnet is insecure and transmits data in plaintext, making it unsuitable for production environments.
    • Its use has declined in favor of more secure protocols like SSH.

15. iwconfig

The iwconfig command is used to configure wireless network interfaces in Linux-based systems.

Purpose: To manage wireless network interfaces, set parameters, and view wireless network configurations.

Key Features:

  • Allows configuration of wireless network interfaces (Wi-Fi).
  • Supports viewing wireless connection details like SSID, frequency, and signal strength.
  • Enables management of wireless network parameters, including encryption and power settings.

Syntax:

iwconfig [interface] [parameters]

Functions:

  • Displays information about the wireless interface, such as SSID and signal strength.
  • Configures the wireless interface settings, like joining networks and setting encryption.
  • Displays statistics and current connection status.

Use Cases and Examples:

  • Display Wireless Network Details:

To view the wireless interface’s details: 

iwconfig wlan0
  • Connect to a Wireless Network:

To connect to a Wi-Fi network with WPA2 encryption: 

iwconfig wlan0 essid "NetworkName" key s:password
  • Set the Wireless Mode:

To set the wireless mode to Managed (for connecting to access points): 

iwconfig wlan0 mode managed

Benefits and Challenges:

  • Benefits:
    • Provides powerful control over wireless network interfaces.
    • Essential for troubleshooting and optimizing wireless connections.
  • Challenges:
    • Limited to Linux systems, so not available on other operating systems.
    • Requires specific permissions to configure wireless settings.

16. netcat (nc)

The netcat command, often abbreviated as nc, is a versatile tool used for reading from and writing to network connections using TCP or UDP.

Purpose: To establish network connections, troubleshoot, and transfer data over networks.

Key Features:

  • Supports both TCP and UDP protocols.
  • Allows for port scanning, banner grabbing, and setting up simple network services.
  • Capable of acting as a basic server or client for testing.

Syntax:

nc [options] [hostname] [port]

Functions:

  • Establishes a TCP/UDP connection between a client and server.
  • Can listen for incoming connections on specified ports.
  • Facilitates data transfer and basic port scanning.

Use Cases and Examples:

  • Establish TCP Connection:

To connect to a remote server on port 80: 

nc example.com 80
  • Create a Simple TCP Server:

To listen on port 1234 for incoming connections: 

nc -l 1234
  • Send a File Over TCP:

send a file over a network using netcat: 

nc -w 3 example.com 1234 < file.txt

Benefits and Challenges:

  • Benefits:
    • Extremely versatile and can be used for multiple network tasks.
    • Lightweight and quick for testing network services and transferring files.
  • Challenges:
    • Lacks built-in security, making it unsuitable for production environments.
    • Can be misused for malicious purposes (e.g., port scanning, remote access).

Also Read: Top 20+ Networking Certifications for Your IT Career in 2025: A Complete Guide

17. nmap

The nmap (Network Mapper) command is a powerful tool used for network discovery and security auditing.

Purpose: To discover devices, services, and vulnerabilities on a network.

Key Features:

  • Scans networks to identify active devices, services, and open ports.
  • Supports various scan types to detect vulnerabilities and network topology.
  • Allows scriptable network audits for advanced security checks.

Syntax:

nmap [options] [target]

Functions:

  • Performs network discovery to identify devices and services.
  • Scans specific ports or entire networks to check for vulnerabilities.
  • Provides information about the operating system and versions of services running on a device.

Use Cases and Examples:

  • Scan a Host for Open Ports:

To scan a host for open ports: 

nmap example.com
  • Scan a Range of IP Addresses:

To scan multiple IP addresses for open ports: 

nmap 192.168.1.1-100
  • Service Version Detection:

To detect versions of services running on a host: 

nmap -sV example.com

Benefits and Challenges:

  • Benefits:
    • Essential for network discovery and vulnerability scanning.
    • Widely used in network security and penetration testing.
  • Challenges:
    • Can be misused for malicious purposes (e.g., unauthorized port scanning).
    • Requires knowledge of scan types and options to use effectively.

18. iperf

The iperf command is used for measuring network bandwidth performance between two systems.

Purpose: To test the throughput between two systems over a network.

Key Features:

  • Measures the maximum TCP/UDP bandwidth performance.
  • Supports both client-server and peer-to-peer testing modes.
  • Provides detailed statistics on network performance, including latency and packet loss.

Syntax:

iperf [options]

Functions:

  • Measures the bandwidth between a client and server over TCP or UDP.
  • Generates detailed network performance reports.
  • Can test both upload and download speeds.

Use Cases and Examples:

  • Test Network Performance Between Two Systems:

To test the bandwidth between a client and server: 

iperf -c server_ip
  • Run as a Server for Performance Testing:

To start iperf in server mode: 

iperf -s
  • Test UDP Bandwidth:

To test UDP bandwidth instead of TCP: 

iperf -c server_ip -u

Benefits and Challenges:

  • Benefits:
    • Provides accurate bandwidth measurement for network troubleshooting.
    • Easy to set up and use, with detailed performance statistics.
  • Challenges:
    • Requires two systems to fully utilize the client-server model.
    • Limited to bandwidth testing, so it doesn’t measure all network factors (like jitter)

19. tcpdump

The tcpdump command is a packet analyzer used to capture and display network traffic in real-time.

Purpose:
To capture and analyze network traffic for troubleshooting and security analysis.

Key Features:

  • Captures packet-level network data from various interfaces.
  • Supports filtering of captured packets by protocol, IP address, and other criteria.
  • Provides detailed output on network traffic, including headers and payloads.

Syntax:

tcpdump [options] [expression]

Functions:

  • Captures network packets in real time.
  • Allows filtering to capture specific types of traffic.
  • Displays detailed information about the captured packets, including source, destination, and protocol.

Use Cases and Examples:

  • Capture All Network Traffic:

To capture all traffic on the default network interface: 

tcpdump
  • Capture Traffic for a Specific Port:

To capture traffic on port 80 (HTTP): 

tcpdump port 80
  • Capture Packets from a Specific Host:

To capture traffic from a specific IP address: 

tcpdump host 192.168.1.1

Benefits and Challenges:

  • Benefits:
    • Highly effective for troubleshooting and security analysis.
    • Provides detailed packet-level visibility into network traffic.
  • Challenges:
    • Capturing large amounts of traffic can overwhelm system resources.
    • Requires administrative privileges to capture traffic on network interfaces. 

20. scp

The scp (Secure Copy) command is used to copy files securely between hosts over a network using SSH.

Purpose:
To securely transfer files between systems using encryption.

Key Features:

  • Copies files securely between local and remote systems.
  • Uses SSH for secure file transfers, preventing data from being exposed during transit.
  • Supports copying directories and recursive transfers.

Syntax:

scp [options] [source] [destination]

Functions:

  • Transfers files and directories securely over a network.
  • Supports both local-to-remote and remote-to-local file transfer.
  • Ensures secure, encrypted file transfers by leveraging SSH.

Use Cases and Examples:

  • Copy a File to a Remote Host:

To copy a file to a remote server: 

scp file.txt user@remote:/path/to/destination
  • Copy a Directory to a Remote Host:

To copy an entire directory (recursively): 

scp -r /local/directory user@remote:/path/to/destination
  • Copy a File from a Remote Host:

To copy a file from a remote server to your local machine: 

scp user@remote:/path/to/file.txt /local/destination

Benefits and Challenges:

  • Benefits:
    • Provides secure, encrypted file transfers over a network.
    • Simple and efficient for transferring files between different systems.
  • Challenges:
    • Limited to SSH-enabled servers, making it unsuitable for all environments.
    • Slower transfer speeds compared to some other protocols (e.g., rsync). 

21. lsof

The lsof command is used to list open files and the processes that opened them on a system.

Purpose:
To display information about files opened by processes in the system.

Key Features:

  • Lists all open files and the processes associated with them.
  • Shows network connections, open sockets, and files in use by programs.
  • Useful for troubleshooting and system auditing.

Syntax:

lsof [options]

Functions:

  • Displays a list of open files, including network connections, directories, and devices.
  • Helps identify which processes are using which resources.
  • Useful for system troubleshooting and monitoring open files.

Use Cases and Examples:

  • List All Open Files:

To list all open files on the system: 

lsof
  • Show Open Files for a Specific User:

To display files opened by a particular user: 

lsof -u username
  • Display Network Connections:

To view network connections and open ports: 

lsof -i

Benefits and Challenges:

  • Benefits:
    • Extremely useful for troubleshooting resource usage and network connections.
    • Allows auditing of processes to detect unusual or unauthorized activity.
  • Challenges:
    • Can produce a large amount of output on busy systems, requiring filtering.
    • Requires administrative privileges to view some open files and processes. 

22. mtr

The mtr command is a network diagnostic tool that combines the functionality of ping and traceroute.

Purpose:
To trace network paths and diagnose network issues by combining real-time ping and traceroute results.

Key Features:

  • Displays network path information along with latency and packet loss statistics.
  • Continuously pings the network and updates results in real-time.
  • Combines traceroute and ping into a single, dynamic output.

Syntax:

mtr [options] [hostname or IP]

Functions:

  • Provides real-time tracing of the network path to a destination.
  • Displays detailed statistics on each hop in the network path.
  • Helps identify network bottlenecks, packet loss, or high latency issues.

Use Cases and Examples:

  • Trace the Path to a Host:

To trace the network path to a destination: 

mtr example.com
  • Set a Maximum Number of Hops:

To limit the trace to 10 hops: 

mtr --max-hops 10 example.com
  • Display Only Summary Information:

To display a summary of the test without all hop details: 

mtr --report example.com

Benefits and Challenges:

  • Benefits:
    • Provides real-time, continuous diagnostic information about network performance.
    • Combines ping and traceroute in a single, easy-to-read output.
  • Challenges:
    • Requires root or administrative privileges on some systems to trace all network hops.
    • Can be overwhelming if the network path is long or includes many hops.

Also Read: Raspberry Pi Commands: General, Networking, Internet, File & System Information

Now that you've covered the essentials, let's dive into real-world scenarios where these commands truly shine.

How to Effectively Implement Networking Commands? Practical Examples

In this section, you’ll find detailed examples of how to use each of the commands. These are practical scenarios, so you’ll not only understand the theory but also see how each command can be used in real-life situations. 

Ping Command Examples

The ping command is your first line of defense in diagnosing network connectivity issues. It helps you test whether your device can reach another device (like a server or router) on the network. 

You can also use it to measure network latency (how long it takes for a packet of data to travel to a destination and back).

Example 1: Ping a website to check connectivity 

ping www.google.com

Output: 

Pinging www.google.com [142.250.190.78] with 32 bytes of data:
Reply from 142.250.190.78: bytes=32 time=15ms TTL=115
Reply from 142.250.190.78: bytes=32 time=16ms TTL=115
Reply from 142.250.190.78: bytes=32 time=16ms TTL=115
Reply from 142.250.190.78: bytes=32 time=15ms TTL=115

Ping statistics for 142.250.190.78:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 15ms, Maximum = 16ms, Average = 15ms

Explanation:

  • What is happening?: This command sends 4 ICMP echo request packets to Google's server and waits for a response. The time value (e.g., 15ms) indicates the round-trip time.
  • Key Takeaways:
    • If you get a reply, it means the destination is reachable and the network is working.
    • The TTL (Time to Live) value helps you understand how many hops (routers) the packet has passed through.
    • If you lose packets or experience high latency, it suggests network issues like congestion or connection loss. 

Pinging www.google.com may not always work, as some websites block ICMP requests. A better example is pinging a reliable public DNS server like 8.8.8.8 (Google DNS) or an internal network device.

Tracert Command Examples

The tracert (trace route) command helps you track the path that a packet takes from your computer to a destination host. It’s invaluable for identifying where network delays are occurring.

Example 1: Trace the route to a website 

tracert www.google.com

Output: 

Tracing route to www.google.com [142.250.190.78] over a maximum of 30 hops:

  1    <1 ms    <1 ms    <1 ms  192.168.1.1
  2     5 ms     6 ms     5 ms  10.0.0.1
  3    10 ms    11 ms    10 ms  172.217.5.1
  4    14 ms    13 ms    15 ms  108.177.10.34
  5    20 ms    19 ms    19 ms  142.250.190.78

Trace complete.

Explanation:

  • What is happening?: Each line represents a hop (router or server) the packet travels through. It shows the IP address and the time taken for each hop.
  • Key Takeaways:
    • The first hop is your local gateway (router).
    • The time taken between hops can help you identify slow or problematic routers.
    • If you see asterisks (* * *), it means the hop timed out or the router isn’t responding to the trace. 

Ipconfig Command Examples

The ipconfig command is used to display your computer’s IP configuration. It’s especially helpful for checking your IP address, subnet mask, and default gateway.

Example 1: View your network configuration 

ipconfig

Output: 

Windows IP Configuration

Ethernet adapter Local Area Connection:
    Connection-specific DNS Suffix  . : local
    IPv4 Address. . . . . . . . . . . : 192.168.1.100
    Subnet Mask . . . . . . . . . . . : 255.255.255.0
    Default Gateway . . . . . . . . . : 192.168.1.1

Explanation:

  • What is happening?: This command displays information about your current network adapter, including your IP address, subnet mask, and default gateway.
  • Key Takeaways:
    • The IPv4 Address is your unique identifier on the local network.
    • The Default Gateway is typically your router, which connects your network to the internet.
    • The Subnet Mask determines which portion of the IP address is used for the network and which part is used for hosts.

Example 2: Release and renew your IP address 

ipconfig /release
ipconfig /renew

Explanation:

  • What is happening?: These commands release and renew your IP address from the DHCP server (usually your router).
  • Key Takeaways:
    • release: Disconnects your device from the network and removes its IP address.
    • renew: Requests a new IP address from the DHCP server.
    • Useful for resolving IP-related network issues like address conflicts.

Netstat Command Examples

The netstat command is used to display active network connections, routing tables, and network statistics. It’s helpful for understanding what services are using network ports.

Example 1: View all active network connections 

netstat -an

Output: 

Proto  Local Address          Foreign Address        State
TCP    192.168.1.100:80      0.0.0.0:0              LISTENING
TCP    192.168.1.100:443     0.0.0.0:0              LISTENING
TCP    192.168.1.100:5100    192.168.1.200:443     ESTABLISHED

Explanation:

  • What is happening?: This shows a list of active TCP connections along with their states. For instance, LISTENING means your device is waiting for incoming connections on that port, while ESTABLISHED indicates an active connection.
  • Key Takeaways:
    • Local Address is the IP address and port on your machine.
    • Foreign Address shows the remote system and port it’s connected to.
    • State helps you understand the connection status (e.g., LISTENINGESTABLISHEDTIME_WAIT). 

Arp Command Examples

The arp command is used to manage the Address Resolution Protocol (ARP) cache, which maps IP addresses to MAC addresses on a local network.

Example 1: View the ARP cache 

arp -a

Output: 

Interface: 192.168.1.100 --- 0x4
  Internet Address      Physical Address      Type
  192.168.1.1          00-14-22-01-23-45     dynamic
  192.168.1.200        00-14-22-11-23-56     dynamic

Explanation:

  • What is happening?: This shows the ARP cache, which lists the IP addresses and their corresponding MAC addresses on your local network.
  • Key Takeaways:
    • Internet Address is the IP of the device.
    • Physical Address is the MAC address associated with that IP.
    • Type tells whether the entry is dynamic (temporary) or static (manually set).

Example 2: Delete an ARP cache entry 

arp -d 192.168.1.200

Explanation:

  • What is happening?: This command deletes the ARP cache entry for the IP 192.168.1.200.
  • Key Takeaways:
    • Use this when you suspect that an ARP cache entry is outdated or incorrect.
    • ARP will automatically repopulate the cache when you communicate with the device again. 

By now, you’ve learned how to use several of the most important CMD network commands effectively. Each command has its own purpose and is a useful tool when diagnosing or troubleshooting network issues. 

Also Read: 55+ Top Networking Interview Questions and Answers for All Skill Levels in 2025

Don’t hesitate to experiment with these examples to understand better how they work in real time. The more you practice, the more confident you’ll become in using networking commands to solve problems on your network.

How Can upGrad Help You Enhance Your Networking Skills?

With a global community of over 10 million learners and access to more than 200 specialized courses, upGrad offers the perfect platform to boost your networking skills. 

Whether you're a beginner looking to master the basics or an intermediate learner aiming to refine your expertise, upGrad's comprehensive courses in networking and IT infrastructure ensure you stay ahead of the curve. 

Here are some of the top courses to choose from: 

You can also get personalized career counseling with upGrad to guide your career path, or visit your nearest upGrad center and start hands-on training today! 

Boost your career with our popular Software Engineering courses, offering hands-on training and expert guidance to turn you into a skilled software developer.

Master in-demand Software Development skills like coding, system design, DevOps, and agile methodologies to excel in today’s competitive tech industry.

Stay informed with our widely-read Software Development articles, covering everything from coding techniques to the latest advancements in software engineering.

Frequently Asked Questions

1. How can I troubleshoot network connectivity issues using cmd network commands?

2. What is the difference between ping and tracert in networking commands?

3. How do I configure network settings using cmd network commands?

4. How can I use cmd network commands for network performance testing?

5. Can I use cmd network commands to troubleshoot DNS issues?

6. How do I analyze active connections and open ports with cmd network commands?

7. What role does the arp command play in troubleshooting networking commands?

8. Can cmd network commands help with network security?

9. How can cmd network commands assist with wireless network troubleshooting?

10. How do I reset my network settings using cmd network commands?

11. What advanced networking commands should I learn after mastering the basics?

Mukesh Kumar

120 articles published

Get Free Consultation

+91

By submitting, I accept the T&C and
Privacy Policy

India’s #1 Tech University

Executive PG Certification in AI-Powered Full Stack Development

77%

seats filled

View Program

Top Resources

Recommended Programs

Suggested Blogs