$29
CS 118 : Homework 6
Problem 1
Suppose two packets arrive to two different input ports of a router at exactly the same time. Also suppose
there are no other packets anywhere in the router.
(a) Suppose the two packets are to be forwarded to two different output ports. Is it possible to forward
the two packets through the switch fabric at the same time when the fabric uses a shared bus?
(b) Suppose the two packets are to be forwarded to two different output ports. Is it possible to forward the
two packets through the switch fabric at the same time when the fabric uses switching via memory?
(c) Suppose the two packets are to be forwarded to two different output ports. Is it possible to forward
the two packets through the switch fabric at the same time when the fabric uses a crossbar?
Write your solution to Problem 1 in this box
Page 1 of 5
CS 118 Spring 2020 : Homework 6
Problem 2
Consider a router that interconnects three subnets: Subnet 1, Subnet 2, and Subnet 3. Suppose all of the
interfaces in each of these three subnets are required to have the prefix 224.1.17.0/24. Also suppose that
Subnet 1 is required to support at least 60 interfaces, Subnet 2 is to support at least 90 interfaces, and Subnet
3 is to support at least 8 interfaces. Provide three subnet addresses (of the form a.b.c.d/x) that satisfy the
constraints. You may use the following link to help verify your result: http://jodies.de/ipcalc.
Write your solution to Problem 2 in this box
Page 2 of 5
CS 118 Spring 2020 : Homework 6
Problem 3
Consider sending a datagram with total length 2400 B into a link that has an MTU (maximum transmission
unit) of 800 B. Suppose the original datagram is stamped with the identification number 421 and all IP
headers are 20 bytes.
(a) How many fragments are generated?
(b) What are the values in the various fields (header length, total length, identification, MF flag, and
fragment offset) in the IP datagram(s) generated related to fragmentation?
Write your solution to Problem 3 in this box
Page 3 of 5
CS 118 Spring 2020 : Homework 6
Problem 4
Please answer the following questions regarding checksum.
(a) Why is the IP header checksum recalculated at every router?
(b) What is covered by IP checksum and TCP checksum?
Write your solution to Problem 4 in this box
Page 4 of 5
CS 118 Spring 2020 : Homework 6
Problem 5
In this problem we will explore the impact of NATs on P2P applications. Suppose a peer with username
Arnold discovers through querying that a peer with username Bernard has a file it wants to download. Also
suppose that Bernard and Arnold are both behind a NAT. Try to devise a technique that will allow Arnold
to establish a TCP connection with Bernard without application-specific NAT configuration. If you have
difficulty devising such a technique, discuss why.
Write your solution to Problem 5 in this box
Page 5 of 5