1. Suppose that the following changes were made to the base code provided in order to implement neighbor discovery (Assume all class variables have been declared appropriately): public void start() { this.newNeighbors = new HashMap(); this.neighbors = new HashMap(); this.pktSeq = 0; addTimer(10, "discoverNeighbors"); } public void onReceive(Integer from, byte[] msg) { Packet pkt = Packet.unpack(msg); this.newNeighbors.put(new Integer(pkt.getSrc()), null); } public void discoverNeighbors() { Iterator iter = this.neighbors.keySet().iterator(); while(iter.hasNext()) { Integer n = (Integer)iter.next(); if(!this.newNeighbors.containsKey(n)) { System.out.println("Neighbor " + n + " lost!"); } } this.neighbors = this.newNeighbors; this.newNeighbors = new HashMap(); Iterator iter = this.neighbors.keySet().iterator(); while(iter.hasNext()) { Packet ping = new Packet(Packet.BROADCAST_ADDRESS, this.addr, Packet.MAX_TTL, Protocol.PING_PKT, this.pktSeq, Utility.stringToByteArray("Neighbor Discovery")); send(((Integer)iter.next()).intValue(), ping); } this.pktSeq += 1; addTimer(10, "discoverNeighbors"); } Assuming all other nodes in the network implement flooding correctly as specified in fishnet1, describe the problems with the above solution. 2. In fishnet2, we used Link State Routing to determine routes to each node in the network. The LSP sent out by a node lets every other node in the network who its neighbors are, and this sharing of information enables every node to determine the shortest path to any other node. Instead, consider a situation where every node is responsible for discovering the routes on its own and it can then include the route within the packet for nodes along the path to forward accordingly. How would you discover the routes to all other nodes in the network in this new scenario? Outline the strategy you would employ in terms of the packets you would send out and how the algorithm would proceed. 3. Modify the client/server source code discussed/presented in class to allow a server to accept and service multiple client connections simultaneously. A client can connect and then send a stream of characters to the server. Ctrl-C closes terminates the client and closes the connection As the server receives characters, it prints them on the screen, together with address and the port of the source, such as: Received message from 128.95.1.4.2999: "Hi Mom." (meaning that a message was received from IP address 128.95.1.4, port 2999) Multiple clients can connect to the server simultaneously, Test your code by connecting from three different clients at the same time. You should turn in: - the output - the client and server source code 4. a) What problem does poison reverse solve? b.) Give a scenario where poison reverse does not work. 5. Consider a network of N nodes where each node has K links. Give and explain the upper and lower bound on the number of messages that the protocol should send in order for the following two routing protocols to reach steady state. a. Link state b. Distance Vector Questions from the book: Chapter 5: 9 15 16 36a