Sei sulla pagina 1di 13

COSC4377 – Networking – Spring 2018 - Kevin B Long

Solutions to Homework #6
Due 11:59pm Wednesday, May 2, 2018
Multiple submissions accepted.
We will review this in class on April 30 before it is due.

1. (9 pts) Search at http://tools.ietf.org and use the “Doc fetch” documents pertaining to
“private address”. One of the documents shows [Marla] Azinger as the author
discussing the need to assign additional private address space.

a. What is the URL for that document?

________________________________________________________________
Answer: https://tools.ietf.org/html/draft-azinger-additional-private-ipv4-space-
issues-05

b. Early in the document the three current reserved (private) address ranges are
mentioned. What are the network addresses and how many hosts can they support
each (powers of two is fine)?

Answer: 192.168.0.0/16, 172.16.0.0/12 and 10.0.0.0/8


2^16, 2^20, 2^24

c. The document discusses problems with networks that are so large that these private
addresses are not enough. Cell phone operators are included in this list. Recall our
question on tunnel detection on the last homework when we were trying to
determine if the IP address of our cell phone might be public or private. If the
cellular providers need more addresses than the 10.0.0.0/8, do you think they NAT
our cellular IP addresses? Justify your answer.

________________________________________________________________
Answer: No, because they’d not need so many addresses if they NATted

2. (10 pts) Are the following situations permitted/legal or not? Mark “Y” for legal or “N”
for not.

Y____ A router offering both public and private addresses on the same subnet.

Y____ A router that NATs only some of the addresses leaving the internal network
if the others do not need to be NATted.

© Kevin B Long & Elsevier Page 1 of 13


N____ Two hosts with the same private address on either side of a switch.

Y____ Packets in a VPN tunnel between a laptop inside a network and a public
server on the Internet whose IP address is changed by a NAT server as it
leaves the network and enters the Internet.
Y____ Multiple customers of a carrier using the same addresses inside their
network.
3. (10 pts) In the figure below (4.42), consider the path information that reaches stub
networks w, x, and y.

“y”’s view of the network looks like this:

Y could also be drawn to reach “x” and/or “w” via a path that included “B”.
Draw x’s and w’s view of the network. If you have options, choose one.
Answer: here are two options for w’s view of the network. Note in the left that the only
way to reach C’s network is via the customer “x”. They would not like this.

X’s view of the topology W’s view of the topology


X may connect to w via C not B. W may connect to x via C not B

4. (14 pts) This image is taken from


http://gaia.cs.umass.edu/kurose_ross/interactive/link_layer_addressing.php:

© Kevin B Long & Elsevier Page 2 of 13


a. Between a packet sent from A to C, how many times will the source IP change?

________0
b. How many times will the destination IP change? _______0

c. How many times will the source MAC address be changed?________1

d. How many times will the destination MAC address be changed?_______1

e. Will any MAC address be used in more than one frame? Y/N.
Answer: I realized after the lecture that I wish I had asked this differently – as an IP
datagram makes its way across the network on one LAN and then another, with the
source or destination MAC address on one LAN segment ever match those used on
any other LAN segment? No. Not only are they supposed to be globally unique,
there’s no visibility between LANs.

f. If you have two hosts separated by n routers, how many different frames will be
needed to send a single packet between the hosts, assuming no fragmentation?

________n+1
g. When a frame is forwarded from one router port to another, besides the addresses,
what else is changed in the Ethernet frame (not in the IP payload)?

________the CRC
This simplified Ethernet frame format may help you:
Ethernet Ethernet
Preamble
Source Addr. Dest. Addr.
Type Payload CRC

5. (10 pts) Suppose two nodes start to transmit at the same time a packet of length L over a
broadcast channel of rate R. Denote the propagation delay between the two nodes as
dprop. Will there be a collision if dprop < L/R ? Why or why not?

© Kevin B Long & Elsevier Page 3 of 13


________________________________________________________________

________________________________________________________________
Answer: Yes, because signal from one computer will be able to reach the other
before either finishes transmitting. Here’s an easier way to visualize what’s going
on. Suppose the question is about two nodes B and D:

B transmits until it’s packet is on the wire. That’s length divided by bandwidth, L/R,
which we’ll label t1. The time it takes a bit (and thus your first chance to spot a
collision) to travel from B to D is the propagation delay, dprop, which we’ll label t2.
As long as t1 > t2, you’ll experience/detect a collision.

6. (10 pts) ICMP – answers are in the book in section 4.4.3


a. What value do we intentionally change in an IP datagram that forces routers to
respond with ICMP errors when performing a traceroute?

______________TTL

b. In which of the five of the TCP/IP layers does ICMP exist? _________3

c. What is the ICMP message Type and Code when a ping is sent to a host or router?

Type: ______8_ Code: _____0__

d. What is the type and code for the response? Type: ___0___ Code: ___0___

e. How does traceroute “trick” the destination host into responding? Not the router,
but the host. You will need to read the book to answer this question – it’s not very
obvious.

© Kevin B Long & Elsevier Page 4 of 13


