0% found this document useful (0 votes)
83 views

IP Addressing 2023

The document discusses IP addressing including classes of IP addresses from A to E, representation of IP addresses in binary, and examples of calculating network addresses, broadcast addresses, and subnet masks for different IP address classes.

Uploaded by

ananyabaghel18
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
83 views

IP Addressing 2023

The document discusses IP addressing including classes of IP addresses from A to E, representation of IP addresses in binary, and examples of calculating network addresses, broadcast addresses, and subnet masks for different IP address classes.

Uploaded by

ananyabaghel18
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 53

IP Addressing

An IP address is represented by a series of numbers segregated by periods(.).

They are expressed in the form of four pairs - an example address might be 255.255.255.255
wherein each set can range from 0 to 255.

IP addresses are not produced randomly. They are generated mathematically and are further
assigned by the IANA (Internet Assigned Numbers Authority), a department of the ICANN.

ICANN stands for Internet Corporation for Assigned Names and Numbers. It is a non-profit
corporation founded in the US back in 1998 with an aim to manage Internet security and
enable it to be available by all.
IPv4-32 bit logical address divided into 4 octets

The number of networks and the number of hosts per class can be derived by this formula −

NOTE: When calculating hosts' IP addresses, 2 IP addresses are decreased because they cannot be assigned to
hosts, i.e. the first IP of a network is network number and the last IP is reserved for Broadcast IP.
Representation of 8 Bit Octet

The above representation shows the structure of 8- bit octet.

Now, we will see how to obtain the binary representation of the above IP address, i.e., 66.94.29.13

Step 1: First, we find the binary number of 66.

To obtain 66, we put 1 under 64 and 2 as the sum of 64 and 2 is equal to 66 (64+2=66), and the remaining bits will
be zero, as shown above. Therefore, the binary bit version of 66 is 01000010.
Step 3: The next number is 29.

To obtain 29, we put 1 under 16, 8, 4, and 1 as the sum of these numbers is equal to 29, and the remaining
bits will be zero. Therefore, the binary bit version of 29 is 00011101.

Step 4: The last number is 13.

To obtain 13, we put 1 under 8, 4, and 1 as the sum of these


numbers is equal to 13, and the remaining bits will be zero.
Therefore, the binary bit version of 13 is 00001101.
Classful Addressing:
Introduced in 1981, with classful routing, IP v4 addresses were divided into 5 classes(A to E).

Classes A-C: unicast addresses


Class D: multicast addresses
Class E: reserved for future use

Class A :
In a class A address, the first bit of the first octet is always ‘0’. Thus, class A addresses range from 0.0.0.0 to
127.255.255.255(as 01111111 in binary converts to 127 in decimal).

The first 8 bits or the first octet denote the network portion and the rest 24 bits or the 3 octets belong to the
host portion. Its Subnet mask is 255.0.0.0.

Example: 10.1.1.1

Exception – 127.X.X.X is reserved for loopback


- 0.X.X.X is reserved for default network

Therefore, the actual range of class A addresses is: 1.0.0.0 to 126.255.255.255


Classful Addressing:
Internet Protocol hierarchy contains several classes of IP
Addresses to be used efficiently in various situations as per the
requirement of hosts per network.

Broadly, the IPv4 Addressing system is divided into five


classes of IP Addresses. All the five classes are identified by the
first octet of IP Address.

Internet Corporation for Assigned Names and Numbers is


responsible for assigning IP addresses.
Class A Address
The first bit of the first octet is always set to 0 (zero). Thus the first octet ranges from 1 – 127, i.e.

NOTE:

 Class A addresses only include IP starting from 1.x.x.x to 126.x.x.x only.

 The IP range 127.x.x.x is reserved for loopback IP addresses.

 The default subnet mask for Class A IP address is 255.0.0.0 which implies that Class A
