cs

1. We can already build networks with links and switches and send fr..so then why do we need network layer?
     The above design does not scale to large network – can blow up of routing table, broadcast will bring the network down. Doesn’t work across for more than one link layer tech like WIFI, 3G. Not much control over the traffic
2. Describe the steps of the shortest path finding Dijkstra’s Algorithm.
     Start with source. Set distance at other nodes to infinity (∞) but source note to zero (0). Relax distance to other nodes. Pick the lowest distance node, add it to source tree .Repeat until all nodes are in the source tree.
3. Briefly describe the steps of Distance Vector Routing Algorithm.
     Each node knows distance of links to its neighbors. Each node advertises vector of lowest known distances to all neighbors. Each node uses received vectors to update its own. Repeat periodically
4. Give two example computer applications for which connection-oriented service is appropriate. Now give two examples for which…
     File transfer, remote login, and video on demand need connection- oriented service. Credit card verification and other point-of-sale terminals, electronic funds transfer inherently connectionless.
5. If costs are recorded as 8-bit numbers in a 50-router network, and distance vectors are exchanged twice a second, how much bandwidth per …? 
     The routing table is 400 bits ( 8×50=400),Twice a second this table is written onto each line, so 800 bps are needed.
6.  An IP datagram using the strict source routing option has to be fragmented.Do you think the option is copied into each fragment,…?
     The info is needed to route every fragment, so it must appear in all of them.
7. a.) Convert the IP address whose hexadecimal representation is C22F1582 to dotted decimal notation . b.) A network on the Internet has a subnet mask of 255.255.240.0. What is the max # of host? 
    a.). The address is 194.47.21.130
    b.) The mask is 20 bits long, so the network part is 20 bits. The remaining         12 bits are for the host, so 2^12 or, 4096 host addresses exist.
8. While IP addresses are tied to specific networks, Ethernet addresses are not. Can you think of a good reason why they are not?
     Each Ethernet adapter sold in stores comes hardwired with an Ethernet address in it manufacturer has no idea where in the world the card will be used, making the address useless for routing. IP addresses are either assigned either statically or dynamically by an ISP or company, which knows exactly how to get to the host getting the IP address.
9.  a.)  A router has just received the following new IP addresses: 57.6.96.0/21, 57.6.104.0/21, 57.6.112.0/21, and 57.6.120.0/21. If all of them use…?  b.) The set of IP addresses from 29.18.0.0 to 19.18.128.255 has been aggregated to 29.18.0.0/17. However, there is a gap of 1024 unassigned addresses from 29.18.60.0 to 29.18.63.255 that are now suddenly assigned to a host using a diffe…?
    a.) They can be aggregated to 57.6.96.0/19.
    b.) It is sufficient to add one new table entry: 29.18.60.0/22 for the new block. If an incoming packet matches both 29.18.0.0/17 and 29.18.60.0./22, the longest one wins. This rule makes it possible to assign a large block to one outgoing line but make an exception for one or more small blocks within its range.
10. Describe a way to reassemble IP fragments at the destination
Fragments may arrive out of order and some may be missing. On a retransmission, the datagram may be fragmented in different-sized chunks. Furthermore, the total size is not known until the last fragment arrives. only way to handle reassembly is to buffer all the pieces until the last fragment arrives and the size is known. Then build a buffer of the right size, and put the fragments into the buffer, maintaining a bit map with 1 bit per 8 bytes to keep track of which bytes are present in the buffer. When all the bits in the bit map are 1, the datagram.
11. A group of N stations share a 56-kbps pure ALOHA channel. Each station outputs a 1000-bit frame on average once every 100… max N?
With pure ALOHA, the usable bandwidth is 0.184 x 56 kbps = 10.3 kbps. Each station requires to send 1000 bits in 100 sec or, 10 bps, so N = 10300/10 = 1030 stations.
12. Consider the delay of pure ALOHA versus slotted ALOHA at low load. less?
With pure ALOHA, transmission can start instantly. At low load, no collisions are expected so the transmission is likely to be successful. With slotted ALOHA, it has to wait for the next slot. This introduces half a slot time of delay
13. Give two reasons why networks might use an error-correcting code instead of error detection and retransmission.
First reason is the need for real-time quality of service. If an error is discovered, there is no time for a retransmission. The show must go on. Forward error correction can be used here. Second reason is that on very low-quality lines (e.g., wireless channels), the error rate can be so high that practically all frames would have to be retransmitted, and the retransmissions would probably damage as well. 
14. a.) Briefly describe the difference between store-and-forward and cut-through switches. b.) tore-and-forward switches have an advantage..expl?
    a.) A store-and-forward switch stores each incoming frame in its entirety, then examines it and forwards it. A cut-through switch starts to forward incoming frames before they have arrived completely. As soon as the destination address is in, the forwarding can begin.
   b.) store-and-forward switches store entire frames before forwarding them. After a frame comes in, the checksum can be verified. If the frame is damaged, it is discarded immediately. With cutthrough, damaged frames cannot be discarded by the switch because by the time the error is detected, the frame is already gone. Trying to deal with the problem is like locking the barn door after.