13,420
edits
Changes
no edit summary
# Perform this section on your '''c7host''' machine.
# On the centos host '''ping''' each of your VM's# Examine the contents of the ARP cache by using the command: <b><code><span style="color:#3366CC;font-size:1.2em;">arp</span></code></b># Check the contents of the cache again by using the command: <b><code><span style="color:#3366CC;font-size:1.2em;">arp -n</span></code></b># What was the difference in output? For what other command did the option '''-n''' have a similar effect?# On your CentOS host execute the command: <b><code><span style="color:#3366CC;font-size:1.2em;">netstat -at</span></code></b># This command will list all active TCP ports. Note the state of your ports.# TCP is a connection oriented protocol that uses a handshaking mechanism to establish a connection. Those ports that show a state of LISTEN are waiting for connection requests to a particular service. For example you should see the '''ssh''' service in a LISTEN state as it is waiting for connections.# From one of your VM's login to your host using '''ssh'''# On the CentOS host rerun the command and in addition to the LISTEN port it should list a 2nd entry with a state of ESTABLISHED. This shows that there is a current connection to your ssh server.# Exit your ssh connection from the VM and rerun the command on the CentOS host. Instead of ESTABLISHED it should now show a state of CLOSE_WAIT. Indicating that the TCP connection is being closed.# On your CentOS host try the command <b><code><span style="color:#3366CC;font-size:1.2em;">netstat -atn</span></code></b>. How is this output different?# Without the <code>-n</code> option <code>netstat</code> attempts to resolve IP addresses to host names (using '''/etc/hosts''') and port numbers to service names (using '''/etc/services''')# Examine the '''/etc/services''' file and find which ports are used for the services: '''ssh''', '''sftp''', '''http'''# Now execute the command <b><code><span style="color:#3366CC;font-size:1.2em;">netstat -au</span></code></b> What is the difference between the options: '''-at''' and '''-au'''?# When examining UDP ports why is there no state?x
{| width="40%" align="right" cellpadding="10"