You are on page 1of 5

School of Computing and Mathematics

First Year – Semester One


CSC-10029: Fundamentals of Computing

Tutorial Five – Networks, Routing and DNS


This tutorial/practical is intended to give you a greater understanding of networking and
network configuration by using a number of networking tools – available online and within
the operating system.

Task One
The ‘ping’ command on computers can be used to send small data packets to a destination
host and calculates statistics about the journey of the packets (e.g. average time taken).

For the first task, try to use the Ping command to ‘ping’ one of the Keele servers. Open up a
command line window (in Microsoft Windows, open up the main programs menu by clicking
‘Start’, then select ‘All Programs’, then Accessories, and click ‘Command Prompt’) and type
the following in the command prompt window:

ping –n 4 jupiter.kis.keele.ac.uk

The ‘-n 4’ part of the command simply tells the ping application to stop after sending four
packets. Note how long it takes for each packet to arrive at the destination – it will probably
be a few milliseconds or less. This is because the jupiter server is situated on the Keele
campus.

Try to ‘ping’ the bbc Web site:

ping –n 4 www.bbc.co.uk

The packets take about ten to twenty milliseconds to make the round trip (remember the
response has to come back to your terminal, so the real time taken for the packet to arrive is
half the time shown by ping).

Try to ping a domain or Web server in another country and see how the time differs. Note:
always set the number of packets to 4 or less.

- Based on the way you have seen the ping command work, and on any
information you can find on the Web, what do you think the command would be
used for?

TN/CD CSC-10029 page 1


Task Two
The traceroute command sends three test packets to a destination and displays the
name/address of each router the packets pass through. It also keeps a running tally of the time
taken for each packet to arrive at each ‘hop’.

Open a command prompt and try the traceroute command (called tracert on
Windows computers) with a Keele domain:

tracert jupiter.kis.keele.ac.uk

Try it with another domain within the UK, e.g. the BBC Web site:

tracert www.bbc.co.uk

You will see that the packets pass through several routers at Keele before leaving the campus.
They then pass through various routers within the JANET network (the UK academic ISP -
ja.net) before arriving at their destination. The BBC has a direct connection to the JANET
network.

Try the tracert command out on some other domain names and see how many ‘hops’ it takes
for packets of data to get from Keele to the address. Try to see where the different addresses
are that the packets pass through on the way to their destination.

- Based on the way you have seen the traceroute command work, what do you
think it would be used for?

Task Three
Domain names must be registered by their owners, to allow other people to be able to contact
a domain's owner if needed and also to prevent duplicate names. The whois service allows
you to query the world-wide database of registered domains to discover the owner of a
particular domain. Depending on the domain, it might give you their address and other contact
details.

The whois service is accessible online using a web-browser and entering the following
address:

http://whois.domaintools.com/

Type a domain name into the textbox and click ‘Lookup’. For example, try to find
information about the following domain:

keele.ac.uk

You will see that the result provides details of who registered the domain, when it is due for
renewal, and other information. In particular, it provides the addresses of a number of
‘servers’ related to the domain.

- What do you think these servers are used for? What servers are provided for the
Keele domain?
TN/CD CSC-10029 page 2
Try and find information for some other domains you are aware of. Note that most Web
accessible services are limited to accepting queries concerning only particular domains. If the
above address does not work, you may like to try one of the following whois services:

http://www.nominet.org.uk/other/whois/ (for ‘uk’ domains, including .co.uk)

http://www.internic.net/whois.html (for .aero, .arpa, .asia, .biz, .cat, .com, .coop, .edu, .info,
.int, .jobs, .mobi, .museum, .name, .net, .org, .pro, and .travel domains)

Look at the information you can obtain. Why is each piece of information collected when a
domain is registered? Try and think of, or find, a use for each piece of information given
when you perform a WHOIS query.

Task Four
The Domain Name System (DNS) is used to translate domain names (such as
www.keele.ac.uk) to IP addresses. Before carrying on with the practical, lookup the IP
address of the computer you are using. This can be done online, but for the moment use the
tools within the operating system to determine your IP address as follows:

- Open a command prompt


- Type ‘ipconfig’ and press return

Your IP address should be listed. Make a note of it.

Your machine will also have a domain name. In order to find out the name of your machine,
go to the following URL:

http://network-tools.com/

Your IP address should automatically be entered into the textbox. If it is not there, type your
IP address that you discovered above into the textbox.

Once you have done this, click the ‘Lookup’ option and click ‘Go’. This should display the
name of your computer on the right hand side of the web-page.

Next, click the ‘Network Lookup’ option and click ‘Go’. This should give you a list of
information about the Keele network. One detail included is a range of IP addresses next to
the header ‘Netrange’.

- What do you think this range of IP addresses indicates?

TN/CD CSC-10029 page 3


Task Five – the ‘netstat’ command
This task requires that you re-boot your machine and start up an alternative operating system
to MS Windows – a version of the Linux operating system called Ubuntu.

To do this carry out the following steps:

1. Log-off from your Windows session and power-down the PC.

2. Turn PC on again using the power switch on the front of the machine – the PC will re-
boot (a process that can take a little time – so be patient!). Eventually you will be
presented with a text-based menu asking you to choose between either the Windows
or Ubuntu operating systems: you should choose Ubuntu.

3. There will eventually be another text-based menu asking you to select a particular
flavour (or mode) of Ubuntu: the first one listed is fine for our purposes.

4. Again after a short delay, you should be presented with a log-on screen (this time as
an Ubuntu user) where you can log-on with your regular user name and password.

5. Once you are logged-on you will be in the Ubuntu desktop environment (quite
different to MS windows). In the top-left section of the screen you should be able to
click-on:

Applications --> Accessories --> Terminal

To open a special sort of window called a Terminal.

As well as opening a Terminal window, in Ubuntu you can start-up a web-browser if


you want to access the KLE and carry on reading this set of instructions on the screen?

6. A Terminal window in Ubuntu can be used a little like the Command Prompt window
in MS Windows. It is inside this terminal window that you will be issuing your netstat
commands.

7. When you eventually want to log-off (not right now, obviously) use the icon in the
top-right section of the Ubuntu desktop and select the log-off option.

At the command prompt inside the Terminal window type the following command:

netstat -a -n --inet

This lists all the Transmission Control Protocol (TCP) port numbers on the computer
which are waiting for connections from the outside world. The list will be of the form
*:6010, where the number after the colon/final full-stop is the port number. Some of
the ports may be listed by a name instead of a number (e.g. *:ftp). The name of the
port is given when the port number has been given a standard name allocated by the
International Assigned Numbers Authority (IANA).

Using the output of the netstat command, answer the following questions:

TN/CD CSC-10029 page 4


• Try and find out what services are offered on the computer based upon the port
numbers or names that are listed. You can do this by searching on the Internet for the
port name, or even the port number. Remember that knowing what a service is called
is not the same as knowing what it does! You should be able to collect simple
explanations for many of the services available. (hint: the names displayed with the
port numbers will be names of processes running on the machine – you could search
for these names on the Internet). You could try and work out what software is running
by searching for the TCP port numbers (instead of the process names) to find out
which service is generally offered on a particular port.
If you cannot find any information about a particular port name/number, simply leave
it and carry on. It may be more difficult to find details about port numbers that are
above 1024 (see following question).

• The TCP ports between 0 and 65535 are split into three ranges. Using Google or any
other resource, list the names of these ranges along with the associated number ranges.

TN/CD CSC-10029 page 5

You might also like