Networking Lab FAQ

Hopefully this page will answer some of the most common questions I get about issues specific to our lab. You may wish to print this page for your reference; I'll try to keep a copy of it around the lab as well.

Notable differences between what the lab manual asks, and what we want you to do:

How do we turn in work in this class?

Submissions should be mailed to the TA. Submissions must be organized into two sets of files: (i) answers to short questions, and (ii) computer generated output. The tarzip of all files should be emailed to the TA. You may also submit the answers to short questions of prelabs to the main office in the CMPSCI building to Pauline, but email is preferred. If there are any doubts as to what to turn in and what not to turn in via paper, please ask the TA.

General Issues:

I'm stuck. Things just don't work. What should I do?

Handy tips for debugging your configuration:

Why can't I unmount my floppy disk? I am getting a "Device is busy" errors

Linux will not let you unmount a drive if an application is using a file on that drive. But you swear you aren't!

  • Be sure to not have a shell's working directory in the directory of the floppy disk. Just type "cd" at the shell prompt, and this should fix this
  • Try not to use the file system manager in either KDE/gnome. This includes throwing files into the trash can, etc. Often these programs forget to close files on the floppy, and this will prevent your floppy from unmounting.
  • As a last resort, try typing "lsof | grep /mnt/floppy" should give you an idea of what program is using a file on the floppy disk. The second column is the process ID (aka pid). You can kill processes using the command "kill pid"
  • I think floppies are too unreliable. Can I use USB flash disks in the netlab?

    WARNING! (2/18/04) Apparently you can break your USB keychain if you plug it into a linux machine. One person has reported being able to get their keychain working again after a few days. You have been warned!!!

    Be sure you read the warning notice in the previous paragraph. Other than that, you can mount usb flash disks in linux. All the PCs in the lab have USB ports under the front cover. The PCs have been configured to automatically detect USB flash drives. You must mount the disks manually, similar to how to mount floppy disks. Mounting a USB flash disk to /mnt/flash can be done with:

    mount /dev/sda1 /mnt/flash
    
    Just like a floppy, remember to unmount the flash disk!
    umount /dev/sda1
    
    Please let the TAs know if you have any problems with the flash disks.

    My IOS prompt reads "rommon >". What?

    For reasons we don't really understand, sometimes when the routers are powered up they don't really start. If this happens to you, just type reset and it'll reboot and be fixed.

    Router interface ethernet0/ethernet1 doesn't exist! Am I doing something wrong?

    No, Cisco just uses a different naming scheme for our routers than the ones the lab was written for. Instead of ethernet0, use FastEthernet0/0. Instead of ethernet1, use FastEthernet0/1.

    I really really like KDE and thought it would be great if it was the default on the machines.

    If you're going to use KDE, please have the courtesy not to set it as the default session and to logout when you're done. Not everyone knows the systems well enough to get out of KDE and into an environment they're already familiar with. The default environment for these machines is GNOME/Sawfish. Please leave it that way.

    Lab 1

    I saved my file on a computer yesterday, but its not there today!

    There are absolutely no guarantees that any files you save on the lab PCs will be there when you return. This means that you should be sure to bring a floppy disk with you every time you visit the lab.

    Each PC in a workstation has a its own hard drive. Be sure to look for your files on the correct PC when you return!

    To lessen the chance of your files being overwritten by another student, PLEASE add your name (first name, or edlab username) to your "labdata" directory name. Note that this still offers no guarantees of your data being there when you return.

    I just saved my file in /labdata, but the file is no longer there!

    Be sure that you differentiate between /labdata and /root/labdata. There really is a difference between the "root directory of the filesystem" (= /) and "root's home directory" (= /root). You can use either, but be sure to be consistent, so that you know where to find your files!

    Helpful hints for Lab 1, and in general, Linux:

  • The up arrow recalls the last command entered. pressing the up arrow multiple times will scroll through the command history. This is useful if you made a typo, so that you dont have to type the entire command out again. Another good tidbit to know, is that control-a will move the cursor to the beginning of a line, and control-e will move the cursor back to the end.

  • To copy a directory onto a floppy, use the command "cp -r". The "-r" flag (also known as an argument) will recursively copy a directory from one place to another. For example, when a floppy is mounted,
    cp -r /labdata-armenb /mnt/floppy/
    
    will copy the entire directory "labdata-armenb" to the floppy disk.

    Do not forget to unmount the floppy disk using the "umount" command!

  • Lab 2

    How can I learn capture filter syntax (for tcpdump and ethereal), or display filter syntax (for ethereal)?

    First, be sure to check the introduction chapter in the lab manual for a quick rundown on how to define both kinds of filters. There is more information available at:
    http://home.insight.rr.com/procana/index.html
    tcpdump manpage - just type "man tcpdump" on any PC
    http://www.firetower.com/forum/tcpdump.html
    Searching on google will probably yield better results.

    How do I get rid of ARP entries on the PCs?

    arp -d [ip address].

    Warning about setting netmasks with ifconfig

    For some odd reason, ifconfig on linux doesn't support this operation:
    ifconfig eth0 10.0.1.100/24
    
    Intuitively, you'd think that eth0 would be set with the netmask 255.255.255.0. However, ifconfig completely ignores the /24 you may append to the ip address.

    Actually, what ifconfig does is use the pre-CIDR default network sizes of automatically assigning the following netmasks to their respective network ranges (that are actually called classes):

    Be sure you explicitly state the netmask of the network with the "netmask" command in ifconfig, rather than using the slash-notation.

    Why am i sometimes seeing 3 ARP requests for a non-responsive IP address, and sometimes seeing 6?

    You may see non-deterministic behavior of ARP requests in this regard because of when exactly the TCP retransmission timer on a PC attempts to send a packet. Both cases exhibit correct behavior of ARP.

    Lab 3

    Isn't there an easier way to connect to the router than typing all those commands listed in the book every time?

    There sure is. Open a new terminal window and type "kermit router". The file "/root/router" contains all the line-setting and connecting commands in it.

    What are these "LOOP" messages I'm seeing in ethereal?

    These messages are generated by the routers, and as far as I can tell, are completely useless and harmless. You can ignore them.

    Part 5: My PC isn't accepting ICMP redirects. I get the redirects back, but my routing cache doesn't update.

    For some reason (and only on 1 PC, and not anymore) the route cache was specifically forbidden from accepting updates from ICMP redirect messages. If this happens to you, here's how to fix it:
    echo '1' > /proc/sys/net/ipv4/conf/all/accept-redirects
    Also, please tell the TA so they can have a look at the machine to see if any of the rest of the configuration is broken as well.

    Part 5: My pings from PC2 to PC3 are not being answered. What's wrong with my setup?

    The lab manual inadvertently leaves out directions to configure PC3 to reach PC2. Be sure to add an entry to PC3's routing table, such that it knows how to reach 10.0.2.0/24 (i.e., through 10.0.3.2). You can do this by typing:
    route add -net 10.0.2.0 netmask 255.255.255.0 gw 10.0.3.2 eth0

    Part 6: Ethereal isn't capturing any packets in promiscuous mode! What gives?

    For currently unknown reasons, ethereal sometimes doesn't put the ethernet interface into promiscuous mode. the status of the ethernet interface can be shown by typing: ifconfig eth0 at the linux prompt. What should appear is something like:

    UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1

    If the PROMISC flag isn't shown, put the ethernet interface into promiscuous mode manually by typing:
    ifconfig eth0 promisc
    as root. That should solve that problem.

    It takes forever to wipe all the entries from the router's routing table? Isn't there a better way?

    Yes. At the config prompt:

    (config)# no ip routing
    (config)# ip routing

    Disabling then re-enabling ip routing flushes the routing table. Sometimes this is NOT what you want, though, so be aware of it even if you don't intend to use it this way.

    Hey! Someone shuffled the cables that go from the PCs to the routers!

    Yeah, don't do that. :) Apparently some of the labs call for the routers to be attached to PCs that aren't the normal ones (in order). Ignore these directions. Be a good neighbor; if you find out that someone's scrambled things when you're doing your setup, set it right and make everyone's day a little easier.

    The "connected" light on one of my router interfaces won't light up no matter what I do.

    Do a quick show running-config and make sure the interface duplexing is set to "auto-duplex" rather than "full-duplex." We ran into that over the summer and fixed all of them; lately they've been getting set back to full-duplex, which doesn't work with our hubs. If you fix it, make a note of which router was doing it so we can keep an eye on it.

    Lab 4

    Erasing the router's route cache doesn't work!

    As far as we can tell, this is a bug in Cisco's IOS. For now, you will just have to wait until the entries in the router cache time out (on the order of a few minutes).

    I'm having problems getting the count-to-infinity problem working!

    Until further notice, the count-to-infinity portion of Lab4 is optional, because of a problem in CISCO IOS. Specifically, the version of IOS loaded on the routers ignores commands to shut off triggered updates. When triggered updates are on, it is VERY difficult to exhibit the count-to-infinity problem.

    In lieu of carrying out the experiment, be sure to explain HOW the count-to-infinity phenomena should have exhibited itself in this portion of the lab. Be sure to mention what routers would have been involved in the count-to-infinity.

    Lab 6

    In Lab 6, Why am I getting a "Can't add bridge: package not installed" error?

    The linux computer being configured as a bridge needs to be running a kernel with bridging enabled. To use this kernel, reboot the machine, and using the arrow keys, select the kernel with bridging enabled in the GRUB menu just before the kernel gets loaded.

    Lab 7

    Why is dhcpd ignoring certain interfaces?

    Make sure you have an entry for 10.0.2.0/24 in dhcpd.conf, or dhcpd will ignore that interface.

    In part 1 of this lab, we are supposed to use the command iptables and then some arguments. It seems like the only arguments iptables will accept are "start", "stop", "restart", etc. What am I doing wrong? I am also having the same problem in part 2 of this lab with the dhcpd program. Help?

    There are actually TWO iptables and dhcpd commands - one in /etc/rc.d/init.d/, and one in their respective normal locations (probably /sbin and /usr/sbin/). The /etc/rc.d/init.d/ version is actually a script that runs on bootup and on shutdown of the machine, and takes as an argument "start", "stop", "restart", and probably a couple of other commands. The iptables and dhcpd scripts that live in /etc/rc.d/init.d/ are not what you should be using; you should be using the /sbin/iptables and /usr/sbin/iptables commands.

    The reason you are getting the wrong result is because the /etc/rc.d/init.d/ directory is in your path variable (PATH in bash), and it is executing the scripts rather than the actual commands: as you've figured out, the iptables arguments used in the book don't work with the scripts.

    A sure-fire solution to this problem is to use the full path of the command, e.g. "/sbin/iptables -L" or "/usr/sbin/dhcpd -d". If you know how to muck with the path variables, change them so they don't include /etc/rc.d/init.d.

    Lab 8

    In Part 4, The lab manual asks to "determine how domain names and IP address are encoded in DNS messages". What do they mean by "encoded"?

    State whether the data is in ascii or binary format in the messages.

    When I try logging in on the graphical console, I get an error about a missing entry in /etc/hosts. What is this?

    This means someone forgot to restore the /etc/hosts files on the PCs to their original state after changing them in lab 8. Switch to a text console (control-alt-f1), log in, uncomment (or add) this line to /etc/hosts:
    127.0.0.1 PC2 localhost.localdomain
    
    This example assumes PC2's hostfile is broken. Be sure to change "PC2" to the proper name of the PC. Switch to a graphical console (control-alt-f7), and log in. Let the TA know if you have any problems!

    Last updated 5/11/2004.