You are on page 1of 15

CS471/EE471/CS573: Fall 2013-2014 Handout # 31

Zartash Uzmi

Final Examination 2013-2014 – Solution


Allowed items: Calculators, Two A-4 hand-written help sheets (both sides)
Time Allowed: 3 hours (Monday, December 9, 2013 starting at 3:00pm)

“I certify that I have neither received nor given unpermitted aid on this examination
and that I have reported all such incidents observed by me in which unpermitted aid is
given.”

Signature

Name Student ID

IMPORTANT NOTE: In this course, and in this exam, 1 K means 1000 and not 1024.
Similarly, 1 M means 106 . Capital ‘B’ is used for bytes, while small ‘b’ is used for bits.
Therefore, 1 Kb/s is 1000 bits/sec, and 4 MB is 4×106 bytes. All addresses are IPv4 unless
specified otherwise.
We will prefer brief and to the point answers!
For questions that require numerical answers, make sure to compute a final answer
(calculators are allowed!); significant grade may be lost if you fail to compute a final answer.

Problem 1 [24]

Problem 2 [15]

Problem 3 [12]

Problem 4 [8]

Problem 5 [8]

Problem 6 [20]

Problem 7 [13]

Problem 8 [15]

TOTAL [115]

1
2
Problem 1: TCP congestion control [24 points]. Consider a TCP interaction between
a new TCP (Series 2 Reno) client and a server. The initial parameters at the client are
cwnd=1MSS and ssthresh=64000 bytes, with all packets containing 1MSS=1460 bytes. As-
sume that the server sends an ACK packet immediately after every packet (from client) is
received. As usual, the client starts in the slow start (SS) phase. In providing the answers
below, round off all answers to nearest byte at each step (with 0.5 rounding upwards, i.e.,
take 3.5 as 4). Perform calculations and provide all answers in bytes.
(a) [2 pts] After receiving 37 in-sequence ACK packets (without duplicates), is the client
operating in slow start (SS) or congestion avoidance (CA)? Why? (No reason, no credit!)
Solution: cwnd = 1460 + 37 × 1460 = 55480 < 64000. Thus, cwnd < ssthresh ⇒ SS
(b) [3 pts] After the first data packet is sent by the client, what is the minimum number
of in-sequence ACK packets the client would have received before it transitions from SS to
CA? [There is no error-carry-forward credit in this question, so it is important to get this
answer right for the remaining parts. You may buy the correct answer by raising your hand
and asking for an invigilator to check your answer. If it is correct, the invigilator will assign
marks and sign this part so you can move forward with full credit. If your answer is incorrect,
the invigilator will provide you the correct answer but you will not receive credit for this
part. Rest assured, you will have the correct answer to move forward.]
Solution: In SS, cwnd increases by one MSS with eack in-sequence ACK received. Let n is
the number to be found; need cwnd = 1460 + 1460n > 64000 ⇒ n > 42.83. Thus n = 43.
(c) [3 pts] Continuing from part (b), what are the values of cwnd and ssthresh as soon as
the client enters CA, before it receives any further ACK packet?
Solution: cwnd = 1460 + 43 × 1460 = 64240; ssthresh = 64000
(d) [3 pts] Continuing from part (b), the client receives another 4 in-sequence ACK packets.
What are the values of cwnd and ssthresh now? [You may buy the correct answer to this
part as well by raising your hand, again. Same conditions as in part(b) apply.]
Solution: ssthresh=64000. For each ACK packet received after the 43 ACK packets in
part(b), client is in CA, and cwnd progresses as follows:
1460×1460
After first ACK, cwnd is 64240 + 64240
≈ 64273
1460×1460
After second ACK, cwnd is 64273 + 64273
≈ 64306
1460×1460
After third ACK, cwnd is 64306 + 64306
≈ 64339
1460×1460
After fourth ACK, cwnd is 64339 + 64339
≈ 64372

