Basic Network Utilities
Basic Network Utilities
Now that you know what IP addresses and URLs are, you need to be familiar with
some basic network utilities. You can execute some network utilities from a
command prompt (Windows) or from a shell (Unix/Linux). Many people are
already familiar with Windows, so we will focus on how to execute the commands
from the Windows command-prompt perspective. However, these utilities are
available in all operating systems.
Ipconfig
The first thing you want to do is get information about your own system. To
accomplish this, you must get a command prompt. In Windows, you do this by
going to the Start menu, selecting All Programs, and then choosing Accessories.
You can also go to Start, Run, and type cmd to get a command prompt. In
Windows 10 you go to Search and type cmd. Now you can type in ipconfig. (You
could input the same command in UNIX or Linux by typing in ipconfig from the
shell.) After typing in ipconfig (ipconfig in Linux), you should see something
much like the below screenshot.
This command gives you information about your connection to a network (or to the
Internet). Most importantly, you find out your own IP address. The command also
has the IP address for your default gateway, which is your connection to the
outside world. Running the ipconfig command is a first step in determining your
system’s network configuration. Most commands including ipconfig have a
number of parameters, or flags, which can be passed to the commands to make the
computer behave in a certain way. You can find out what these commands are by
typing in the command, followed by a space, and then typing in hyphen question
mark: -?.
As you can see, you might use a number of options to find out different details
about your computer’s configuration. The most commonly used method would
probably be ipconfig/all.
Ping
Another common used command is ping. Ping is used to send a test packet, or echo
packet, to a machine to find out whether the machine is reachable and how long the
packet takes to reach the machine. This useful diagnostic tool can be employed in
elementary hacking techniques. Figure 1-3 shows the command.
The above command shows that a 32-byte echo packet was sent to the destination
and returned. The TTL means “time to live.” That time unit is how many
intermediary steps, or hops, the packet should take to the destination before giving
up. Remember that the Internet is a vast conglomerate of interconnected networks.
Your packet probably won’t go straight to its destination. It will have to take
several hops to get there. As with ipconfig, you can type in ping -? to find out
various ways you can refine your ping.
Tracert
The next command is tracert. This command is a sort of “ping deluxe.” Tracert not
only tells you whether the packet got there and how long it took, but it also tells
you all the intermediate hops it took to get there. (This same command can be
executed in Linux or UNIX, but it is called traceroute rather than tracert.) You can
see this utility in Figure 1-4.
With tracert, you can see (in milliseconds) the time the IP addresses of each
intermediate step listed, and how long it took to get to that step. Knowing the steps
required to reach a destination can be very important.
Netstat
Certainly, other utilities can be used when working with network communications.
However, the four we just examined are the core utilities. These four (ipconfig,
ping, tracert, and netstat) are absolutely essential to any network administrator.
Guided Exercise: Using Basic Network
Utilities
Resources
Files None
Machines Windows 10, Windows Server 2012,
Ubuntu Server
Username: Admin
Password: Pa$$w0rd
Then select Command Prompt (Admin) and click Yes on the User Account Control window.
On the command prompt window write the command ipconfig and then press the enter
button.
Use the ping command on Windows 10 to ping the host 192.168.1.20
Use the ipconfig command on Windows Server 2012 to identify the IP address.
Login to Windows Server 2012 using the following credentials:
Username: Administrator
Password: Pa$$w0rd
Then right click on the Start button and select Command Prompt (Admin)
On the command prompt window write the command ipconfig and press enter.
Use the ping command on Windows Server 2012 to ping the host 192.168.1.30.
Use the ifconfig command on Ubuntu Server to identify the IP address. Login with the
following credentials:
Username: user
Password: Pa$$w0rd
Once logged in click on the terminal icon (last icon) the left side menu.
On the terminal window write the command ifconfig and press enter.
Open a terminal window and use the command “ping –c 4 192.168.1.10” on Ubuntu Server
to ping the host 192.168.1.10.
Use the command “netstat -tulpn” on the Ubuntu Server and observe the output. You will
notice the Local Address bound with a port which is a specific service listening on that port
and the Foreign Address which is a remote host connected to that specific service and the
State which is Listening or can be Established in the case of a remote host connection.
Use the command “netstat –a” on the Windows Server 2012 and observe the output. You
will notice the Local Address bound with a port which is a specific service listening on that
port and the Foreign Address which is a remote host connected to that specific service and the
State which is Listening or can be Established in the case of a remote host
connection.