Hardware Reference
In-Depth Information
To use it, open up the command-line application on your
computer (Terminal on Mac OS X, the command prompt
on Windows, and xterm or similar on Linux/Unix). On Mac
OS X or Linux, type the following:
--- 127.0.0.1 ping statistics ---
10 packets transmitted, 10 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.143/0.164/0.206/0.015 ms
It gives you a good picture of not only how many packets
got through, but also how long they took. It's a useful way
to learn quickly whether a given device on the Internet
is reachable or not, as well as how reliable the network
is between you and that device. Later on, you'll be using
devices that have no physical interface on which you can
see activity, so ping is a handy way to check whether
they're working.
ping -c 10 127.0.0.1
On Windows, type this:
ping -n 10 127.0.0.1
This sends a message to address 127.0.0.1 and waits for a
reply. Every time it gets a reply, it tells you how long it took,
like this:
NOTE: 127.0.0.1 is a special address called the loopback address
or localhost address . Whenever you use it, the computer you're
sending it from loops back and sends the message to itself. You
can also use the name localhost in its place. You can test many
network applications using this address, even when you don't have
a network connection.
X
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.166 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.157 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.182 ms
After counting 10 packets (that's what the -c 10 on Mac
and -n 10 on Windows means), it stops and gives you a
summary, like this:
Clients, Servers, and Message Protocols
Now you know how the Internet is organized, but how do things get done on the Net?
For example, how does an email message get from you to your friend? Or how does
a web page get to your computer when you type a URL into your browser or click on
a link? It's all handled by sending messages back and forth between objects using the
transport scheme just described. Once you know how that works, you can take it for
granted and concentrate on the messages.
How Web Browsing Works
Figure 3-5 is a map of the routes web pages take to reach
your computer. Your browser sends out a request for a
page to a web server, and the server sends the page back.
Which route the request and the reply take is irrelevant,
as long as there is a route. The web server itself is just a
program running on a computer somewhere else on the
Internet. A server is a program that provides a service to
other programs on the Net. The computer that a server
runs on, also referred to as a server, is expected to be
online and available at all times so that the service is not
disrupted. In the case of a web server, the server provides
access to a number of HTML files, images, sound files, and
other elements of a website to clients from all over the
Net. Clients are programs that take advantage of services.
Your browser, a client, makes a connection to the server
to request a page. The browser makes a connection to the
server computer, the server program accepts the connec-
tion and delivers the files representing the page, and the
exchange is made.
Search WWH ::




Custom Search