Assignment #4 AIT 622 Summer 2008

navybeansvietnameseNetworking and Communications

Oct 24, 2013 (4 years and 7 months ago)


Assignment #4

AIT 622



July 1

1. Select a subnet mask for so that there will be at least 16,000 subnets with at least 700
host addresses available on each subnet.

Proposed Mask

11111111 11111111 11111100 00000000

Subnets: 2


= 16,382

Hosts: 2
2 = 1,022

2. Select a subnet mask for so that there are at least 500 subnets with at least 100 host
addresses per subnet.

Proposed Mask

11111111 11111111 111111


Subnets: 2




Hosts: 2
2 = 1

3. How many subnets are available if a class C address has six bits of subnetting? How many
host addresses are available per subnet?


11111111 11111111 11111111 11111100

Subnets: 2
2 = 62

Hosts: 2
2 = 2

4. Suppose a 28
bit mask is use
d to subnet How many subnets are available?
Give the mask and list the subnet addresses in binary and dotted
quad notation.

Class C address

11111111 11111111 11111111 11110000

Subnets: 2
2 = 14

Hosts: 2
2 = 14

5. Suppose a 20
bit mas
k is used to subnet How many subnets are available? Give
the mask and list the subnet addresses in binary and dotted
quad notation.

Class B address

11111111 11111111 11110000 0000

Subnets: 2
2 = 14

Hosts: 2
2 = 4094


How does TCP provide a reliable transfer service by using IP, which is unreliable?

Transmission Control Protocol (TCP) provides a reliable

stream transfer service between
two endpoints on an internet.

TCP depends on IP to move packets around the net
work on its

behalf. IP is inherently unreliable, so TCP protects against data

loss, data corruption, packet
reordering and data duplication by

adding checksums and sequence numbers to transmitted data
and, on

the receiving side, sending back packets that a
cknowledge the

receipt of data.

7. What “specializations” are made to the simplified sliding window protocol for TCP? What
two important problems does the specialized mechanism used by TCP solve?

TCP has a multi
stage flow
control mechanism which conti

adjusts the sender's data rate
in an attempt to achieve maximum

data throughput while avoiding congestion and subsequent

losses in the network. It also attempts to make the best use of

network resources by
acking as much data as possible in
to a

single IP packet, although this behaviour can be
overridden by

applications that demand immediate data transfer and don't care

about the
inefficiencies of small network packets.

8. Describe the connection abstraction used by TCP.

With TCP a given p
ort number dose not correspond o a single object. Instead, TCP has been
built on the connection abstraction, in which the objects to be identified are virtual circuit
connections, not individual ports.

TCP uses the connection, not the protocol port, as it
s fundamental abstraction; connections are
identified by a pair of endpoints.

9. Why does TCP support an option to specify a Maximum Segment Size (MSS) when it also
has a window advertisement mechanism?

TCP provides a means for a device to specify that
the MSS it wants to use is either smaller or
larger than the default value of 536.
A device can inform the other of the MSS it wants to

during the connection establishment process. A device that chooses to do so includes in its

message the TCP opti
on called, appropriately,
Maximum Segment Size

The other device
receives this option and records the MSS for the connection. Each device can specify the MSS it
wants for the segments it receives independently.

Devices may wish to use a larger MSS if they
know for a fact that the MTUs of the networks the
segments will pass over are larger than the IP minimum of 576. This is most commonly the case
when large amounts of data are sent on a local network; the process of path MTU discovery is
used to determine t
he appropriate MSS. A smaller MSS might be advisable if it were known that
a particular optional feature was in place that would consistently increase the size of the IP
header. Employing IPSec for security would be a good example.

Pg: 202 in the book

0. Why is the TCP acknowledgement scheme called
? What are the advantages and
disadvantages of cumulative acknowledgements?

The TCP acknowledgement scheme is called cumulative because it reports how much of the
stream has accumulated.


Lost acknowledgements do not necessarily fore retransmission.


The sender does not receive information about all successful transmissions, but only about a
single position in the stream that has been received.

11. Why is an adaptive ret
ransmission algorithm used for TCP? In general terms, how does it

To accommodate the varying

delays encountered in an internet environment, TCP uses an
adaptive retransmission algorithm that monitors delays on each connection and adjusts its
t parameter accordingly.

TCP records the time at which each segment is sent and the time at which an acknowledgement
arrives for the data in that segment. Fro the two times, TCP computes an elapsed time known as
a sample round trip time or round trip s
ample. Whenever it obtains a new round trip sample,
TCP adjusts its notion of the average round trip time for the connection.

12. What problem does Karn’s algorithm solve?

Karn’s Algorithm avoids the problem of ambiguous acknowledgements by only adjust
ing the
estimated round trip for unambiguous acknowledgements.

13. What is congestion? What two techniques does the TCP standard recommend to avoid
congestion? Describe the techniques.

Congestion is a condition of severe delay caused by and overload o
f datagrams at one or more
switching points.

To avoid congestion, the TCP standard now recommends using two techniques: slow
start and
multiplicative decrease.

Multiplicative decrease congestion avoidance: upon loss of a segment, reduce the congestion
indow by half (down to a minimum of at least one segment). For those segments that remain
in the allowed window, backoff the retransmission timer exponentially.

Start (Additive) Recovery: Whenever starting traffic on a new connection or increasing

traffic after a period of congestion, start the congestion window at the size of a single segment
and increase the congestion window by one segment each time an acknowledgement arrives.

14. What is silly window syndrome? Describe the two approaches tak
en to implement silly
window syndrome avoidance on the receive side; which is best? In general terms, describe the
Nagle algorithm that is used for silly window syndrome avoidance on the send side.

Two approaches to avoid silly window syndrome are, 1 T
CP acknowledges each segment that
arrives, but does not advertise an increase in its window until the window reaches the limits
specified by the silly window avoidance heuristic. In the second approach, TCP delays sending
an acknowledgement when silly win
dow avoidance specifies that the window is not sufficiently
large to advertise.

Delayed acknowledgments are most likely the best because delayed acknowledgements can
decrease traffic and thereby increase throughput.

Nagle algorithm:
side silly windo
w avoidance: When a sending application generates
additional data to be sent over a connection for which previous data has been transmitted but not
acknowledged, place the new data in the output buffer as usual, but do not send additional
segments until t
here is sufficient data to fill a maximum
sized segment. If still waiting to send
when an acknowledgement arrives, send all data that has accumulated in the buffer. Apply the
rule even when the users request a push operation.

Other things you should k
now (but don’t need to answer as part of the homework!)

1. Describe the properties of the TCP reliable stream delivery service

2. Describe the operation of the sliding window protocol.

3. Describe the differences and characteristics of the tail
rop policy and the random early
discard policy.

4. Understand how TCP works as related to the TCP state machine on page 223.