You are on page 1of 2



A) We will use CTP (connors transport protocol) with its data not = 11011111 00000001 00000011 00011011
exceeding 1196 bytes and use a 4 byte header (with destination in R15 8 interfaces
it) to the packet. This then sends the destination and segment to 3 forwarding tables
the network layer, which sends the segment to the STP at the
destination host. This is then extracted and sent to the correct
Yes, since the full IPv6 datagram is encompassed in an IPv4 datagram.
port number.
B) Use CTP which accepts data chunks no larger than 1192 bytes. OG = outgoing!!!!!!!!!!!!!!!!!!!!
Now, however, the segment has two 4 byte headers; one header a) destination address link interface
acts as a source port field and the other a destination port field. H3 3
This is then sent to the network layer, which again sends it to the Data destined for H3 is sent through the #3 link interface
STP at the destination host. This is then examined, extracted, and b) no, the forwarding rule for datagram networks is based solely on the destination
sent to the source port.
C) no
c) Router A:
incoming interface| incoming VC No.| OG interface| OG VC No
A) The mail system will use Mail Transport Protocol (MTP) to send
its mail. The front of each letter will act as the header and the
contents of each letter will act as the packets segment data. MTP
will take a destination [IP] address and nothing more (since it only d) Router B:
requires the house address not the individuals address). It will
incoming interface| incoming VC No.| OG interface| OG VC No.
then take the letter and send the letter to the destination
address, which will then deal with it however it sees fit.
Router C:
B) No, the contents will never have to be looked at because all the incoming interface| incoming VC No.| OG interface| OG VC No
data needed for sending is in the header (on the front of the
Router D:
incoming interface| incoming VC No.| OG interface| OG VC No
Most firewalls block/intercept UDP traffic. TCP however is not
blocked through firewalls and therefore is used for video/voice
a) Entry Prefix Match Interface
Yes, the application designer can incorporate reliable data
1st 11100000 00 0
transfer into his/her application layer protocol. This would be very 2nd 11100000 01000000 1
difficult to accomplish however and require much debugging.
3rd 1110000 2
4th 11100001 1 3
Yes both segments will arrive at the same socket. The systems OS 5th otherwise 3
will provide the originating IP of each segment to differentiate
b) 11001000 10010001 01010001 01010101 interface is 3
between the two.
11100001 01000000 11000011 00111100 interface is 2
11100001 10000000 00010001 01110111 interface is 3
The web server creates an individual connection socket for each P13
persistent connect, each identified with a source IP address,
destination IP address, source port number, and destination port
number. When host C receives a packet it examines these four
identifiers to determine where to send the segment data.
Therefore A and B travel through different sockets, both identified Max Frag = 700 - 20 (header) = 680 bytes
as 80 but with different source IPs.
Required Frags = 4
Each Frag's ID No. = 422
a) 20 bytes
Each will be of size 700 bytes (including the header)
b) Ack No. = 90
-except the last one which will be 360 bytes (including the header)
the offsets will be 0, 85, 170, 255
NAK based protocol only detects when a subsequence packet is The first three frags will have flag = 1
lost when a later packet it received and the protocol notices a gap the last will have flag = 0
in the sequence numbers. So for the first case this would be a bad P22
choice since NAK can have a long error recovery time. In the
a) most likely there would be a packet sniffer somewhere within the NAT. as the packets
second case ACK based protocol would be undesirable because of came through we would check their sequence numbers and for consecutive sequence
the high data rate and high overhead associated with ACK.
numbers we would group them into clusters (assuming they aren't randomly assigned).
b) no, the result from a is dependent on the fact that the sequence numbers are assigned
a) True, if a sender window had size of 3 and sent the packets 1, 2, sequentially.
and 3 at Time zero. At some point when Time > zero (call this time P26
X) the receiver ACKS 1, 2, and 3. At some point after this when
step N Dt,pt Du,pu Dv,pv Dw,pw Dy,py Dz,pz
Time > X the sender times out and 1 and 2 are resent.
0 x
6,x 8,x
b) True, ^basically the same.
1 xv 7,v 6,v 3,x
6,x 8,x
c) True, Alternating Bit Protocol revolves around the 0 and 1 of an 2 xvu 7,v 6,v 3,x 6,x
6,x 8,x
alternating ACK. So the accumulative ACK is impossible since it
3 xvuw 7,v 6,v 3,x
6,x 8,x
needs to be sent after each packet is received. (Therefore SR is
4 xvuwy 7,v 6,v 3,x 6,x
6,x 8,x
acting like ABP)
5 xvuwyt 7,v 6,v 3,x 6,x
6,x 8,x
d) True, ^basically the same thing again
6 xvuwytz 7,v 6,v 3,x 6,x
6,x 8,x
a) There are 4,294,967,296 (2^32) possible sequence numbers. Cost to __ u v x y z
Sequence numbers increment by the side (in bytes) of data sent.
Therefore the MSS size is irrelevant and the max file size that can From __ x 5 3 0 4 4
be sent from A to B is 2^32 of bytes (about 4.3 Gigabytes).
b) 4294967296/536 = 8,012,998.687 = 8,012,999 segments.
P37 a) eBGP
66 (bytes of header) * 8,012,999 segments = 528,857,934 bytes of b) iBGP
c) eBGP
4,294,967,296 + 528,857,934 = 4,823,825,230 bytes.
d) Ibgp
4,823,825,230 bytes / 155,000,000 bytes per second = 31.6
R1. Suppose the network layer provides the following service. The network layer
a) Seq No. = 207
in the source host accepts a segment of maximum size 1,200 bytes and a destination host
source port = 302
address from the transport layer. The network layer then guarantees to deliver the
destination port = 80
segment to the transport layer at the destination host. Suppose many network application
b) ACK No. = 207
processes can be running at the destination host.
source port = 302
a. Design the simplest possible transport-layer protocol that will get application
destination port = 80
data to the desired process at the destination host. Assume the operating system in the
c) ACK No. = 127
destination host has assigned a 4-byte port number to each running application process.
b. Modify this protocol so that it provides a return address to the destination process.
c. In your protocols, does the transport layer have to do anything in the core of the
[Seq No. = 127, 80 bytes]
computer network?
[ACK No. = 207] R2. Consider a planet where everyone belongs to a family of six, every family lives in its
own house, each house has a unique address, and each person in a

