CMPT 471 SAMPLE FINAL EXAMINATION

CMPT 471
SAMPLE FINAL EXAMINATION
PART 1: SHORT ANSWER PROBLEMS (35 of 100 points)
1) [5 points] Consider host A’s routing table, shown below.
Entry number
(for reference)
network
gateway
Netmask
Interface
1
196.168.1.0
196.168.0.2
255.255.255.128
eth1
2
196.168.0.0
*
255.255.255.0
eth1
3
172.17.0.0
172.32.0.3
255.255.0.0
eth2
4
172.18.0.0
*
255.255.0.0
eth3
5
172.32.0.0
*
255.248.0.0
eth2
Consider packets with destination addresses 172.17.55.92, 172.51.1.253 and 196.168.1.132. For
each address indicate which row in the routing table is used to forward the packet, which interface
the packet will be forwarded through, and the IP address of the host the packet will be sent to in
the Ethernet layer.
2) Consider the small IPv6 network illustrated below. Assume the IPv6 global address or addresses of
each of the hosts on this network are allocated using auto-configuration. Host A is an IPv6 router.
Host A advertises prefixes 2000:45a:bbb:1::/64 and fdd0:44:ee:100::/64 in the router
advertisements it periodically sends to the hosts on the illustrated network. Auto configuration
assigns host B a global address fdd0:44:ee:100:21b:2cff:fe3d:4e5f.
a) [1 point] Can an IPv6 host have more than one global address?
b) [4 points] If an IPv6 host can have one global address what would the auto configured global
address of host K be? If an IPv6 host can have more than one global address what global
addresses would the auto configured host K have?
c) [4 points] Give a step by step explanation of how you determined one global address. Indicate
what data you used to derive the address and how you used that data.
Ethernet addresses of each host are shown
00:1b:2c:3d:4e:5f
00:1c:2c:aa:bb:cc
B
C
00:1d:2d:dd:ee:ff
D
A
E
00:1f:22:33:44:5f
K
00:1e:2d:34:cf:5a
H
00:1d:00:3a:4b:5c
3) [6 points] You are logged on to host A. Host A is using DNS to determine the correspondence
between domain names and IP addresses. Host A is not a DNS server. Host A and DNS servers it
queries are all located in domain summer.edu.. We wish to find the IP address of host B. The fully
qualified domain name of host B is NAME1.a3.summer.edu.. You use a resolver on host A to make
a query for the unqualified domain name NAME1.
• The resolver sends a query for NAME1.a1.summer.edu. to the DNS server at 128.46.11.1. No
response is received.
• Then the resolver sends query for NAME1.a1.summer.edu. to the DNS server at 128.46.134.2. A
response indicating that there is no such host is received from the DNS server.
• Then the resolver sends a query for NAME1.a2.summer.edu. to the DNS server at 128.46.11.1.
A response indicating that there is no such host is received from the DNS server.
• Finally, the resolver sends a query for NAME1.a3.summer.edu. to the DNS server at 128.46.11.1
and receives a response containing the desired IP address.
What are the contents of the /etc/resolv.conf file on host A?
4) Consider the ASs illustrated below. The communication between ASs uses BGP. If a route to AS6
used by AS2 has the form
PATH: sequence AS4, AS6 reaches 224.5.0.0/17 224.4.16.0/20
Then
a) [1 points] What would be the simplest (not aggregated) route used by AS2 to reach AS7?
b) [2 points] Assume that AS2 advertises the route in a) to AS1. What would be the route used by
AS1 to reach AS7?
c) [4 points] AS1 wants to reduce the number of routes in its database. AS1 decides that the
routes to AS5, AS6 and AS7 could be aggregated into a single route. What would that single
route be?
AS3
225.5.0.0/17
AS1
AS2
225.0.0.0/15
AS5
224.4.64.0/19
AS4
ASx
224.5.0.0/17
AS6
224.4.16.0/20
AS7
224.4.32.0/20
224.5.128.0/18
5) [8 points] Consider the autonomous system shown below.
A
1
B
2
F
4
1
C
2
1
N
J
3
2
1
3
1
G
K
2
O
2
3
2
3
1
3
1
2
2
2
1
M
I
1
2
1
1
E
3
4
2
1
D
1
2
1
H
L
P
3
2
Each of the capitalized letters is the name of a router in the AS. Each number indicated the
interface number (eth#) for each interface on each router. Each router has one or more local
networks connected to it (local networks are connected to only one router). The routers in this
network are all running a dense mode multicasting protocol (DVMRP or PIM DM) that is based
on reverse path multicasting. You may assume that all connections between pairs of routers
have equal cost and the unicast routing protocol is determining the best routes from each
router in the AS to router B based on minimizing the number of hops. State your assumption
about how to choose a path if two paths with the same number of hops are available.
Assume that truncated reverse path forwarding (no pruning) is being used. Router B is sending
a multicast packet to all members of group 224.1.2.3. Every router has at least one local
network attached. Local networks on routers P, G, and D include no members of the multicast
group 224.1.2.3; all other routers have members of the multicast group 224.1.2.3 within their
local networks. Based on the diagram above draw the truncated reverse path forwarding tree
(showing only the routers that the multicast packets have reached) after
a) the multicast packet sent by router B is received by all routers 1 hop distant from router B
b) the copies of the multicast packets sent by the routers that received multicast packets in i)
have been received by all routers 2 hops distant from router B
c) The copies of the multicast packets sent by the routers that received multicast packets in ii)
have been received by all routers 3 hops distant from router B.
6) [5 points BONUS PROBLEM] List four approaches to proxying. Give a 2-3 sentence explanation of
each of these four approaches.
PART 2: PROBLEMS (65 of 100 marks)
7) Answer the following questions about network security
a) [8 points] Give step by step explanations of how public key / private key pairs are used for
encryption? For authentication?
b) [4 points] Consider using the tunnel mode of the ESP protocol to authenticate and encrypt a
packet. Give a step by step description of the steps you would need to take to transform a
regular IP packet to an encrypted and authenticated packet consistent with the tunnel mode of
the ESP protocol. Use only ESP protocol, do not use AH protocol.
c) [5 points] Draw a well annotated diagram to illustrate a screened network firewall architecture.
What are two of the purposes of having one or more bastion hosts in a screened network
architecture?
d) [2 points] What is the purpose of encryption? What is one purpose of authentication
8)
A series of packets captured when a TCP connection was made. The connection was made
to a passive server socket. The packets, as captured by tcpdump, are shown below. Each packet is
labeled with a capital letter to use to refer to that packet in your answers. Based on the packets
below and the TCP state machine also shown below answer the following questions.
a) [3 points] Could any of the packets in the TCP dump below be fragmented if they reached a
b) [12 points] Draw a partial TCP state machine showing only the states that are passed through
when the captured packets below are transferred. Make sure to indicate (on your partial state
machine diagram), using the labels added to the tcpdump output (A-H), which packet in the
tcpdump corresponds to each packet that is received or sent to initiate a transition. You are
provided with a copy of the full state machine for reference.
A:
11:48:52.913278 IP (tos 0x0, ttl 64, id 32738, offset 0, flags [DF], proto 6, length: 60) july.1106 > july.20015: S [tcp sum ok]
3249991378:3249991378(0) win 1840 <mss 460,sackOK,timestamp 421826864 0,nop,wscale 2>
B
11:48:52.913407 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto 6, length: 60) july.20015 > july.1106: S [tcp sum ok]
3250876723:3250876723(0) ack 3249991379 win 1792 <mss 460,sackOK,timestamp 421826864 421826864,nop,wscale 2>
C
11:48:52.913505 IP (tos 0x0, ttl 64, id 32740, offset 0, flags [DF], proto 6, length: 52) july.1106 > july.20015: . [tcp sum ok] ack 1
win 460 <nop,nop,timestamp 421826864 421826864>
D
11:48:52.913821 IP (tos 0x0, ttl 64, id 32742, offset 0, flags [DF], proto 6, length: 500) july.1106 > july.20015: . 1:449(448) ack 1
win 460 <nop,nop,timestamp 421826865 421826864>
E
11:48:52.931285 IP (tos 0x0, ttl 64, id 57364, offset 0, flags [DF], proto 6, length: 500) july.20015 > july.1106: . 1:449(448) ack
449 win 2016 <nop,nop,timestamp 421826882 421826865>
F
11:48:53.032371 IP (tos 0x0, ttl 64, id 32788, offset 0, flags [DF], proto 6, length: 52) july.1106 > july.20015: F [tcp sum ok]
4502:4502(0) ack 4502 win 2700 <nop,nop,timestamp 421826983 421826973>
G
11:48:53.033676 IP (tos 0x0, ttl 64, id 57392, offset 0, flags [DF], proto 6, length: 52) july.20015 > july.1106: F [tcp sum ok]
4502:4502(0) ack 4503 win 2464 <nop,nop,timestamp 421826984 421826983>
H
11:48:53.033763 IP (tos 0x0, ttl 64, id 32790, offset 0, flags [DF], proto 6, length: 52) july.1106 > july.20015: . [tcp sum ok] ack
4503 win 2700 <nop,nop,timestamp 421826985 421826984>
9) Consider routing packets within an AS between many ASs.
a) [4 points] Name 1 interior routing protocol based on the link state approach. Name 1 interior
routing protocol based on the distance vector approach. Name 1 exterior routing protocol.
What are interior routing protocols and an exterior routing protocols used for? Is the exterior
routing protocol you named based on the distance vector approach? Is the exterior routing
protocol you named based on the link state approach?
b) [6 points] Give a step by step procedure explaining how two routers who have just established
a adjacency relationship synchronize their OSPF databases.
c) [2 points] Describe what information would be in a summary LSA sent from R3 to the other
routers in the backbone region. Give a 2-3 sentence general description of the contents of a
summary LSA.
d) [4 points] Give a step by step explanation of the process for electing backup designated router
and the designated router. Consider only the case when all the routers on the local network
segment are being restarted at the same time. You may assume there is no nominated (current)
designated router or backup designated router in any of the hello packets being sent by any of
the routers on the local network segment. You may assume that all the routers on the local
network segment have already become OSPF neighbors.
YOU MUST ANSWER ONE OF THE FOLLOWING TWO PROBLEMS
IF YOU ANSWER BOTH PROBLEMS ONLY THE FIRST ANSWER TO APPEAR IN YOUR
EXAMINATION BOOKLET WILL BE CONSIDERED
10) [15 points] Consider the following fragment of sample code from a TCP echo server. Explain step
by step the execution of the parent server. Explain step by step the execution of the child server.
Steps should explain the purpose of each line (or group of lines) of code.
000
001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
0025 }
for ( ; ; ) {
/* tcpsd is the descriptor of the listening socket */
connfd = accept(tcpsd, (struct sockaddr *)&cad, &len);
if( (fork()) == 0) {
close(tcpsd);
for( ; ; ) {
if( nread = read(connfd, echobuf, LENBUF ) < 0)
{
fprintf(stderr,
"error reading from TCP socket");
}
else if (nread > 0 )
{
tcpcharcntin += nread;
nwrite = write(connfd, echobuf, nread);
tcpcharcntout += nwrite;
}
else
{
break;
}
close(connfd);
exit(1);
}
}
close(connfd);
11) [15 points] Router X is a DVMRP multicast router. X is part of a broadcast network A. Network A
presently has members in multicast groups group1 and group2. How does router X determine if
any hosts on network A wish to remain members of group1 or group2? When and how often does
router X determine if any hosts on network A wish to remain members of group1 or group2?
a) Answer assuming router X is running IGMPv2
b) Answer assuming router X is running MLDv2