3
(e) [3 pts] Continuing from above part, the client receives another 3 ACK packets with the
same ACK number as the one received in the last ACK packet of previous part (a triplicate
ACK). Knowing that the client was using new TCP (Series 2 Reno), what are the values of
cwnd and ssthresh now? Is the client operating in SS or CA?
64372
Solution: cwnd = ssthresh = 2
= 32186
(f ) [3 pts] If the 32-bit initial sequence number (ISN), i.e., the number of the first byte in
the first packet at the client was 735284 in this TCP interaction, what are the ACK numbers
in each of the triplicate packets in above part?
Solution: 735284 + 1460 × 47 = 803904
(g) [2 pts] Continuing from above parts, three (3) more in-sequence ACK packets (with a
higher ACK number than you found in above part) are received by the client. What are the
values of cwnd and ssthresh now? [You may buy the correct answer to this part as well by
raising your hand, yet again. Same conditions as in part(b) apply.]
Solution: The client is still in CA, and ssthresh is 32186. Once again, for each ACK
packet received beyond the ones in above parts, cwnd progresses as:
1460×1460
After first ACK, cwnd is 32186 + 32186
≈ 32252
1460×1460
After second ACK, cwnd is 32252 + 32252
≈ 32318
1460×1460
After third ACK, cwnd is 32318 + 32318
≈ 32384

(h) [2 pts] Continuing from above parts, the client never receives any additional ACK packets
until it times out. After this timeout event, what would be the values of cwnd and ssthresh?
Solution: cwnd = 1460; ssthresh = 16192
(i) [3 pts] If no further packets are lost, how many more in-sequence ACK packets (at
minimum) are needed by the client to move from SS to CA?
Solution: Let m is the number to be found; need cwnd = 1460 + 1460m > 16192 ⇒ m >
10.09. Thus m = 11 packets.

4
Problem 2: PING [15 points]. I captured the Wireshark traces in HEX on my desk-
top which was connected within my office—through an ethernet cable—to a wireless router
that was further connected to the University network. I recorded the ICMP echo request
(also called ping request) and the resulting response between my desktop machine and
mureekh.lums.edu.pk. First, the request made by my desktop machine:

0000 00 12 17 40 f2 cc 00 24 81 83 43 69 08 00 45 00 ...@...$ ..Ci..E.


0010 00 3c a2 f7 00 00 80 01 00 00 c0 a8 01 6e 6e 5d .<...... .....nn]
0020 c9 aa 08 00 8a 5a 02 00 c1 01 61 62 63 64 65 66 .....Z.. ..abcdef
0030 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76 ghijklmn opqrstuv
0040 77 61 62 63 64 65 66 67 68 69 wabcdefg hi

1) The leftmost number (four hex digits) on each line indicates the byte number of the
byte at the start of the line.

2) The Ethernet frame header is 14 bytes long. IP/ICMP payload starts right afterwards.

3) The IP/ICMP header is 20 bytes long. The first 9 bytes are useful but not relevant
to this question. The next 1 byte tells us the ICMP protocol type. The next 2 bytes
are for checksum (used for error detection) that you can also ignore for this question.
The next 4 bytes indicate the source IP address and the 4 bytes following that are the
destination IP address. ICMP related information follows immediately after this.

4) First two bytes in ICMP related information indicate the ICMP packet type and code
(both in HEX, one byte each). Next six bytes are not relevant to this question.

5) The remaining bytes indicate the data carried within the ICMP packet. Note the
equivalent ASCII on the rightmost column of the trace.

The trace for the ICMP echo response (which follows the same structure as the ICMP
echo request) received by my desktop is:

0000 00 24 81 83 43 69 00 12 17 40 f2 cc 08 00 45 00 .$..Ci.. .@....E.


0010 00 3c cd 6e 00 00 3b 01 b8 34 6e 5d c9 aa c0 a8 .<.n..;. .4n]....
0020 01 6e 00 00 92 5a 02 00 c1 01 61 62 63 64 65 66 .n...Z.. ..abcdef
0030 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76 ghijklmn opqrstuv
0040 77 61 62 63 64 65 66 67 68 69 wabcdefg hi

Using given traces, please answer the following:


(a) [1 pts] What is the IP address of mureekh.lums.edu.pk (in dotted decimal)?
Solution: 110.93.201.170

