CMIS 325 Various networking and Internet activities. Name:____________________________________ Use ifconfig to see the IP address of your computer: eth0 is the first ethernet interface. How many packets have been received (RX) and transmitted (TX): How many bytes in those packets: HWAddr is the 6-byte (in hexadecimal) MAC address of the network card/chip/controller (NIC), unique in the world. The first three bytes identify the vendor. Use coffer.com/mac_find to find out the manufacturer of the NIC: Use the lspci command to see the make and model of the ethernet controller: View /proc/interrupts to find out the IRQ of the eth0 and the number of interrupts it has generated: View /etc/resolv.conf to see the IP addresses of the DNS name servers that are queried to translate DNS names like yahoo.com to an IP address: Use the route command to see what is the default gateway (the machine your computer sends packets to if their destination is outside your local network [and they don't have a specific route to follow]): (Use the -n option to see IP addresses) Use the ping command to see if a computer exists or is running [and is accessible and is responding to pings]: ping www.yahoo.com Notice the time field of each ping message; this is the round-trip time of each 64-byte packet. Notice it varies, due to network activity. What is the IP: What is the average time of 10 pings: A machine that doesn't answer the pings: ping www.asia.umuc.edu What happens: You can also ping by IP address (skipping the DNS name lookup, if DNS isn't working): ping 66.249.89.99 localhost and 127.0.0.1 are synonyms for the computer you're at. What is the average round-trip time to ping it? ping a non-existent machine: ping asdf.asia.umuc.edu What is the response? ping a computer on the local network (e.g. your neighbor's computer). What is the average round-trip time to ping it? Test if the default gateway is alive [and answering pings]. What is the average round-trip time to ping it? What is the average round-trip time to ping www.cenpac.net.nr? Use the traceroute command to see the route on the Internet to some machine or site. A list of the gateways/routers ("hops") that any message goes through is shown, along with the time it takes to get to each hop. For example, traceroute www.ebay.com is interesting because of some of the names of the hops. How many hops to it (or before the hops quit answering)? Which hop to www.cenpac.net.nr is likely to be a microwave satelite link: Use the whois command to see some information about a domain name. You can find out the registrar of the domain, contacts and its name servers. whois umuc.edu What are its name servers: Use the netstat command to see what Internet services are available on the local machine: netstat -lt [ -lt option shows listening TCP ports ] What are their names? (smtp is a mail server, pop-3 allows accessing mail from the mail server, auth is an identification protocol, 6000 is the X server). Use nmap to scan ports and services on a machine. nmap localhost shows port numbers in addition to the list of services netstat gave you. nmap can scan any machine's ports (unless firewalled or otherwise protected). Scan a MS Windows on the network 192.168.0.14 What services/ports are open: Port scan 192.168.0.205 What kind of machine is it likely to be: Use telnet to connect to any port on a machine (by default, connects to the telnet port, 23): telnet sensei.ad.umuc.edu 80 will connect to the HTTP web server port. Then enter: GET /index.html HTTP/1.0 (and a blank line) will show exactly what the web server sends in response to your request for the /index.html resource. Normally that goes to a browser, but you can do it from the command line. You can see the headers that the server sends the browser. What is the web server at sensei.ad.umuc.edu: GNOME has a networking tools GUI that does much of these. IGNORE BELOW ****************************************** Use the finger command to see who's logged on to a machine. finger by itself lists the logged-on users of the local machine. To see a remote machine, include a @name argument: finger @anjin.ad.umuc.edu How many users are logged on? Who are they? (It's not a heavily used machine). Many sites don't run a finger server because it's considered to give out too much information. The Linux machine does not run a finger server: finger @202.239.133.19 [or you can do: finger @localhost ] What's the message? (this is what you get from a machine that doesn't have a finger server). Any resource can be requested this way. telnet to localhost on port 80 again and request: GET /cgi-bin/date.pl HTTP/1.0 (blank line) Run a browser on your Windows and point to: kadenix.dhs.org/cgi-bin/date.pl