addressing can have 126 networks (27-2) and 16777214 hosts (224-2).

 Class A IP address format is thus:

 0NNNNNNN.HHHHHHHH.HHHHHHHH.HHHHHHHH

 8 bits reserved for network id and 24 bits are reserved for host id.
Class B Address
An IP address which belongs to class B has the first two bits in the first octet set to 10, i.e.

Class B IP Addresses range from 128.0.x.x to 191.255.x.x.

The default subnet mask for Class B is 255.255.x.x.

Class B has 16384 (214) Network addresses and 65534 (216-2)


Host addresses.

Class B IP address format is:

10NNNNNN.NNNNNNNN.HHHHHHHH.HHHHHHHH
Class C Address
The first octet of Class C IP address has its first 3 bits set to 110, that is −

Class C IP addresses range from 192.0.0.x to 223.255.255.x. The default subnet


mask for Class C is 255.255.255.x.

Class C gives 2097152 (221) Network addresses and 254 (28-2) Host addresses.

Class C IP address format


is: 110NNNNN.NNNNNNNN.NNNNNNNN.HHHHHHHH
Class D Address
Very first four bits of the first octet in Class D IP addresses are set to 1110, giving a range of −

Class D has IP address range from 224.0.0.0 to 239.255.255.255.

Class D is reserved for Multicasting. In multicasting data is not destined for a particular host, that is why there is
no need to extract host address from the IP address, and Class D does not have any subnet mask.

Class E Address
This IP Class is reserved for experimental purposes only for R&D or Study.

IP addresses in this class ranges from 240.0.0.0 to 255.255.255.254.

Like Class D, this class too is not equipped with any subnet mask.
Important Points
 For any given IP Address,
•If the range of first octet is [1, 126], then IP Address belongs to class A.
•If the range of first octet is [128, 191], then IP Address belongs to class B.
•If the range of first octet is [192, 223], then IP Address belongs to class C.
•If the range of first octet is [224, 239], then IP Address belongs to class D.
•If the range of first octet is [240, 254], then IP Address belongs to class E.
 For any given IP Address,
•IP Address of its network is obtained by setting all its Host ID part bits to 0.
•Direct Broadcast Address is obtained by setting all its Host ID part bits to 1.
• limited Broadcast Address is obtained by setting all its bits to 1.
•For any network, its limited broadcast address is always 255.255.255.255
 Class D IP Addresses are not divided into Net ID and Host ID parts.
 Class E IP Addresses are not divided into Net ID and Host ID parts.

For all Class A address subnet mask is: 255.0.0.0 (set first octet bits to 1 reserved for net id)
For all Class B address subnet mask is: 255.255.0.0 (set first two octet bits to 1 reserved for net id)
•For all Class C address subnet mask is: 255.255.255.0 (set first three octet bits to 1 reserved for net id)
Class B : Class C :
In a class B address, the first octet would always start In a class C address, the first octet would
with ’10’. always start with ‘110’.
Thus, class B addresses range from 128.0.0.0 to
191.255.255.255. Thus, class C addresses range from
192.0.0.0 to 223.255.255.255.
The first 16 bits or the first two octets denote the
network portion and the remaining 16 bits or two octets The first 24 bits or the first three octets
belong to the host portion. denote the network portion and the rest 8
bits or the remaining one octet belong to
Its Subnet mask is 255.255.0.0. the host portion.
Its Subnet mask is 255.255.255.0.
Class D :
Class D is used for multicast addressing and in a class D Class E :
address the first octet would always start with ‘1110’. Class E addresses are reserved for research
purposes and future use. The first octet in a
Thus, class D addresses range from 224.0.0.0 to class E address starts with ‘1111’.
239.255.255.255.
Thus, class E addresses range from 240.0.0.0
Its Subnet mask is not defined. to 255.255.255.255.

