Blog
Linux Commands for Networking Configuration and Troubleshooting for Network Engineers
- March 22, 2018
- Posted by: Muhammad Afaq Khan, CCIE #9070
- Category: Linux

There are at least three career benefits to learning Linux as far as networking configuration and troubleshooting are concerned.
Let me summarize.
- You can configure and troubleshoot machines running Linux (all distributions)
- You can configure and troubleshoot networking devices that run modified version of Linux OS as their networking OS e.g. Cumulus Linux.
- You can configure, automate and troubleshoot black boxes (routers, switches etc.) from likes of Cisco, Juniper and Arista as virtually all of them run admin-accessible Linux as sort of base OS today (an exception would be boxes that run classic Cisco IOS but who cares)
Here is a bird’s eye view of how Linux is pervasive even inside the routing, switching and security closed-source software from Cisco.
Cisco Networking OS Linux OS Linux Kernel Shell Access Command Cisco IOS XE Linux Stock Kernel request platform software system shell Cisco IOS XR (Classic) QNX Real-time micro Kernel Console ("run")
Direct via Aux portCisco Nexus OS (NX-OS) MontaVista Linux Kernel run bash
sudo su rootCisco ASA/FirePOWER Linux Stock Kernel "expert" command Classic Cisco IOS N/A None
Now, let me break down configuration and troubleshooting commands for each scope or use case.
1. Linux OS running on x86 machines or servers
Configuration
ifconfig (or interface configurator)
You can use this command to enable/disable or assign an IP address to an interface. You can also ifconfig to view IP address, MTU and MAC address.
route (to configure to display and configure ip routing table)
arp (to configure to display and configure ARP table)
ethtool (to set speed or duplex etc.)
iwconfig (to configure wireless network interface)
Troubleshooting
ifup / ifdown
You can these two commands to enable or disable a specific interface.
ping
traceroute
netstat
dig (to query DNS related info such as A, CNAME or MX records etc.)
nslookup
host
hostname
telnet
scp
map (to see what L4 ports are open on the given machine)
2. Cumulus Linux
Configuration
You can configure pretty much everything that has to do with networking using the Cumulus Network Command Line Utility or NCLU via bash interface. NCLU wrapper utility is known as net. You can configure L2/L3 Cumulus networking stack including ACLs or VXLANS using net.
net abort
net commit [verbose] [confirm] [description ]
net commit delete (|)
net help [verbose]
net pending
net rollback (|last)
You can also use “net example” to get a handy list of configuration snippets broken down into scenarios. These can help you get started from a blank state.
Troubleshooting
net show commit (history|||last)
net show rollback (|last)
net show configuration [commands|files|acl|bgp|ospf|ospf6|interface ]
You can obviously also use standard Linux networking commands such as sudo ifup/ifdown/ifreload, ip link show, ip addr show etc.
3a. Cisco IOS XE
Configuration
You’re not supposed to configure anything directly from within the Linux shell on Cisco IOS XE, obviously that doesn’t apply to Guest Shell.
Troubleshooting
In READ-ONLY mode, you can pretty much see all of the inner workings of the systems using various Linux commands. Let me give you some examples.
tcpdump
ps
arp
ls / mount / pwd
top (to show top processes using up CPU cycles)
and others.
3b. Cisco IOS XR
Configuration
You can use run or just connect directly to AUX port to get access to Linux shell on an IOS XR device. Again, you’re not supposed to configure anything directly from within the Linux shell on Cisco IOS XR.
Troubleshooting
tcpdump
ps
arp
ls / mount / pwd
top (to show top processes using up CPU cycles)
and others.
3c. Cisco NX-OS
Configuration
In NX-OS, you can access bash shell if you are part of the dev-ops role obviously if you’re an admin.
Besides the read-only stuff, you can also install and run python from within the bash shell. This bash access is in addition to the Guest Shell access which is totally decoupled execution space running within an LXC.
Troubleshooting
tcpdump
ps
arp
ls / mount / pwd
top (to show top processes using up CPU cycles)
and others.
3d. Arista EOS
Configuration
You can use under the cover Linux for writing your shell or python scripts in addition to DevOps tools such as Ansible. You can also add your VMs or containers to it.
Troubleshooting
You can manage Arista switches much like Linux machines with the exception of the overall system software. You can add extensions using YUM.
tcpdump
ps
arp
ls / mount / pwd
top (to show top processes using up CPU cycles)
and others.
3e. Junos OS
Configuration
You can access Linux shell inside Junos OS but you’re not supposed to configure anything directly from within the Linux shell. However, once inside the shell (start shell), you will find all of the file system commands there.
Troubleshooting
tcpdump
ps
arp
ls / mount / pwd
top (to show top processes using up CPU cycles)
and others.
How useful was this post?
Author:Muhammad Afaq Khan, CCIE #9070

Leave a Reply Cancel reply
0 (0) The network automation market size is projected to grow from $3 billion in 2020 to about $9 billion over the next five years, so that’s about 25% compounded annual growth over that period. North America has the highest market share in the network automation market due to the early adoption of technology and […]
0 (0) Network automation is the biggest trend in networking today and picking up even more steam as networking infrastructure becomes virtualized, software-defined, and cloud-based. If there was ever another driver needed for network automation to kick in high gear, employees working remotely due to coronavirus is it. As per Gartner, by 2023, 60% of […]
5 (1) In the last several articles, I made a case that as a network engineer, when you look back at 2020 say in three years, you will realize that it was the year that kicked the network automation into high gear. It is super critical to note that network automation isn’t about using network […]
5 (1) In this article, I am going to cover every bit of detail that you need to get started, to prepare and pass the Implementing DevOps Solutions and Practices Using Cisco Platforms or the Cisco DEVOPS 300-910 exam. You can take the DEVOPS exam and the DEVCOR 350-901 exam to earn your DevNet Professional […]
5 (1) In this article, I am going to cover every bit of detail that you need to get started, to prepare and pass the Automating and Programming Cisco Collaboration Solutions or the CLAUTO 300-835 exam. You can take the CLAUTO exam and the DEVCOR 350-901 exam to earn your DevNet Professional certification. Likewise, Automating […]
How useful was this post?