You are on page 1of 6

Review: Questions, problems and excercises

1. How are OSI and ISO related to each other?


2. Match the following to one or more layers of the OSI model:
a) route determination
b) flow-control
c) interface to transmission media
d) provides access for the end user
3. Match the following to one or more layers of the OSI model:
a) reliable process-to-process message delivery
b) route selection
c) defines frames
d) provides user services such as e-mail and file transfer
e) transmission of bit stream across physical medium
4. Match the following to one or more layers of the OSI model:
a) communicates directly with user’s application program
b) error correction and retransmission
c) mechanical, electrical, and functional interface
d) responsibility for carrying frames between adjacent nodes
5. Match the following to one or more layers of the OSI model:
a) format and code conversion services
b) establishes, manages, and terminates sessions
c) ensures reliable transmission of data
d) log-in and log-out procedures
e) provides independence from differences in data representation
6. A 100-byte message is sent through a private internet using the TCP/IP protocol suite.
If the protocol adds a 10-byte header at each layer, what is the efficiency of the system
(the ratio of the number of useful bytes to the number of total bytes)?
7. If a port number is 16 bits (2 bytes), what is the minimum header size at transport layer
of the TCP/IP protocol suite?
8. If a logical address is 32 bits (4 bytes), what is the minimum header size at network
layer of the TCP/IP protocol suite?
9. If a physical address is 48 bits (6 bytes) what is the minimum header size at the data
link layer of the TCP/IP protocol suite?
10. An Ethernet MAC sublayer receives 42 bytes of data from the LLC sublayer. How
many bytes of padding must be added to the data?
11. An Ethernet MAC sublayer receives 1510 bytes of data from the LLC layer. Can the
data be encapsulated in one frame? If not, how many frames need to be sent? What is
the size of the data in each frame?
12. Compare and contrast CSMA/CD with CSMA/CA
13. What is the address space in each of the following systems?
a) A system with 8-bit addresses
b) A system with 16-bit addresses
c) A system with 64-bit addresses
14. An address space has a total of 1,024 addresses. How many bits are needed to represent
an address?
15. An address space uses three symbols: 0, 1, and 2 to represent addresses. If each address
is made of 10 symbols, how many addresses are available in this system?
16. Change the following IP addresses from dotted-decimal notation to binary notation:
a) 114.34.2.8
b) 129.14.6.8
c) 208.34.54.12
d) 238.34.2.1
17. Change the following IP addresses from dotted-decimal notation to hexadecimal
notation:
a) 114.34.2.8
b) 129.14.6.8
c) 208.34.54.12
d) 238.34.2.1
18. Change the following IP addresses from hexadecimal notation to binary notation:
a) 0x1347FEAB
b) 0xAB234102
c) 0x0123A2BE
d) 0x00001111
19. How many hexadecimal digits are needed to define the netid in each of the following
classes?
a) Class A
b) Class B
c) Class C
20. Change the following IP addresses from binary notation to dotted-decimal notation:
a) 01111111 11110000 01100111 01111101
b) 10101111 11000000 11111000 00011101
c) 11011111 10110000 00011111 01011101
d) 11101111 11110111 11000111 00011101
21. Find the class of the following IP addresses:
a) 208.34.54.12
b) 238.34.2.1
c) 242.34.2.8
d) 129.14.6.8
22. Find the class of the following IP addresses:
a) 11110111 11110011 10000111 11011101
b) 10101111 11000000 11110000 00011101
c) 11011111 10110000 00011111 01011101
d) 11101111 11110111 11000111 00011101
23. Find the netid and the hostid of the following IP addresses:
a) 114.34.2.8
b) 132.56.8.6
c) 208.34.54.12
d) 251.34.98.5
24. Find the number of addresses in the range if the first address is 14.7.24.0 and the last
address is 14.14.34.255.
25. If the first address in a range is 122.12.7.0 and there are 2048 addresses in the range,
what is the last address?
26. In a class A subnet, we know the IP address of one of the hosts and the subnet mask as
given below:
27. IP Address: 25.34.12.56 Subnet mask: 255.255.0.0
28. What is the first address (subnet address)? What is the last address?
29. In a class B subnet, we know the IP address of one of the hosts and the subnet mask as
given below:
IP Address: 131.134.112.66 Subnet mask: 255.255.224.0
30. What is the first address (subnet address)? What is the last address?
31. In a class C subnet, we know the IP address of one of the hosts and the subnet mask as
given below:
IP Address: 202.44.82.16 Subnet mask: 255.255.255.192
32. What is the first address (subnet address)? What is the last address?
33. Find the subnet mask in each case:
a) 1024 subnets in class A
b) 256 subnets in class B
c) 32 subnets in class C
d) 4 subnets in class C
34. In a block of addresses, we know the IP address of one host is 25.34.12.56/16. What is
the first address (network address) and the last address (limited broadcast address) in
this block?
35. In a block of addresses, we know the IP address of one host is 182.44.82.16/26. What
is the first address (network address) and the last address (limited broadcast address) in
this block?
36. In fixed-length subnetting, find the number of 1s that must be added to the mask if the
number of desired subnets is _______.
a) 2
b) 62
c) 122
d) 250
37. An organization is granted the block 16.0.0.0/8. The administrator wants to create 500
fixed-length subnets.
a) Find the subnet mask.
b) Find the number of addresses in each subnet.
c) Find the first and the last address in the first subnet
d) Find the first and the last address in the last subnet (subnet 500).
38. An organization is granted the block 130.56.0.0/16. The administrator wants to create
1024 subnets.

