Sie sind auf Seite 1von 5

Chapter 4 Assignment

(009397180)

P1. In this question, we consider some of the pros and cons of virtual-circuit and datagram networks. a. Suppose that routers were subjected to conditions that might cause them to fail fairly often. Would this argue in favor of a VC or datagram architecture? Why? b. Suppose that a source node and a destination require that a fixed amount of capacity always be available at all routers on the path between the source and destination node, for the exclusive use of traffic flowing between this source and destination node. Would this argue in favor of a VC or datagram architecture? Why? c. Suppose that the links and routers in the network never fail and that routing paths used between all source/destination pairs remains constant. In this scenario, does a VC or datagram architecture have more control traffic overhead? Why? Sol. a) Datagram: In the case of connection-oriented network, every router failure will involve the routing of that connection. At a minimum, this will require the router that is upstream from the failed router to establish a new downstream part of the path to the destination node, with all of the requisite signaling involved in setting up a path. Moreover, all of the routers on the initial path that are downstream from the failed node must take down the failed connection, with all of the requisite signaling involved to do this. Whereas in the case of connectionless datagram network, no signaling is required to either set up a new downstream path or take down the old downstream path. b) VC: In this case in order for a router to maintain an available fixed amount of capacity on the path between the source and destination node for that source-destination pair, it would need to know the characteristics of the traffic from all sessions passing through that link. That is, the router must have per-session state in the router. This is possible in a connection-oriented network, but not with a connectionless network. Thus, a connectionoriented VC network would be preferable. c) In this scenario, datagram architecture has more control traffic overhead. This is due to the various packet headers needed to route the datagrams through the network. But in VC

architecture, once all circuits are set up, they will never change. Thus, the signaling overhead is negligible over the long run.

P10. Consider a datagram network using 32-bit host addresses. Suppose a router has four links, numbered 0 through 3 and packets are to be forwarded to the link interfaces as follows: Destination Address Range 11100000 00000000 00000000 00000000 through 11100000 00111111 11111111 11111111 11100000 01000000 00000000 00000000 through 11100000 01000000 11111111 11111111 11100000 01000001 00000000 00000000 through 11100001 01111111 11111111 11111111 otherwise 3 2 1 0 Link Interface

a. Provide a forwarding table that has five entries, uses longest prefix matching, and forwards packets to the correct link interfaces. b. Describe how your forwarding table determines the appropriate link interface for datagrams with destination addresses: 11001000 10010001 01010001 01010101 11100001 01000000 11000011 00111100 11100001 10000000 00010001 01110111 Sol. a) Destination Prefix 11100000 00 11100000 01000000 1110000 Otherwise Link Interface 0 1 2 3

b) First address corresponds to link interface 3. Second address corresponds to link interface 2. Third address corresponds to link interface 2.

P11. Consider a datagram network using 8-bit host addresses. Suppose a router uses longest prefix matching and has the following forwarding table: Prefix 00 010 011 10 11 Match Interface 0 1 2 2 3

For each of the four interfaces, give the associated range of destination host addresses and the number of addresses in the range. Sol. The datagram is using 8 bit host addresses 0 0 _ _ _ _ _ _ range is 2^6. Minimum is 0 0 0 0 0 0 0 0 = 0. Maximum is 0 0 1 1 1 1 1 1 = 63.

0 1 0 _ _ _ _ _ range is 2^5. Minimum is 0 1 0 0 0 0 0 0 = 64. Maximum is 0 1 0 1 1 1 1 1 = 95.

0 1 1 _ _ _ _ _ range is 2^5. Minimum is 0 1 1 0 0 0 0 0 = 96. Maximum is 0 1 1 1 1 1 1 1 = 127.

1 0 _ _ _ _ _ _ range is 2^6 Minimum is 1 0 0 0 0 0 0 0 = 128. Maximum is 1 0 1 1 1 1 1 1 = 191.

1 1 _ _ _ _ _ _ range is 2^6 Minimum is 1 1 0 0 0 0 0 0 = 192. Maximum is 1 1 1 1 1 1 1 1 = 255.

P16. Consider a subnet with prefix 128.119.40.128/26. Give an example of one IP address (of form xxx.xxx.xxx.xxx) that can be assigned to this network. Suppose an ISP owns the block of addresses of the form 128.119.40.64/26. Suppose it wants to create four subnets from this block, with each block having the same number of IP addresses. What are the prefixes (of form a.b.c.d/x) for the four subnets? Sol. Given 128.119.40.128/26 (128.119.40.10000000) No.of host bits in the given address are 6 bits In this the starting ip address is 128.119.40.129 (128.119.40.10000001) Ending ip address is 128.119.40.190 (128.119.40.10111110) Broadcast address is 128.119.40.191 (128.119.40.10111111) So ip address range is 128.119.40.128----128.119.40.191

Given 128.119.40.64/26 For this the number of host addresses are 64-2=62 addresses We have to create 4 equal subnets. So 64/4=16 addresses. 16 addresses are possible with subnet /28 They are 128.119.40.64/28, 128.119.40.80/28, 128.119.40.96/28, 128.119.40.112/28.

P19. Consider sending a 2400-byte datagram into a link that has an MTU of 700 bytes. Suppose the original datagram is stamped with the identification number 422. How many fragments are generated? What are the values in the various fields in the IP datagram(s) generated related to fragmentation?

Sol: Fragments 1st fragment 2 fragment 3rd fragment 4th fragment


nd

Bytes 680 680 680 340

Identification Number 422 422 422 422

Offset 0 85 170 255

Flag flag=1 flag=1 flag=1 flag=0

Das könnte Ihnen auch gefallen