_______________________________________________________________
Answer: pick some unusual port unlikely to be monitored to trigger a “destination port
unreachable” message.
7. (14 pts) The book discusses several ways of accomplishing broadcasts over routed
networks. One way is to let the routers duplicate and forward copies of your packets
over every port. This is a “network-layer broadcast”. A variation is called “unicast
emulation” where one server sends all of the needed copies itself to each destination.
This is how WebEx sends copies of packets to everyone watching a broadcast.
Although unicast emulation is easier – completely under the control of the software
developer, there are differences on the number of times packets that must pass across
the Internet’s various links.

Consider the following tree:

Assume all nodes have the ability to receive, duplicate, and forward packets as needed.
There are 32 receiver nodes across the bottom, and one sender node at the top. We have
chosen to connect them in a tree. Starting at the red node at the top, what is the
difference in the number of link crossings that must be performed using each method of
broadcasting?

For example, if this was our tree:

Then the cost would be 4 link crossings for a network-layer broadcast (1 from red to
green, and green would duplicate and send 3 to the orange nodes), and 6 for unicast
emulation (three pairs of red-green and green-orange).

For our larger tree with 32 nodes, how many link crossings are required:
a. With network-layer broadcast: __________
Answer: 62 (2+4+8+16+32)
b. With unicast emulation: _________
Answer: 32 * 5 = 160
c. Decimal ratio of network-layer to unicast emulation link crossings: _________
Answer: 0.3875
Can you think of a way of reorganizing the red and orange nodes (the sender and 32

© Kevin B Long & Elsevier Page 5 of 13


receivers) so that the difference between the two methods is most pronounced? It does
not have to be a tree. You can just describe your method or draw it out, but you need to
provide the numbers. For the numerical answers, you can provide a decimal answer or a
formula.

d. Description or sketch of your method: ____________________________________


Answer: organize them in a single-file line with the sender at one end.
e. Link crossings with network-layer broadcast:________
Answer: each node is crossed once, for a total of 32 link crossings.
f. Link crossings with unicast emulation:________
#$∗(#$*')
Answer: ∑#$%&' 𝑖 , $
, or 528.
g. Decimal ratio of network-layer to unicast emulation link crossings: _________
Answer: . 06 or just .06.

8. (12 pts) Consider transmitting two byes: 1110 0110 and 1001 1101 and protecting them
with a two-dimensional even parity scheme. We will organize the 16 bits into a block
such that you require the fewest parity bits to detect any single-bit error. Note that our
book (and many others) add a 0 bit in the bottom right corner. It’s needless. Don’t do
that.
a. Fill in the following table adding the 8 parity bits in each row and column.

Answer:
1 1 1 0 1
0 1 1 0 0
1 0 0 1 0
1 1 0 1 1
1 1 0 0

b. Convert the resulting 24-bit binary number to a decimal number. This site can help:
https://www.binaryhexconverter.com/binary-to-decimal-converter

_____________
Answer: 15410620
Assume you have received a transmitted the decimal number 10919696, representing a
24-bit binary string comprised of two bytes of data and 8 parity bits as above.
Determine if there has been an error introduced in transmission and circle or otherwise
highlight it in the grid.
c. Convert the decimal number to binary and fill in the corresponding grid:

© Kevin B Long & Elsevier Page 6 of 13


d. Mark the bit in error.
Answer:

1 0 1 0 0
1 1 0 1 0
0 1 1 1 1
1 0 0 0 1
0 0 0 0

9. (10 pts) Consider the following Wireshark trace of packets from TEC’s campus to
google. It shows the client checking on the validity of google’s security certificate used
to send HTTP data.

a. Is the destination Ethernet address of the server at google? If not, what is it?

_______________________________________________________________
Answer: no, it’s some intermediary device on TEC’s campus, probably the wifi
router.

b. Use “arp -a” to examine the contents of your computer’s ARP cache (on either a

© Kevin B Long & Elsevier Page 7 of 13


Windows or Mac laptop). Copy and paste the results here.
<copy and paste results here>

Answer: mine looked like this:


kevinlong$ arp -a
? (172.20.10.1) at f2:c5:f3:86:8b:64 on en1 ifscope [ethernet]
? (172.20.10.15) at ff:ff:ff:ff:ff:ff on en1 ifscope [ethernet]
? (224.0.0.251) at 1:0:5e:0:0:fb on en1 ifscope permanent [ethernet]
? (239.255.255.250) at 1:0:5e:7f:ff:fa on en1 ifscope permanent [ethernet]
broadcasthost (255.255.255.255) at ff:ff:ff:ff:ff:ff on en1 ifscope [ethernet]
kevinlong$

We want to understand the importance of having an entry in the ARP table.


c. When you ping one of the entries, is an ARP request transmitted to the network?
Why or why not?

__________________________________________________________________
Answer: No, because ARP can supply the corresponding MAC address locally that is
needed by IP to build a request to Ethernet.
d. What benefit does the network experience from the ARP table?

__________________________________________________________________
Answer: reduced broadcast ARP requests and replies.
e. When you ping an IP address that is not in the table (or ping a hostname whose IP
address is not in the table), is an ARP request transmitted to the network?