a) Find the subnet mask.


b) Find the number of addresses in each subnet.
c) Find the first and the last address in the first subnet.
d) Find the first and the last address in the last subnet (subnet 1024).
39. An organization is granted the block 211.17.180.0/24. The administrator wants to create
32 subnets.
a) Find the subnet mask.
b) Find the number of addresses in each subnet.
c) Find the first and the last address in the first subnet.
d) Find the first and the last address in the last subnet (subnet 32).

40. Write the following mask in slash notation (/n):


a) 255.255.255.0
b) 255.0.0.0
c) 255.255.224.0
d) 255.255.240.0

41. Find the range of addresses in the following blocks:


a) 123.56.77.32/29
b) 200.17.21.128/27
c) 17.34.16.0/23
d) 180.34.64.64/30

42. Which fields of the IP header change from router to router?


43. Calculate the HLEN value if the total length is 1200 bytes, 1176 of which is data from
the upper layer.
44. Given a fragmented datagram with an offset of 120, how can you determine the first
and last byte number?
45. An IP datagram must go through router 128.46.10.5. There are no other restrictions on
the routers to be visited. Draw the IP options with their values.
46. What is the maximum number of routers that can be recorded if the timestamp option
has a flag value of 1? Why?
47. Can the value of the header length in an IP packet be less than 5? When is it exactly 5?
48. The value of HLEN in an IP datagram is 7. How many option bytes are present?
49. The size of the option field of an IP datagram is 20 bytes. What is the value of HLEN?
What is the value in binary?
50. The value of the total length field in an IP datagram is 36 and the value of the header
length field is 5. How many bytes of data is the packet carrying?
51. A datagram is carrying 1024 bytes of data. If there is no option information, what is the
value of the header length field? What is the value of the total length field?
52. A host is sending 100 datagrams to another host. If the identification number of the first
datagram is 1024, what is the identification number of the last?
53. An IP datagram arrives with fragmentation offset of 0 and an M bit (more fragment bit)
of 0. Is this a first fragment, middle fragment, or last fragment?
54. An IP fragment has arrived with an offset value of 100. How many bytes of data were
originally sent by the source before the data in this fragment?
55. An IP datagram has arrived with the following information in the header (in hexa-
decimal):

45 00 00 54 00 03 00 00 20 06 00 00 7C 4E 03 02 B4 0E 0F 02