5
(b) [1 pts] What is the Ethernet address (hex ok!) of mureekh.lums.edu.pk?
Solution: Cannot find from the given data. A wireless router comes on the way!
(c) [1 pts] What is the IP address of my desktop (in dotted decimal)?
Solution: 192.168.1.110
(d) [1 pts] What is the Ethernet address (hex ok!) of my desktop?
Solution: 00:24:81:83:43:69
(e) [1 pts] What is the protocol type of ICMP?
Solution: 01
(f ) [1 pts] What is the type in ICMP echo request packet?
Solution: 08
(g) [1 pts] What is the type in ICMP echo response packet?
Solution: 00
(h) [1 pts] What is the code in ICMP echo request packet?
Solution: 00
(i) [1 pts] What is the code in ICMP echo response packet?
Solution: 00
(j) [1 pts] How many data bytes in ICMP echo request?
Solution: 32
(k) [1 pts] For ICMP echo request, from my desktop to mureekh.lums.edu.pk, is this a
direct delivery (using ARP for destination) or through a default gateway?
Solution: Through a default gateway/router.
(l) [2 pts] Justify your answer in above part?
Solution: Data given in the problem mentioned the existence of a wireless router between
my desktop and campus network (where mureekh.lums.edu.pk lies). Thus, two different
networks and the delivery must be through a default (or intermediate) gateway/router.
(m) [2 pts] For ICMP echo response, from mureekh.lums.edu.pk to my desktop, is this a
direct delivery (using ARP for destination) or through a default gateway? Why?
Solution: Through a default gateway/router, because the machine mureekh.lums.edu.pk
and my desktop are on different networks, separated at least by a wireless router.

6
Problem 3: Traceroute [12 points]. The Mureekh server resides on the University
network (at LUMS) and has a globally routable IP address. Executing traceroute on this
server gave the following response:
mureekh:~> traceroute www.ucla.edu
traceroute to www.ucla.edu (128.97.27.37), 30 hops max, 60 byte packets
1 tw201-static161.tw1.com (110.93.201.161) 0.439 ms 1.799 ms 1.979 ms
2 192.168.88.1 (192.168.88.1) 2.242 ms 4.156 ms 4.297 ms
3 192.168.15.5 (192.168.15.5) 4.427 ms 4.557 ms 6.523 ms
4 172.25.150.6 (172.25.150.6) 6.658 ms 6.936 ms 6.778 ms
5 110.93.200.251 (110.93.200.251) 7.615 ms 9.559 ms 10.035 ms
6 tw130-static176.tw1.com (119.63.130.176) 21.955 ms 20.429 ms 13.841 ms
7 tw255-static101.tw1.com (110.93.255.101) 25.231 ms 24.414 ms 25.343 ms
8 110.93.253.138 (110.93.253.138) 180.890 ms 181.573 ms 182.049 ms
9 xe-8-1-3.edge4.Frankfurt1.Level3.net (212.162.25.89) 182.758 ms 183.037 ms 182.875 ms
10 vlan90.csw4.Frankfurt1.Level3.net (4.69.154.254) 338.518 ms 338.665 ms
vlan60.csw1.Frankfurt1.Level3.net (4.69.154.62) 336.222 ms
11 ae-91-91.ebr1.Frankfurt1.Level3.net (4.69.140.13) 338.793 ms
ae-81-81.ebr1.Frankfurt1.Level3.net (4.69.140.9) 334.919 ms
ae-61-61.ebr1.Frankfurt1.Level3.net (4.69.140.1) 335.372 ms
12 ae-46-46.ebr2.Paris1.Level3.net (4.69.143.138) 331.140 ms
ae-47-47.ebr2.Paris1.Level3.net (4.69.143.142) 330.240 ms
ae-48-48.ebr2.Paris1.Level3.net (4.69.143.146) 331.750 ms
13 ae-42-42.ebr2.Washington1.Level3.net (4.69.137.54) 332.153 ms
ae-41-41.ebr2.Washington1.Level3.net (4.69.137.50) 332.278 ms
ae-44-44.ebr2.Washington1.Level3.net (4.69.137.62) 337.080 ms
14 ae-92-92.csw4.Washington1.Level3.net (4.69.134.158) 334.528 ms 335.950 ms 336.220 ms
15 ae-81-81.ebr1.Washington1.Level3.net (4.69.134.137) 330.538 ms
ae-71-71.ebr1.Washington1.Level3.net (4.69.134.133) 334.168 ms
ae-81-81.ebr1.washington1.level3.net (4.69.134.137) 331.161ms
16 ae-4-4.ebr3.LosAngeles1.Level3.net (4.69.132.81) 334.295 ms 334.575 ms 333.205 ms
17 ae-63-63.csw1.LosAngeles1.Level3.net (4.69.137.34) 335.983 ms
ae-73-73.csw2.LosAngeles1.Level3.net (4.69.137.38) 336.769 ms
ae-93-93.csw4.LosAngeles1.Level3.net (4.69.137.46) 335.512 ms
18 ae-3-80.edge5.LosAngeles1.Level3.net (4.69.144.139) 332.577 ms
ae-2-70.edge5.LosAngeles1.Level3.net (4.69.144.75) 331.526 ms
ae-4-90.edge5.LosAngeles1.Level3.net (4.69.144.203) 334.791 ms
19 CENIC.edge5.LosAngeles1.Level3.net (4.59.48.178) 329.791 ms 333.309 ms 331.908 ms
20 dc-lax-core1--lax-isp2-10ge.cenic.net (137.164.47.137) 325.409 ms 325.547 ms 324.753 ms
21 dc-lax-agg5--lax-core1-10ge.cenic.net (137.164.46.133) 321.973 ms 321.381 ms 320.674 ms
22 ucla--lax-agg1-10g.cenic.net (137.164.24.135) 312.001 ms 310.961 ms 311.676 ms
23 cr01f1.anderson--bd02f1.anderson.ucla.net (169.232.4.106) 311.812 ms 307.767 ms 308.379 ms
24 sr02fb.jsei--cr01f1.anderson.ucla.net (169.232.8.53) 320.837 ms 321.488 ms 321.189 ms
25 172.25.150.6 (172.25.150.6) 307.665 ms !X 308.415 ms !X 309.250 ms !X
mureekh:~>

