4 1 IP Addressing Lyst7910

Download as pdf or txt
Download as pdf or txt
You are on page 1of 104

IPV4 ADDRESSES

• The Internet Protocol addresses are 32 bits in length; this gives us a maximum of 232
addresses. These addresses are referred to as IPv4 (IP version 4) addresses or simply IP
addresses if there is no confusion.

• This means that, theoretically, if there were no restrictions, more than 4 billion
(4,29,49,67,296) devices could be connected to the Internet. The actual number is much less
because of the restrictions imposed on the addresses.

• The need for more addresses, in addition to other concerns about the IP layer, motivated a
new design of the IP layer called the new generation of IP or IPv6 (lP version 6). In this version,
the Internet uses 128-bit addresses that give much greater flexibility in address allocation (3.4
*1038). These addresses are referred to as IPv6 (IP version 6) addresses.

To access all paid content get KG Prime at ₹25/day CLICK HERE


• An IP address is uniquely and universally defining the connection of a host or a router to the Internet.

• They are unique in the sense that each address defines one, and only one, connection to the Internet.
Two devices on the Internet can never have the same address at the same time.

• The IPv4 addresses are universal in the sense that the addressing system must be accepted by any host
that wants to be connected to the Internet.

• The IP address is the address of the connection, not the host or the router, because if the device is
moved to another network, the IP address may be changed.

To access all paid content get KG Prime at ₹25/day CLICK HERE


To access all paid content get KG Prime at ₹25/day CLICK HERE
Notations
• There are two prevalent notations to show an IPv4 address: binary notation and dotted
decimal notation.

• Binary Notation - In binary notation, the IPv4 address is displayed as 32 bits. Each octet is
often referred to as a byte. So, it is common to hear an IPv4 address referred to as a 32-bit
address or a 4-byte address. An example of an IPv4 address in binary notation:
01110101 10010101 00011101 00000010

• Dotted-Decimal Notation - To make the IPv4 address more compact and easier to read,
Internet addresses are usually written in decimal form with a decimal point (dot) separating
the bytes. The following is the dotted decimal notation of the above address: 117.149.29.2

To access all paid content get KG Prime at ₹25/day CLICK HERE


To access all paid content get KG Prime at ₹25/day CLICK HERE
Classful Addressing
• IPv4 addressing, at its inception, used the concept of classes. This architecture is called classful addressing.
• A 32-bit IPv4 address is hierarchical and divided only into two parts:
• The first part of the address, called the prefix, defines the network (NetworkID).
• The second part of the address, called the suffix, defines the node (connection of a device to the Internet
(HostID)).
• The prefix length is n bits and the suffix length is (32 − n) bits.

To access all paid content get KG Prime at ₹25/day CLICK HERE


• IPv4 was first designed as a fixed-length prefix and is referred to as classful addressing

• In classful addressing, the address space is divided into five classes: A, B, C, D, and E. Each class
occupies some part of the address space.

• Now-a-days it has become obsolete because of many problems, now the new scheme referred
to as classless addressing, uses a variable-length network prefix.

To access all paid content get KG Prime at ₹25/day CLICK HERE


• To accommodate both small and large networks, three fixed-length prefixes were designed (n =
8, n = 16, and n = 24).

• The whole address space was divided into five classes (class A, B, C, D, and E).

• This scheme is referred to as classful addressing.

To access all paid content get KG Prime at ₹25/day CLICK HERE


To access all paid content get KG Prime at ₹25/day CLICK HERE
Class A
• In Class A NetID = 8 bits and HostID = 24.
• How to identify class A address
• First bit is reserved to 0 in binary notation
• Range of 1st octet is [0, 127] in dotted decimal notation
• Total number of connections in class A is 231 (2,14,74,83,648)
• There are 27 -2 = 126 networks in Class A network.
• In Class A, total network available are 2 less, because:
• IP Address 0.0.0.0 is reserved for broadcasting requirements
• IP Address 127.0.0.1 is reserved for loopback address used for software testing.
• The range of 1st octet is [0, 127] but since two addresses are reserved it is: [1, 126].

To access all paid content get KG Prime at ₹25/day CLICK HERE


• There are 224 – 2 (1,67,77,214) HostID in Class A.
• In all the classes, total number of hosts that can be configured are 2 less because:
• This is to account for the two reserved IP addresses in which all the bits for host ID are
either zero or one.
• When all Host ID bits are 0, it represents the Network ID for the network.
• When all Host ID bits are 1, it represents the Broadcast Address.
• Class A is used by organizations requiring very large size networks like Indian Railways.

To access all paid content get KG Prime at ₹25/day CLICK HERE


