Networking Tools

ssh

The UNIX ssh program is used to establish a secure login on a remote machine. It encrypts all communication between the local machine and the remote machine. On a Windows platform, an ssh login can be established using the PuTTY program.

Here is an example of a secure shell login to ukko.d.umn.edu. Everything typed by the the user is shown with a light green background.

susan 1% ssh gshute@ukko.d.umn.edu

The authenticity of host 'ukko.d.umn.edu (131.212.41.69)' can't be established.
RSA key fingerprint is cc:47:75:ae:85:c4:7c:fb:1e:a7:5b:cf:76:0b:b9:5b.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ukko.d.umn.edu,131.212.41.69' (RSA) to the list of known hosts.

gshute@ukko.d.umn.edu's password:           
Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-35-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Wed Jan 16 08:15:27 CST 2013

  System load:  0.11               Processes:            268
  Usage of /:   40.1% of 45.83GB   Users logged in:      1
  Memory usage: 1%                 IP address for bond0: 131.212.41.69
  Swap usage:   0%

  Graph this data and manage this system at https://landscape.canonical.com/

33 packages can be updated.
12 updates are security updates.

Last login: Mon Jan 14 08:33:57 2013 from 68-115-86-83.dhcp.roch.mn.charter.com
ukko 1% 

ping

A common use of the ping program is to time a connection to a remote machine.

Here is an example using ping to time the connection to bitsy.mit.edu. Everything typed by the the user is shown with a light green background. Note that you need to type a control-C to terminate the ping.

ukko 1% ping bitsy.mit.edu

PING bitsy.mit.edu: 56 data bytes
64 bytes from BITSY.MIT.EDU (18.72.0.3): icmp_seq=0. time=57. ms
64 bytes from BITSY.MIT.EDU (18.72.0.3): icmp_seq=1. time=56. ms
64 bytes from BITSY.MIT.EDU (18.72.0.3): icmp_seq=2. time=58. ms
64 bytes from BITSY.MIT.EDU (18.72.0.3): icmp_seq=3. time=57. ms
64 bytes from BITSY.MIT.EDU (18.72.0.3): icmp_seq=4. time=56. ms
64 bytes from BITSY.MIT.EDU (18.72.0.3): icmp_seq=5. time=56. ms
64 bytes from BITSY.MIT.EDU (18.72.0.3): icmp_seq=6. time=57. ms
64 bytes from BITSY.MIT.EDU (18.72.0.3): icmp_seq=7. time=56. ms
64 bytes from BITSY.MIT.EDU (18.72.0.3): icmp_seq=8. time=57. ms
^C
----bitsy.mit.edu PING Statistics----
9 packets transmitted, 9 packets received, 0% packet loss
round-trip (ms)  min/avg/max = 56/56/58

nslookup

The UNIX nslookup program can be used to determine a variety of information about machines and domains in the internet. It uses the Domain Name System (DNS) protocol to query DNS name servers. There is at least one DNS name server for each internet domain. This is explained further in the "Name Server" subsection.

The primary purpose of DNS is translating host names to Internet Protocol (IP) addresses. IP addresses are required for routing data through the internet.

For security reasons, most machines and domains will not respond to all types of queries made by nslookup. Most will respond to the query types described in the following sections. In these examples everything typed by the the user is shown with a light blue background.

Finding the Address of a Machine

Here is an example using nslookup to find the address of bulldog.d.umn.edu. The first two lines give the local server from which the query originates. They are the same in all of the examples below. The answer to the query is in the following lines.

ukko 1% nslookup -type=a bulldog.d.umn.edu
Server:		131.212.32.32
Address:	131.212.32.32#53

Name:	bulldog.d.umn.edu
Address: 131.212.109.98

Finding the Mail Exchanger for a Domain

Here is an example using nslookup to find the mail exchanger for a network domain. A non-authoritative answer means the local DNS server is returning information that it had cached from earlier queries.

There are two kinds of IP addresses in the section that describes where you can get authoritative information:

ukko 2% nslookup -type=mx tc.umn.edu
Server:		131.212.32.32
Address:	131.212.32.32#53

Non-authoritative answer:
tc.umn.edu	mail exchanger = 10 mhub-m.tc.umn.edu.
tc.umn.edu	mail exchanger = 10 mhub-w.tc.umn.edu.
tc.umn.edu	mail exchanger = 10 mhub-a.tc.umn.edu.

Authoritative answers can be found from:
umn.edu	nameserver = ns-auth-2.umn.edu.
umn.edu	nameserver = ns-auth-1.umn.edu.
umn.edu	nameserver = ns-auth-remote-1.umn.edu.
ns-auth-1.umn.edu	internet address = 128.101.101.1
ns-auth-1.umn.edu	has AAAA address 2001:468:1910:4801::2
ns-auth-2.umn.edu	internet address = 128.101.101.9
ns-auth-2.umn.edu	has AAAA address 2001:468:1910:4802::2
ns-auth-remote-1.umn.edu	internet address = 140.142.16.240