(a) [2 pts] How many ICMP packets have been received by the Mureekh server?
Solution: 25 × 3 = 75. Each numbered line corresponds to three UDP packets sent out
(with the same TTL value) and three ICMP packets received back.
(b) [2 pts] Are all ICMP packets in above part of same type/code? Why? Why not?
Solution: All but the ones corresponding to the last line have same type/code (i.e., TTL
expired ). The last one is always different (either communication administratively prohibited,
as in this case, or port unreachable if the traceroute completes successfully). If traceroute
terminates abnormally, the last ICMP packets may be missing and, in that case, all ICMP
packets received by the traceroute application will just be indicating TTL expired.

7
(c) [2 pts] In traceroute, UDP packets are sent by the source (in this case, Mureekh) in
succession. What is the maximum value of TTL in any of the UDP packets that result in
the given output?
Solution: 25
(d) [2 pts] Continuing from above part, what is the minimum value of TTL in any of the
UDP packets sent by Mureekh server?
Solution: 1
(e) [2 pts] Is it plausible if someone claims that the path from Mureekh to UCLA is presently
routed through Japan? Say Yes/No. Why? Why not?
Solution: No, because the trace output says so. Japan is not on the path.
(f ) [2 pts] Is it plausible if someone claims that the path to Mureekh from UCLA is presently
routed through Japan? Say Yes/No. Why? Why not?
Solution: Yes. Reverse path can be arbitrarily different, and may very well pass through
trans-Pacific links passing through Japan.
(g) [8 pts] The program traceroute provides the path from the sender to a remote machine.
In the context of this problem, if I do not have (physical or remote login) access to the
machine in UCLA (i.e., www.ucla.edu), invent a method to find the route from the machine
in UCLA to Mureekh server? This is bonus part, so skipping it can still get you full points
in the exam. This part also has negative marking (up to 8 points). We are not expecting a
complete solution; but smart and relevant comments will earn you points, while irrelevant
and bogus comments will cost you points. You have been warned.
Solution: Google for reverse traceroute. Presently, one of the most relevant links is:
http://www.cs.washington.edu/research/networking/astronomy/reverse-traceroute.html

