Homework Assignment #3 Due Oct 27 @ 3:50 PM EE122: Introduction to Communication Networks (Fall 2008) Department of Electrical Engineering and Computer Sciences College of Engineering University of California, Berkeley Submission: Mail your solutions to dzats@eecs.berkeley.edu 1. Nodes A, B, and C are connected together using a non-switched Ethernet medium as shown below. Assume that (i) A, B, and C all transmit at 100Mbps, (ii) a wire propagation speed of 2*10 8 m/s, (iii) no channel coding (i.e. no Manchester encoding, etc.). a. Nodes A and C start transmitting to B at the same time. The distance from A to B as well as the distance from B to C is 1024 meters. How large must the frame be for this collision to be detected? 2*1024m*(1/(2*10 8 m/s))*(100*10 6 b/s) = 1024 bits So, the frame must be at least 1025 bits long. b. What will occur at the link layer if we transmit a packet smaller than that calculated in (a)? How will this affect the application layer? The packet will fail the CRC check at B and be dropped. No linklayer retransmission will occur. What effects the application layer will see will depend on the transport protocol being used. If TCP is being used, the application will notice a performance hit, if UDP is being used, the application will notice missing data. c. What is the approximate efficiency of the local area network described above? Efficiency = 1/(1+5d prop /d trans ) d prop = 2*1024m*(1/(2*10 8 m/s)) = 10.24µs d trans = 1526B/(100*10 6 b/s *1B/8b) = 0.12msec Efficiency = 1/(1+5(10.24*10-6 )/(0.12*10-3 )) = 0.7 d. If the distance from A to B as well as the distance from B to C is now 10 meters, what will be the values for (a) and (c)? Why is this significant? 2*10m*(1/(2*10 8 m/s))*(100*10 6 b/s) = 10 bits. So the frame will have to be at least 11 bits long. d prop = 2*10m*(1/(2*10 8 m/s)) = 0.1µs
Efficiency = 1/(1+5(0.1*10-6 )/(0.12*10-3 )) = 0.996 This shows why the standards impose limits on the length of wires used in Ethernet. 2. Now assume that nodes A, B, C, and D are connected through switch X as shown below: a. A malicious user takes over node A to snoop packets generated in this network. Describe specifically which packets the user will be able to see if he sets the network interface to promiscuous mode. Which packets will the user be unable to see? Why? The user will be able to see all packets that originate from or are sent to nodes A and B. He will be unable to see the packets sent between C and D because the switch will not forward those packets. b. Now the malicious user in A has a new ability: he can change his source MAC address to any value he wishes. How would he use this new ability to starve node C of the packets destined for it? Would C still get some packets? If so, from whom and why? What could C do to thwart Aʼs attempts? He would set his MAC address to Cʼs MAC address. He would then send a packet with that address to any of the nodes in the network. This would cause the switch to believe that C is on the other side and forward Cʼs packets to A. C would still see packets from D because of the nature of the broadcast medium. C could thwart Aʼs attempts by sending packets to any node. The switch would then re-learn the correct location of C. However, C will not be fully immune from A because A could keep sending packets from Cʼs MAC address, thereby causing the switch to re-learn the wrong location of C. c. Say there is no longer a malicious user and that node C is actually a laptop that moves on the other side of the switch to join A and B. One of two things must occur before D will be able to communicate with C. What are they? Either C must send a packet that will allow the switch to learn that C is on the other side or the entry in the switch for the location of C must expire.
3. Assume the following configuration where C is connected to A and B through router X: a. B has a packet to send to A. What is the process of sending the message if all of the ARP caches are empty? For every message sent or received, specify the source and destination MAC addresses. For every ARP message, also specify the information it must include. For every IP message, also specify its source and destination IP addresses. 1. B sends an ARP request with dest MAC = FF:FF:FF:FF:FF:FF, src MAC = C3:D4:67:B3:A4:C2. The request includes IP address 137.62.31.2 2. A sends an ARP reply with dest MAC = C3:D4:67:B3:A4:C2, src MAC = A7:62:19:BF:C3:A2. This reply includes the IP address of A. 3. B sends the IP message with src MAC = C3:D4:67:B3:A4:C2, dest MAC = A7:62:19:BF:C3:A2. This message includes Bʼs IP address as the source address and Aʼs IP address as the destination address. b. Repeat (a) when B has a packet to send to C. 1. B sends an ARP request with dest MAC = FF:FF:FF:FF:FF:FF, src MAC = C3:D4:67:B3:A4:C2. The request includes IP address 137.62.31.1 2. The router sends an ARP reply with dest MAC = C3:D4:67:B3:A4:C2, src MAC = C7:D4:A6:78:A1:61. This reply includes the IP address of the router. 3. B sends the IP message with src MAC = C3:D4:67:B3:A4:C2, dest MAC = C7:D4:A6:78:A1:61. This message includes Bʼs IP address as the source address and Cʼs IP address as the destination address. 4. The router sends an ARP request with dest MAC = FF:FF:FF:FF:FF:FF, src MAC = AF:76:9D:73:60:BC, This request includes IP address 128.32.64.2 5. C sends an ARP reply with dest MAC= AF:76:9D:73:60:BC,
src MAC = FE:64:7A:4B:81:A7. This reply contains the IP address of C. 6. The router sends the IP message with src MAC = AF:76:9D:73:60:BC, dest MAC = FE:64:7A:4B:81:A7. This message includes Bʼs IP address as the source address and Cʼs IP address as the destination address. c. What is the point of the ARP cache? To minimize having to send so many messages for every IP message we have to send. 4. Assume node A is connecting to a network with a DHCP server and is not manually configured: a. What value is the IP source address field set to in the DHCP discovery message the client will send? Why? It is set to 0.0.0.0 because the client does not have an IP address yet. b. Why must all of the DHCP messages be broadcast? The messages from the client are broadcast because it does not know the address of the DHCP server. The messages to the client must be broadcast because the client is not allowed to use an IP address until the configuration process is complete. c. Say node A is a laptop that was connected to another wireless network and was downloading a file. If this laptop connects to this network, will the TCP connection be broken? Why? Assume that the DHCP messages are instantaneous. Yes, because the location in the network of A and hence its IP address has changed. The server will keep trying to send to the old location and will not comprehend the new packets from A as coming from that connection. 5. Given the following network topology, fill in the table showing the stepby-step operation of the link-state algorithm. 6. Assume the following network topology:
a. Show how the Distance Vector algorithm would operate in this case by filling in the following tables: Initialization of node A: Initialization of node B: Initialization of node C: All of the nodes will send their distance vectors to their neighbors. Resulting state of node A: Resulting state of node B:
Resulting state of node C: Only nodes A and C will send their distance vectors to their neighbors. Final state of node A: Final state of node B: Final state of node C: b. The link from B to C changes its value to 5. Would Poison reverse be valuable here? Why or why not? No, because this change in value does not cause a loop. c. Now assume that the value of the link from A to B is actually 1. How would this change your answer for (b)? Poison reverse would be valuable here because when the change in value occurs, A tries to route through B to get to C, while B tries to route through A to get to C.