Finding the Name Server for a Domain

Here are examples using nslookup to find the name server for a domain. A domain is an administrative unit for a group of machines. The administrative units form a hierarchy.

The full hostname for a machine encodes the domains it belongs to. For example

Domains at any level can be queried for their name server. The first example show a query for a lower-level domain. The second example show a query for a higher-level domain.

Example 1

ukko 3% nslookup -type=ns mit.edu
Server:		131.212.32.32
Address:	131.212.32.32#53

Non-authoritative answer:
mit.edu	nameserver = W20NS.mit.edu.
mit.edu	nameserver = bitsy.mit.edu.
mit.edu	nameserver = STRAWB.mit.edu.

Authoritative answers can be found from:
bitsy.mit.edu	internet address = 18.72.0.3
W20NS.mit.edu	internet address = 18.70.0.160
STRAWB.mit.edu	internet address = 18.71.0.151

Example 2

ukko 4% nslookup -type=ns edu
Server:		131.212.32.32
Address:	131.212.32.32#53

Non-authoritative answer:
edu	nameserver = l.edu-servers.net.
edu	nameserver = c.edu-servers.net.
edu	nameserver = a.edu-servers.net.
edu	nameserver = g.edu-servers.net.
edu	nameserver = f.edu-servers.net.
edu	nameserver = d.edu-servers.net.

Authoritative answers can be found from:
a.edu-servers.net	internet address = 192.5.6.30
c.edu-servers.net	internet address = 192.26.92.30
d.edu-servers.net	internet address = 192.31.80.30
f.edu-servers.net	internet address = 192.35.51.30
g.edu-servers.net	internet address = 192.42.93.30
g.edu-servers.net	has AAAA address 2001:503:cc2c::2:36
l.edu-servers.net	internet address = 192.41.162.30

traceroute

Here is an example using traceroute to trace the route to bitsy.mit.edu. Everything typed by the the user is shown with a light green background.

ukko 1% traceroute bitsy.mit.edu
traceroute to bitsy.mit.edu (18.72.0.3), 30 hops max, 60 byte packets
 1  131.212.41.252 (131.212.41.252)  0.397 ms  0.412 ms  0.472 ms
 2  hh-L3-exchange-631.d.umn.edu (131.212.4.249)  0.445 ms  0.526 ms  0.590 ms
 3  dlh-cb-01-po-2-4010.ggnet.umn.edu (146.57.237.49)  0.507 ms  0.638 ms  0.806 ms
 4  192.168.212.194 (192.168.212.194)  6.413 ms  6.425 ms  6.415 ms
 5  172.25.1.117 (172.25.1.117)  6.389 ms  6.401 ms  6.406 ms
 6  172.25.0.146 (172.25.0.146)  6.365 ms  6.259 ms  6.301 ms
 7  172.25.1.178 (172.25.1.178)  6.544 ms  6.644 ms  6.705 ms
 8  172.25.0.38 (172.25.0.38)  6.478 ms  6.570 ms  6.658 ms
 9  telecomb-bn-02-v3210.ggnet.umn.edu (146.57.238.17)  6.415 ms  6.334 ms  6.422 ms
10  telecomb-br-02-v3219.ggnet.umn.edu (146.57.238.18)  6.325 ms  6.384 ms  6.427 ms
11  telecomb-br-01-te-4-2.ggnet.umn.edu (192.35.86.29)  6.321 ms  6.301 ms  6.364 ms
12  telecomb-gr-01-te-2-3.northernlights.gigapop.net (146.57.252.178)  6.298 ms  6.293 ms  6.343 ms
13  infotech-gr-01-te-2-1.northernlights.gigapop.net (146.57.252.129)  6.419 ms  6.324 ms  6.350 ms
14  nlr.northernlights.gigapop.net (192.35.86.170)  17.292 ms  17.284 ms  17.175 ms
15  vlan-63.clev.layer2.nlr.net (216.24.186.61)  40.436 ms  40.455 ms  40.839 ms
16  vlan-62.newy.layer2.nlr.net (216.24.186.67)  40.532 ms  40.377 ms  40.581 ms
17  216.24.184.102 (216.24.184.102)  40.354 ms  40.351 ms  40.345 ms
18  DMZ-RTR-1-NY32-RTR-1.MIT.EDU (18.192.5.1)  50.243 ms  50.427 ms  50.423 ms
19  BACKBONE-RTR-1-DMZ-RTR-1.MIT.EDU (18.168.5.1)  46.701 ms  46.726 ms  46.754 ms
20  W92-RTR-1-BACKBONE-2.MIT.EDU (18.168.1.25)  46.836 ms  46.785 ms  46.813 ms
21  BITSY.MIT.EDU (18.72.0.3)  46.740 ms !X  46.746 ms !X  46.739 ms !X