Microsoft Word – midterm471.docx
CMPT 471 MIDTERM 1 SOLUTION
1. When IPv6 is used for address resolution parts of the neighbor discovery (ND) protocol are
used. ND uses a neighbor cash to record information about hosts recently sent to. One of the
variables that is recorded in each record in the neighbor cache (one record per host contacted)
is the state of the entry. Answer the following questions about IPv6 address resolution. The
answer to each question should not be longer than 2-3 sentences.
a) [2 points] What type of address is being searched for in the address resolution process?
Which host does the address being searched for belong to?
The Ethernet destination address(1 point) for the next hop is being searched for.
This Ethernet address corresponds the IP address of the next hop gateway (or the final
destination) (1 point)
b) [3 points] When is a new entry in the neighbor cache created? What is the state of a newly
created neighbor cache entry?
The entry in the neighbor cache is created when the address resolution process begins
(2 points), before the first neighbor solicitation packet is sent.
The newly created neighbor cache entry will be in the INCOMPLETE state(1 point)
c) [4 points] When does a neighbor cache entry change from REACHABLE state to STALE state?
In particular, what series of conditions and actions are necessary for the transition to occur?
The neighbor cache entry will stay in the reachable state as long as a regular flow of
packets that display 2-way connectivity is being received (usually TCP traffic). (2 points)
When this flow is interrupted for more than the Reachable time the host will move into
the STALE state. (2 points)
d) [4 points] When does a neighbor cache entry change from STALE state to PROBE state? In
particular, what series of conditions and actions are necessary for the transition to occur?
When traffic to an entry in STALE state needs to be sent, the traffic will be sent to the host
corresponding to the cache entry. (1 point). The cache entry will move from the STALE
state into the DELAY state. (1 point)
A timer will be set. (1 point) If the timer expires before two way communication is
verified the entry will move from the STALE state to the PROBE state. (1 point)
e) [4 points] When does a neighbor cache entry change from INCOMPLETE state to
UNREACHABLE state? In particular, what series of conditions and actions are necessary for
the transition to occur?
The maximum number N of retransmissions of the packet have been sent without
receiving a response
2. Imagine you are using the virtual lab. Your starting point is immediately after you have opened
a command line window on one chosen host on network 17. You wish to
Do a Wireshark capture of packets for the PIM and IGMP protocols that are present in the
virtual lab on network 17.
Save your resulting Wireshark pcapng file. (It will contain all the packets you have captured)
Move your pcapng file to your gateway machine.
Assume your chose host is spring
1. In the terminal window (now attached to spring) start Wireshark with command
wireshark (1 point)
2. Select options from the capture menu from the Wireshark GUI
a. Set the capture filter field at the bottom of the resulting GUI page to (1 point)
b. pim or igmp (3 points 1 each word)
c. Set the interface to eth1 on the same GUI page(1 point)
d. Press start(1 point)
3. Let the capture run until you have 25 packets (give any reasonable length of time)
4. Stop the capture using the Wireshark GUI(1 point)
5. Select Save from the Wireshark File menu. (1 point)
6. In the resulting pop up give the file a name, for example capturePI(1 point)
7. press save on the pop up(1 point)
8. Open another terminal window on the gateway (1 point)
9. Navigate to the folder you want to save the capture in on the gateway(1 point)
10. Copy the file from the host spring to the gateway with the command(1 point)
scp yourID@spring:/home/yourID/capturePI.pcapng .
In this command yourID is your own computer ID
6 points, 1 point for each word int the command (. scp yourID@
spring: home capturePI.pcapng)
OR
8. Close the WireShark GUI (1 point)
9. Navigate to the folder in which you saved your Wireshark file(1 point)
10. Copy the file from the host spring to the gateway with the command(1 point)
scp -P 24 capturePI.pcapng .0.101:/home/jregan/.
In this command yourID is your own computer ID
6 points, 1 point for each word int the command (. scp yourID@
spring: home capturePI.pcapng)
3. [8 points] A router is sending period router advertisements onto network A. The periodic router
advertisements include a prefix option for the prefix fdd0:1919:aaaa:1111 The network is using
SLAAC EUI addresses Give a detailed step by step explanation of how the IPv6 EUI-64 address is
determined using host C as an example. The Ethernet address on network A of host C is
aa:bb:cc:dd:ee:ff.
What would the automatic IPv6 EUI-64 address of host C on the network with prefix
fdd0:1919:aaaa:1111 be? (1 point for concept in each line)
Split the Ethernet address into two equal parts (1 point) aa:bb:cc dd:ee:ff
Insert fffe between the two parts aa:bb:cc:ff:fe:dd:ee:ff
Convert the first two hex digits to binary aa → 10101010
Filp the 7th bit (OK if conversions not shown) 10101000
Convert back to hex to give a8 10101000 → a8
So now EUI 64 portion becomes a8:bb:cc:ff:fe:dd:ee:ff
Prepend the prefix to give the EUI address fdd0:1919:aaaa:1111:a8bb:ccff:fedd:eeff
4. Consider the networks illustrated in the diagram below. On the diagram you are given the IP
address and interface name for each Ethernet interface that you will need to solve the
problem. In the table labelled ROUTER A below you are shown the number of hosts in each
network and the first address available in two of the four networks.Consider the networks
illustrated in the diagram below. On the diagram you are given the IP address and interface
name for each Ethernet interface that you will need to solve the problem. In the table labelled
ROUTER A below you are shown the number of hosts in each network and the first address
available in two of the four networks.
A. [14 points] Complete all entries in the partially filled rows of Table 1. The first row in the table
is for Company B’s network. Show any calculations used to determine the entries in the table
below. Give answers as individual (identified) rows or columns in the table.
1 point for each item in green in the table below
For all networks (COMPANY A and COMPANY B)
first address Last address Number of
addresses allocated
Number of
hosts needed
Mask
182.160.100.0 182.160.103.255 1024 777 255.255.252.0
182.160.112.0 182.160.113.255 512 455 255.255.254.0
182.160.80.0 182.160.95.255 4096 2420 255.255.240.0
182.160.72.0 182.160.79.255 2048 1356 255.255.248.0
B. [8 points] Some networks in the below have an empty box next to them. Give the value that
should go into each of these boxes by identifying each answer with the label in the
corresponding box. The network address / prefix length must have the form 1.2.3.0/21. If
the network address/prefix was 1.2.3.0/21, then 1.2.3.0 is the network address and 21 gives
the length of the prefix. The length of the prefix is also the number of 1 bits in the mask. Put
your network address /prefix in the box provided on the diagram.
2 points for each box containing a green item
(1 network address, 1 prefix length)
C. [8 points] Aggregate the entries for Company A into a single entry in the ISP router’s routing
table routing table entry. Give the entries needed to complete the provided table for the ISP
router. (Give points as shown in table)
ISP ROUTER
Destination gateway Mask iface
182.160.100.0 (½) 10.44.0.4 (1) 255.255.252.0 (½) eth1 (½) Company B
182.160.64.0 (2) 192.168.128.33 (1) 255.255.192.0 (2) eth0 (½) Company A
(aggregated)
eth0
192.168.128.33
Router B
Router ISP
182.160.77.2
eth2
182.160.88.1
eth1
eth0
182.160.102.1
182.160.112.0/23
182.160.72.0/21
182.160.80.0/20
182.160.100.0/22
eth3
182.160.112.1
1\
eth1
10.44.0.4
eth0
192.168.128.32
eth1
10.44.0.5
eth2
Router A
(company A)
5. [18 points] Consider a mobile computer that has been a DHCP lease on address
192.168.3.33. The owner has moved across the city and is attaching to a new mobile
network. The lease for the old IP address has not expired, the old address is not available on
the new network. Fill in the blanks in the following step by step description of how the lease
is renewed or replaced.
The host has a previous lease on IP address 192.168.3.33.
It begins in the _____1_____ state of the state diagram when it is booted or a dhclient is
started.
The dhclient checks the existing lease, finds that it has not expired. The client thinks it still
has a valid lease
A _____2______ packet is generated. This packet requests the continued use of the IP
address that the client still considers valid. When the packet is sent it is _____3_____ to
assure it is received even if the original server is not available.
The dhclient then moves from the _____3_____ state to the _____4_____ state. The
______5______ packet is received by the server and processed.
The server discovers it cannot grant the lease of the required address so the server
constructs and sends a _____6_____ packet to inform the dhclient that the IP address it
has requested is not available.
When the dhclient receives the _____7_____ packet the system moves into the INITIALIZE
state
The next DHCP packet generated is a ______8______ packet.
The ______9_______ packet is ______10______ by the host to assure that it reaches the
DHCP server or relay client on the local network segment. The client does not know the IP
addresses for unicast
The dhclient moves from the _______11_____ state to the SELECT state.
Each DHCP server on the local network segment, and any DHCP servers attached to the
local network through a relay client, will receive the message.
Each of these servers that is willing to grant the host that sent it an IP address lease will
construct a _____12_____ packet.
That _____13_____ packet contains the detailed parameters of the lease.
Each packet will be ____14____ back to the requesting host either directly or through the
_______15______ client.
The____16___ will receive that packet, it is stated in the RFC’s that even if the host does
not yet know its own address it will receive a packet _____17____ to its offered
_____18____ address. (1 point each numbered item below)
1) INITREBOOT 10) Broadcast
2) DHCPREQUEST 11) INIT (or INITIALIZE)
3) Broadcast / INITREBOOT 12) DHCPOFFER
4) SELECT 13) DHCPOFFER
5) DHCPREQUEST 14) unicast
6) DHCPNACK 15) DHCP relay
7) DHCPNACK 16) DHCP server
8) DHCPDISCOVER 17) unicast
9) DHCPDISCOVER 18) IP
6. An IPv6 interface can have more than 1 global IP address
True
False
7. [2 points]A semantically opaque IPv6 address is generated using a prefix taken from a
configuration file on the host the address is being generated for.
True
False
8. [2 points]A DHCP lease on an IPv4 address is good for a finite period of time
True
False
9. [2 points] When forwarding a packet in IPv6 the source IPv6 address of the packet is used as
input.
True
False
10. [2 points] The purpose of DAD in IPv6 and the purpose of gratuitous ARP in IPv4 is to
determine if the proposed IP address of a host is already in use.
True
False
11. [2 points] A packet can be corrupted as it travels from the source host to the destination
host
True
False