8
Problem 4: CRC [8 points]. Consider a frame carrying data 1101011111 is to be
transmitted. The sender would like to checksum it by adding some CRC bits. For this
purpose, sender and receiver share a generator given by 10011.
(a) [2 pts] What is the maximum number of CRC bits we can use? [Correct answer is
needed for the next part. You may buy that by raising your hand after you have an answer.
Confirmation of your correct answer will not cost you anything.]
Solution: Four (4). This is one shorter than the length of the generator.
(b) [6 pts] Using the maximum number of CRC bits, what is the complete message the
sender will send. Solve in your scratch space (in the blue book provided for this purpose)
and write your answer here. No partial credit is available.
Solution: After long division, 1101011111 0010
Problem 5: Ethernet [8 points]. In this problem, we will explore frame transmission on
an Ethernet local area network (LAN). For this problem assume a signal propagation speed
of 3 × 108 m/s.
(a) [4 points] Suppose the maximum separation (in physical distance) between any two
stations on the LAN is 75m. If we want to operate the LAN at 1Gb/s, what is the minimum
packet size we must use? Answer in bits is okay.
Solution:
s 2 × 75
≥ ⇒ s ≥ 500 bits
1 × 10 9 3 × 108
(b) [4 points] If the bit error rate is 5 × 10−7 , what are the chances that a packet this small
(as found in above part) will be received in error?
500
Solution: 1 − (1 − 5 × 10−7 ) ≈ 2.4997 × 10−4

9
Problem 6: Routers and Routing [20 points]. Consider the network topology with
eight routers and connecting links (with costs) shown in the following figure.

2 G
4
F 4
3
C H
E 6
1
1
16 1
2 5
A B D

(a) [8 pts] If the routers in the given network are implementing a link state protocol (such as
OSPF), we need the lowest cost path from router C to all other routers, using the Dijkstra’s
algorithm. This can be done in steps where one destination (on shortest path from C) is
added at each iterative step. List all the iterations of the algorithm in the following table,
using the procedure similar to the one given in class.

N ′ : set of nodes to which shortest path/distance from router C is definitely known.


D(x): Currently best known value of cost of path from router C to x.
p(x): Predecessor node (currently best known) along path from router C to x.

Step N′ D(A),p(A) D(B),p(B) D(D),p(D) D(E),p(E) D(F),p(F) D(G),p(G) D(H),p(H)


— — ∞ ∞ ∞ ∞ ∞ ∞ ∞
0 C ∞ 16,C ∞ 1,C ∞ 4,C 6,C
1 CE ∞ 16,C ∞ 4,E 4,C 6,C
2 CEG ∞ 16,C ∞ 4,E 6,C
3 CEGF ∞ 16,C 5,F 6,C
4 CEGFD ∞ 10,D 6,C/D
5 CEGFDH ∞ 10,D
6 CEGFDHB 12,B
7 CEGFDHBA

One possible Solution

Important Note: Decide the entries on rough pages (in your blue book, distributed for scratch
usage) and neatly fill this table. Messy, unclear entries will lose you points. Feel free to use
a pencil to fill in this table (or to complete this entire exam, for that matter).

10
(b) [8 pts] Next, we need to find the lowest-cost tree to reach router A from each of the
other routers using the Bellman-Ford algorithm. This is very similar to the example we did
in class. Note: This problem is not about RIP which also uses the Bellman-Ford algorithm.
So, do not assume that 16 is infinity as is considered in RIP routing protocol.
Clearly show each step of the algorithm, including the evolution of routing table entry
at each router. Use the following table to write your answers. You need to show the 2-tuple
(Cost to reach router A, Next-hop router) for each router at each step of the algorithm until
it converges (i.e., no more change in routing entries). This is quite similar to the procedure
we used in example discussed in class slides.