a. In the second segment sent from Host A to B, what are the sequence number, source port number, and destination
port number?
b. If the first segment arrives before the second segment, in the acknowledgment of the first arriving segment, what is
the acknowledgment number, the source port number, and the destination port number?
c. If the second segment arrives before the first segment, in the acknowledgment of the first arriving segment, what is
the acknowledgment number?
d. Suppose the two segments sent by A arrive in order at B. The first acknowledgment is lost and the second
acknowledgment arrives after the first timeout interval. Draw a timing diagram, showing these segments and all
other segments and acknowledgments sent. (Assume there is no additional packet loss.) For each segment in your
figure, provide the sequence number and
the number of bytes of data; for each acknowledgment that you add, provide
the acknowledgment number.
P28. Host A and B are directly connected with a 100 Mbps link. There is one TCP connection between the two hosts,
and Host A is sending to Host B an enormous file over this connection. Host A can send its application data into its
TCP socket at a rate as high as 120 Mbps but Host B can read out of its TCP receive buffer at a maximum rate of 50
Mbps. Describe the effect of TCP flow control.
P31. Suppose that the five measured SampleRTT values (see Section 3.5.3) are 106 ms, 120 ms, 140 ms, 90 ms, and
115 ms. Compute the EstimatedRTT after each of these SampleRTT values is obtained, using a value of = 0.125 and
assuming that the value of EstimatedRTT was 100 ms just before the first of these five samples were obtained.
Compute also the evRTT after each sample is obtained, assuming a value of = 0.25 and assuming the value of
DevRTT was 5 ms just before the first of these five samples was obtained. Last, compute the TCP TimeoutInterval after
each of these samples is obtained.
P37. Compare GBN, SR, and TCP (no delayed ACK). Assume that the timeout values for all three protocols are
sufficiently long such that 5 consecutive data segments and their corresponding ACKs can be received (if not lost in
the channel) by the receiving host (Host B) and the sending host (Host A) respectively. Suppose Host A sends 5 data
segments to Host B, and the 2nd segment (sent from A) is lost. In the end, all 5 data segments have been correctly
received by Host B.
a. How many segments has Host A sent in total and how many ACKs has Host B sent in total? What are their sequence
numbers? Answer this question for all three protocols.
b. If the timeout values for all three protocol are much longer than 5 RTT, then which protocol successfully delivers all
five data segments in shortest time interval?
P43. Host A is sending an enormous file to Host B over a TCP connection. Over this connection there is never any
packet loss and the timers never expire. Denote the transmission rate of the link connecting Host A to the Internet by
R bps. Suppose that the process in Host A is capable of sending data into its TCP socket at a rate S bps, where S = 10
R. Further suppose that the TCP receive buffer is large enough to hold the entire file, and the send buffer can hold
only one percent of the file. What would prevent the process in Host A from continuously passing data to its TCP
socket at rate S bps? TCP flow control? TCP congestion control? Or something else? Elaborate.
P46. Consider that only a single TCP (Reno) connection uses one 10Mbps link which does not buffer any data. Suppose
that this link is the only congested link between the sending and receiving hosts. Assume that the TCP sender has a
huge file to send to the receiver, and the receivers receive buffer is much larger than the congestion window. We also
make the following assumptions: each TCP segment size is 1,500 bytes; the two-way propagation delay of this
connection is 150 msec; and this TCP connection is always in congestion avoidance phase, that is, ignore slow start.
a. What is the maximum window size (in segments) that this TCP connection can achieve?
b. What is the average window size (in segments) and average throughput (in bps) of this TCP connection?
c. How long would it take for this TCP connection to reach its maximum window again after recovering from a packet
P55. In this problem we investigate whether either UDP or TCP provides a degree of end-point authentication.
a. Consider a server that receives a request within a UDP packet and responds to that request within a UDP packet (for
example, as done by a DNS server). If a client with IP address X spoofs its address with address Y, where will the server
send its response?
b. Suppose a server receives a SYN with IP source address Y, and after responding with a SYNACK, receives an ACK
with IP source address Y with the correct acknowledgment number. Assuming the server chooses a random initial
sequence number and there is no man-in-the-middle, can the server be certain that the client is indeed at Y (and
not at some other address X that is spoofing Y)?
R13. What is the 32-bit binary equivalent of the IP address
R15. Suppose there are three routers between a source host and a destination host. Ignoring fragmentation, an IP
datagram sent from the source host to the destination host will travel over how many interfaces? How many
forwarding tables will be indexed to move the datagram from the source to the destination?
R20. It has been said that when IPv6 tunnels through IPv4 routers, IPv6 treats the IPv4 tunnels as link-layer protocols.
Do you agree with this statement? Why or why not?
P4. Consider the network below.
a. Suppose that this network is a datagram network. Show the forwarding table in router A, such that all traffic
destined to host H3 is forwarded through interface 3.
b. Suppose that this network is a datagram network. Can you write down a forwarding table in router A, such that all
traffic from H1 destined to host H3 is forwarded through interface 3, while all traffic from H2 destined to host H3 is
forwarded through interface 4? (Hint: this is a trick question.)
c. Now suppose that this network is a virtual circuit network and that there is one ongoing call between H1 and H3,
and another ongoing call between H2 and H3. Write down a forwarding table in router A, such that all traffic from H1
destined to host H3 is forwarded through interface 3, while all traffic from H2 destined to host H3 is forwarded
through interface 4.
d. Assuming the same scenario as (c), write down the forwarding tables in nodes B, C, and D.

