CS 457 - Fall 2012

Homework 3

Date assigned: Sept 19, 2012
Date due: Oct 1, 2012
Submission tag: HW3

  1. Problem 1 (10pts): Exercise 4.13 (p.362)
    Suppose hosts A and B have been assigned the same IP address on the same Ethernet, on which ARP is used. B starts up after A. What will happen to A's existing connections? Explain how "self-ARP" (querying the network on start up for one's own IP address) might help with this problem.

  2. Problem 2 (20pts): Exercise 4.17 (p.363)
    For the following figure, show how the link state algorithm builds the routing table for node D.



  3. Problem 3 (20pts): Exercise 4.21 (p.364)
    Suppose a router has built up the routing table as follows:
    128.96.39.0
    255.255.255.128
    Interface 0
    128.96.39.128
    255.255.255.128
    Interface 1
    128.96.40.0
    255.255.255.128
    R2
    128.96.153.0
    255.255.255.192
    R3
    Default

    R4
    The router can deliver packets directly over interfaces 0 and 1, or it can forward packets to routers R2, R3, or R4. Describe what the router does with packet addressed to each of the following destinations:
    a) 128.96.40.10
    b) 128.92.52.12
    c) 128.96.40.151
    d) 192.4.153.17
    e) 192.4.154.90

  4. Problem 4 (15pts): Exercise 4.41 (p.371)
    Suppose hosts A and B are on an Ethernet LAN with class C IP network address 200.0.0. It is desired to attach a host C to the network via a direct connection to B:

    Explain how to do this with subnets; give sample assignments. Assume that an additional network address is not available. What does this do to the size of the Ethernet LAN?

  5. Problem 5 (20pts): Exercise 4.42 (p.371)
    An alternative method for connecting host C in the above problem 4, is to use proxy ARP and routing: B agrees to route traffic to and from C, and also answers ARP queries for C received over the Ethernet.
    a) Give all packets sent, with physical address, as A uses ARP to locate and then send one packet to C.
    b) Give B's routing table. What peculiarity must it contain?

  6. Problem 6 (15pts): netstat - Print network connections, routing tables, interface statistics
    Read the manual page for the command "netstat" to understand the different options. Explain at least four options. Run the command on the machines in the lab and explain output.
    Now, ssh to another machine in the lab and run your chat server (project 1) on it. On your machine run the chat client and connect to server (Make sure connection works by exchanging couple of messages). Keep it running and in another terminal run netstat command and see if the machine you ran your server on appears in the output.
    a) What does this mean ?
    b) What protocol is the connection using ?
    c) What is the state of connection ? And what are other possible states ?
    d) What port is the client running on ? (Don't make changes to your client code, use netstat to figure out). Show output that helped you know the port number.


All exercise numbers and page numbers are according to 4th Edition of the Textbook.

Submission Guidelines:
Submit your homework via email to the TA. The homework solutions must be typed, no hand written homeworks. Format of the file must be .txt or .pdf. Name your submission file as follows:

FIRSTNAME_LASTNAME_HW3.txt/.pdf

For example, John_Smith_HW3.pdf. The subject line of your email must be CS457 Submission: John_Smith_HW3.pdf
For questions regarding this homework email the TA with subject line CS457 Query: Regarding HW3

Note: All homework assignments are individual assignments. Please do your own work.