To access all paid content get KG Prime at ₹25/day CLICK HERE
Class B
• In Class B NetID = 16 bits and HostID = 16.
• How to identify class B address
• First two bits are reserved to 10 in binary notation
• Range of 1st octet is [128, 191] in dotted decimal notation
• Total number of connections in class B is 230 (1,07,37,41,824)
• Total number of networks available in class B is 214 (16,384)
• Total number of hosts that can be configured in every network in class B is 2 16 – 2 (65,534)
• Class B is used by organizations requiring medium size networks

To access all paid content get KG Prime at ₹25/day CLICK HERE


To access all paid content get KG Prime at ₹25/day CLICK HERE
Class C
• In Class C NetID = 24 bits and HostID = 8.
• How to identify class C address
• First three bits are reserved to 110 in binary notation
• Range of 1st octet is [192, 223] in dotted decimal notation
• Total number of connections in class C is 229 (53,68,70,912)
• Total number of networks available in class C is 221 (20,97,152)
• Total number of hosts that can be configured in every network in class C is 2 8 – 2 (254)
• Class C is used by organizations requiring small to medium size networks.

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q In the IPv4 addressing format, the number of networks allowed under Class C
addresses is (Gate-2012) (1 Marks)
(A) 2 14 (B) 2 7 (C) 2 21 (D) 2 24

To access all paid content get KG Prime at ₹25/day CLICK HERE


To access all paid content get KG Prime at ₹25/day CLICK HERE
Class D
• Class D is not divided into Network ID and Host ID.
• How to identify class D address
• First four bits are reserved to 1110 in binary notation
• Range of 1st octet is [224, 239] in dotted decimal notation
• Total number of IP Addresses available in class D = 228 (26,84,35,456)
• Class D is reserved for multicasting, in multicasting, there is no need to extract host address
from the IP Address, this is because data is not destined for a particular host.

To access all paid content get KG Prime at ₹25/day CLICK HERE


Class E
• Class E is not divided into Network ID and Host ID.
• How to identify class E address
• First four bits are reserved to 1111 in binary notation
• Range of 1st octet is [240, 255] in dotted decimal notation
• If the 32-bit binary address starts with bits 1111, then IP Address belongs to class E.
• Range of 1st octet = [240, 255]
• Total number of IP Addresses available in class E = 228 (26,84,35,456)
• Class E is reserved for future or experimental purposes.

To access all paid content get KG Prime at ₹25/day CLICK HERE


Points to note
• All the hosts in a single network always have the same network ID but different Host ID.

• Two hosts in two different networks can have the same host ID.

• Only those devices which have the network layer will have IP Address, switches, hubs and
repeaters does not have any IP Address.

To access all paid content get KG Prime at ₹25/day CLICK HERE


To access all paid content get KG Prime at ₹25/day CLICK HERE
Casting in Networks

Types of Casting
• Casting in a network is basically of three type: Unicast, Multicast and Broadcast.

• Unicast: Transmitting data from one source host to one destination host is called as unicast. It
is a one to one transmission.

To access all paid content get KG Prime at ₹25/day CLICK HERE


• Broadcast: Transmitting data from one source host to all other hosts residing in a network
either same or other network is called as broadcast. It is a one to all transmission.

• Limited Broadcast: Transmitting data from one source host to all other hosts residing in the
same network is called as limited broadcast. Limited Broadcast Address for any network is
• All 32 bits set to 1 = 11111111.11111111.11111111.11111111 = 255.255.255.255

• Direct Broadcast: Transmitting data from one source host to all other hosts residing in
some other network is called as direct broadcast.
• Direct Broadcast Address for any network is the IP Address where, Network ID is the IP
Address of the network where all the destination hosts are present and Host ID bits are
all set to 1.

To access all paid content get KG Prime at ₹25/day CLICK HERE


• Multicast: Transmitting data from one source host to a particular group of hosts having
interest in receiving the data is called as multicast. It is a one to many transmissions.

To access all paid content get KG Prime at ₹25/day CLICK HERE


To access all paid content get KG Prime at ₹25/day CLICK HERE
Subnetting
o Maintenance of a very big network like class A and class B is very difficult for network
administrator.

o Having all the computer from different departments in a company on the same networks is
less secure from company prospective.

o So, if an organization was granted a large block in class A or B, it could divide the addresses
into several contiguous groups and assign each group to smaller networks (called subnets) or,
in rare cases, share part of the addresses with neighbours.

To access all paid content get KG Prime at ₹25/day CLICK HERE


• Conclusion: An organization (or an ISP) that is granted a range of addresses may divide the
range into several subranges and assign each subrange to a subnetwork (or subnet). A
subnetwork can be divided into several sub-subnetworks. A sub-subnetwork can be divided
into several sub-sub-subnetworks, and so on.

To access all paid content get KG Prime at ₹25/day CLICK HERE