Class D addresses are used by routing protocols like Its Subnet mask is not defined.
OSPF, RIP, etc
PRACTICE PROBLEMS BASED ON IP ADDRESS IN NETWORKING-
Q1. For the following IP Addresses-
1.1.2.3.4
2.10.15.20.60
3.130.1.2.3
4.150.0.150.150
5.200.1.10.100
6.220.15.1.10
7.250.0.1.2
8.300.1.2.3
Identify the Class, Network IP Address, Direct broadcast address and Limited broadcast address of each IP Address.

Ans. Given IP Address is- 2. Given IP Address is-


1. 1.2.3.4
10.15.20.60
•IP Address belongs to class A
•Network IP Address = 1.0.0.0 IP Address belongs to class A
•Direct Broadcast Address = 1.255.255.255 Network IP Address = 10.0.0.0
•Limited Broadcast Address = 255.255.255.255 Direct Broadcast Address = 10.255.255.255
•Subnet Mask=255.0.0.0 Limited Broadcast Address = 255.255.255.255
Subnet Mask=255.0.0.0
6. Given IP Address is- 220.15.1.10
3. Given IP Address is- 130.1.2.3
IP Address belongs to class C
•IP Address belongs to class B Network IP Address = 220.15.1.0
•Network IP Address = 130.1.0.0 Direct Broadcast Address = 220.15.1.255
•Direct Broadcast Address = 130.1.255.255 Limited Broadcast Address = 255.255.255.255
•Limited Broadcast Address = 255.255.255.255 Subnet Mask=255.255.255.0
•Subnet Mask=255.255.0.0
4. Given IP Address is- 150.0.150.150
7. Given IP Address is: 250.0.1.2
IP Address belongs to class B
IP Address belongs to class E
Network IP Address = 150.0.0.0
Network IP Address = Not available
Direct Broadcast Address = 150.0.255.255
Direct Broadcast Address = Not available
Limited Broadcast Address = 255.255.255.255
Limited Broadcast Address = Not available

8. Given IP Address is- 300.1.2.3


5. Given IP Address is- 200.1.10.100
This is not a valid IP Address.
IP Address belongs to class C
This is because for any given IP Address, the range of its first
Network IP Address = 200.1.10.0
octet is always [1, 254].
Direct Broadcast Address = 200.1.10.255
First and Last IP Addresses are reserved.
Limited Broadcast Address = 255.255.255.255
Subnet Mask=255.255.255.0
Que 2: A host with IP Address 200.100.1.1 wants to send a packet to all the hosts in the same network.
What will be-
1.Source IP Address
2.Destination IP Address

Solution-

3.Source IP Address = IP Address of the sender = 200.100.1.1


4.Destination IP Address = Limited Broadcast Address = 255.255.255.255

Que 3: A host with IP Address 10.100.100.100 wants to use loop back testing. What will be-
Source IP Address
Destination IP Address

Solution-

Source IP Address = 10.100.100.100


Destination IP Address = Loopback Testing Address = 127.0.0.1

Note: How to find no. of usable host in given IP address?


Que4: How many bits are allocated for Network ID and Host ID Que 7:
in 23.192.157.234 address? Match the following-

Solution- Column-I:
Given IP Address belongs to class A.

Thus, I. 200.10.192.100
II. 7.10.230.1
Number of bits reserved for Network ID = 8 III. 128.1.1.254
Number of bits reserved for Host ID = 24 IV. 255.255.255.255
V. 100.255.255.255
Que 5. What is the network ID of the IP Address
230.100.123.70? Column-II:

Solution-
A. Class A
Given IP Address belongs to class D. B. Limited Broadcast Address
Class D IP Addresses are not divided into the Network ID and C. Direct Broadcast Address
Host ID parts. D. Class C
Thus, there is no network ID for the given IP Address. E. Class B

Solution:
(I, D), (II, A), (III, E), (IV, B), (V, C)
Que 8. Suppose that instead of using 16 bits for network part of a class B Address, 20 bits have been used.