P10. Consider a datagram network using 32-bit host addresses. Suppose a router has four links, numbered 0 through
3, and packets are to be forwarded to the link interfaces as follows:
Destination Address Range Link Interface
11100000 00000000 00000000 00000000
through 0
11100000 00111111 11111111 11111111
11100000 01000000 00000000 00000000
through 1
11100000 01000000 11111111 11111111
11100000 01000001 00000000 00000000
through 2
given house has a unique name. Suppose this planet has a mail service that
[Seq No. = 207, 40 bytes]
11100001 01111111 11111111 11111111
delivers letters from source house to destination house. The mail service
[ACK No. = 247] requires that (1) the letter be in an envelope, and that (2) the address of the
otherwise 3
a. Provide a forwarding table that has five entries, uses longest prefix matching, and forwards packets to the correct
destination house (and nothing more) be clearly written on the envelope. Suppose
[Seq No. = 127, 80 bytes]
each family has a delegate family member who collects and distributes letters for the other link interfaces.
[ACK No. = 247] family members. The letters do not necessarily provide any indication of the recipients of b. Describe how your forwarding table determines the appropriate link interface
for datagrams with destination addresses:
the letters.
11001000 10010001 01010001 01010101
a. Using the solution to Problem R1 above as inspiration, describe a protocol
Since Host B cannot read the data Host A send fast enough TCP that the delegates can use to deliver letters from a sending family member
11100001 01000000 11000011 00111100
Flow Control is utilized. TCP FC allows host B to set its receive
11100001 10000000 00010001 01110111
to a receiving family member.
window to 0 until it can start receiving from A again. Host A listens b. In your protocol, does the mail service ever have to open the envelope and
P11. Consider a datagram network using 8-bit host addresses. Suppose a router uses longest prefix matching and has
and adjusts its send rate based on what it hears. This maximizes examine the letter in order to provide its service?
the following forwarding table:
data transfer and is why Flow Control I s important.
Match Interface
R5. Why is it that voice and video traffic is often sent over TCP rather than UDP
in todays Internet? (Hint: The answer we are looking for has nothing to do
Estimated RTT = Sample RTTx + [1-x] Estimated RTT
with TCPs congestion-control mechanism.)
Dev RTT = Sample RTTy Estimated RTT + (1 y) Dev RTT
R6. Is it possible for an application to enjoy reliable data transfer even when the
TOI (time out interval) = Estimated RTT + 4 * Dev RTT
application runs over UDP? If so, how?
First Sample RTT, 0.125*106+0.875*100 = 100.75ms
R7. Suppose a process in Host C has a UDP socket with port number 6789. Suppose
Dev RTT = 0.25 * 106 100.75 +0.75*5 = 5.06ms
both Host A and Host B each send a UDP segment to Host C with destination port number For each of the four interfaces, give the associated range of destination host addresses and the number of addresses
TOI = 100.75+4*5.06=120.99ms
6789. Will both of these segments be directed to the same socket at Host C? If so, how will in the range.
Second Sample RTT = 120ms
the process at Host C know that these two segments originated from two different hosts? P13. Consider a router that interconnects three subnets: Subnet 1, Subnet 2, and Subnet 3. Suppose all of the
Estimated RTT = 103.15ms
interfaces in each of these three subnets are required to have the prefix 223.1.17/24. Also suppose that Subnet 1 is
R8. Suppose that a Web server runs in Host C on port 80. Suppose this Web
Dev RTT= 8ms
required to support at least 60 interfaces, Subnet 2 is to support at least 90 interfaces, and Subnet 3 is to support at
server uses persistent connections, and is currently receiving requests from
TOI = 135.15ms
least 12 interfaces. Provide three network addresses (of the form a.b.c.d/x) that satisfy these constraints.
two different Hosts, A and B. Are all of the requests being sent through the
Third Sample RTT = 140ms
P19. Consider sending a 2400-byte datagram into a link that has an MTU of 700 bytes. Suppose the original datagram
same socket at Host C? If they are being passed through different sockets, do
Estimated RTT = 107.8ms
is stamped with the identification number 422. How many fragments are generated? What are the values in the
both of the sockets have port 80? Discuss and explain.
Dev RTT= 14ms
various fields in the IP datagram(s) generated related to fragmentation?
R15. Suppose Host A sends two TCP segments back to back to Host B over a
TOI = 164ms
P22. Suppose you are interested in detecting the number of hosts behind a NAT. You observe that the IP layer stamps
TCP connection. The first segment has sequence number 90; the second has sequence
Fourth Sample RTT = 90ms
an identification number sequentially on each IP packet. The identification number of the first IP packet generated by
number 110.
Estimated RTT = 105.5ms
a host is a random number, and the identification numbers of the subsequent IP packets are sequentially assigned.
a. How much data is in the first segment?
Dev RTT= 14.4ms
Assume all IP packets generated by hosts behind the NAT are sent to the outside world.
b. Suppose that the first segment is lost but the second segment arrives at B.
TOI = 163ms
a. Based on this observation, and assuming you can sniff all packets sent by the NAT to the outside, can you outline a
In the acknowledgment that Host B sends to Host A, what will be the
Fifth Sample RTT = 115ms
simple technique that detects the number of unique hosts behind a NAT? Justify your answer.
acknowledgment number?
Estimated RTT = 106.7ms
P14. Consider a reliable data transfer protocol that uses only negative acknowledgments. b. If the identification numbers are not sequentially assigned but randomly assigned, would your technique work?
Dev RTT= 12.9ms
Suppose the sender sends data only infrequently. Would a NAK-only protocol be preferable Justify your answer.
TOI = 158ms
to a protocol that uses ACKs? Why? Now suppose the sender has a lot of data to send and P26. Consider the following network. With the indicated link costs, use Dijkstras shortest-path algorithm to compute
the end-to-end connection experiences few losses. In this second case, would a NAK-only the shortest path from x to all network nodes. Show how the algorithm works by computing a table similar to Table
A) GBN = 9 segments, 8 ACKs, Seq No. 0,1,2,3,4,1,2,3,4
protocol be preferable to a protocol that uses ACKs? Why?
SR = 6 segments, 5 ACKs, Seq No. 0,1,2,3,4,1
P24. Answer true or false to the following questions and briefly justify your
TCP = 6 segments 5 ACKs, Seq No. 0,1000,2000,3000,4000,1000 answer:
a. With the SR protocol, it is possible for the sender to receive an ACK for a
packet that falls outside of its current window.
There is no danger in overflow to the receiver since the receivers b. With GBN, it is possible for the sender to receive an ACK for a packet that
buffer can hold the full file. Also since theres no loss and ACKs are falls outside of its current window.
return prior to the timer expires TCP Congestion Control doesnt c. The alternating-bit protocol is the same as the SR protocol with a sender
accelerate the sender. Yet, The process in host A wont
and receiver window size of 1.
continuously send data to the socket since this will make the send d. The alternating-bit protocol is the same as the GBN protocol with a sender
buffer fill up. Once the send buffer is full data will be passed at an and receiver window size of 1.
average rate.
P26. Consider transferring an enormous file of L bytes from Host A to Host B.
Assume an MSS of 536 bytes.
A) WS * 1500 / RTT
a. What is the maximum value of L such that TCP sequence numbers are not
Window size = 83.3
exhausted? Recall that the TCP sequence number field has 4 bytes.
Window size ~ 84
P28. Consider the network shown below, and assume that each node initially knows the costs to each of its neighbors.
b. For the L you obtain in (a), find how long it takes to transmit the file.
B) AvgWS = 83*.75 = 62.25 ~ 63 segments
Consider the distance-vector algorithm and show the distance table entries at node z.
Assume that a total of 66 bytes of transport, network, and data-link header
AvgThroughput = 10Mb * .75 = 7.5 Mb
are added to each segment before the resulting packet is sent out over a
C) RTT = 42
155 Mbps link. Ignore flow control and congestion control so A can pump
4.2 seconds
out the segments back to back and continuously.
P27. Host A and B are communicating over a TCP connection, and Host B has already
A) The server will send to the spoofed address Y since its the
received from A all bytes up through byte 126. Suppose Host A then sends two segments
matching address.
to Host B back-to-back. The first and second segments contain 80 and 40 bytes of data,
B) The server can never actually be sure it was sent to the correct respectively. In the first segment, the sequence number is 127, the source port number is
address and not a spoofed address in this case.
302, and the destination port number is 80. Host B sends an acknowledgment whenever it
receives a segment from Host A.