__________________________________________________________________
Yes, because ARP must go to the network to learn the MAC address of the device to
which IP should direct the ICMP echo request.

10. (11 pts) Consider the following 5-node wired Ethernet LAN that follows the rules for
CSMA/CD:

© Kevin B Long & Elsevier Page 8 of 13


A B C D E
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
If B begins transmitting at time 0 as shown,
a. When will its signal arrive at each of the other stations?

Host A: _____ Host C: _____ Host D: _____ Host E: _____


Answer: 4, 4, 8, 12
b. Start a transmission from E at time 10. When will it collide with B’s signal? _____
Answer: 11
c. At what time will B detect it? ______
Answer: 22
d. The graph only shows the path of the first bit of the first packet B is sending. The
next bit follows along the same angle but just below. In order to detect this
collision, how long at a minimum must B continue to transmit (and listen)?

______
Answer: 22
e. Using E as an example of a host that is as close to the end of a cable as permitted

© Kevin B Long & Elsevier Page 9 of 13


and assuming this cable is as long as permitted, how long in general must a host
transmit to detect a collision?
_______
Answer: 40. Wrong. The answer on the video is 22. Here’s the real explanation:

The blue line shows the path from E back to B. That actually takes 24 to get there, not 22.
But that’s not how long a host must listen; just what B must listen for. You won’t have
different packet minimums for each host; instead, it’s part of the standard, so all hosts will
have the same minimum listening time. So…. E is 2 squares away from the right end of the
cable, and we’re told it’s as close as you can get. We’re also told this is the max length of
cable. There is no host as close to the left end of the cable as E is to the right, but if there
were, it would be where the light green vertical dotted line shows. And the time to get from
there to E is the dark green diagonal line: 18. To be sure you hear a collision that happens

© Kevin B Long & Elsevier Page 10 of 13


the instant before a bit makes it to E, you’d have to listen for 36 units.

If you interpret the question to be how long does it take a reflection of a signal to return
from the far end of the network, that’s the red line. Most networks don’t work that way, so
we’ll ignore the red line.

Final answer: 22 if you copied what we said in class (the 12 looked like an 11 to me), but
the accurate answer is 36.

11. (8 pts) Consult the document [GSMA 2013] IMEI Allocation and Approval Process
TS.06-v7-Approved.pdf, located in the google drive “Extras” folder and answer the
following questions:

a. What’s the format of the IMEI? What fields, and how many characters per field?
Just the major categories are fine, you don’t need to define each acronym.

Answer:

b. What is the size of the address space of IMEI? In other words, how many
different IMEI numbers are there? You will need to determine the format,
which digits are assignable and which are simply calculated from the assigned
number, and also what character ranges are allowed (alphanumeric, numeric,
alphabetic, etc.)

____________
Answer: 1014. The field is 15 characters long, but one is a check digit, and the
are all 0-9 numeric.
c. What does IMEI stand for?

_________________________________________________________
International Mobile Equipment Identity (see section 5).

d. How many different production units of a particular model of mobile device can
be numbered before the reporting body must issue another “TAC”? What field is
the limiting factor driving that requirement? In other words, if you added a digit
to avoid that limit, where would it be added?

______________________________________________________________

© Kevin B Long & Elsevier Page 11 of 13


Answer: 1 million, Z/Serial # is the limiting field, 6 digits, 0-999,999. See page
e. According to section 7, when a repair of a mobile device requires replacement
of a component housing the IMEI identifier, what is the document’s requirement
about replicating the IMEI to the new device or new part? A few words is
enough.

________________________________
Answer: it’s prohibited. A new IMEI must be issued any time the existing one
requires replacement. No means of duplicating or replicating the IMEI should be
allowed.

f. If Apple wants to produce test units of each model of mobile device (iPhone 6,
6+, 7, 10, iPad Pro, Apple Watch with cellular service, etc.), according to
section 9, how many test units may be used?

___________
Answer: 1,000.

g. Find your phone’s IMEI number, and list the first two digits. Referencing
https://en.wikipedia.org/wiki/Reporting_Body_Identifier, what country is the
origin of your Reporting Body Identifier?

_________________________
Answer: 35 is Ireland, 01 is US, etc.
h. Calculate the check digit for the following IMEI number, based on the algorithm
shown in
https://en.wikipedia.org/wiki/International_Mobile_Equipment_Identity:

IMEI 3 5 0 2 4 6 2 0 4 1 2 8 6 2 x
Double
every
other
Sum
digits

x = _______
Answer:
IMEI 3 5 0 2 4 6 2 0 4 1 2 8 6 2 x
Double
every 6 10 0 4 4 12 2 0 4 2 2 16 6 4 x
other
Sum
6 + (1 + 0) + 0 + 4 + 4 + (1 + 2) + 2 + 0 + 4 + 2 + 2 + (1 + 6) + 6 + 4 + x = 45 + x
digits

Therefore, x = 5

© Kevin B Long & Elsevier Page 12 of 13


© Kevin B Long & Elsevier Page 13 of 13

Potrebbero piacerti anche