Step B C D E F G H
1 (∞, –) (∞, –) (∞, –) (∞, –) (∞, –) (∞, –) (∞, –)
2 (2, A) (∞, –) (∞, –) (∞, –) (∞, –) (∞, –) (∞, –)
3 (2, A) (18, B) (7, B) (∞, –) (∞, –) (∞, –) (∞, –)
4 (2, A) (18, B) (7, B) (19, C) (8, D) (22, C) (8, D)
5 (2, A) (14, H) (7, B) (11, F) (8, D) (10, F) (8, D)
6 (2, A) (12, E) (7, B) (11, F) (8, D) (10, F) (8, D)

(c) [4 pts] After the algorithm has converged as in part(b), the link between D and F breaks.
Starting from the solution in part(b), show, in the following table, how the routing entries
at each router evolve until they stabilize again. Assume split horizon or any other similar
mechanism is not implemented.

Step B C D E F G H
1 (2, A) (12, E) (7, B) (11, F) (8, D) (10, F) (8, D)
2 (2, A) (12, E) (7, B) (11, F) (12, G) (10, F) (8, D)
3 (2, A) (12, E) (7, B) (13, C) (12, G) (12, H) (8, D)
4 (2, A) (14, E/H) (7, B) (13, C) (14, G) (12, H) (8, D)
5 (2, A) (14, E/H) (7, B) (15, C) (14, G) (12, H) (8, D)
6 (2, A) (14, H) (7, B) (15, C) (14, G) (12, H) (8, D)

11
Problem 7: Prefix Hijack [13 points]. A few years back, Pakistan Telecom Authority
(PTA), the governing telecom body in Pakistan, ordered the service providers in the country
to block YouTube content for viewing from within Pakistan. There were many solutions to
comply with this order.
Assume the following information is available to you (most of this is well-known facts
and could be found on the Internet):

1) The AS number of YouTube was AS 36561.

2) Pakistan Telecom (PTCL) was AS 17557.

3) At that time, Pakistan Telecom had international connectivity through another up-
stream service provider PCCW which was AS 3491.

4) AS 36561 normally announced 208.65.152.0/22 to its upstream service provider.

The solution PTCL chose to comply with PTA’s order was to blackhole the Pakistani
requests for YouTube. That is, they decided to redirect all the requests, originating from
within Pakistan and destined for YouTube, to a server which responds by saying something
like “You can not visit this site at the moment!”. This was supposed to be accomplished by
a BGP announce for 208.65.153.0/24 inside the country. Unfortunately, this announcement
was leaked from AS 17557 to AS 3491 which leaked it into the rest of the Internet – causing
global outage of YouTube. This instance of Prefix Hijack by Pakistan Telecom was claimed
to be unintentional.
Provide very brief answers to the following.
(a) [2 pts] Very briefly in technical terms (such as http requests and responses, etc.), what
caused the global outage of YouTube?
Solution: Announcement of a more specific YouTube prefix by PTCL caused requests for
YouTube content from all over the world be directed to AS 17557.
(b) [2 pts] Suggest another solution using which ISPs in Pakistan could have complied with
PTA order? [Present blocking if YouTube is done this way!]
Solution: One solution would have been to block all IP traffic originating from Pakistan
destined for YouTube’s IP addresses. This solution is not robust because (i) YouTube’s IP
addresses are rotated by google making PTCL (and other ISPs) follow a moving target, (ii)
end users from within Pakistan could have used a web service that makes the requests to
YouTube anonymous (such as spotflux, anonymizer, etc.), or (iii) end users from Pakistan
could have used an open proxy over encrypted sessions (such as the TOR network). A similar
(still not robust) solution would be to perform a higher layer filtering of YouTube domain
addresses. Yet another solution could be to use DNS poisoning within Pakistan.