Advantages
• It improves the security.
• The maintenance and administration of subnets is easy.

Disadvantages
• Identification of a station is difficult
• Not possible to directed broadcast from outside network.

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q Consider the network having IP Address 200.1.2.0. Divide this network into two subnets.

To access all paid content get KG Prime at ₹25/day CLICK HERE


1st Subnet 2nd Subnet
• IP Address of the subnet / Subnet id = 200.1.2.0 • IP Address of the subnet / Subnet id = 200.1.2.128
• Total number of IP Addresses = 27 = 128 • Total number of IP Addresses = 27 = 128
• Total number of hosts that can be configured = 128 – 2 = 126 • Total number of hosts that can be configured = 128 – 2 = 126
• Range of IP Addresses = [200.1.2.0, 200.1.2.127] • Range of IP Addresses = [200.1.2.128, 200.1.2.255]
• Direct Broadcast Address = 200.1.2.01111111 = 200.1.2.127 • Direct Broadcast Address = 200.1.2.11111111 = 200.1.2.255
• Limited Broadcast Address = 255.255.255.255 • Limited Broadcast Address = 255.255.255.255

To access all paid content get KG Prime at ₹25/day CLICK HERE


Subnet ID
• Each subnet has its unique network address known as its Subnet ID.
• The subnet ID is created by borrowing some bits from the Host ID part of the IP Address.
• The number of bits borrowed depends on the number of subnets created.
• Subnetting increases the number of I’s in the mask

To access all paid content get KG Prime at ₹25/day CLICK HERE


To access all paid content get KG Prime at ₹25/day CLICK HERE
Q Consider we have a big single network having IP Address 200.1.2.0. We want to do subnetting
and divide this network into 4 subnets.

To access all paid content get KG Prime at ₹25/day CLICK HERE


1st Subnet 2nd Subnet
• IP Address of the subnet / Subnet id = 200.1.2.0 • IP Address of the subnet / Subnet id = 200.1.2.64
• Total number of IP Addresses = 26 = 64 • Total number of IP Addresses = 26 = 64
• Total number of hosts that can be configured = 64 – 2 = 62 • Total number of hosts that can be configured = 64 – 2 = 62
• Range of IP Addresses = [200.1.2.0, 200.1.2.63] • Range of IP Addresses = [200.1.2.64, 200.1.2.127]
• Direct Broadcast Address = 200.1.2.00111111 = 200.1.2.63 • Direct Broadcast Address = 200.1.2.01111111 = 200.1.2.127
• Limited Broadcast Address = 255.255.255.255 • Limited Broadcast Address = 255.255.255.255

3rd Subnet 4th Subnet


• IP Address of the subnet / Subnet id = 200.1.2.128 • IP Address of the subnet / Subnet id = 200.1.2.192
• Total number of IP Addresses = 26 = 64 • Total number of IP Addresses = 26 = 64
• Total number of hosts that can be configured = 64 – 2 = 62 • Total number of hosts that can be configured = 64 – 2 = 62
• Range of IP Addresses = [200.1.2.128, 200.1.2.191] • Range of IP Addresses = [200.1.2.192, 200.1.2.255]
• Direct Broadcast Address = 200.1.2.10111111 = 200.1.2.191 • Direct Broadcast Address = 200.1.2.11111111 = 200.1.2.255
• Limited Broadcast Address = 255.255.255.255 • Limited Broadcast Address = 255.255.255.255

To access all paid content get KG Prime at ₹25/day CLICK HERE


To access all paid content get KG Prime at ₹25/day CLICK HERE
Subnet Masks
• In case of subnetting the problem is how to identify to which subnet the incoming packet from outside the
network must be delivered. To solve this problem, we use the idea of subnet mask.

• Subnet mask is a 32-bit number which is a sequence of 1’s followed by a sequence of 0’s where:
o 1’s represents the Network ID part along with the subnet ID.
o 0’s represents the host ID part.

• Default mask for different classes of IP Address are:


o Default subnet mask of Class A = 255.0.0.0
o Default subnet mask for Class B = 255.255.0.0
o Default subnet mask for Class C = 255.255.255.0

o Networks of same size always have the same subnet mask.

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q How to identify to which subnet the incoming packet from outside the network must be
delivered.
• Take Subnet mask in binary notation
• Take ip address of the incoming packet in binary notation
• Do bit wise and operation
• we will get Subnet id

To access all paid content get KG Prime at ₹25/day CLICK HERE


Net id Subnet Mask Interface
200.1.2.0 255.255.255.192 w
200.1.2.64 255.255.255.192 x
200.1.2.128 255.255.255.192 y
200.1.2.192 255.255.255.192 z
0.0.0.0 0.0.0.0 default

