Professional Documents
Culture Documents
html
1 of 4 12/18/2008 12:43 PM
Linux Networking Basics http://doc.vic.computerbank.org.au/tutorials/Tutorial3/print.html
Where eth0 refers to the cable connection. The inet addr is my IP address.
The lo refers to the local loopback interface, the ability of the computer to communicate with itself.
Using the ping command
The ping command sends a packet across the network to the remote computer you specify. When ping responds, it
confirms that the remote machine is responding to requests and there is a valid, functional route to the remote
computer. If ping does not respond, it may be because your machine has no network connectivity, the Internet
connection is down, or the web site on the Internet is down.
Pinging a machine on the internal network at Computerbank
In the following example, the ping command is used to see whether the 'toast' machine on the Computerbank is
accepting ping requests. Press the Ctrl-C keys to terminate ping requests.
kylie@prometheus:~$ ping toast
The above command produces the following output:
PING toast.cbv.prv (192.168.1.1): 56 data bytes
64 bytes from 192.168.1.1: icmp_seq=0 ttl=244 time=0.6 ms
64 bytes from 192.168.1.1: icmp_seq=1 ttl=244 time=0.6 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=244 time=0.6 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=244 time=0.6 ms
--- toast.cbv.prv ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 0.6/0.6/0.6 ms
This output tells us that our machine has network connectivity and the 'toast' machine is accepting ping requests.
Pinging a machine on the Internet
The following example is a ping request to www.yahoo.com.au . Press the Ctrl-C keys to terminate ping requests.
kylie@prometheus:~$ ping www.yahoo.com.au
The following output is produced:
PING au.rc.yahoo.com (202.3.14.151): 56 data bytes
64 bytes from 202.3.14.152: icmp_seq=0 ttl=244 time=1754.4 ms
64 bytes from 202.3.14.152: icmp_seq=1 ttl=244 time=1496.0 ms
64 bytes from 202.3.14.152: icmp_seq=2 ttl=244 time=1586.1 ms
64 bytes from 202.3.14.152: icmp_seq=3 ttl=244 time=1645.8 ms
--- au.rc.yahoo.com ping statistics ---
5 packets transmitted, 4 packets received, 20% packet loss
round-trip min/avg/max = 1496.0/1620.5/1754.4 ms
The above example tells us that the Internet connection at Computerbank is up and the www.yahoo.com.au web
site is accepting requests.
Accessing other computers
ssh - secure shell
Secure shell provides a method to securely access another computer. ssh is secure in that the connection between
the two computers is encrypted. The first time you ssh to a computer a key will be set up.
You can use ssh to access another computer using two different methods:
* IP number
* Hostname
Generally if you want to access your home computer (one that is connected by cable modem or serial modem) you
will need to supply an IP number. If you want to ssh to a computer on a network such as the one at Computerbank
- a hostname is fine. If all else fails use the IP number method. If the ssh program is not installed it won't work.
To ssh you need to specify a username@hostname (or IP address: 234.45.123.14)
Example first time use of ssh to access another computer on the Internet
kylie@thinking:~$ ssh computerbank@digital.linux.org.au
The authenticity of host 'digital.linux.org.au (202.0.185.5)' can't be established.
RSA key fingerprint is b6:0a:98:bc:ab:1f:74:cd:d4:bc:5c:c1:e3:1a:de:18.
Are you sure you want to continue connecting (yes/no)?
2 of 4 12/18/2008 12:43 PM
Linux Networking Basics http://doc.vic.computerbank.org.au/tutorials/Tutorial3/print.html
3 of 4 12/18/2008 12:43 PM
Linux Networking Basics http://doc.vic.computerbank.org.au/tutorials/Tutorial3/print.html
©GNU Free Documentation License - Copying and distribution of these web pages is permitted in any
medium, provided this notice is preserved.
Computerbank Victoria Inc., 483 Victoria St, West Melbourne, Victoria, Australia. 3003 ARBN 096 258 543
4 of 4 12/18/2008 12:43 PM