Practice Questions For Comprehensive Exam
Practice Questions For Comprehensive Exam
1. The conventional CRC technique is used to send the bit stream 10101010. x3 + x2 + 1
is the generator polynomial. Show the actual bit string that was sent. Let's say that
during transmission, the second bit from the left is inverted. Show that the receiver's
end is where this problem is discovered.
Solution:
The frame is 10101010
The generator is 1101= x3 +x2 +1
So we must append 3 zeros to the message: 10101010000
10101010000 1101
1101 11011110
01111
1101
1001
1101
01000
1101
01010
1101
01110
1101
110 is remainder.
Consequently, the actual bit string transferred is 10101010110.
The received bit stream is 11101010110 and has a mistake in the second bit from the left.
11101010110 1101
1101 10101010
001110
1101
001110
1101
001111
1101
00100 is a remainder.
As can be seen, the remaining is not zero. Thus, the fault is discovered by the recipient, who
can then request a resend.
2. A host wants to Setup a TCP connection to Public Server, the host holds Private IP
and connected to a NAT router. The TCP connection needs to be persistent and
should not allow Router to disconnect if there is not activity. So explain with more
details on TCP Headers which would be used for persistent TCP connection through
NAT router
SOLUTION:
When you set up a TCP connection, you associate a set of timers. Some of
these timers deal with the keepalive procedure. When the keepalive timer reaches
zero, you send your peer a keepalive probe packet with no data in it and the ACK flag
turned on. You can do this because of the TCP/IP specifications, as a sort of duplicate
ACK, and the remote endpoint will have no arguments, as TCP is a stream-oriented
protocol. On the other hand, you will receive a reply from the remote host (which
doesn't need to support keepalive at all, just TCP/IP), with no data and the ACK set.
If you receive a reply to your keepalive probe, you can assert that the
connection is still up and running without worrying about the user-level
implementation.
If the keepalive probes are not replied to by your peer, you can assert that the
connection cannot be considered valid and then take the correct action.
3. When Host-A is switched on (or when it boots up) it has only its MAC address with it.
Now it wants to send data to Host-B whose IP address is known to Host-A. in the path
from Host-A to Host-B there are 2 routers, R1 and R2. Explain the process in steps that
how a packet from Host-A is forwarded to Host-B. in each step mention clearly that
which network element has the packet, what information is required to forward the packet
to next element, and which protocol is used to get this information.
Solution:
Step 1. Host A procures mac address of router 1 through broadcasting IP
using ARP if MAC address is not available
Step 6: router 2 Deliveries data packet to HOST-B using IP and MAC address
Solution:
5.Consider the network setup shown in Figure. Suppose that the ISP instead assigns the router
the address 20.30.110.230 and that the network address of the home network is 192.168.2/24.
a.Assign addresses to all interfaces in the home network.
b.Suppose each host has two ongoing TCP connections, all to port 80 at host
128.119.40.186. Provide the six corresponding entries in the NAT translation table.
Solution:
a)Home addresses: 192.168.2.1, 192.168.2.2, 192.168.2.3 with the router interface being
192.168.2.4
b)
NAT Translation Table
WAN Side LAN Side
20.30.110.230, 4000 192.168.2.1, 3345
20.30.110.230, 4001 192.168.2.1, 3346
20.30.110.230, 4002 192.168.2.2, 3445
20.30.110.230, 4003 192.168.2.2, 3446
20.30.110.230, 4004 192.168.2.3, 3545
20.30.110.230, 4005 192.168.2.3, 3546
6.Assume a datagram of size 5000 bytes crosses 5 different networks segments on its way
from sender to receiver. The smallest MTU of all network segments is 820 bytes.
a.In how many datagrams does the original datagram have to be fragmented in?
b.At which point in the network does the fragmentation occur?
c.Show the length, ID, fragflag, and offset fields of the IP header of each fragment.
d.At which location are the IP fragments reassembled? Explain your answer.
Solution:
a. 7
b. The fragmentation occurs at the router directly ahead of the link with the
MTU of 800 bytes.
c.Here are the header field for the fragments:
1.Length = 820, ID = x, fragflag = 1, offset = 0;
2.Length = 820, ID = x, fragflag = 1, offset = 100;
3.Length = 820, ID = x, fragflag = 1, offset = 200;
4.Length = 820, ID = x, fragflag = 1, offset = 300;
5.Length = 820, ID = x, fragflag = 1, offset = 400;
6.Length =820, ID = x, fragflag = 1, offset = 500;
7.Length = 220, ID = x, fragflag = 0, offset = 600;
d.All fragments are reassembled at the receiving host. Reassembling at one of the
intermediate hosts could result in further fragmentation on other segments towards the
destination. Routers have no knowledge of the MTU size other than the one directly
connected to them
7. A local area network has a broadcast distance of 4km and transmission rate of 10 6 bps and
uses CSMA / CD. The signal travels along the wire at 2 x 10 8 m/sec. What is the minimum
packet size that can be used on this network?
Solution:
Given-
Distance = 4 km ; Bandwidth = 106 bps ; Speed = 2 x 108 m/sec
Calculating Propagation Delay-
Propagation delay (Tp)
= Distance / Propagation speed
= 4 km / (2 x 108 m/sec)
= 4x 103 m / (2 x 108 m/sec)
= 2 x 10-5 sec
Calculating Minimum Frame Size-
Minimum frame size
= 2 x Propagation delay x Bandwidth
= 2 x 2 x 10-5 sec x 106 bits per sec
= 40 bits.
8. Consider there are N stations connected to a channel of 8Mbps which uses FDMA and the
time of propagation of a frame is 2ms and the time taken to transmit a frame is 1ms.If each
station requires 2Kbps, calculate the efficiency of the channel, its effective bandwidth and the
maximum number of stations that can be connected using the effective bandwidth. [4 marks]
Solution:
Given Tt = 1ms , Tp = 2ms , bandwidth = 8Mbps
η = useful time/cycle time
= Tt / (Tt + Tp) = 1/(1+2) = 0.3333 = 33%
Effective bandwidth = η x bandwidth = 1/3 x 8Mbps = 2.667Mbps
If N stations require each 2Kbps, max.no. of stations that can be connected using 2.667Mbps
is,
N x 2Kbps = 2.667Mbps ~=1.3333*1000
N ~ = 1333 stations(approximately)
9.A message of size k bytes is sent through a VPN tunnel. The message is first encapsulated
in a TCP segment with a 20-byte header, then in an IP packet with a 20-byte header, and
finally in a VPN tunnelling protocol with a 24-byte header. If the Ethernet frame adds an
additional 16 bytes of overhead, what is the percentage of useful data transmitted if k equals
512 bytes, 1536 bytes, and 3072 bytes?
Solution:
TCP header = 20 bytes, IP header = 20 bytes, VPN header = 24 bytes, Ethernet
overhead = 16 bytes.
Total overhead = 20+20+24+16 = 80 bytes
Transmitted data = k+ 80 bytes
Message = k bytes
Percentage of useful data = k / (k+80)
k = 512
512/(512+80)= 86.48
k = 1536
1536/(1536+80) = 95.049
k = 3072
3072/(3072+80) = 97.46