To access all paid content get KG Prime at ₹25/day CLICK HERE


To access all paid content get KG Prime at ₹25/day CLICK HERE
To access all paid content get KG Prime at ₹25/day CLICK HERE
Types of Subnetting
Subnets can be of two types:
1. Fixed Length Subnetting
2. Variable Length Subnetting

To access all paid content get KG Prime at ₹25/day CLICK HERE


Fixed Length Subnetting
• Fixed length subnetting (classful subnetting) divides the network into subnets such that:
o All the subnets are of same size.
o All the subnets have equal number of hosts.
o All the subnets have same subnet mask.

To access all paid content get KG Prime at ₹25/day CLICK HERE


Variable Length Subnetting
• Variable length subnetting (classless subnetting) divides the network into subnets such that:
o All the subnets are not of same size.
o All the subnets do not have equal number of hosts.
o All the subnets do not have same subnet mask.

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q Consider we have a big single network having IP Address 200.1.2.0. We want to do subnetting and divide this
network into 3 subnets, such that first contains 126 hosts, and other two contains 62 hosts each?

To access all paid content get KG Prime at ₹25/day CLICK HERE


1st Subnet
• Total number of IP Addresses = 27 = 128
• Total number of hosts that can be configured = 128 – 2 = 64
• Range of IP Addresses = [200.1.2.0, 200.1.2.127]
• IP Address of the subnet / Subnet id = 200.1.2.0
• Direct Broadcast Address = 200.1.2.01111111 = 200.1.2.127
• Limited Broadcast Address = 255.255.255.255
• Subnet Mask: 255.255.255.128

2nd Subnet 3rd Subnet


• Total number of IP Addresses = 26 = 64 • Total number of IP Addresses = 26 = 64
• Total number of hosts that can be configured = 64 – 2 = 62 • Total number of hosts that can be configured = 64 – 2 = 62
• Range of IP Addresses = [200.1.2.128, 200.1.2.191] • Range of IP Addresses = [200.1.2.192, 200.1.2.255]
• IP Address of the subnet / Subnet id = 200.1.2.128 • IP Address of the subnet / Subnet id = 200.1.2.192
• Direct Broadcast Address = 200.1.2.10111111 = 200.1.2.191 • Direct Broadcast Address = 200.1.2.11111111 = 200.1.2.255
• Limited Broadcast Address = 255.255.255.255 • Limited Broadcast Address = 255.255.255.255
• Subnet Mask: 255.255.255.192 • Subnet Mask: 255.255.255.192

To access all paid content get KG Prime at ₹25/day CLICK HERE


Point to Note:
• For, dividing a subnet into three subnets we will first divide the subnet into two parts and will
then further divide it into one of them into two parts.

To access all paid content get KG Prime at ₹25/day CLICK HERE


To access all paid content get KG Prime at ₹25/day CLICK HERE
Q Suppose computers A and B have IP addresses 10.105.1.113 and 10.105.1.91 respectively and
they both use the same netmask N. Which of the values of N given below should not be used if A
and B should belong to the same network? (Gate-2010) (2 Marks)

(A) 255.255.255.0

(B) 255.255.255.128

(C) 255.255.255.192

(D) 255.255.255.224

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q Suppose computers A and B have IP addresses 10.105.1.113 and 10.105.1.91 respectively and
they both use the same netmask N. Which of the values of N given below should not be used if A
and B should belong to the same network? (Gate-2010) (2 Marks)
10.105.1.113 = 00001010 01101001 00000001 01110001
10.105.1.91 = 00001010 01101001 00000001 01011011

a) 255.255.255.0 11111111 11111111 11111111 00000000


b) 255.255.255.128 11111111 11111111 11111111 10000000
c) 255.255.255.192 11111111 11111111 11111111 11000000
d) 255.255.255.224 11111111 11111111 11111111 11100000

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q If a class B network on the Internet has a subnet mask of 255.255.248.0, what is the maximum
number of hosts per subnet? (Gate-2008) (2 Marks)
(A) 1022 (B) 1023 (C) 2046 (D) 2047

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q If a class B network on the Internet has a subnet mask of 255.255.248.0, what is the maximum
number of hosts per subnet? (Gate-2008) (2 Marks)
(A) 1022 (B) 1023 (C) 2046 (D) 2047

<------------------16-----------------> <------------------16----------------->
Net Id Host Id
5 bits

<------------------------21------------------------> <-----------11----------->
Net Id Host Id
11111111 11111111 11111000 00000000

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q Host X has IP address 192.168.1.97 and is connected through two routers R 1 and R2 to another host Y with IP
address 192.168.1.80. Router R1 has IP addresses 192.168.1.135 and 192.168.1.110. R2 has IP addresses
192.168.1.67 and 192.168.1.155. The netmask used in the network is 255.255.255.224. Which IP address should X
configure its gateway as? (Gate-2008) (2 Marks)
(A) 192.168.1.67 (B) 192.168.1.110

