Escolar Documentos
Profissional Documentos
Cultura Documentos
Network Layer
Logical Addressing Scheme
(IP Addressing)
IPv4 ADDRESSES
An IPv4 address is a 32-bit address that uniquely and
universally defines the connection of a device (for
example, a computer or a router) to the Internet.
IPV4
IPV4
IPV4
Example 1
Change the following IPv4 addresses from binary
notation to dotted-decimal notation.
Solution
We replace each group of 8 bits with its equivalent
decimal number and add dots for separation.
Classfull Addressing
In classful addressing, the address
space is divided into five classes:
A, B, C, D, and E.
Classfull Addressing
IP address formats.
Solution : C
Explanation. For class C address, size of network field
is 24 bits. But first 3 bits are fixed as 110 for the
representation of class; hence total number of
networks possible is 221.
Note
Note:
CLASSLESS ADDRESSING
SCHEME
Classless Addressing
Classless Addressing
Note
Note
Example
A block of addresses is granted to a small organization.
We know that one of the addresses is 205.16.37.39/28.
What is the first address in the block?
Solution:
The binary representation of the given address
is
11001101 00010000 00100101 00100111
If we set 3228 rightmost bits to 0, we get
11001101
00010000 00100101 00100000
or 205.16.37.32
Note
Example
Find the last address for the block in previous.
Solution
The binary representation of the given address is
11001101 00010000 00100101 00100111
If we set 32 28 rightmost bits to 1, we get
11001101 00010000 00100101 00101111
or
205.16.37.47
This is actually the block shown in Figure.
Note
Example
Find the number of addresses in above problem.
Solution
The value of n is 28, which means that number
of addresses is 2 3228 or 16.
Problem:1
In a class B network on the internet has a IP
Address
144.97.17.132
Subnet Mask 255.255.255.192
Calculate the net id and host id for the IP address.
Solution:
Subnet Mask: 11111111 11111111 11111111
11000000
Net id ..
Host id .
Problem:2
In a class B network on the internet has a Subnet
Mask 255.255.240.0
Calculate the maximum no. of host per subnet.
Solution:
Subnet Mask: 11111111 11111111 11111111
11000000
No of Host per Subnet: ?
Solution : c
Explanation: IP address of C1 is 203.197.2.53 and
Subnet mask is 255.255.128.0 ending gives the network
id which is 203.197.0.0.
Explanation: Continuied
b. 1023
d. 2047
Solution : c
Explanation:
Number of bits for subnet mask = 21
Number of bits for host = 11
Number of hosts = 211-2 = 2046
(B) 255.255.255.128
(D) 255.255.255.224
Solution : d
Explanation: For both IP address of A & B if Subnet mask is
255.255.255.0 gives the same network id for A & B which is
10.105.1.0.
Explanation: Continued
Note
Problem:GATE 2012
Solution: (A)
Explanation:
Since half of 4096 host addresses must be given
to organization A, we can set 12th bit to 1 and
include that bit into network part of organization
A, so the valid allocation of addresses to A is
245.248.136.0/21
Now for organization B, 12th bit is set to 0 but
since we need only half of 2048 addresses, 13th
bit can be set to 0 and include that bit into
network part of organization B so the valid
allocation of addresses to B is 245.248.128.0/22
Problem:GATE 2011
Solution
Answer : A
Routing
McGraw-Hill