Exercise 4

Learning about the Internet


You now know your computer's IP address (exercise 1), and how your computer uses arp (exercise 2) to find out local hardware addresses for computers connected to your local LAN. You should also know how your computer determines that an IP address is remote and how it uses a default router to start to forward packets to other networks (exercise 3) via a network of links (serial communications links leased from national telecommunication providers, e.g. BT, SPRINT) and routers forming a WAN.

In this exercsie, you will contact some remote end systems located far away on the Internet (you could use the same one that you "pinged" in exercise 3). The way in which computers communicate with local systems and remote systems is different. To communicate with a remote system your computer will first send to the default router.

To make this more interesting, try using the -c option of "ping" to collect some statistics, the "c" option specifies how many packets to send. So, "ping -c10 yahoo.com" sends ten ICMP-echo requests, and displays the time it takes to receive each reply from the ICMP echo server running on the remote computer (i.e. "yahoo.com" in this example). In windows, you should type "ping -n10 yahoo.com", since the option is "n" in this case.

An example use of this command is shown below for the web site :

ping -c10 www.yahoo.com

PING yahoo.com : (66.218.71.198): 56 data bytes

64 bytes from 66.218.71.198: icmp_seq=0 ttl=239 time=156.326 ms
64 bytes from 66.218.71.198: icmp_seq=1 ttl=239 time=155.923 ms
64 bytes from 66.218.71.198: icmp_seq=2 ttl=239 time=155.632 ms
64 bytes from 66.218.71.198: icmp_seq=3 ttl=239 time=156.378 ms
64 bytes from 66.218.71.198: icmp_seq=4 ttl=239 time=155.866 ms
64 bytes from 66.218.71.198: icmp_seq=5 ttl=239 time=155.724 ms
64 bytes from 66.218.71.198: icmp_seq=6 ttl=239 time=155.823 ms
64 bytes from 66.218.71.198: icmp_seq=7 ttl=239 time=156.004 ms
64 bytes from 66.218.71.198: icmp_seq=8 ttl=239 time=155.932 ms
64 bytes from 66.218.71.198: icmp_seq=9 ttl=239 time=156.019 ms

--- yahoo.com ping statistics ---
10 packets transmitted, 10 packets received, 0% packet loss
round-trip min/avg/max = 155.632/155.962/156.378 ms

Each time an ICMP echo reply message is received, a single line of text is displayed. Each ICMP echo request message contains a sequence number (starting at 0) that is incremented after each transmission, that your computer can use to keep track of which packets were sent when. The displayed text also shows the sequence number in received packets (so you can see the order in which the reply messages were received), and the measured round trip time (in milliseconds).

Contacting remote sites from your computer

Use the Ping program to examine whether some remote sites are reachable from your computer. Here are some addresses to try. Be sure to specify that you would like statistics (-c) and that you are to send only ten (10) messages .

Type:

ping -c10 space.mit.edu

ping -c10 www.nasa.gov

ping -c10 cs.wisc.edu

Do you always get a reply when you send an ICMP echo-request?

The loss of an IP packet may be discovered by a discontinuity in the sequence numbers of received ICMP echo reply messages. The summary at the end of the test also records the percentage of IP packets that were not replied to.

Is it acceptable for packets to be lost?

You'll probably now realise the implications of the IP network service being a best effort service (i.e. that IP does not provide reliable delivery of packets through the internet). Since ICMP is a connection-less protocol, it does not perform retransmission of any lost IP packets (i.e. it is not reliable).

Some sites choose not to respond to all ICMP messages (or not to respond to any at all). Two reaons for this are:

More things to think about.

The results you get when you use ping to test the network may well depend on the time of day when you do the exercise. The time taken to receive a reply measures the distance in "cyber space" to the destination - this need not have a relationship to the actual distance to the destination. It is a combination of the network load, the transmission speed, and the loading of the destination host.

Another program: Finger

"Finger" is the simplest server program (apart from an ICMP echo server) that is run by computers connected to the Internet. Finger uses a complete set of protocols corresponding to the entire OSI reference model and operates only in End Systems (not generally in routers). It relies upon the transport protocol provided by TCP. Many sites use finger to supply information about users or to provide information about particular subjects.

You may like to contact the finger server at the remote sites that you have just contacted. The following finger server is also (usually) available and displays the contents of today's press release from NASA.

Type:

finger nasanews@space.mit.edu

A well known finger server used to run at the University Wisconsin, in the USA. This finger server provides instructions on the use of a "coke server" - a coca-cola machine connected to the Internet, which allows users to determine whether coke is available, and the temperature of the cans in the machine which are about to be dispensed. Some coke servers also debit the computer account of the users. This perhaps isn't much use when you're in Aberdeen (as far as I know there isn't a coke server for the engineering department's vending machine!). You could see if it is still working by typing:

finger coke@cs.wisc.edu

There are many other interesting and useful places, one that you may have "pinged" is the server for the visible human project which displays information about a project to provide in-depth on-line information about the human anatomy.


GO BACK TO FIRST EXERCISE

LIST OF EXERCISES

CONTENTS PAGE


Gorry Fairhurst, - School of Engineering, University of Aberdeen, Scotland, UK.

email: G.Fairhurst(at)eng.abdn.ac.uk - Date: 10/11/1995 Revised: 7/10/2003