How many class B networks would have been possible?

Solution-

•Total 20 bits are used for Network ID of class B.


•The first two bits are always set to 10.
•Then, with 18 bits, number of networks possible = 2 18

Que 9: What is the default mask for 192.0.46.10?

Solution-

•Given IP Address belongs to class C.


•For class C, default mask = 255.255.255.0
Private and Public IP address:
 Private IP address of a system is the IP address that is used to
communicate within the same network. Using private IP data
or information can be sent or received within the same
network.

 Public IP address of a system is the IP address that is used to


communicate outside the network. A public IP address is
basically assigned by the ISP (Internet Service Provider).
S.No. PRIVATE IP ADDRESS PUBLIC IP ADDRESS

1. The scope of Private IP is local. The scope of Public IP is global.

2. It is used to communicate within the network. It is used to communicate outside the network.

Private IP addresses of the systems connected in a


3. network differ in a uniform manner.
Public IP may differ in a uniform or non-uniform manner.

4. It works only on LAN. It is used to get internet service.

5. It is used to load the network operating system. It is controlled by ISP.

6. It is available free of cost. It is not free of cost.

Private IP can be known by entering “ipconfig” on the


7. command prompt.
Public IP can be known by searching “what is my ip” on google.

Range:
8. 10.0.0.0 – 10.255.255.255, 172.16.0.0 – 172.31.255.255, Range: Besides private IP addresses, the rest are public.
192.168.0.0 – 192.168.255.255

Example: 192.168.1.10 Example: 17.5.7.8

Private IP uses numeric code that is not unique and can be Public IP uses a numeric code that is unique and cannot be used by
9. used again other

10. Private IP addresses are secure Public IP address has no security and is subjected to attack
Drawbacks of IPv4
Currently, the population of the world is 7.6 billion. Every user
is having more than one device connected with the internet, and
private companies also rely on the internet. As we know that
IPv4 produces 4 billion addresses, which are not enough for
each device connected to the internet on a planet.

Although the various techniques were invented, such as


variable- length mask, network address translation, port address
translation, classes, inter-domain translation, to conserve the
bandwidth of IP address and slow down the depletion of an IP
address.

In these techniques, public IP is converted into a private IP due


to which the user having public IP can also use the internet. But
still, this was not so efficient, so it gave rise to the development
of the next generation of IP addresses, i.e., IPv6.
IP v6
IP v6 is a 128-bits address having an address space of 2^128, which is way
bigger than IPv4. In IPv6 we use Colon-Hexa representation.

There are 8 groups and each group represents 2 Bytes.


Note: Because of the length of IPv6 addresses various shortening techniques are
employed.
The main technique being to omit repetitive 0’s as shown in the example below.
Q1. IPv6 does not use _________ type of address.
a) broadcast
b) multicast
c) anycast
d) unicast

Answer: a
Explanation: There is no concept of broadcast address in IPv6. Instead, there is an anycast address in IPv6 which
allows sending messages to a group of devices but not all devices in a network. Anycast address is not
standardized in IPv4.

Q2. The size of an IP address in IPv6 is _________


a) 4 bytes
b) 128 bits
c) 8 bytes
d) 100 bits

Answer: b
Explanation: An IPv6 address is 128 bits long. Therefore, 2128 i.e. 340 undecillion addresses are possible in
IPv6. IPv4 has only 4 billion possible addresses and IPv6 would be a brilliant alternative in case IPv4 runs out of
possible new addresses.
Disadvantage of Classful Addressing:
Class A with a mask of 255.0.0.0 can support 128 Network, 16,777,216 addresses per network
and a total of 2,147,483,648 addresses.

Class B with a mask of 255.255.0.0 can support 16,384 Network, 65,536 addresses per
network and a total of 1,073,741,824 addresses.

Class C with a mask of 255.255.255.0 can support 2,097,152 Network, 256 addresses per
network and a total of 536,870,912 addresses.