a) Are there any options?


b) Is the packet fragmented?
c) What is the size of the data?
d) Is a checksum used?
e) How many more routers can the packet travel to?
f) What is the identification number of the packet?
g) What is the type of service?

56. In a datagram, the M bit is zero, the value of HLEN is 5, the value of total length is 200,
and the offset value is 200. What is the number of the first byte and number of the last
byte in this datagram? Is this the last fragment, the first fragment, or a middle fragment?
57. An ICMP message has arrived with the header (in hexadecimal):
03 0310 20 00 00 00 00

What is the type of the message? What is the code? What is the purpose of the message?
58. An ICMP message has arrived with the header (in hexadecimal):
05 00 11 12 11 0B 03 02
What is the type of the message? What is the code? What is the purpose of the message?
What is the value of the last 4 bytes? What do the last bytes signify?

59. Show the entries for the header of a UDP user datagram that carries a message from a
TFTP client to a TFTP server. Fill the checksum field with 0s. Choose an appropriate
ephemeral port number and the correct well-known port number. The length of data is
40 bytes. Show the UDP packet
60. An SNMP client residing on a host with IP address 122.45.12.7 sends a message to an
SNMP server residing on a host with IP address 200.112.45.90. What is the pair of
sockets used in this communication?
61. A TFTP server residing on a host with IP address 130.45.12.7 sends a message to a
TFTP client residing on a host with IP address 14.90.90.33. What is the pair of sockets
used in this communication?
62. Answer the following questions:

a) What is the minimum size of a UDP datagram?


b) What is the maximum size of a UDP datagram?
c) What is the minimum size of the process data that can be encapsulated in a UDP
datagram?
d) What is the maximum size of the process data that can be encapsulated in a UDP
datagram?

63. A client uses UDP to send data to a server. The data length is 16 bytes. Calculate the
efficiency of this transmission at the UDP level (ratio of useful bytes to total bytes).
64. Redo Exercise 63, calculating the efficiency of transmission at the IP level. Assume no
options for the IP header.
65. Redo Exercise 63, calculating the efficiency of transmission at the data link layer.
Assume no options for the IP header and use Ethernet at the data link layer.
66. The following is a dump of a UDP header in hexadecimal format.

0045DF000058FE20

a) What is the source port number?


b) What is the destination port number?
c) What is the total length of the user datagram?
d) What is the length of the data?
e) Is the packet directed from a client to a server or vice versa?
f) What is the client process?

67. Compare the TCP header and the UDP header. List the fields in the TCP header that
are not part of the UDP header. Give the reason for each missing field.
68. UDP is a message-oriented protocol. TCP is a byte-oriented protocol. If an application
needs to protect the boundaries of its message, which protocol should be used, UDP or
TCP?
69. What is the maximum size of the TCP header? What is the minimum size of the TCP
header?
70. If the value of HLEN is 0111, how many bytes of option are included in the segment?
71. Show the entries for the header of a TCP segment that carries a message from an FTP
client to an FTP server. Fill the checksum field with 0s. Choose an appropriate
ephemeral port number and the correct well-known port number. The length of data is
40 bytes.
72. What can you say about the TCP segment in which the value of the control field is one
of the following:

a. 000000 b. 000001 c. 010001 d. 000100 e. 000010 f. 010010

73. The following is a dump of a TCP header in hexadecimal format.

(05320017 00000001 00000000 500207FF 00000000)16

a) What is the source port number?


b) What is the destination port number?
c) What the sequence number?
d) What is the acknowledgment number?
e) What is the length of the header?
f) What is the type of the segment?
g) What is the window size?
74. A client uses TCP to send data to a server. The data consist of 16 bytes. Calculate the
efficiency of this transmission at the TCP level (ratio of useful bytes to total bytes).
Calculate the efficiency of transmission at the IP level. Assume no options for the IP
header. Calculate the efficiency of transmission at the data link layer. Assume no
options for the IP header and use Ethernet at the data link layer.

You might also like