hw3 Soln
hw3 Soln
hw3 Soln
Homework 3
Due by 1:25 PM MT, Monday March 5th 2012
Important:
No cheating will be tolerated.
No Late Submission will be allowed.
Total points for 5480 = 37
Total points for 6480 = 44
Question 1 (IP/TCP Headers) 3 points: Look at the 40byte dump of an IP packet
containing a TCP segment below.
45 20 03 c5 78 06 00 00 34 06 ca 1f d1 55 ad 71 c0 a8 01 7e
00 50 9a 03 3e 64 e5 58 df d0 08 b3 80 18 00 de 00 02 00 00
Identify all the fields of the IP and TCP header.
IP header: IP version 4, Header Length: 20 bytes, ToS = 20, Total Length = 0x03c5 =
965 bytes, Identification = 0x7806, Flags = 0, Fragment offset = 0, TTL = 0x34 = 52,
Proto = TCP, Header Checksum = 0xca1f, Source IP address = 209.85.173.113,
Destination IP address = 192.168.1.126.
TCP header: src port = 80, destination port = 39427, sequence number =0x3e64e558, ack
number = 0xdfd008b3, header length = 8*4 = 32bytes, unused = 0, flags : URG = 0,
ACK = 1, PSH =1, RST =0, SYN = 0, FIN = 0, receive window = 0x000de, Internet
checksum = 0x0002, urgent data pointer = 0.
Question 2 (IP Fragmentation) 2 points: 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?
The maximum size of data field in each fragment = 680 (because there are 20 bytes IP
header). Thus the number of required fragments
Each fragment will have Identification number 422. Each fragment except the last one
will be of size 700 bytes (including IP header). The last datagram will be of size 360
bytes (including IP header). The offsets of the 4 fragments will be 0, 85, 170, 255. Each
of the first 3 fragments will have flag=1; the last fragment will have flag=0.
Question 3 (IP addressing) 4 points:
(a) (2 points) 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 223.1.17/24. Also suppose that Subnet 1 is required to support up to 63
1
Step
D(t),p(t)
D(u),p(u)
D(v),p(v)
D(w),p(w)
D(y),p(y)
D(z),p(z)
0
1
2
3
4
5
6
x
xv
xvu
xvuw
xvuwy
xvuwyt
xvuwytz
7,v
7,v
7,v
7,v
7,v
7,v
6,v
6,v
6,v
6,v
6,v
6,v
3,x
3,x
3,x
3,x
3,x
3,x
3,x
6,x
6,x
6,x
6,x
6,x
6,x
6,x
6,x
6,x
6,x
6,x
6,x
6,x
6,x
8,x
8,x
8,x
8,x
8,x
8,x
8,x
(b) (3 points) Consider the three-node topology shown on slide 4-89. Let the link costs be
c(x,y) = 3, c(y,z) = 6, c(z,x) = 4. Compute the distance tables after the initialization step
and after each iteration of the distance-vector algorithm as done for the example on slide
4-89.
Node x table
Cost to
x
From y
z
x
0
y
3
z
4
x
From y
z
x
0
3
4
Cost to
y
3
0
6
z
4
6
0
x
From y
z
Cost to
y
x
From y
z
x
0
3
4
Cost to
y
3
0
6
z
4
6
0
x
From y
z
Cost to
x
y
4
6
x
From y
z
x
0
3
4
Cost to
y
3
0
6
z
4
6
0
Node y table
Node z table
(c) (3 points) Consider the count-to-infinity problem in the distance vector routing. Will
the count-to-infinity problem occur if we decrease the cost of a link? Why? How about if
we connect two nodes which do not have a link?
NO, this is because that decreasing link cost wont cause a loop (caused by the next-hop
relation of between two nodes of that link). Connecting two nodes with a link is
equivalent to decreasing the link weight from infinite to the finite weight.
(d) (4 points) Consider the network shown below. Suppose AS3 and AS2 are running
OSPF for their intra-AS routing protocol. Suppose AS1 and AS4 are running RIP for
their intra-AS routing protocol. Suppose eBGP and iBGP are used for the inter-AS
routing protocol. Initially suppose there is no physical link between AS2 and AS4.
a. Router 3c learns about prefix x from which routing protocol: OSPF, RIP, eBGP, or
iBGP?
b. Router 3a learns about x from which routing protocol?
c. Router 1c learns about x from which routing protocol?
d. Router 1d learns about x from which routing protocol?
a. eBGP
b. iBGP
c. eBGP
d. iBGP
(e) (3 points) Referring to the above problem, once router 1d learns about x it will put an
entry (x, I) in its forwarding table.
a. Will I be equal to I1 or I2 for this entry? Explain why in one sentence.
b. Now suppose that there is a physical link between AS2 and AS4, shown by the dotted
line. Suppose router 1d learns that x is accessible via AS2 as well as via AS3. Will I be
set to I1 or I2? Explain why in one sentence.
c. Now suppose there is another AS, called AS5, which lies on the path between AS2 and
AS4 (not shown in diagram). Suppose router 1d learns that x is accessible via AS2 AS5
AS4 as well as via AS3 AS4. Will I be set to I1 or I2? Explain why in one sentence.
a. I1 because this interface begins the least cost path from 1d towards the gateway router
1c.
b. I2. Both routes have equal AS-PATH length but I2 begins the path that has the closest
NEXT-HOP router.
c. I1. I1 begins the path that has the shortest AS-PATH.
(f) (2 points) Consider the figure on slide 4-119. B would never forward traffic destined
to Y via X based on BGP routing. But there are some very popular applications for which
data packets go to X first and then flow to Y. Identify one such application, and describe
how data packets follow a path not given by BGP routing.
BitTorrent file sharing and Skype P2P applications.
Consider a BitTorrent file sharing network in which peer 1, 2, and 3 are in stub networks
W, X, and Y respectively. Due the mechanism of BitTorrents file sharing, it is quire
possible that peer 2 gets data chunks from peer 1 and then forwards those data chunks to
3. This is equivalent to B forwarding data that is finally destined to stub network Y.
Question 6 (Broadcast and Multicast Routing) 7 points:
(a) (2 points) Consider the topology shown in Figure 4.44. Suppose that all links have
unit cost and that node E is the broadcast source. Using arrows like those shown in
Figure 4.44 indicate links over which packets will be forwarded using RPF, and links
over which packets will not be forwarded, given that node E is the source.