But what if someone requires 2000 addresses ?


One way to address this situation would be to provide the person with class B network. But that would result in a
waste of so many addresses.

Another possible way is to provide multiple class C networks, but that too can cause a problem as there would be
too many networks to handle.

To resolve problems like the one mentioned above CIDR was introduced.
Why CIDR is used?

The problem with this classful addressing method is that millions of class A addresses
are wasted, many of the class B addresses are wasted, whereas, number of addresses
available in class C is so small that it cannot cater to the needs of organizations.

 Class D addresses are used for multicast routing and are therefore available as a
single block only.
 Class E addresses are reserved. Since there are these problems, Classful networking
was replaced by Classless Inter-Domain Routing (CIDR).

What is the LOOPBACK address?

Loopback Address is used to let a system send a message to itself to make sure that the
TCP/IP stack is installed correctly on the machine.
CIDR(Classless Inter-Domain Routing or supernetting)
 No concept of classes
 Here we can provide as many block of addresses to the user which he
requested so NO wastage of IP addresses.
 Here IPv4 (32 bit address) consist of Block ID and Host Id but no classes
 Notation: x.y.z.w/n
 Here n represent the mask(no. of 1’s) or no of bits for the block or network.
 Example: 200.10.20.40/28 (28 no of 1’s) therfore net id is of 28 bits and
host id is of 4 bits
 Total no of host in this network=24
 Now to find network Id: 28 bits of 1’s
 11111111. 11111111. 11111111. 11110000 (default mask)
 255.255.255.240
 200.10.20.40/28
 200.10.20.00101000 Keep network intact and make remaining 4 host
