Problems
Problems
1 Problems on Subnetting 4
2 Exercise on Subnetting 10
3 Problems on Fragmentation 11
4 Exercise on Fragmentation 17
2
GENERAL OBJECTIVE
3
LECTURE 1:- PROBLEMS ON SUBNETTING
Problem 1:
Calculate the number of subnets required for the IP address
20.0.0.0. Also write the Subnet IDs required and Broadcast
ID for the network shown in the diagram.
Solution:
1. Given IP Address is 20.0.0.0.
It is a Class A address,
which has 8 Network bits
and 24 host bits.
4
LECTURE 1:- Problems on Subnetting
3. Maximum number of Subnet ID required
2n>=60, as largest number of end system is the network is 60.
For n=6, we get
26-2>=60
64-2>=60
62>=60
Hence n=6, i.e. maximum number of subnet required.
5
LECTURE 1:- Problems on Subnetting
Subnet IDs and Broadcast IDs:
7. Default Subnet Mask for Class A
is 255.0.0.0. Subnet ID 1: 20.0.0.0/26
Broadcast Id: 20.0.0.63
8.8. After Subnetting Default
subnet Mask will be Subnet Id 2: 20.0.0.64/26
255.255.255.192 Broadcast Id:20.0.0.127
As n=6, we require six subnet IP
addresses Subnet Id 3: 20.0.0.128/26
Broadcast Id:20.0.0.191
Subnet Id 4: 20.0.0.192/26
Broadcast Id:20.0.0.255
Subnet Id 5: 20.0.1.0/26
Broadcast Id: 20.0.1.63
Subnet Id 6: 20.0.1.64/26
Broadcast Id:20.0.1.127
6
LECTURE 1:- PROBLEMS ON SUBNETTING
Problem 2:
Determine the number of subnets required for the given
network and the IP address 15.0.0.0. Write the Subnet IDs
and Broadcast IDs required.
Solution:
1. Given IP Address is
15.0.0.0. It is a Class A
address, which has 8 Network
bits and 24 host bits.
7
LECTURE 1:- Problems on Subnetting
3. Maximum number of Subnet ID required
2n>=1024, as largest number of end system is the network is 1024.
For n=11, we get
211-2>=1024
2048-2>=1024
2044>=1024
Hence n=11, i.e. maximum number of subnet IDs required.
4. Keep 11 bits for the host and give remaining bits to the network.
Subnet ID 1: 15.0.8.0/21
Broadcast Id: 15.0.15.255
Subnet ID 3:15.0.16.0/21
Broadcast Id: 15.0.23.255
Subnet ID 4: 15.0.24.0/21
Broadcast Id: 15.0.31.255
Subnet ID 5: 15.0.32.0/2
Broadcast Id: 15.0.39.255
Subnet ID 6: 15.0.40.0/21
Broadcast Id: 15.0.47.255
9
LECTURE 1:- Exercise on Subnetting
10 1. Calculate the number of
subnets required for the
given network and the IP
address 193.168.10.0.
30 R1 R2 24 Write the Subnet IDs and
Broadcast IDs required.
60 120
10
10
LECTURE 2:- Problems on Fragmentation
Problem 1
A datagram of 4000 bytes (60 bytes of IP header + 3940 bytes of payload)
arrives at router and must be forwarded to a link with an MTU of 1500
bytes. Find how many fragments will be generated and also give the values
of MF field, offset, and total value for all.
Solution:
Given-
Datagram = 4000 bytes = 60 Bytes (IP header) + 3940 Bytes (Data)
11
LECTURE 2:- Problems on Fragmentation
Total
Fragments MF Offset
Length
P1 1440+60 1500 1 0 0
12
LECTURE 2:- Problems on Fragmentation
Problem 2:
A datagram of 3000 bytes (20 bytes of IP header + 2980 bytes of payload)
arrives at router and must be forwarded to a link with an MTU of 500 bytes.
Find how many fragments will be generated and also give the values of MF
field, offset, and total value for all.
Solution:
Given-
Datagram =3000 bytes = 20 Bytes (IP header) + 2980 Bytes (Data)
MTU= 500Bytes = 20 B + 480B
13
LECTURE 2:- Problems on Fragmentation
14
LECTURE 2:- Problems on Fragmentation
Problem 3:
A datagram of 4000 bytes (20 bytes of IP header + 3980 bytes of payload)
arrives at router and must be forwarded to a link with an MTU of 1500
bytes. Find how many fragments will be generated and also give the values
of MF field, offset, and total value for all.
Solution:
Given-
Datagram =4000 bytes = 20 Bytes (IP header) + 3980 Bytes (Data)
MTU = 1500Bytes = 20 B + 1480B
Number of fragments = 3980 Bytes/1480 Bytes
= 2.68
= 3 (Take Upper Value)
15
LECTURE 2:- Problems on Fragmentation
No of fragments will be generated and also give the values of MF field, offset, and
0
P1 1480+20 1500 1 0
185
P2 1480+20 1500 1 1480/8=185
370
P3 1020+20 1040 0 1480+1480=370/8=370
16
LECTURE 2:- Exercise on Fragmentation
1. A datagram of 4000 bytes (60 bytes of IP header + 3940 bytes of
payload) arrives at router and must be forwarded to a link with an MTU
of 1000 bytes. Find how many fragments will be generated and also give
the values of MF field, offset, and total value for all.
17
LECTURE :- 3 Problems on CRC
Problem 1:
Consider the Cyclic Redundancy Check (CRC) based error detecting
scheme having the generator polynomial X3+X+1. Suppose the
message bits are 110000 is to be transmitted. Calculate the value of
check bit sequence appended at the end of the message bits by the
transmitter. Receiver will receive the data bits without error; verify
whether the received bits are error free or not.
Solution:
Given
Original Message=110000
Generator Polynomial= X3+X+1
Therefore,
CRC Generator= 1X3+0X2+1X1+1X0= 1011 4-bit
As CRC generator is of 4 bit, 3 zeros will be appended to the original
message
Therefore, 110000000 will become the message
Now, perform division .
18
LECTURE :- 3 Problems on CRC
19
LECTURE :- 3 Problems on CRC
Problem 2: Consider the following message M = 1010001101. Calculate the
cyclic redundancy check (CRC) for this message using the divisor polynomial
x5 + x4 + x2 + 1.
Solution:
Original Message=1010001101
Generator Polynomial= x5 + x4 + x2 + 1
Therefore,
Hence,
M= 101000110100000 will be the message.
Now, perform division
20
LECTURE :- 3 Problems on CRC
At Sender
110101 101000110100000 Now, append the last five bits of
XOR 110101 remainder with original data, and send it
XOR 011101110100000 to receiver. And perform the same
110101
division at the end of receiver.
XOR 101000110100000 M=1010001101001110
110101
At Receiver
XOR 011101110100000
110101 101000110101110
110101
XOR 110101
XOR 00111010100000 XOR 011101110101110
110101 110101
XOR 001111100000
110101 XOR 00111010101110
XOR 0010110000 110101
110101 XOR 001111101110
XOR 01100100 110101
110101
XOR 0010111110
0001110
110101
Remainder 001110
XOR 01101010
As the remainder is all zeros, it shows that 110101
21
LECTURE :- 3 Exercise on CRC
1. Consider the following message M = 101101. Calculate the cyclic
redundancy check (CRC) for this message using the divisor
polynomial X2+1.
2. Consider the following message M = 100100100. Calculate the cyclic
redundancy check (CRC) for this message using the divisor
polynomial X3 + X2 + 1
22
Recommended Books:
23
References Books:
24
References Website
25