On a linux-based system what command can be used to display tcp/ip information

The following are commands for TCP/IP services with different type of systems. Knowing these commands is essential, as you will be able to diagnose most TCP/IP problems and begin working on a viable solution.

Commands relating to type of system

  • DOS/Windows IP Commands
  • UNIX IP Commands
  • Linux IP Commands
  • VMS IP Commands

DOS/Windows Internet Protocol commands

DOS/Windows IP commands are used to perform several tasks, like assigning an address to a network interface or configuring network interface parameters. Below you'll find a list of the most common Internet Protocol commands for Windows and DOS. This is only a small list of the types of DOS and Windows Internet Protocol Commands that are available, but it includes ipconfig, trace route, netstat, arp, route, hostname, and control netconnections.

DescriptionDOS/Windows Internet Protocol Commands
Connection Configuration ipconfig /all
DNS Cache Information ipconfig /displaydns
Release All IP Address Connections ipconfig /release
Renew All IP Address Connections ipconfig /renew
Re-Register the DNS connections ipconfig /registerdns
Change/Modify DHCP Class ID ipconfig /setclassid
Network Connections control netconnections
Network Setup Wizard netsetup.cpl
Test Connectivity ping whatismyip.com
Trace Route tracert
TCP/IP Protocol Sessions netstat
Local Route route
Resolved MAC Addresses arp
Name of Computer Currently On hostname
DHCP Class Information ipconfig /showclassid
NameServer Lookup nslookup whatismyip.com

UNIX Internet Protocol commands

The following are the most common command lines relating to Unix IP Commands.

DescriptionUNIX Internet Protocol Command
Display Current Config For All NIC's ifconfig
Display Current Config For dc0 ifconfig dc0
Assign Multiple IPs ifconfig dc0:0 192.168.1.2
Assign Second IP ifconfig dc0:1 192.168.1.3
Disable Network Card ifconfig dc0 down
Enable Network Card ifconfig dc0 up
Assign IP/Subnet ifconfig dc0 inet 192.168.1.2 netmask 255.255.255.0
Assign Gateway route delete default && route add default 192.168.1.1

Note that you must be at the root user to make or save any changes. Furthermore, you will need to save your changes in the /etc/rc.conf file. Network cards are referred to as dc0, dc1, dc2, and so on based on their position on the PCI bus.

*Special thanks to Romanov Sergey Vladimirovich from Moscow for the UNIX IP Commands!

Linux Internet Protocol commands

The following are the most common command lines relating to Linux IP Commands.

DescriptionLinux Internet Protocol Command
Display Current Config For All NIC's ifconfig
Display Current Config For eth0 ifconfig eth0
Assign IP ifconfig eth0 192.168.1.2
Ping ping -c 3 192.168.1.1
Assign Multiple IPs ifconfig eth0:0 192.168.1.2
Assign Second IP ifconfig eth0:1 192.168.1.3
Disable Network Card ifconfig eth0 down
Enable Network Card ifconfig eth0 up
View Current Routing Table route "or" route -n
View arp Cache arp "or" arp -n
Assign IP/Subnet ifconfig eth0 192.168.1.2 netmask 255.255.255.0
Assign Default Gateway route add default gw 192.168.1.1
Trace Route traceroute www.whatismyip.com
Trace Path tracepath www.whatismyip.com
DNS Test host www.whatismyip.com
Advanced DNS Test dig www.whatismyip.com
Reverse Lookup host 66.11.119.69
Advanced Reverse Lookup dig -x 66.11.119.69

Note that you must be at the root user to make or save any changes. Linux users, your distribution will determine the location of your network config file, which will need to be updated and saved in order for the changes to remain in effect after rebooting. Network cards are referred to as eth0, eth2, eth2, and so on based on their position on the PCI bus.

*Special thanks to Gergely for the Linux Internet Protocol Commands!

VMS Internet Protocol commands

As the system administrator ("SYSTEM"), one can use TCP/IP commands to maintain TCP/IP services in various ways. The below are all CLI commands with DCL.

Note that exclamation marks (i.e. "!") denote comments. They relate to VMS IP Commands.

To display the current configuration, the fastest way would be by invoking the following command: $ SHOW NETWORK

The following command shows detailed information for the TCP/IP configuration(s) in particular and also lists active ports in use: $ SHOW NETWORK /FULL "TCP/IP"

One of the easiest ways of setting up TCP/IP networking is with the following utility:  $ @SYS$SYSROOT:[SYSMGR]TCPIP$CONFIG.COM

It's executed via the UNIX-like command:  $ TCPIP

So, for example:
$ TCPIP IFCONFIG (...) ! whatever ! desired ! options & ! values
$ TCPIP PING 192.168.1.1 ! just as an ! example
$ TCPIP TRACEROUTE GOOGLE.COM ! idem ditto
$ TCPIP NETSTAT -A

All the ethernet adapters should typically be listed as EW* devices, which can be found by typing: $ SHOW DEVICES EW</code?

With advanced descriptions, add the /FULL qualifier, like so: $ SHOW DEVICES /FULL EW

However, for just one device, say EWA0: $ SHOW DEVICE /FULL EWA0

Alternatively, this also works: $ TCPIP SHOW INTERFACES /FULL $ TCPIP IFCONFIG -A

*Special thanks to Marco Gariboldi for the VMS Internet Protocol Commands!

What command can you utilize to display TCP IP?

The ipconfig command displays the basic IP addressing information for each network interface on the Windows system. This information includes both the IP address and subnet mask.

What text editor can be used on Linux to view and edit contents of a configuration file?

There are two command-line text editors in Linux®: vim and nano. You can use one of these two available options should you ever need to write a script, edit a configuration file, create a virtual host, or jot down a quick note for yourself.

What is the purpose of the checksum TCP field?

Checksum is a simple error detection mechanism to determine the integrity of the data transmitted over a network. Communication protocols like TCP/IP/UDP implement this scheme in order to determine whether the received data is corrupted along the network.

Which of the following IP addresses would be a loopback IP address?

The IP address 127.0. 0.1 is called a loopback address.