P37. Consider the network shown below. Suppose AS3 and AS2 are running
OSPF for their intra-AS routing protocol. Suppose AS1 and AS4 are running RIP
for their intra-AS routing protocol. Suppose eBGP and iBGP are used for the
inter-AS routing protocol. Initially suppose there is no physical link between AS2
a. Router 3c learns about prefix x from which routing protocol: OSPF, RIP,
eBGP, or iBGP?
b. Router 3a learns about x from which routing protocol?
c. Router 1c learns about x from which routing protocol?
d. Router 1d learns about x from which routing protocol?

a. Host A is sending Host B a large file over a TCP connection. Assume Host B
has no data to send Host A. Host B will not send acknowledgments to Host A
because Host B cannot piggyback the acknowledgments on data. False
b. The size of the TCP rwnd never changes throughout the duration of the
connection. False
c. Suppose Host A is sending Host B a large file over a TCP connection. The
number of unacknowledged bytes that A sends cannot exceed the size of the
receive buffer. True
d. Suppose Host A is sending a large file to Host B over a TCP connection. If the
sequence number for a segment of this connection is m, then the sequence
number for the subsequent segment will necessarily be m + 1. False
e. The TCP segment has a field in its header for cwnd. False
f. Suppose that the last SampleRTT in a TCP connection is equal to 1 sec. The
current value of Timeout Interval for the connection will necessarily be 1 sec.
g. Suppose Host A sends one segment with sequence number 38 and 4bytes of
data over a TCP connection to Host B. In this same segment the
acknowledgment number is necessarily 42. False
Q. Assuming TCP Reno is the protocol experiencing the behavior shown in the
below, answer the following questions.
a. Identify the intervals of time when TCP slow start is operating. [1,6], [23,26]
b. Identify the intervals of time when TCP congestion avoidance is operating.
[6,16] and [17,22]
c. Identify the starting transmission round when TCP fast recovery is operating.
d. After the 16th transmission round, is segment loss detected by a triple
duplicate ACK or by a timeout? Triple duplicate ACK
e. After the 22nd transmission round, is segment loss detected by a triple
duplicate ACK or by a timeout? Timeout
f. What is the initial value of ssthresh at the first transmission round? 32
g. What is the value of ssthresh at the 18th transmission round? 21
h. What is the value of ssthresh at the 24th transmission round? 14
i. During what transmission round is the 60th segment sent? During the 1
transmission round, packet 1 is sent; packet 2-3 are sent in the 2 Transmission
round; packets 4-7 are sent in the 3 transmission round; packets 8-15 are sent
in the 4 transmission round; packets 16-31 are sent in the 5 transmission
round; packets 32-63 are sent in the 6 transmission round;
j. Assuming a packet loss is detected after the 26th round by the receipt of a
triple duplicate ACK, what will be the values of the ssthresh? 4