12
(c) [2 pts] When YouTube learned about this, their top priority was to eliminate outage.
Besides calling PTCL folks and other ISPs, what configuration change(s) could they have
done in their BGP?
Solution: They could have announced even more specific prefixes in order to re-divert the
global requests for Youtube content to the YouTube servers. For example, YouTube could
have announced the following set to prefixes: 208.65.152/24, 208.65.153/24, 208.65.154/24,
and 208.65.155/24. Other sets are also possible.
(d) [1 pts] Continuing from part (c), YouTube did change the their BGP announcements
but it did not work out well. Can you think why?
Solution: It did not work well because providers usually block (i.e., do not accept) prefixes
longer than 24 bits. Furthermore, it takes time for BGP entries to propagate throughout
the Internet.
(e) [2 pts] Do you expect the outage duration be the same (or almost same) everywhere in
the world? Provide a specific answer with precise reasons.
Solution: It is likely to be different depending upon the vantage point of the customers to
the Internet.
(f ) [0 pts] What could PTCL have done to not let this outage happen in the first place?
Your answer can be non-technical if you want.
Solution: Hire better network engineers who have taken Computer Networks at LUMS.
(g) [2 pts] What could PCCW have done to not let this outage happen? We are expecting
a technical answer.
Solution: PCCW should have filtered BGP prefixes announced by other service providers
from Pakistan who are the customers of PCCW.
(h) [2 pts] Which protocol would have been used by PTCL to announce 208.65.153.0/24 to
PCCW. Be as specific as possible.
Solution: eBGP

13
Problem 8: Subnetting and Subnet Routing [15 points]. Consider the portion of a
corporate network shown in the following figure. Note that A, B, and C are routers and N 1
and N 2 are subnets (LANs, if you like). In this problem we assume the following:

1) All ports of routers are unnumbered i.e., they do not have any IP addresses. Even the
interfaces connecting to LANs are unnumbered.

2) In practice, all zeros and all ones are special-purpose IP addresses, but for this problem
assume that any end host can use those.

3) All IP addresses in N 1 are set to be numerically smaller than all IP addresses in N 2


and the number of end hosts in N 1 is one-third the number of end hosts in N 2.

A
B
To other
Networks

N1 N2

The routing table of router B is shown below:

Entry # Network Address / Mask Next Hop


1 163.64.7.0/26 Router-C
2 default Router-A
(a) [2 pts] What is the maximum number of hosts you can have on network N 1 and N 2
combined?
Solution: All hosts in N 1 and in N 2 must match Entry #1 or the network address
163.64.7.0/26. This leaves us with 6 bits for hosts. Thus, a total of 26 = 64 hosts.
(b) [3 pts] Suppose you use the maximum number of hosts found in part(a). What is the
number of hosts on network N 1? What about N 2?
Solution: Number of hosts in N 1 is 16, while number of hosts in N 2 is 48.

14
(c) [4 pts] Draw the routing table for router C. To each entry, assign an entry number
similar to the first column of the routing table for router B.

Entry # Network Address / Mask Next Hop


1 163.64.7.0/28 N1
First Solution:
2 163.64.7.0/26 N2
3 default B

Entry # Network Address / Mask Next Hop


1 163.64.7.0/28 N1
2a 163.64.7.16/28 N2
Second Solution:
2b 163.64.7.32/28 N2
2c 163.64.7.48/28 N2
3 default B

(d) [6 pts] Assume that router B receives four packets with destination IP addresses shown
in each of the following parts, (i) through (iv). In each case, we are interested in three things:
where does the packet end up (N 1, N 2, or router A), what entries it matches in router B
(1, 2, or none), and what entries it matches in router C (if any).

(i) B receives packet with destination IP: 163.64.7.77


Packet ends up at: A
Entries matched at router B: 2
Entries matched at router C: –

(ii) B receives packet with destination IP: 163.64.7.47


Packet ends up at: N 2
Entries matched at router B: 1
Entries matched at router C: 2 (for first solution) or 2b (for second solution)

(iii) B receives packet with destination IP: 163.64.7.4


Packet ends up at: N 1
Entries matched at router B: 1
Entries matched at router C: 1 and 2 (for first solution) or 1 (for second solution)

(iv) B receives packet with destination IP: 163.64.7.17


Packet ends up at: N 2
Entries matched at router B: 1
Entries matched at router C: 2 (for first solution) or 2a (for second solution)

15

You might also like