Execute the following commands in Linux and write their output 1. ping : This command is used to test connectivity between two nodes. Ping use ICMP (Internet Control Message Protocol) to communicate to other devices. You can ping host name or ip address using below command. Example: ping www.google.com $ping Output: $ping localhost Output: $ping Output: 2. hostname Gives the host name of the computer they are logged into. To set the hostname permanently use /etc/sysconfig/network file. $hostname Output : 3. traceroute traceroute is a network troubleshooting utility which shows number of hops taken to reach destination also determine packets traveling path $traceroute ip-address Output 4. netstat Netstat (Network Statistic) command displays interfaces, connection information, routing table information etc. $netstat Output : Execute it with the following options and write the output: netstat –t netstat –s –t netstat -i 5. ifconfig ifconfig is used for displaying network interface information. $/sbin/ifconfig Output :
Execute the following commands in Linux and write their output
1. ping :
This command is used to test connectivity between two nodes. Ping use ICMP (Internet Control Message Protocol) to communicate to other devices. You can ping host name or ip address using below command.
Example: ping www.google.com
$ping <server-ip-address>
Output:
$ping localhost
Output:
$ping <other-ip-in-network>
Output:
2. hostname
Gives the host name of the computer they are logged into. To set the hostname permanently use /etc/sysconfig/network file.
$hostname
Output :
3. traceroute
traceroute is a network troubleshooting utility which shows number of hops taken to reach destination also determine packets traveling path
$traceroute ip-address
Output
4. netstat
Netstat (Network Statistic) command displays interfaces, connection information, routing table information etc.
$netstat
Output :
Execute it with the following options and write the output:
netstat –t netstat –s –t netstat -i
5. ifconfig
ifconfig is used for displaying network interface information.
$/sbin/ifconfig
Output :
6. who
Displays information of all users who are logged in
$who
Output :
7. whoami
The whoami command writes the user name (i.e., login name) of the owner of the current login session to standard output.
$whoami
Output :
8. nmap
Network mapper tool to discover hosts and services on a
$ nmap <ip-address>
Output :
$ nmap <server-ip-address>
Output :
9. tcpdump
Tcpdump prints out a description of the contents of packets on a network interface that match the boolean expression; the description is preceded by a time stamp, printed, by default, as hours, minutes, seconds, and fractions of a second since midnight.
Sample output for ARP protocol:
arp who-has 128.3.254.6 tell 128.3.254.68 arp reply 128.3.254.6 is-at 02:07:01:00:01:c4
$ tcpdump
Output :
Step by step
Solved in 4 steps with 6 images