CSC 41200 Computer Networks (Section T)

 

Last Updated: Sunday, May 08, 2005

 

 

Instructor: T. Rahman

 

Announcements:

·        Networking Lab is open from Monday to Thursday, 2pm-4pm. Room: NAC 7/309.

·        Send me an email if you are interested to work in the lab and also if you have participated on the lab.

 

 

Lab Notes:

·        Send me an email if the lab setup does not work or you find the configurations changed.

·        Please login your lab activities and send me an email of your lab.

·        The figure below shows the lab connectivity. Do not touch the Ethernet cables for whatever reasons.

 

Figure 1: Lab Network Connectivity Diagram

 

 

Lab Prerequisites:

 

Lab users are expected to have UNIX user level experience. (login / logout / edit files using vi)

If you do not have user level experience please learn UNIX first. It is really easy. (See introduction in http://www.tldp.org/guides.html)

 

Lab #1: Routing

 

  1. Login into Router1 as root.
  2. Type #/sbin/ifconfig to see configurations for all the interfaces.
  3. Type #ping 100.10.10.1 to test the local address. #Ctrl-c to stop pinging.
  4. Type #ping 200.10.10.1 to test the local address. #Ctrl-c to stop pinging.
  5. Type #ping 12.1.1.1 to test the local address. #Ctrl-c to stop pinging.
  6. Try to ping Router2. How are you going to reach Router2? Which IP address? Try reaching both.
    1. Type #ping 150.10.10.3. Ctrl-c to stop pinging.
    2. Type #ping 200.10.10.3. Ctrl-c to stop pinging.
  7. Why do you think 150.10.10.3 does not respond?
  8. Does Router1 know how to get to 150.10.10.x subnet? Let us find out.
    1. Type #netstat –nr. This will print out the routing table (-r option) in number format (-n option).
    2. Ok so Router1 does not know about 150.10.10.x subnet. We shall update its routing table then.
    3. Type #route add -net 150.10.10.0 netmask 255.255.255.0 dev eth1 (We tell it to go via 200.10.10.0 subnet).
    4. Type #ping 150.10.10.3. Ctrl-c to stop pinging. Does it respond? Why not?
  9. Does Router3 know for to forward IP packets from one interface to another? Let us check.
    1. Login into Router3 as root.
    2. Type #/sbin/ifconfig to see configurations for all the interfaces.
    3. Type #ping 100.10.10.3 to test the local address. #Ctrl-c to stop pinging.
    4. Type #ping 150.10.10.3 to test the local address. #Ctrl-c to stop pinging.
    5. Type #ping 24.1.1.3 to test the local address. #Ctrl-c to stop pinging.
    6. Type #cat /proc/sys/net/ipv4/ip_forward (You should see 0 meaning no IP forwarding.)
    7. Type #echo “1” /proc/sys/net/ipv4/ip_forward (Now it should be forwarding packets.)
    8. Type #cat /proc/sys/net/ipv4/ip_forward (You should see 1 meaning IP forwarding ok.)
  10. Go back to Router1 and try to ping 150.10.10.3 again. Does it work?