(C) 192.168.1.135 (D) 192.168.1.155

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q which ip address should x configure its gateway as? (Gate-2008) (2 Marks)
a) 192.168.1.67 b) 192.168.1.110

c) 192.168.1.135 d) 192.168.1.155

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q The address of a class B host is to be split into subnets with a 6-bit subnet number. What is the
maximum number of subnets and the maximum number of hosts in each subnet? (Gate-2007) (2 Marks)
(A) 62 subnets and 262142 hosts. (B) 64 subnets and 262142 hosts.

(C) 62 subnets and 1022 hosts. (D) 64 subnets and 1024 hosts.

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q A sub netted Class B network has the following broadcast address: 144.16.95.255. Its subnet
mask (Gate-2006) (2 Marks)

(A) is necessarily 255.255.224.0


(B) is necessarily 255.255.240.0
(C) is necessarily 255.255.248.0
(D) could be any one of 255.255.224.0, 255.255.240.0, 255.255.248.0
To access all paid content get KG Prime at ₹25/day CLICK HERE
Q An organization has a class B network and wishes to form subnets for 64 departments. The
subnet mask would be: (Gate-2005) (1 Marks)
(a) 255.255.0.0 (b) 255.255.64.0

(c) 255.255.128.0 (d) 255.255.252.0

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q An organization has a class B network and wishes to form subnets for 64 departments. The
subnet mask would be: (Gate-2005) (1 Marks)
(a) 255.255.0.0 (b) 255.255.64.0
<------------------16-----------------> <------------------16----------------->
Net Id Host Id
6 bits

(c) 255.255.128.0 (d) 255.255.252.0


<-------------------------22--------------------------> <----------10---------->
Net Id Host Id
11111111 11111111 11111100 00000000

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q A company has a class C network address of 204.204.204.0. It wishes to have three subnets,
one with 100 hosts and two with 50 hosts each. Which one of the following options represents a
feasible set of subnet address/subnet mask pairs? (Gate-2005) (2 Marks)

(A) 204.204.204.128/255.255.255.192 (B) 204.204.204.0/255.255.255.192


204.204.204.0/255.255.255.128 204.204.204.192/255.255.255.128
204.204.204.64/255.255.255.128 204.204.204.64/255.255.255.128
(C) 204.204.204.128/255.255.255.128 (D) 204.204.204.128/255.255.255.128
204.204.204.192/255.255.255.192 204.204.204.64/255.255.255.192
204.204.204.224/255.255.255.192 204.204.204.0/255.255.255.192

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q A company has a class C network address of 204.204.204.0. It wishes to have three subnets,
one with 100 hosts and two with 50 hosts each. Which one of the following options represents a
feasible set of subnet address/subnet mask pairs? (Gate-2005) (2 Marks)

(A) 204.204.204.128/255.255.255.192 (B) 204.204.204.0/255.255.255.192


204.204.204.0/255.255.255.128 204.204.204.192/255.255.255.128
204.204.204.64/255.255.255.128 204.204.204.64/255.255.255.128
(C) 204.204.204.128/255.255.255.128 (D) 204.204.204.128/255.255.255.128
204.204.204.192/255.255.255.192 204.204.204.64/255.255.255.192
204.204.204.224/255.255.255.192 204.204.204.0/255.255.255.192
<---------------------24---------------------> <--------8------->
Net Id Host Id
1100110011001100 11001100 0_ _ _ _ _ _ _
11001100 11001100 11001100 01 _ _ _ _ _ _
11001100 11001100 11001100 00 _ _ _ _ _ _

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q A subnet has been assigned a subnet mask of 255.255.255.192. What is the maximum number
of hosts that can belong to this subnet? (Gate-2004) (1 Marks)
(A) 14 (B) 30 (C) 62 (D) 126

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q A subnet has been assigned a subnet mask of 255.255.255.192. What is the maximum number
of hosts that can belong to this subnet? (Gate-2004) (1 Marks)
(A) 14 (B) 30 (C) 62 (D) 126

<--------------------------------26----------------------------------> <------6------>
Net Id Host Id
11111111 11111111 11111111 11000000

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q The subnet mask for a particular network is 255.255.31.0. Which of the following pairs of IP
addresses could belong to this network? (Gate-2003) (2 Marks)
(A) 172.57.88.62 and 172.56.87.233 (B) 10.35.28.2 and 10.35.29.4