bits to zero
 200.10.20.00100000 200.10.20.32/28 (network Id or block id of given IP
Difference between Classful Addressing and Classless Addressing
Sr. No. Parameter Classful Addressing Classless Addressing

1. Basics In Classful addressing IP addresses are allocated according Classless addressing came to replace the classful addressing and to
to the classes- A to E. handle the issue of rapid exhaustion of IP addresses.

2. Practical It is less practical. It is more practical.

3. Network ID and The changes in the Network ID and Host ID depend on the There is no such restriction of class in classless addressing.
Host ID class.

4. VLSM It does not support the Variable Length Subnet Mask It supports the Variable Length Subnet Mask (VLSM).
(VLSM).
Classful addressing requires more bandwidth. As a result, it It requires less bandwidth. Thus, fast and less expensive as compared to
5. Bandwidth becomes slower and more expensive as compared to classful addressing.
classless addressing.

6. CIDR It does not support Classless Inter-Domain Routing (CIDR). It supports Classless Inter-Domain Routing (CIDR).

7. Updates Regular or periodic updates Triggered Updates

Troubleshooting Troubleshooting and problem detection are easy than


8. and Problem classless addressing because of the division of network, It is not as easy compared to classful addressing.
detection host and subnet parts in the address.

Division of •Network •Host


9. Address •Host
•Subnet •Subnet
IPv4 IPv6

IPv4 has a 32-bit address length IPv6 has a 128-bit address length
It supports Auto and renumbering address
It Supports Manual and DHCP address configuration
configuration
In IPv4 end to end, connection integrity is Unachievable In IPv6 end to end, connection integrity is Achievable
Address space of IPv6 is quite large it can produce
It can generate 4.29×109 address space
3.4×1038 address space
IPSEC is an inbuilt security feature in the IPv6
The Security feature is dependent on application
protocol
Address representation of IPv4 is in decimal Address Representation of IPv6 is in hexadecimal
Fragmentation performed by Sender and forwarding
In IPv6 fragmentation performed only by the sender
routers
In IPv6 packet flow identification are Available and
In IPv4 Packet flow identification is not available
uses the flow label field in the header
In IPv4 checksum field is available In IPv6 checksum field is not available
In IPv6 multicast and anycast message transmission
It has broadcast Message Transmission Scheme
scheme is available
IPv4 IPv6

In IPv4 Encryption and Authentication facility not In IPv6 Encryption and Authentication are provided
provided
IPv6 has header of 40 bytes fixed
IPv4 has a header of 20-60 bytes.

IPv4 can be converted to IPv6 Not all IPv6 can be converted to IPv4
IPv6 consist of 8 fields, which are separated by colon
IPv4 consist of 4 fields which are separated by dot (.)
(:)
IPv4’s IP addresses are divided into five different
IPv6 does not have any classes of IP address.
classes. Class A , Class B, Class C , Class D , Class E.
IPv4 supports VLSM(Variable Length subnet mask). IPv6 does not support VLSM.
Example of IPv6:
Example of IPv4: 66.94.29.13
2001:0000:3238:DFE1:0063:0000:0000:FEFB
In networking,
Subnetting in Networking-

•The process of dividing a single network into multiple sub networks is called as subnetting.
•The sub networks so created are called as subnets.

Following diagram shows the subnetting of a big single network into 4 smaller subnets-
Subnetting in Networking-
Advantages-

The two main advantages of subnetting a network are-


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

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.
Types of Subnetting-
Subnetting of a network may be carried out in the following two ways-

1.Fixed Length Subnetting


2.Variable Length Subnetting
Types of Subnetting-
Fixed Length Subnetting-

Fixed length subnetting also called as classful subnetting divides the network into
subnets where-
•All the subnets are of same size.
•All the subnets have equal number of hosts.
•All the subnets have same subnet mask.
2. Variable Length Subnetting-

Variable length subnetting also called as classless subnetting divides the network into
subnets where-
•All the subnets are not of same size.
•All the subnets do not have equal number of hosts.
•All the subnets do not have same subnet mask.
Subnetting
Consider-
•We have a big single network having IP Address 200.1.2.0.
•We want to do subnetting and divide this network into 2
subnets.

Clearly, the given network belongs to class C.


For creating two subnets and to represent their subnet IDs,
we require 1 bit.
So,
•We borrow one bit from the Host ID part.
•After borrowing one bit, Host ID part remains with only 7
bits.
Subnetting
•If borrowed bit = 0, then it represents the first subnet.
•If borrowed bit = 1, then it represents the second subnet.

IP Address of the two subnets are-


•200.1.2.00000000 = 200.1.2.0
•200.1.2.10000000 = 200.1.2.128
Subnetting: Example

For 1st Subnet-

•IP Address of the subnet = 200.1.2.0


•Total number of IP Addresses = 27 = 128
•Total number of hosts that can be configured = 128 – 2 = 126
•Range of IP Addresses = [200.1.2.00000000, 200.1.2.01111111] =
[200.1.2.0, 200.1.2.127]
•Direct Broadcast Address = 200.1.2.01111111 = 200.1.2.127
•Limited Broadcast Address = 255.255.255.255
Subnetting: Example
For 2nd Subnet-

•IP Address of the subnet = 200.1.2.128


•Total number of IP Addresses = 27 = 128
•Total number of hosts that can be configured = 128 – 2 = 126
•Range of IP Addresses = [200.1.2.10000000, 200.1.2.11111111] =
[200.1.2.128, 200.1.2.255]
•Direct Broadcast Address = 200.1.2.11111111 = 200.1.2.255
•Limited Broadcast Address = 255.255.255.255
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.
Clearly, the given network belongs to class C.
For creating four subnets and to represent their
subnet IDs, we require 2 bits.

So,
•We borrow two bits from the Host ID part.
•After borrowing two bits, Host ID part remains
with only 6 bits.
•If borrowed bits = 00, then it represents the 1st subnet.
•If borrowed bits = 01, then it represents the 2nd subnet.
•If borrowed bits = 10, then it represents the 3rd subnet.
•If borrowed bits = 11, then it represents the 4th subnet .
IP Address of the four subnets are-
•200.1.2.00000000 = 200.1.2.0
•200.1.2.01000000 = 200.1.2.64
•200.1.2.10000000 = 200.1.2.128
•200.1.2.11000000 = 200.1.2.192

For 1st Subnet-

•IP Address of the subnet = 200.1.2.0


•Total number of IP Addresses = 26 = 64
•Total number of hosts that can be configured = 64 – 2 = 62
•Range of IP Addresses = [200.1.2.00000000, 200.1.2.00111111] = [200.1.2.0, 200.1.2.63]
•Direct Broadcast Address = 200.1.2.00111111 = 200.1.2.63
•Limited Broadcast Address = 255.255.255.255
For 2nd Subnet-
For 4th Subnet-
•IP Address of the subnet = 200.1.2.64
•Total number of IP Addresses = 26 = 64
•Total number of hosts that can be configured = 64 – 2 = 62 •IP Address of the subnet = 200.1.2.192
•Range of IP Addresses = [200.1.2.01000000, •Total number of IP Addresses = 26 = 64
200.1.2.01111111] = [200.1.2.64, 200.1.2.127] •Total number of hosts that can be configured = 64 – 2 = 62
•Direct Broadcast Address = 200.1.2.01111111 = 200.1.2.127 •Range of IP Addresses = [200.1.2.11000000, 200.1.2.11111111]
•Limited Broadcast Address = 255.255.255.255 = [200.1.2.192, 200.1.2.255]
For 3rd Subnet- •Direct Broadcast Address = 200.1.2.11111111 = 200.1.2.255
•Limited Broadcast Address = 255.255.255.255

•IP Address of the subnet = 200.1.2.128


•Total number of IP Addresses = 26 = 64
•Total number of hosts that can be configured = 64 – 2 = 62
•Range of IP Addresses = [200.1.2.10000000,
200.1.2.10111111] = [200.1.2.128, 200.1.2.191]
•Direct Broadcast Address = 200.1.2.10111111 = 200.1.2.191
•Limited Broadcast Address = 255.255.255.255
Q1. Suppose a network with IP Address 192.16.0.0. is divided into 2 subnets, find number of hosts per subnet.
Also for the first subnet, find-

1.Subnet Address
2.First Host ID
3.Last Host ID
4.Broadcast Address
Solution-

•Given IP Address belongs to class C.


•So, 24 bits are reserved for the Net ID.
•The given network is divided into 2 subnets.
•So, 1 bit is borrowed from the host ID part for the subnet IDs.
•Then, Number of bits remaining for the Host ID = 7.
•Thus, Number of hosts per subnet = 27 = 128.
For 1st Subnet-

•Subnet Address = First IP Address = 192.16.0.00000000 = 172.16.0.0


•First Host ID = 192.16.0.00000001 = 192.16.0.1
•Last Host ID = 192.16.0.01111110 = 192.16.0.126
•Broadcast Address = Last IP Address = 192.16.0.01111111 = 172.16.0.127
Q3. In a class B, network on the internet has a subnet mask of
255.255.240.0. What is the maximum number of hosts per subnet?
Q2. What is not true about subnetting?
1.4096
1.It is applied for a single network
2.4094
2.It is used to improve security
3.4092
3.Bits are borrowed from network portion
4.4090
4.Bits are borrowed from Host portion
Solution-
Solution-
•Number of bits reserved for network ID in the given subnet mask = 20.
Clearly, Option (C) is correct.
•So, Number of bits reserved for Host ID = 32 – 20 = 12 bits.
•Thus, Number of hosts per subnet = 212 – 2 = 4094.
•In class B, 16 bits are reserved for the network.
•So, Number of bits reserved for subnet ID = 20 – 16 = 4 bits.
•Number of subnets possible = 24 = 16.
•Thus, Option (B) is correct.

You might also like