IS 333 Lab 3: Setting up a LAN using hubs and switches


*** = write down and submit answers to these questions/problems. I recommend you use a google doc to record your answers.

Purpose

In this exercise, you will create your own private LAN out of 3 computers and a hub, and then change the LAN's configuration a few times.

Record your answers to the questions marked *** for submission.

1. Getting Started

"Trio up" with 2 others to form a group of 3 people, each with a computer. On each computer, login asmradmin, and open a terminal window. Get 3 Sticky Notes from your prof.

2. Create your Own Private LAN with a Hub (or 2)

On each computer, do the following: Pull out any non-yellow Ethernet cables.  Run ifconfig, and write on the Sticky Note the MAC address and port name of the port that the yellow Ethernet cable is plugged in to.  Attach the sticky note to the machine near the port.  

Disconnect all machines in your workgroup from the lab network by pulling out the yellow cable. Get a hub and 3 ethernet cables from your benevolent professor. Plug all 3 computers into the hub. Make sure the little green lights on the front of the hub are on.  Run ifconfig to see if the interface is up and see that it has no IP address.  *** How does ifconfig indicate that an interface is up -- i.e., attached to a cable? ***

2.1. Assigning IP addresses

Assign IP addresses to each machine -- use any network part and host part that you want. To assign an IP address, use ifconfig. As the output of man ifconfig and ifconfig --help is pretty confusing, I'll show you how I set up my IP addresses on a machine in my workgroup:

sudo ifconfig eth1 15.0.0.2/24

On one of the other machines in my workgroup, I needed to use eth0, and I chose 15.0.0.3/24. You can use any network part and host part, as I said, but all three of your computers have to be on the same network. Document how you have set up your computers. ***

Make sure all machines can ping each other. Run wireshark on "computer 1" to observe the packets that fly by when you ping each machine.  Run arp -n on a machine or two to see the arp table (the mapping between an IP address and its MAC address).

Question: do you see the ping packets on computer 1 if you are pinging between computer 2 and computer 3? *** If so, what can you learn from this about the operation of a hub? ***


2.2 Using 2 Hubs

Next, set up 2 hubs in your little network: Connect Computer 1 to hub 1, then hub 1 to hub 2, then hub 2 to computer 2 and computer 3. Make sure all computers can ping each other. When connecting hub 1 to hub 2 make sure the little green lights come on.

NOTE: I've found that when you use ifconfig to assign an IP address to an interface, if you unplug the cable from the interface, the IP address goes away. So, you'll have to use ifconfig repeatedly to set the IP address on the interface. (Later, we'll figure out how to make the IP address setting permanent.)

If the lights don't come on, make sure you are using port 4 on each hub. If the lights still don't come on, check out this website that talks about needing, or not needing, a crossover cable.

Question: What did you have to do to get the hubs to communicate with each other? ***

Now ping between computer 2 and computer 3. Do you see the ping packets in wireshark on computer 1? Should you? ***

Now, ping between computer 2 and computer 3 with a ping packet size of 50000. Observe wireshark output and note what is different this time. ***

Remove the 2nd hub and connect all computers to hub 1. Make sure all computers can ping each other. 

2.3 Switch to a switch

Replace your hub with a switch. Does communication still work? How does the amount of traffic you see on wireshark change when you use a switch instead of a hub? ***

3 Clean Up!

Remove all your ethernet cables and wrap them up nicely. Put your hubs and switches and their power cords back in the cabinet. Connect your machines to the systems lab network, and reboot each machine. Make sure it comes up and can reach the systems lab server. Then, log out.

Submit your answers to this lab via Moodle.


Turn in

Turn in the answers to the questions marked *** by submitting the file via Moodle.

Grading Rubric:

20 points total:

5 points: All questions are answered

5 points: Depth of information/investigation.

10 points: Correctness.