(C) 191.203.31.87 and 191.234.31.88 (D) 128.8.129.43 and 128.8.161.55

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q The subnet mask for a particular network is 255.255.31.0. Which of the following pairs of IP
addresses could belong to this network? (Gate-2003) (2 Marks)
(A) 172.57.88.62 and 172.56.87.233 (B) 10.35.28.2 and 10.35.29.4
10.35.28.2 00001010 00100011 00011100 00000010
255.255.31.0 11111111 11111111 00011111 00000000
10.35.28.0 00001010 00100011 00011100 00000000
10.35.29.4 00001010 00100011 00011100 00000100
255.255.31.0 11111111 11111111 00011111 00000000
10.35.29.0 00001010 00100011 00011101 00000000

(C) 191.203.31.87 and 191.234.31.88 (D) 128.8.129.43 and 128.8.161.55

128.8.129.43 10000000 00001000 10000001 00101011


255.255.31.0 11111111 11111111 00011111 00000000
128.8.1.0 10000000 00001000 00000001 00000000
128.8.161.55 00001010 00100011 10100001 00110111
255.255.31.0 11111111 11111111 00011111 00000000
128.8.1.0 10000000 00001000 00000001 00000000

To access all paid content get KG Prime at ₹25/day CLICK HERE


To access all paid content get KG Prime at ₹25/day CLICK HERE
Address Depletion
• The addresses were not distributed properly as class A and B are usually very large for any organization
and class C is usually very small

• flexibility is not there is classful addressing, we cannot have the exact allocation as we want for e.g. if
some company wants 50 IP address then must go for 256, resulting into address depletion.

• Wastage of addresses, for example: Class E addresses were almost never used, wasting the whole
class.

• Conclusion: The Internet was faced with the problem of the addresses being rapidly used up, resulting
in no more addresses available for organizations and individuals that needed to be connected to the
Internet.

To access all paid content get KG Prime at ₹25/day CLICK HERE


Classless Addressing (Blocks/Network)
• Classless Addressing is an improved IP Addressing system.

• The class privilege is removed from the distribution to compensate for the address depletion, so no
class.

• Here we can ask exact set of IP address which are required and a Variable-length blocks are assigned
which satisfy the request.

To access all paid content get KG Prime at ₹25/day CLICK HERE


CIDR Notation
• The question is as there are no classes, how to identify block id and host id, as address in classless
addressing does not define the block or network to which the address belongs.

• To solve this problem now we have a new CIDR notation, this notation is informally referred to as slash
notation and formally as classless interdomain routing or CIDR.

• To find the prefix(net_id), n is added to the address, separated by a slash.

• n represent number of bits in net_id

To access all paid content get KG Prime at ₹25/day CLICK HERE


Extracting Information from an Address
• The number of addresses in the block is found as N = 232−n.
• To find the first address, we keep the n leftmost bits and set the (32 − n) rightmost bits all to 0s.
• To find the last address, we keep the n leftmost bits and set the (32 − n) rightmost bits all to 1s.

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q Find the Number of addresses, first and last address of the CIDR block to which
Address: 167.199.170.82/27 (10100111 11000111 10101010 01010010)
belongs to

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q Find the Number of addresses, first and last address of the CIDR block to which
Address: 167.199.170.82/27 (10100111 11000111 10101010 01010010)
belongs to
10100111 11000111 10101010 010

10100111 11000111 10101010 010

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q Find the Number of addresses, first and last address of the CIDR block to which
Address: 167.199.170.82/27 (10100111 11000111 10101010 01010010)
belongs to

The mask by setting 27 leftmost bits to 1 and 5 rightmost bits to 0 in dotted-decimal notation is:

Number of addresses in the block: N = NOT (mask) + 1 =

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q Find the Number of addresses, first and last address of the CIDR block to which
Address: 167.199.170.82/27 (10100111 11000111 10101010 01010010)
belongs to

The mask by setting 27 leftmost bits to 1 and 5 rightmost bits to 0 in dotted-decimal notation is:
255.255.255.224 (11111111 11111111 11111111 11100000)
• Number of addresses in the block: N = NOT (mask) + 1 =
• 00000000 00000000 00000000 00011111 + 1 = 0.0.0.31 + 1 = 32 addresses

To access all paid content get KG Prime at ₹25/day CLICK HERE


• First address: First = (address) AND (mask) =
• 10100111 11000111 10101010 01010010
• 11111111 11111111 11111111 11100000

• Last address: Last = (address) OR (NOT mask) =


• 10100111 11000111 10101010 01010010
• 00000000 00000000 00000000 00011111

To access all paid content get KG Prime at ₹25/day CLICK HERE


• First address: First = (address) AND (mask) =
• 10100111 11000111 10101010 01010010
• 11111111 11111111 11111111 11100000
• 167.199.170.64

• Last address: Last = (address) OR (NOT mask) =


