Top 10 network commands and their uses

Today every computer is connected to some other computer through a network whether internally or externally to exchange some information. This network can be small as some computers connected in your home or office, or can be large or complicated as in large offices or the entire Internet.
Maintaining a system’s network is a task of the System/Network administrator.

Here is a list of 10 Networking commands that must be known to the network administrator/tech support engineer

  1. ifconfig
  2. ip
  3. ping
  4. traceroute
  5. netstat
  6. telnet
  7. dig
  8. netcat
  9. nmap
  10. Wireshark

1. ifconfig

ifconfig, will be one of the most used commands and for a long time it was the default command used to configure and troubleshoot network interface and issues on linux, ifconfig is a command-line interface tool for network interface configuration and is also used to initialize interfaces at system boot time.
It is also used to view the IP Address, Hardware / MAC address, as well as MTU (Maximum Transmission Unit) size of the currently active interfaces.

Running ifconfig without any arguments, lists all the interfaces which are currently in operation

ifconfig

To list all interfaces which are currently available, whether up or down, use the -a flag

[centos@midas ~]$ ifconfig -a
enp3s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.1.152  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::da72:6a96:b4cc:b4d6  prefixlen 64  scopeid 0x20<link>
        ether 00:e0:4d:1e:b3:1c  txqueuelen 1000  (Ethernet)
        RX packets 1443  bytes 111527 (108.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 124  bytes 10010 (9.7 KiB)
        TX errors 8  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 144  bytes 12836 (12.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 144  bytes 12836 (12.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp0s20u6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.29.22  netmask 255.255.255.0  broadcast 192.168.29.255
        inet6 fe80::6ebc:877a:f6c0:885c  prefixlen 64  scopeid 0x20<link>
        inet6 2405:201:4019:91a2:d7c7:e3b2:ae40:468a  prefixlen 64  scopeid 0x0<global>
        ether 3c:33:00:60:48:f8  txqueuelen 1000  (Ethernet)
        RX packets 551536  bytes 105040791 (100.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 51404  bytes 5621067 (5.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Viewing the configuration of a specific interface

[centos@midas ~]$ ifconfig enp3s0
enp3s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.1.152  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::da72:6a96:b4cc:b4d6  prefixlen 64  scopeid 0x20<link>
        ether 00:e0:4d:1e:b3:1c  txqueuelen 1000  (Ethernet)
        RX packets 1443  bytes 111527 (108.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 124  bytes 10010 (9.7 KiB)
        TX errors 8  dropped 0 overruns 0  carrier 0  collisions 0

Configuring an interface

[root@midas ~]# ifconfig enp3s0  192.168.1.122 netmask 255.255.255.0 broadcast 192.168.1.255
[root@midas ~]# ifconfig enp3s0
enp3s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.1.122  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::da72:6a96:b4cc:b4d6  prefixlen 64  scopeid 0x20<link>
        ether 00:e0:4d:1e:b3:1c  txqueuelen 1000  (Ethernet)
        RX packets 1443  bytes 111527 (108.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 124  bytes 10010 (9.7 KiB)
        TX errors 8  dropped 0 overruns 0  carrier 0  collisions 0

2. IP

The IP command is the new default networking command for linux and has replaced ifconfig, it is a part of iproute2util package. IP command takes different flags and syntax than if config command. The ip command is more versatile and technically more efficient than ifconfig because it uses Netlink sockets, though the syntax can be more complex than ifconfig

To list all the all the interfaces we can use “”ip addr show”” or “”ip a”” for short

[root@midas ~]# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp3s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether 00:e0:4d:1e:b3:1c brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.122/24 brd 192.168.1.255 scope global noprefixroute enp3s0
       valid_lft forever preferred_lft forever
    inet6 fe80::da72:6a96:b4cc:b4d6/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
3: wlp0s20u6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 3c:33:00:60:48:f8 brd ff:ff:ff:ff:ff:ff
    inet 192.168.29.22/24 brd 192.168.29.255 scope global dynamic noprefixroute wlp0s20u6
       valid_lft 15969sec preferred_lft 15969sec
    inet6 2405:201:4019:91a2:d7c7:e3b2:ae40:468a/64 scope global dynamic noprefixroute
       valid_lft 3596sec preferred_lft 3596sec
    inet6 fe80::6ebc:877a:f6c0:885c/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

Add IP address

[root@midas ~]# ip a add 192.168.1.152/24 dev enp3s0

[root@midas ~]# ip a show  enp3s0
2: enp3s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether 00:e0:4d:1e:b3:1c brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.122/24 brd 192.168.1.255 scope global noprefixroute enp3s0
       valid_lft forever preferred_lft forever
    inet 192.168.1.152/24 brd 192.168.1.255 scope global secondary noprefixroute enp3s0
       valid_lft forever preferred_lft forever
    inet6 fe80::da72:6a96:b4cc:b4d6/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

Enable or disable a network

ip commands uses the set sub command for this operation

ip link set enp3s0 up
ip link set enp3s0 down

3. Ping

Ping is a simple, widely used, cross-platform networking utility for testing if a host is reachable on an Internet Protocol (IP) network. It works by sending a series of Internet Control Message Protocol (ICMP)

ping is a very common and relatively simple command, but it also provides there are some great options and techniques that make the tool even better, to troubleshoot connectivity issues

[root@midas ~]# ping 192.168.29.1
PING 192.168.29.1 (192.168.29.1) 56(84) bytes of data.
64 bytes from 192.168.29.1: icmp_seq=1 ttl=64 time=1.59 ms
64 bytes from 192.168.29.1: icmp_seq=2 ttl=64 time=2.00 ms
64 bytes from 192.168.29.1: icmp_seq=3 ttl=64 time=1.30 ms
64 bytes from 192.168.29.1: icmp_seq=4 ttl=64 time=1.49 ms
^C
--- 192.168.29.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 1.303/1.592/1.995/0.253 ms

ping -a <host>, adds audible cue, giving a system sound whenever the pings are successful

ping -c <host>, lets you adjust the number of pings

ping <hostname> also lets you display the ip address of the hostname

Output from ping

  • ping output provides some useful insights into the quality of the network, the most important metrics are packet loss, time,
    • whether the target host is reachable (active) or not,
    • to measure the amount of time it takes for packets to get to the target host and back to your computer
    • the packet loss, expressed as a percentage.
  • timeout message indicates that your machine believes it sent successful ping queries to the destination but it did not receive the replies in the specified time
  • TTL means “”time to live””.  It is a value on an ICMP packet and this value is decreased every time a router touches the packet. If the TTL ever reaches zero, the packet is discarded. It is a measure of the number of hops the packet took to reach the destination, if your initial value was 64 and now you see a value of 28 there are 36 hops between the originated and final destination
  • Time metric can also be used to assess the quality of the network and it provides insights into latency and jitter in the network, a high response time signifies high latency, where as a fluctuating time value in response signifies jitter.

4. Traceroute

Traceroute is a command-line utility for tracing the full path from your local system to another network system. It prints a number of hops (router IPs) in that path you travel to reach the end server. It is an easy-to-use network troubleshooting utility after the ping command

5. Netstat (network statistics

netstat (network statistics) is the command-line tool for monitoring network connections both incoming and outgoing as well as viewing routing tables, interface statistics, etc. It can be used for troubleshooting and for configuration.

Listing all ports

Note : we have used more to control the output, it is not necessary

[root@midas ~]# netstat -a | more
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 localhost:ipp           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:ssh             0.0.0.0:*               LISTEN
tcp        0     96 midas.upspiroffice.:ssh 192.168.29.147:53980    ESTABLISHED
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN
tcp6       0      0 localhost:ipp           [::]:*                  LISTEN
udp        0      0 0.0.0.0:mdns            0.0.0.0:*
udp        0      0 0.0.0.0:47053           0.0.0.0:*
udp        0      0 midas.upspiroffi:bootpc reliance.relianc:bootps ESTABLISHED
udp        0      0 localhost:323           0.0.0.0:*
udp6       0      0 [::]:mdns               [::]:*

List only TCP port connections

For listing only TCP (Transmission Control Protocol) port connections using netstat -at.

[root@midas ~]# netstat -at
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 localhost:ipp           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:ssh             0.0.0.0:*               LISTEN
tcp        0    288 midas.upspiroffice.:ssh 192.168.29.147:53980    ESTABLISHED
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN
tcp6       0      0 localhost:ipp           [::]:*                  LISTEN
[root@midas ~]#

Listing all active listening ports netstat -l

Listing all active listening UDP ports by using option netstat -lu

Showing network interface packet transactions including both transferring and receiving packets with MTU size

[root@midas ~]# netstat -i
Kernel Interface table
Iface             MTU    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg
enp3s0           1500      133      0      0 0            38      5      0      0 BMRU
lo              65536       44      0      0 0            44      0      0      0 LRU
wlp0s20u6        1500      844      0      0 0           198      0      0      0 BMRU

6. Telnet

Telnet command is used to establish the connections between different machines. This command allows us to manage the remote devices using the CLI (command-line interface)

Open a connection with a remote host

[root@localhost centos]# telnet 192.168.1.22 80
Trying 192.168.29.22...
Connected to 192.168.29.22.
Escape character is '^]'.

If no port is specified, it uses TCP port 23 which is assigned to the telnet protocol

7. Nslookup

tool for testing and troubleshooting DNS servers (Domain Name Server). It is used to query specific DNS resource records (RR) as well

8. Dig (Domain Information Groper)

just like nslookup command, this command is used for querying and getting information of DNS (Domain Name System).

Dig stands for (Domain Information Groper) is a network administration command-line tool for querying Domain Name System (DNS) name servers.

[root@localhost centos]# dig yahoo.com

; <<>> DiG 9.16.23-RH <<>> yahoo.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26615
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;yahoo.com.                     IN      A

;; ANSWER SECTION:
yahoo.com.              561     IN      A       74.6.231.21
yahoo.com.              561     IN      A       74.6.231.20
yahoo.com.              561     IN      A       74.6.143.25
yahoo.com.              561     IN      A       98.137.11.163
yahoo.com.              561     IN      A       98.137.11.164
yahoo.com.              561     IN      A       74.6.143.26

;; Query time: 2 msec
;; SERVER: 192.168.29.1#53(192.168.29.1)
;; WHEN: Thu Sep 29 15:27:37 IST 2022
;; MSG SIZE  rcvd: 123

Dig command reads the /etc/resolv.conf file and querying the DNS servers listed there   

To query domain “A” record with +short

[root@localhost centos]# dig yahoo.com +short
98.137.11.164
74.6.143.26
74.6.231.21
74.6.231.20
74.6.143.25
98.137.11.163

9. Netcat

Netcat (or nc in short) is a simple yet powerful networking command-line tool used for performing any operation in Linux related to TCP, UDP, or UNIX-domain sockets.

Netcat can be used for port redirection, as a port listener (for incoming connections); it can also be used to open remote connections and so many other things. Besides, you can use it as a backdoor to gain access to a target server.

Here is an example, the -z option sets nc to simply scan for listening daemons, without actually sending any data to them. The -v option enables verbose mode and -w specifies a timeout for connection that can not be established.

10. Nmap

Network Mapper is an open-source and a very versatile tool for Linux system/network administrators. Nmap is used for exploring networks, performing security scans, network audit,s and finding open ports on the remote machine

Nmap allows you to scan your network, to discover not only what is connected to it but also a host of other information like what devices are listening on which ports, it comes with a large number of scanning techniques and filters.

Scan a System with Hostname and IP Address

to find out all open ports, services and MAC addresses on the system.

nmap hostname
nmap ipaddress
[root@midas centos]# nmap 192.168.29.44
Starting Nmap 7.91 ( https://nmap.org ) at 2022-09-29 15:42 IST
Nmap scan report for 192.168.29.44
Host is up (0.021s latency).
Not shown: 997 filtered ports
PORT     STATE  SERVICE
22/tcp   open   ssh
2049/tcp open   nfs
MAC Address: 80:86:F2:47:E4:C4 (Intel Corporate)

Nmap done: 1 IP address (1 host up) scanned in 10.53 seconds

….

…..

Author

Pravin Tewari
Senior Manager, Application and Cloud Support

Pravin is a visionary professional with over 11 years of experience in Technical Support, Cloud Infrastructure Management, and Customer Experience. He has hands-on experience in working across the lifecycle of project delivery and deployment, solution consulting, and support. He has deep experience in managing cloud deployments and implementing DevOps tools for automation to provide better uptime. Pravin has successfully led large product & cloud support teams, and coached & mentored a high-performing team that delivers high-quality service to customers.

10 best entry level tech jobs and skills required to get hired

In today’s world of technology, IT is the most flourishing field. In fact, industry body NASSCOM has recently pointed out that before the pandemic, Indian IT companies were reporting annual growth rates of around 6-7%, which have now increased to around 15-20%. [1]

IT industry is one sector which is growing very fast worldwide. It helps to provide jobs and opportunities for professional success. It can really be a source of quick employment, opportunities in all sectors, numerous career paths, and well-paid salaries. Here we describe the 10 entry-level IT positions while you search for a job.

It is important to note that some roles do provide entry-level positions but some of these are specialized roles and generally companies do look for knowledge of systems and networks as well as prior experience, so it is a good idea to start with roles 1-5 and then opt for the other roles based on your interests and experience.

1. Help Desk Technician

Help Desk technician forms the first level of IT support, a help desk technician provides technical support/assistance, whether on the phone /in-person/ or remotely. When an employee/computer user (within the organization or at a client’s end) has problems with hardware, software, or a network, they call on a help desk to assist. As a help desk technician, your main responsibility is to receive the requests and be responsible for responding to email, chat, or phone queries, and offering technical support to customers using the tools available.

The title for the role may vary, help desk technicians may also be called, help desk analysts, desktop support, service desk technicians, etc. collectively referred to as help desk positions. Many IT professionals start their career in help desk roles, it is a good position to consider if you don’t know where to start in IT, you get the necessary exposure to the domain and as you gain experience and knowledge you can further decide your career path.

Skills required: Help desk roles need basic IT / Troubleshooting skills, normally organizations don’t as for certifications. Even non-IT graduates are eligible for these roles. You will need good communication and process handling skills for these roles.

2. Technical Support / IT Technician

Technical Support roles are similar to help desk technician in way that they also support the technical issues faced by end users, but while help desk job is to support user issues, technical support works on actual technical issues that cause the problem. Technical support is a trained person who has the knowledge of operating systems and networks and is able to troubleshoot the issues that arise due to them.

IT technicians can also be called IT associates, IT analysts, or IT specialists. Some companies may have IT technicians do help desk work as well. This position is a very good start to enter in IT sector jobs and later when you gain experience, you can enter other fields such as network administrator, DBA, or IT security specialist.

Skills required: Technical Support / IT technician roles need to be from IT background, companies seek good knowledge of operating systems, Networking, and in some cases SQL as well. Good communication skills and troubleshooting skills are also needed for this role.

3. Application Support Engineer

Application support engineer role is similar to IT Technician, as they also need to work on technical issues, but in this case in addition to the general operating system and network issues they actually support the applications issues as well which is a product of the company or for which company offers the services.

Here in addition to the operating system and network knowledge, additional knowledge on SQL, HTML, and Scripting may also be required, the organizations also provide product-specific training to those who join in these roles. Similar to IT Technician, this position is a very good start to enter in IT sector jobs as this provides the necessary exposure and once you gain experience, you can enter other fields such as network administrator, DBA or IT security specialist.

Skills required: Companies look for candidates from IT backgrounds with good knowledge of the operating system, Networking, and SQL. Apart from these companies also seek knowledge in web technologiesGood communication skills and troubleshooting skills are also needed for this role.

4. System Administrator

System Administrator is a very important person in the organization as he is responsible for the smooth working of the IT systems on day-to-day basis. He looks after servers, network performance, security tools, operating systems etc. Unlike tech support roles system administrator roles are more specialized in ensuring systems within the organization function smoothly. Their roles can overlap with the Network Administrators.

System Administrator’s should have full knowledge about hardware and software and have plans to resolve any issue. They should also have good communication with management employees so that they can reach out to them whenever required. This role also provides opportunities to grow, as you gain experience and expand your skill set you can advance to roles like systems engineer or systems architect. 

Skills required: Companies look for candidates from IT backgrounds with experience and sound knowledge of networking. Companies look for certifications and associated degrees. Good communication skills and troubleshooting skills are also needed for this role.

5. Network Engineer / Network Support Engineer

Network Engineer / Network support engineer role is similar to technical support role, but the focus here is limited to networking knowledge and troubleshooting of network / “network device” related issues, In a way, this is a more specialized role.

Here you need limited knowledge of operating systems, and hardware but sound knowledge of networking concepts and specialized certification for any of network hardware vendors like cisco is needed., and they support the technical issues in the network or network devices.

Skills required: Companies look for candidates from IT backgrounds with experience and sound knowledge of networking. Companies look for certifications and associated degrees. Good communication skills and troubleshooting skills are also needed for this role.

6. Database Administrator

Database Administrator is responsible for the business aspects of the organization. They manage and maintain company databases. They monitor the database performance and take corrective action, address any issues related to the database, and ensure security and backup of databases as per company policies.

It is a specialized role generally companies look for experience candidates, basic knowledge of operating systems, networking, etc is also required as databases are also a part of the systems. Database is offered by different vendors ( MS SQL, Oracle etc or NoSQL databases or opensource database like mysql and postgresql). Companies either look for skills in a specific database technology or in some cases general skills across databases.

Skills required: Again, this is a specialized role and companies do look for experience and IT background with solid knowledge of systems, operating systems, servers, cloud technologies, and networking. Apart from this companies look for the ability to program in high-level languages like python, knowledge of microservice architecture (Docker, Kubernetes) ability use Devops / CICD tools

8. Information Security Analyst

In this era when everything is online and tech-based, a lot of companies have faced the problem of breaches. An Information Security Analyst is a person who helps to protect you from such issues.

Their job is to detect the different aspects of security like network security and software security. He also makes sure that data is available to the authorized people in the company. They conduct security audits, are responsible for conducting security assessment tests, and coordinate with key stakeholders to ensure remediation activities are performed.

Skills required: This is a specialized role and companies do look for experience and IT background with strong knowledge of systems, operating systems, servers, cloud technologies, and networking. Apart from this companies look for a sound knowledge of penetration testing principles, tools and techniques, knowledge system and application security threats and vulnerabilities, and skills in scripting languages.

9. Cloud Engineer

Cloud Engineer is someone who deals with cloud computing. This includes managing, planning, architecting, and monitoring cloud systems. He should also know how to implement the best practices to deploy an application on the cloud.

Sometime back cloud computing was considered a luxury but today it has become a necessity. There is a lot of scope and high salary in this field.

Skills required: This is a specialized role and companies do look for experience and companies not only look for skills in cloud technologies (AWS, Azure, Oracle) but also the knowledge of operating systems, networking, and fundamentals of hardware (cpu, storage, RAM etc)

10. Web Developer / Software Developer / Mobile Developer

Requirements: Ability to program / Experience with programming languages. Associate, bachelor’s, or master’s degrees may be requested.

Web Developers / Software Developers need programming skills, and depending upon the role the expertise may wary. Web developer roles in generally attributed to those building websites, whereas software developers build the applications/ software products and applications, with a lot of businesses having their web portals as their prime products these roles also overlap.

Skills required: Companies look for skills in front end technologies, back end technologies or full stack developers, with proficiency in programming languages. For web development, you will need skills in HTML, CSS, and Javascript while for backend you will need skills in python, Ruby or PHP. For software development, you will need skills in programming languages like Java, C++ etc . While for mobile development you will need skills in specific mobile app development languages

References
1 – https://www.business-standard.com/article/companies/indian-it-crosses-200-bn-revenue-mark-hits-227-bn-in-fy22-nasscom-122021500828_1.html