Title: COSC 6377 Spring 2002 Midterm
1COSC 6377 Spring 2002Midterm 2 (With Solution)
- Student Name
- Student ID
- Student Signature
2- Assume the flag used in HDLC consists of the byte
10000001. Bit stuffing is used to prevent the
occurrence of the flag inside the HDLC frame.
The transmitter examines the contents inside the
frame and inserts an extra 1 after each instance
of five consecutive 0s. - (a) (3 points) Show the binary sequence after
performing the bit stuffing procedure described
above for the following binary sequence - 1000001000000000000001
- Answer
- 1000001100000100000100001
- (b) (2 points) Assume that the bit stuff
described above is used by the transmitter. Show
the binary sequence after the receive performs
the bit destuffing procedure to the following
binary sequence generated by the transmitter - 0000011000000100000100000
- Answer
- 00000100000010000000000
-
3- 2. An virtual-circuit packet-switching network
and its routing tables are provided below. - (2.5 points)
- Which host will be reached by a packet sent by
host A with virtual circuit identifier (VCI) 2? - Answer Host D
- (2.5 points)
- Which host will be reached by a packet sent by
host E with virtual circuit identifier (VCI) 1? - Answer Host B
D
C
B
2
Port 2
2
Port 1
1
3
3
1
Port 3
S1
S3
S2
A
E
4- (10 points)
- Consider a packet-by-packet fair queuing system
with three logical queues and with service rate
of two units per second. Show the sequence of
transmission for this system for the following
packet arrival pattern. - Queue 1 packet 1 of length 2 arrives at time t
0 packet 2 of length 1 arrives at t 4 - Queue 2 packet 1 of length 8 arrives at time t
1 packet 2 of length 1 arrives at t 2 - Queue 3 packet 1 of length 1 arrives at time t
3 packet 2 of length 5 arrives at t 4 - Calculate the order of transmission.
- Answer
-
-
5- Use the TCP state transition diagram provided in
the next page to answer the following questions - (a) (5 points)
- A TCP connection is in the ESTABLISHED state.
The application sends a Close message. After
the Close message is successfully processed, what
is the clients state? - Answer FIN WAIT-1
- And what is the clients action?
- Answer FIN to server TCP
- (b) (3 points)
- In the TIME-WAIT state, Timer is used to guard
the consequences caused by the ACK segment not
received correctly by (Select all correct ones) - (a) Client TCP
- (b) Server TCP
- (c) Both client TCP and Server TCP
- Answer (b)
- (c) (2 points)
- Server TCP is in the SYS-RCVD state. When the
server TCPs retransmission timer timed out.
What is the action? - Answer The server TCP will send a Reset (RST)
segment to the client. - What is the consequence of this action on the
client TCP?
6BF Figure 12-24 State Transition Diagram
75. The state transition diagram of
point-to-point protocol (PPP) is provided below.
(a) (2.5 points) If one end of the PPP
connection sends an LCP packet with code 0216,
what is the state of the connection after this
event? Answer Note to TA The answer can be
either Authenticating state or Networking
state. (b) (2.5 points) When an initiator of
the PPP connection sends a LCP packet with code
0D16 to the responder, what is the code of the
packet that responders will send back to the
initiator? Answer 0716
8- 6. (5 points)
- The frame delimiter used by the point-to-point
protocol (PPP) consists of the byte 0x7E
(01111110). PPP uses the byte stuffing method to
prevent the occurrence of the frame delimiter
inside the PPP frame. The transmitter examines
the contents inside the frame and performs the
following replacements (note 0x7D is the escape
character) - - Replace 0x7E by 0x7D 0x5E
- - Replace 0x7D by 0x7D 0x5D
- The following byte sequence is generated by the
transmitter after the transmitter performed the
byte stuffing method to a PPP frame - 0x7D 0x5E 0x7D 0x5E 0x5E 0x24 0x7D 0x5D 0x7D
0x5D 0x5D 0x7D 0x5E - Show the byte sequence after the receive
performs the byte destuffing method to the above
byte sequence. - Answer
- 0x7E 0x7E 0x5E 0x24 0x7D 0x7D 0x5D 0x7E
-
9- (5 points)
- A router with IP address 195.5.2.12 and Ethernet
physical address AA25AB1F67CD has received a
packet for a destination with IP address
185.11.78.10. - When the router checks its routing table, it
finds out the packet should be delivered to a
router with IP address 199.5.2.6. - Complete the entries in the following ARP
request packet sent by the router. Assume there
is no subnetting. - Answer
16 bits
16 bits
10- 8. Given the topology in the following figure,
and the following specifications - Bridge B1s ID represented by its MAC address
(in HEX) is 0C00C8110000 - Bridge B2s ID represented by its MAC address
(in HEX) is 0C00C8222222 - Bridge B3s ID represented by its MAC address
(in HEX) is 0C00C8111111 - Costs assigned to each LAN are assumed to be
equal. - Please answer questions 8(a), 8(b), 8(c), and
8(d) on the next page based on the spanning tree
algorithm. -
-
Port 0 of B2
Port 1 of B2
LAN 2
11- 8. (a) (2.5 points)
- Which bridge will be chosen as the root bridge?
- Answer
- B1
- 8. (b) (2.5 points)
- Which are the root ports of bridge B2 and bridge
B3 respectively? - Answer
- The root port of bridge B2 port 0
- The root port of bridge B3 port 0
- 8. (c) (2.5 points)
- For LAN2 , which bridge is the designated
bridge, and which port of the designated bridge
is the designated port? - Answer
- B3/port 1
- 8. (d) (2.5 points)
- Which port of which bridge will be in blocking
state? - Answer
- B2/port 1
12- 9. (5 points)
- The IPV4 strict source route option is provided
in the next page for easy reference. - In the figure below, Host A wants to send a
datagram to Host B using a specific route A to
R1 to R2 to B - Please complete the strict source route option
fields at R1 and R2. -
- Answer
-
-
138.6.25.40
142.6.25.42
140.6.25.40
138.6.25.42
142.6.25.40
140.6.25.42
138.6.0.0
140.6.0.0
142.6.0.0
A
R2
B
R1
R1
R2
137
11
4
137
137
11
11
8
12
13BF Figure 7-15 Strict source route option
Note The pointer is the pointer into the route
data. It indicates the byte which begins the
next source address to be processed. The pointer
is relative to this potion, and the smallest
legal value for the pointer is 4.
4 bytes
1 byte
1 byte
1 byte
1 byte
14- (5 points)
- Router R1 receives an Ethernet frame generated
by Host A on Network 1. The frame carries 1400
bytes of data. - Network 2s MTU is 620 bytes consisting of 20
bytes of header and 600 bytes of data. - R1 performs the fragmentation described below
Fragment 1 consist of 600 bytes of data Fragment
2 consists of 600 bytes of data Fragment 3
consists of 200 bytes of data. Please complete
the following table - Answer
15- 11 (a) (2 point)
- ICMP type 3 means destination unreachable.
Under type 3, different codes are defined - Code 0 network unreachable
- Code 1 host unreachable
- Code 2 protocol unreachable
- Code 3 port unreachable
- Code 4 fragmentation needed and DF flag (do
not fragment) has been set - Code 5 source routing failed
- Which codes can be generated from a host? And
which codes can be generated from a router? - Answer
- Codes that can be generated from a host are
Code 2, and Code 3 - Codes that can be generated from a router are
Codes 0,1,4,5 - 11 (b) (3 points)
- Host A sends an ICMP timestamp request to Host
B. Host A receives the corresponding ICMP
timestamp reply from Host B at 13,567,000
milliseconds. - The values of the original timestamp field, the
receive timestamp field, and the transmit
timestamp field are 13.560,000, 13,562,000, and
13,564,300 milliseconds respectively. What is
the sending trip time? What is the receiving trip
time? And what is the round-trip time? - Answer
- Sending trip time 13,562,000 13,560,000
2,000 milliseconds - Receiving trip time 13,567,000 13,564,300
2,700 milliseconds - Round-trip time 2,000 2,700 4,700
milliseconds
16- 12 (a) (5 points)
- A network administrator has a class C IP
address. Based on the requirements of his TCP/IP
network, he realizes that he must create 5
subnets, and each subnet needs to have up to 25
host IDs. Which subnet masks should he choose
for his network? (Choose the correct one) - a. 255.255.255.224 (corresponding binary
representation 11111111.11111111.11111111.11100000
) - b. 255.255.255.240 (corresponding binary
representation 11111111.11111111.11111111.11110000
) - c. 255.255.255.248 (corresponding binary
representation 11111111.11111111.11111111.11111000
) - d. 255.255.255.252 (corresponding binary
representation 11111111.11111111.11111111.11111100
) -
- Answer a
- (b) (5 points)
- Subnets are created using the subnet mask
255.255.255.252 (corresponding binary
representation 11111111.11111111.11111111.11111100
) for a class C network 221.45.71.0
(corresponding binary representation 11011101
00101101 01000111 00000000). - Network 221.45.71.0 receives a packet with the
following destination IP address 221.45.71.15
(corresponding binary representation 11011101
00101101 01000111 00001111). The destination IP
address is a direct broadcast address for a
subnet. Which host Ids on the subnet will
receive the packet? (Select all correct ones) - a. 221.45.71.9 (binary representation 11011101
00101101 01000111 00001001) - b. 221.45.71.14 (binary representation 11011101
00101101 01000111 00001110) - c. 221.45.71.13 (binary representation 11011101
00101101 01000111 00001101) - d. 221.45.71.6 (binary representation
11011101 00101101 01000111 00000110) - Answer b,c
-
17- 13 (a) (3 points)
- Select all correct statements related to
pseudoheader - a. Pseudoheader is transmitted as part of the
TCP datagram because TCP is a connection-oriented
protocol while UDP pseudoheader is not
transmitted as part of the UDP datagram because
UDP is a connectionless protocol. - b. UDP length field is included twice in the UDP
checksum calculation while TCP length field is
included only once in the TCP checksum
calculation. - c. For TCP datagram, pseudoheader fields include
fields from the IP header. - Answer b,c
- (b) (2 points)
- The time when Host A receives a TCP
acknowledgement from Host B is 13,800 seconds. - The value in the timestamp field of the
acknowledgements timestamp option is 13,780
seconds. - The value in the timestamp echo reply field of
of the acknowledgements timestamp option is
13,770 seconds. - What is the round-trip time based on the
information provided above? - Answer 13,800 seconds 13,770 seconds 30
seconds. -
-
BF Figure 12-11Timestamp option
18- 14. (a) (1 points) A wide area network (WAN) uses
the OSPF protocol that connects two routers. What
type of OSPF link is it? - a. Stub link
- b. Point-to-point link
- c. Transient link
- Answer b
- (b) (1 points) An Ethernet LAN uses the OSPF
protocol with five attached routers. What type
of OSPF link is it? - a. Stub link
- b. Point-to-point link
- c. Transient link
- Answer c
- (c) (1 point) Which one of the following two
routing protocols uses reliable flooding to
exchange information among routers? - a. RIP
- b. OSPF
- Answer b
- (d) (1 point) Which one of the following two
routing protocols is more suitable for large
networks? - a. RIP
- b. OSPF
- Answer b
- (e) (1 point) RIP uses hop counts as a
criteria to select routing path while OSPF uses
cost metric as a criteria to select routing
path. Which criteria is more flexible?s
19- (5 points)
- A router has the following RIP routing table
-
- What would be the contents of the table if the
router receives the following RIP message from
router C before necessary increments -
- Answer
20RIP Updating Algorithm
21- (10 points)
- The leaky bucket algorithm shown in the next
page assumes that the leaky bucket drains at a
continuous rate of 1 packet per packet time. In
order to apply the leaky bucket algorithm to the
problem described below, one block of the leaky
bucket algorithm needs to be modified. - Given I 4, L 6, and the arrival times of
packets, complete the following table using the
leaky bucket algorithm. - Note
- 1.The unit of all numbers in this problem is
packet time - 2. Packets are assumed to be of fixed length (I
4) - 3. The leaky bucket will drain at a continuous
rate of 2 packets per packet time
22LG Figure 7.54 Leaky bucket algorithm used for
policing
The parameters are defined below ta packet
arrival time LCT last conformance time X value
of leaky bucket counter X auxiliary variable I
packet length LI Depth of the bucket
Arrival of a packet at time ta
X X - (ta - LCT)
Yes
X lt 0?
No
X 0
Yes
Nonconforming
X gt L?
packet
No
X X I
LCT ta
conforming packet