• 10100111 11000111 10101010 01010010
• 00000000 00000000 00000000 00011111
• 167.199.170.95

To access all paid content get KG Prime at ₹25/day CLICK HERE


Address Mask
• The address mask is a 32-bit number in which the n leftmost bits are set to 1s and the rest of the bits (32 − n) are set to 0s.
• It is another way to find the first and last addresses in the block.
• Using the three bit-wise operations NOT, AND, and OR a computer can find:
1. The number of addresses in the block N = NOT (mask) + 1.
2. The first address in the block = (Any address in the block) AND (mask).
3. The last address in the block = (Any address in the block) OR [(NOT (mask)].

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q In the network 200.10.11.144/27, the fourth octet (in decimal) of the last IP address of the
network which can be assigned to a host is ________ (Gate-2015) (2 Marks)

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q In the network 200.10.11.144/27, the fourth octet (in decimal) of the last IP address of the
network which can be assigned to a host is ________ (Gate-2015) (2 Marks)

<-----------------------------------27---------------------------------> <---------5------->
Net Id Host Id
11001000 00001010 00001011 10010000
11001000 00001010 00001011 10000000
11001000 00001010 00001011 10000001

11001000 00001010 00001011 10011110(158)


11001000 00001010 00001011 10011111

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q An Internet Service Provider (ISP) has the following chunk of CIDR-based IP addresses available with it:
245.248.128.0/20. The ISP wants to give half of this chunk of addresses to Organization A, and a quarter
to Organization B, while retaining the remaining with itself. Which of the following is a valid allocation of
addresses to A and B? (Gate-2012) (2 Marks)
(A) 245.248.136.0/21 and 245.248.128.0/22
(B) 245.248.128.0/21 and 245.248.128.0/22
(C) 245.248.132.0/22 and 245.248.132.0/21
(D) 245.248.136.0/24 and 245.248.132.0/21

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q An Internet Service Provider (ISP) has the following chunk of CIDR-based IP addresses available with it:
245.248.128.0/20. The ISP wants to give half of this chunk of addresses to Organization A, and a quarter to
Organization B, while retaining the remaining with itself. Which of the following is a valid allocation of addresses to
A and B? (Gate-2012) (2 Marks)
(A) 245.248.136.0/21 and 245.248.128.0/22
(B) 245.248.128.0/21 and 245.248.128.0/22
(C) 245.248.132.0/22 and 245.248.132.0/21
(D) 245.248.136.0/24 and 245.248.132.0/21
<-----------------------20-----------------------> <-----------12---------->
Net Id Host Id
11110101 11111000 10000000 00000000
11110101 11111000 10000000 00000000(B)
11110101 11111000 10000100 00000000(C)
11110101 11111000 10001000 00000000(A)
To access all paid content get KG Prime at ₹25/day CLICK HERE
To access all paid content get KG Prime at ₹25/day CLICK HERE
Rules for Creating CIDR Block (Network)
• All the IP Addresses in the CIDR block must be contiguous.
• The size of the block (total number of IP Addresses contained in the block) must be
presentable as power of 2, size of any CIDR block will always be in the form 21, 22, 23, 24,
25 and so on. (calculation can be easy)
• First IP Address of the block must be divisible by the size of the block. (so that we get the host
id from all 0 to all 1)

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q Consider a block of IP Addresses ranging from 100.1.2.32 to 100.1.2.47.
Is it a CIDR block?
If yes, give the CIDR representation?

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q Consider a block of IP Addresses ranging from 20.10.30.32 to 20.10.30.63
• Is it a CIDR block?
• If yes, give the CIDR representation?

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q Consider a block of IP Addresses ranging from 150.10.20.64 to 150.10.20.127
• Is it a CIDR block?
• If yes, give the CIDR representation?

To access all paid content get KG Prime at ₹25/day CLICK HERE


Subnetting in CIDR

Q Consider the network having IP Address 20.30.40.10/25 Divide this network into two subnets.

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q Consider the network having IP Address 20.30.40.10/25 Divide this network into four subnets.

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q Consider the network having IP Address 20.30.40.10/25 Divide this network into Three
subnets.

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q Consider the network having IP Address 40.30.10.20/20 Divide this network into Three
subnets.

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q Consider the network having IP Address 40.30.10.20/20 Divide this network into Three
subnets.

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q An organization is granted a block of addresses with the beginning address 14.24.74.0/24. The organization needs to have 3
sub blocks of addresses to use in its three subnets: one sub-block of 10 addresses, one sub block of 60 addresses, and one sub
block of 120 addresses. Design the sub blocks.

To access all paid content get KG Prime at ₹25/day CLICK HERE


To access all paid content get KG Prime at ₹25/day CLICK HERE
Designing subnets for CIDR Notations
• Assume:
• The total number of addresses granted to the organization is N
• The prefix length is n
• The assigned number of addresses to each sub-network is Nsub
• The prefix length for each sub-network is nsub.
• Then,
• The number of addresses in each sub-network should be a power of 2.

• The prefix length for each sub-network should be found using the following formula: nsub = 32 − log2Nsub

• The starting address in each sub-network should be divisible by the number of addresses in that sub-network.
This can be achieved if we first assign addresses to larger sub-networks.

To access all paid content get KG Prime at ₹25/day CLICK HERE


Disadvantages of Subnetting

• Subnetting leads to loss of IP Addresses, in each subnet we lose two IP addresses one for
network address and one for DBA.

• Communication process gets complicated.

To access all paid content get KG Prime at ₹25/day CLICK HERE


Super netting in Classful addressing
o Subnetting increase size of routing table, super netting is a perception so a counter idea is also possible which is
super netting

o The size of a class C block with a maximum number of 256 addresses did not satisfy the needs of most
organizations. Even a midsize organization needed more addresses.

o One solution was super netting. In super netting, an organization can combine several blocks to create a larger
range of addresses. In other words, several networks are combined to create a super network or a supernet.

o An organization can apply for a set of class C blocks instead of just one. For example, an organization that needs
1000 addresses can be granted four contiguous class C blocks. The organization can then use these addresses to
create one super network.

o Super netting decreases the number of Is in the mask.

To access all paid content get KG Prime at ₹25/day CLICK HERE


Super netting / Aggregation with CIDR
• Rules for Super netting in CIDR
• All network should be contiguous
• Size of all the network should be same
• first net id should be divisible by size of the block

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q Perform CIDR aggregation on the following IP Addresses-
128.56.24.0/24
128.56.25.0/24
128.56.26.0/24
128.56.27.0/24

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q Consider the following networks and merger them to have a supernet
200.1.0.0/24
200.1.1.0/24
200.1.2.0/24
200.1.2.0/24

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q Consider the following networks and merger them to have a supernet
100.1.2.0/25
100.1.2.128/26
100.1.2.192/26

To access all paid content get KG Prime at ₹25/day CLICK HERE


• ISP provides four things
• IP address
• DGW (router which is connecting us to internet)
• SM (using subnet mask we understand weather the destination is in our
network or some other network)
• DNS

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q Two computers C1 and C2 are configured as follows. C1 has IP address 203.197.2.53 and netmask 255.255.128.0. C2
has IP address 203.197.75.201 and netmask 255.255.192.0. which one of the following statements is true? (Gate-
2006) (2 Marks)

(A) C1 and C2 both assume they are on the same network


(B) C2 assumes C1 is on same network, but C1 assumes C2 is on a different network
(C) C1 assumes C2 is on same network, but C2 assumes C1 is on a different network
(D) C1 and C2 both assume they are on different networks.

To access all paid content get KG Prime at ₹25/day CLICK HERE


Q Two computers C1 and C2 are configured as follows. C1 has IP address 203.197.2.53 and netmask 255.255.128.0. C2
has IP address 203.197.75.201 and netmask 255.255.192.0. which one of the following statements is true? (Gate-
2006) (2 Marks)

203.197.2.53 11001011 11000101 00000010 00110101 203.197.2.53 11001011 11000101 00000010 00110101
255.255.128.0 11111111 11111111 10000000 00000000 255.255.192.0 11111111 11111111 10000000 00000000
203.197.0.0 11001011 11000101 00000000 00000000 203.197.0.0 11001011 11000101 00000000 00000000
203.197.75.201 11001011 11000101 01001011 11001001 203.197.75.201 11001011 11000101 01001011 11001001
255.255.128.0 11111111 11111111 10000000 00000000 255.255.192.0 11111111 11111111 11000000 00000000
203.197.0.0 11001011 11000101 00000000 00000000 203.197.64.0 11001011 11000101 00100000 00000000

(A) C1 and C2 both assume they are on the same network


(B) C2 assumes C1 is on same network, but C1 assumes C2 is on a different network
(C) C1 assumes C2 is on same network, but C2 assumes C1 is on a different network
(D) C1 and C2 both assume they are on different networks.

To access all paid content get KG Prime at ₹25/day CLICK HERE


To access all paid content get KG Prime at ₹25/day CLICK HERE
Special address
• Testing self-connectivity / Loop back address
• To test internet connection
• To check server and client relation

To access all paid content get KG Prime at ₹25/day CLICK HERE


Private IP address
o 10.0.0.0 10.255.255.255
o 172.16.0.0 172.31.255.255
o 192.168.0.0 192.168.255.255

To access all paid content get KG Prime at ₹25/day CLICK HERE

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy