CS计算机代考程序代写 DHCP cache algorithm Microsoft Word – quiz2sol.docx

Microsoft Word – quiz2sol.docx

CMPT 471 quiz 2 solution

1. [3 points] Which of the following statements about IPv4 forwarding is false?
After we have selected a row in the forwarding table to use we choose the interface on

the machine randomly to send the datagram to the correct destination

When multiple rows are selected as possible networks to forward a packet to we choose
the row with the longest mask.

When no rows match the destination address we drop the packet

The forwarding algorithm uses the IP destination address of the datagram as input to
the forwarding algorithm
After we have selected a row in the forwarding table to use we choose the interface on
the machine randomly to send the datagram to the correct destination: FALSE: We
choose the interface from the interface column in the chosen row for the packet

2. [3 points] Give one word or short phrase to fill in each of the numbered blanks in the
statement below
IPv6 address resolution uses a _____1___ cache. This cache contains one entry for each
destination being sent to. Each entry a _____2_____ state. The entry is in the
_____3____ state if it is know that there is _____4___ connectivity to the destination
described in the entry.
IPv4 uses the _____5____ protocol for address resolution. This protocol uses a request
message and a ______6______ message.
1 neighbor
2 This sentence is unclear: all students get this 1/2 point
3 REACHABLE
4 Two way
5 ARP
6 reply
1/2 point for each word or phrase

3. [3 points] Which of the following statements about DHCP is false?
DHCP is a stateless protocol

DHCP is used to dynamically assign IP addresses to many hosts on a network

DHCP relay clients are used to send DHCP messages from one physical segment to
another within a single logical network.

If a DHCP lease is given for X seconds then DHCP asks for the lease to be extended before
the X seconds end

Both IPv4 and IPv6 can be configured to use DHCP
DHCP is a stateless protocol: FALSE: Our discussion of DHCP was based upon a state
machine. A DHCP host was in one of several states as it obtained, renewed or released its
address. We needed to know the state that a host was in to determine what needed to be
considered next. DHCP is a stateful protocol.
DHCP is used to dynamically assign IP addresses to many hosts on a network: TRUE: This
is the purpose of DHCP
DHCP relay clients are used to send DHCP messages from one physical segment to another
within a single logical network: TRUE: DHCP relay clients enable DHCP messages to be sent
to DHCP servers not on the physical local network segment.
If a DHCP lease is given for X seconds then DHCP asks for the lease to be extended before
the X seconds end: TRUE: If a lease is given for X seconds then the renewal timer will be
set to 1/2 of the length of the lease. When the renewal timer expires the renewal of the
lease will be started.
Both IPv4 and IPv6 can be configured to use DHCP: TRUE: Yes both can be configured
using DHCP or static addressing. IPv6 can also be configured using SLAAC

4. [3 points] Which of the following statements about ARP is true?

Gratuitous ARP is used to check for duplicate IP addresses
When an ARP request is made it can be forwarded by a router
ARP is the Address Referencing protocol
A network must not have more than one ARP server
An IPv4 ARP request is sent to the solicited node multicast address

An IPv4 ARP request is sent to the solicited node multicast address: FALSE: An IPv6 ARP
request is sent to the solicited node multicast address, ARP uses broadcast not multicast.
A network must not have more than one ARP server: FALSE: Some networks can have
more than one ARP server, but having more than one may cause problems
ARP is the Address Referencing protocol: FALSE: Address Resolution Protocol
When an ARP request is made it can be forwarded by a router: FALSE: If no proxy ARP
process is running on the router no forwarding will occur. If proxy ARP is running that proxy
ARP process will send the ARP message to the other network, it will not be forwarded by IP
because it was sent as a broadcast packet.
Gratuitous ARP is used to check for duplicate IP addresses: TRUE:

5. [4 points] Consider a CIDR network 112.88.192.0/19. Answer each of the following
questions. Show your work to get the numerical answers or give a brief reason for your
answer in words (1 sentence max per question).
a) How many IP addresses are available in the network that can be as the addresses of
hosts?
b) What is the IPv4 directed broadcast address of the network?
c) What would be the mask for this network in dotted decimal notation?
d) What are the first and last addresses in this network?
1 point per question, 1/2 for answer, 1/2 for explanation
a) /19 means 19 one bits at the start of the mask. This leaves 13 bits for host
addresses. So there are 213 = 8192 addresses. But the first address is reserved for the
network address and the last for the broadcast address so there are 8190 addresses
available for hosts.
b) The directed broadcast address is the network address followed by 13 ones (the bits of
the hostid). Thus the first two blocks of the dotted decimal for the directed broadcast
address will come from the network id. The third block will incude the 192 from the
network address. 192 has 2 ones followed by 6 zeros. The third block for the directed
broadcast address thus has 2 ones followed by one zero from 192 then 5 ones from the
hostid (8+5=13) of the directed broadcast address. So 112.88.223.255
c) The mask for this network would have 19 ones followed by 13 zeros. In dotted decimal
this means that the first two numbers (16 bits) will be all ones so the first 16 digits will
give 255.255. The third block has 19-16=3 ones followed by 5 zeros. So the value is
128+64+32 =224. Subtract 1, the mask would be 255.255.224.0
d) First address is 112.88.192.0 the network address. Last address we add the number
of hosts. 32-19=13, 213 = 8192. 8192/256=32 so 112.88.223.255 is the last address

6. [4 points] Consider aggregation in CIDR.

Company X has has 3 networks. Company X’s network allocation is the smallest allocation
that could include all 3 of its networks. Company X’s allocation excludes the addresses used
by Company Y. Company X’s three networks are
121.176.232.0/21 121.176.144.0/22 121.176.160.0/19

What is the single aggregated network that the ISP provider can use in its routing table to
assure that all traffic for Company X goes to the router for Company X? Show your
intermediate calculations

The smallest address within company X’s networks is 121.176.144.0
The largest address is the last address in one of the networks. For 121.176.232.0/21 have
232-21 = 211 = 2048. 2048/256=8 so last address is 121.176.239.255
For 121.176.160.0/19 have 232-19 = 213 = 8192 8192/256=32 so last address is
121.176.191.255
For 121.176.144.0/22 have 232-22 = 210 = 1024 1024/256=4 so last address is
121.176.147.255
So the largest address is 121.176.239.255. (1 point)
239-144= 95 next power of 2 is 128 so network should be 128*256 long so it needs to
start at 0 or 128 (third dotted decimal block). To contain the networks in the problem
should be 128. 128*256=27*28=215 addresses. This give 32-15=17 or a mask/netid with
17 bits (1 point)
So aggregated entry should be 121.176.128.0/17
2 points, 1 for net address one for /17
(For each point 1/2 for answer, 1/2 for explanation of answer)

7. [1 point] IPv6 address resolution uses a cache. Each entry in the cache has serveral parts
including the IPv6 address the Ethernet address and the reachability state.

True
False

8. [1 point] Renewal of a DHCP lease for host A is normally requested when only half of that
lease has been used. The lease renewal is begun before the lease expires to help assure
that the connectivity for host A is not interrupted.

True
False

9. [1 point] A DHCP lease given by on DCHP server can sometimes be renewed by another
DHCP server

True
False

When there are multiple DHCP servers available and those DHCP servers may be
connected and using failover, then one DHCP server can renew (for a short time) the DHCP
address leased by another DHCP server.

10. [1 point] A DHCP relay client can be used when A DHCP server supports multiple segments
by relaying a DHCP message from one physical segment to another through a router. DHCP
messages are never forwarded by IP forwarding in a router.

True
False

A DHCP relay client can be used when A DHCP server supports multiple segments by
relaying a DHCP message from one physical segment to another through a router. This is
true.
DHCP messages are never forwarded by IP forwarding in a router. This is not true. After
being relayed the DHCP message will be forwarded to the DHCP server if it passes through
additional routers on the way to the DHCP server.
Since part of the statement is false, the entire statement is false.

11. [1 point] DAD is used to check if an IPv4 address being allocated to an interface is already

being used by another host.

True
False

DAD is used to check if an IPv6 address being allocated to and interface is already being
used by another host. DAD replaces gratuitous ARP in IPv4.