DHCP: Dynamic Host Configuration Protocol: dynamically get address from an

server |plug-and-play | can renew its lease | allows reuse of addresses |
support for mobile users {OVERVIEW} host broadcasts DHCP discover msg
[optional] | DHCP server responds with DHCP offer msg [optional] |host
requests IP address: DHCP request msg |DHCP server sends address:
DHCP ack msg
SYN: The active open is performed by the client sending a SYN to the server.
The client sets the segment's sequence number to a random value A.
SYN-ACK: In response, the server replies with a SYN-ACK. The acknowledgment
number is set to one more than the received sequence number i.e. A+1, and the
sequence number that the server chooses for the packet is another random
number, B.
ACK: Finally, the client sends an ACK back to the server. The sequence number
is set to the received acknowledgement value i.e. A+1, and the
acknowledgement number is set to one more than the received sequence
number i.e. B+1.
Registrar inserts two RRs into .com TLD server:
(,, NS)
(,, A)
Create authoritative server type A record for;,, A)
Nodal processing: check bit errors, determine output links
Transmission: L/R, push packets bits into link
Queuing: waiting delay to be transferred on to link
Propagation: time required to propagate from beginning to the end of the link
Flow control is controlled by the receiving side. It ensures that the sender only
sends what the receiver can handle. COMES AFTER CONGESTIONS CONTROL
Congestion control is a method of ensuring that everyone across a network has
a "fair" amount of access to network resources, at any given time.
Traceroute is a utility that traces a packet from your computer to an Internet
host, but it will show you how many hops the packet requires to reach the host
and how long each hop takes.
Ping is a utility that you use to
determine whether or not a specific IP address is accessible. Ping works by
sending a packet to a specified address and waiting for a reply.