Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
34 views41 pages

Networking for IT Students

This document discusses IP addressing and versions of IP addresses. It covers the following key points: 1. IP addresses uniquely identify devices on a network and have two main components - a network ID and host ID. The network ID identifies the network and host ID uniquely identifies a device within that network. 2. There are two main versions of IP - IPv4 which has 32-bit addresses providing 4.3 billion addresses, and IPv6 which has 128-bit addresses providing vastly more addresses to meet future needs. 3. IP addresses can be written in dotted decimal, binary, and hexadecimal notations. Conversion between these notations involves grouping bits or bytes in the address.

Uploaded by

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

Networking for IT Students

This document discusses IP addressing and versions of IP addresses. It covers the following key points: 1. IP addresses uniquely identify devices on a network and have two main components - a network ID and host ID. The network ID identifies the network and host ID uniquely identifies a device within that network. 2. There are two main versions of IP - IPv4 which has 32-bit addresses providing 4.3 billion addresses, and IPv6 which has 128-bit addresses providing vastly more addresses to meet future needs. 3. IP addresses can be written in dotted decimal, binary, and hexadecimal notations. Conversion between these notations involves grouping bits or bytes in the address.

Uploaded by

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

4/26/2021

Chapter 5
Internet Addressing, Subnetting and Masking
By: - Senbeto K.
Data Communication and Computer Networking 1
Contents-Chapter 5
 IP and IP Addressing
 Types of Addresses Level
 Versions of IP Addresses
 Address Classes
 Subnetting and Subnet Masking
 Reserved IP addresses
 Supernetting and Classless Inter-Domain Routing
 Public and Private Addresses
4/26/2021 Data Communication and Computer Networking 2
Network Addressing
IP and IP Addressing
 Network can contains different devices such as: computers, laptops,
mobiles, tablets, hubs, switches, router etc
 How we can identify one device from another?
 Network Addressing:- is the process of assigning unique number to
specifically identify devices in network.
 Internet Protocol(IP) address:- is a numerical label assigned to each
device connected to a computer network that uses the Internet Protocol for
communication.
 These addresses are similar to those of your house number, mobile
number, car plate number or P.O.Box number allowing data to reach the
appropriate destination on a network and the Internet.
 The main aim of Network addressing is to uniquely identify correct
source and destination addresses of devices in networks.
4/26/2021 Data Communication and Computer Networking 3
IP and IP Addressing…
 An IP address serves(carries) two principal information:
 Location/Network identification (Network ID):
 The network ID identifies the network that are bounded by IP routers.
 All hosts on the same physical network must have the same network ID.
 The network ID must be unique to the internetwork (Internet).
 E.g
IP address of PC1 192.168.10.11
IP address of PC2 192.168.10.12
 Host identification (Host ID):
 This is the portion IP address serves to identify the end devices/host
(desktop computer, laptop, mobile, tablet or router) in the network.
 The address for each host must be unique to the network.
 E.g
IP address of PC1 192.168.10.11
IP address of PC2 192.168.10.12
 As Student ID card carries different information (eg. IT(R)255/10), every IP
address carries two information (host information and network information).
4
Types of Addresses Levels
 Four levels of addresses are used in internet employing TCP/IP protocols:
 1. Physical Address:-
 Also known as the link address or MAC (Media Access Control) address
 It is fixed 48-bit number encoded into the hardware’s network Interface
Card (NIC) by the manufacturer of the device.
 physical address written as 12 hexadecimal digits in 6 sections, every
section contains 2 hexadecimal digits separated by a colon(:).
E.g. 07:01:02:2C:4B:AD
 It is included into frame at Physical and data link layers.
 2. Logical Addresses:-
 A logical address is also called IP address.
 It is 32- bit address that can uniquely define a host connected to the
network/Internet.
 No two hosts on the same network can have the same IP address.
 Logical (IP) address has four octets (sections) separated by dot(.), each
having eight binary bits or (decimal numbers ranging from 0 to 255)
E.g. 192.168.105.32 (11000000.10101000.01101001.00100000)
 It is included into data packet at Network layer.
5
4/26/2021 Data Communication and Computer Networking
Types of Addresses Levels…
 Four levels of network addresses…
 3. Port Address:-
 is the label assigned to identify processes running on the same computer at
the same time (a process communicating with another process)
 For example, computer A can communicate with computer B by using TELNET
and with computer C by using the File Transfer Protocol (FTP) at the same time.
 It is 16 bits length number written in one section of decimal notation.
E.g. 753
 The port numbers are integers between 0 and 65,535.
 It is included into data segments at Transport layer.
 4. Specific Address:-
 also called Application-Specific Addresses/user-friendly addresses/
 Designed for specific application
 E.g.
Email address: [email protected], [email protected]
Web site: www.dtu.edu.et, or www.google.com,Twitter or viber address
 It is included into data Massage at Application layer.
4/26/2021 Data Communication and Computer Networking
6
Versions of IP Addresses
 We have two versions of IP used today:
 IPv4 and IPv6
 1. Internet Protocol Version 4 (IPv4):
 is the initial version, which is still widely used on the Internet.
 It has a size of 32 bits of information and provides address space of 232
addresses which is equals to 4,294,967,296 addresses (4.3 Billions).
Address Space is the total number of addresses used by protocol. So that
IPv4 uses 32-bit address and the address space is 232 .
If a protocol uses N bits to define an address, the address space is 2N d/t
addresses because each bit can have two different values (0 and 1)
 The 32 bits of IPv4 address are divided into four sections, referred to as octets
or bytes separated by dot(.).
 Example of an IPv4 address:
 172.16.30.56 (10101100.00010000.00011110.00111000)
 The value of each section (octet) range from 0 to 255.
 IPv4 has less number of IP addresses and less security than IPv6. 7
4/26/2021 Data Communication and Computer Networking
Versions of IP Addresses…
 2. Internet Protocol Version 6 (IPv6):
 The IPv6 is newly developed IP version aimed to address the address limitation
of IPv4.
 It has a size of 128 bits of information providing address space of 2128 addresses
It provides more than 340 Trillions of addresses, which is enough
addresses to assign one to every single atom on the surface of the earth.
 IPv6 has 8 sections separated by colon(:).
Each field(section) in an IPv6 is represented by 4 hexadecimal numbers.
It is also possible to represent it in binary numbering notation.
 Examples of an IPv6 address:
 FF22:00AB:4005:805C:2CDD:2985: 3012:CCF3
 2607:f8b0:4005:805::200 (fields that have zero value represented by double
colons (::))
 IPv6 offer better security and much larger ranges of IP addresses than IPv4.
 Virtually all network devices and operating systems can transmit data using both IPv4
and IPv6. Using both versions on the same network is known as a dual-stack approach.
8
4/26/2021 Data Communication and Computer Networking
Notations of IP Address
 IP address can be depicted in three notations:
 Dotted-decimal notation: using decimal digits (1-9). E.g. 172.16.30.56
 Binary notation: using two binary digits (0&1).
E.g. 10101100.00010000.00011110.00111000
 Hexadecimal notation: using hexadecimal digits (0-9 & A-F).
E.g. AC 10 1E 38
 Converting Binary notation to dotted-decimal notation:
Bit Position 7 6 5 4 3 2 1 0
Binary 1 1 1 1 1 1 1 1
Decimal 128 64 32 16 8 4 2 1
 Decimal equivalent values of 1 binary digit are counted, 128, 64, 32,16, 8, 4,1. but values of
0 binary digit will be ignored.
 E.g convert 01101111.00111000.00101101.01001110 to dotted decimal notation:
 01101111= [64+32+8+4+2+1]=111
 00111000= [32+16+8]=56  01101111 00111000 00101101 in binary
 00101101= [32+8+4+1]=45 notation is equivalent to 111.56.45.78 in
 01001110= [64+8+4+2]=78 dotted-decimal notation
Data Communication and Computer Networking
9
Notations of IP Address…
 To Converting Binary notation to hexadecimal notation:
Group 4 Binary digits (quadruplets) and replace each quadruplets
by its equivalent hexadecimal digit.
E.g convert 01101111.00111000.00101101.01001110 to hexadecimal
notation:
0110 1111. 0011 1000 . 0010 1101 . 0100 1110
6 F . 3 8 . 2 D . 4 E
So that binary notation of IP address
01101111.00111000.00101101.01001110 is equivalent to
6F.3A.2D.4E in hexadecimal notation.
10
Data Communication and Computer Networking
IP Address Classes
 An IP address (IPv4) has 32 bits which fall in four octets. Address class defines which bits
are used for network ID and which bits are used for host ID.
 These address can be classful and classless.
 Classful addresses:
 They fall into one of the five address classes.
 are addresses used in the network that is not subnetted.
 The network bits are always /8, /16 and /24 for class A, B and C respectively.
 They use default subnet mask.
 Additionally, the bits in the subnet mask of classful addresses fall in natural octet
boundary (bits in the same octet are contiguous(similar), i.e. either all are 0s or 1s).
 e.g Classful IP; 192.168.95.25, subnet Mask: 255.255.255.0
(11111111.11111111.11111111.00000000)
 Classless addresses:
 They have no address classes.
 are addresses used in subnetted network.
 They use Custom subnet masks. Their network bits are different from /8, /16 & /24.
 Bits in subnet mask of classless addresses do not fall in the natural octet boundary
(you can find mixed bits in the same octet of subnet mask).
 e.g Classless IP; 199.34.89.32, subnet Mask: 255.255.255.224
(11111111.11111111.11111111.11100000) →(fourth octet has mixed bitts: three 1s &
five 0s.) 11
4/26/2021 Data Communication and Computer Networking
IP Address Classes…
 Classful IP addresses have five address classes: namely class A, B, C, D and E.
 The value of the first octet of the given IP address determines its address class.
 Every IP address has two portions: Network portion (Netid) and Host
portion(Hostid).
 Class A:
 Assigned to networks with a very large number of hosts. Has larger host address
 The address range of Class A address must be between 0 and 127.
 (1.0.0.0 to 126.255.255.255)
 The first bit of the first byte in a Class A network address must always be off, or 0
and the remaining seven bits can turn to zeros (0) for beginning range and once
(1s) for ending range. This helps to find Class A range of addresses.
 00000000=0
 01111111=127
 The first octet represents Network (Netid) & the last three octets represent hosts
(hostid).
Network.Node.Node.Node
 Class A have 7 usable network bits and we have 27 = 128-2=126 Networks
 Class A have 24 Host bits and we have 224-2= 16, 777,214 usable Host
 Class A provides more host addresses and less network addresses
4/26/2021 Data Communication and Computer Networking 12
IP Address Classes…
 Class B:
 assigned to medium sized networks with a large number of hosts.
 The address range of Class B address must be between 128 and 191.
 (128.0.0.0 to 191.255.255.255)
 The first bit of the first byte in a Class B network address must always be
on and the second bit must always be turned off. the remaining six bits can
turn to zeros (0) for beginning range and once (1s) for ending range as
follows.
 10 000000=128
 10 111111=191
 The first two octets represents Network (Netid) and the last two octets
represent hosts (Hostid).
Network.Network.Node.Node
 Class B have 14 usable network bits and we have 214 = 16,382 Networks
 Class B have 16 Host bits and we have 216 = 65, 534 Host
 Class
4/26/2021
B provides more host addresses and less network addresses
Data Communication and Computer Networking 13
IP Address Classes…
 Class C:
 assigned to smaller networks
 The address range of Class C address must be between 192 and 223.
 (192.0.0.0 to 223.255.255.255)
 The three high-order bits in a class C address are always set to binary 110.
 110 000000=192
 110 111111=223
 The first three octets represents Network (Netid) and the last octet
represent hosts (Hostid).
Network.Network.Network.Node
 Class C have 21 usable network bits and we have 221 = 2,097,152
Networks
 Class C have 8 Host bits and we have 28-2 = 254 Host
 Class C provides more network addresses and less host addresses.

4/26/2021 Data Communication and Computer Networking 14


IP Address Classes…
 Class D:
 The address range of Class D address must be between 224 and 239.
 (224.0.0.0 to 239.255.255.255)
 The four high-order bits in a class D address are always set to binary 1110.
 1110 000000=224
 1110 111111=239
 Class D provides network addresses reserved for multicasting
services.
 Class E:
 The address range of Class D address must be between 240 and 254.
 (224.0.0.0 to 239.255.255.255)
 The four high-order bits in a class E address are set to 1111.
 1111 000000=240
 1111 111111=254
 Class E addresses are experimental addresses reserved for future
use.
4/26/2021 Data Communication and Computer Networking 15
IP Address Classes…
1st Octet 1st Octet Network/ Hosts per
Host ID Default Subnet Number of
Addess Decimal High Order Network (Usable
(N=Network, Mask Networks
Class Range Bits H=Host)
Addresses)

128 16,777,214
A 1 – 127 0 N.H.H.H 255.0.0.0
(27) (224 – 2)

B 128 – 191 10 N.N.H.H 255.255.0.0 16,384 (214) 65,534 (216 – 2)

2,097,152
C 192 – 223 110 N.N.N.H 255.255.255.0 254 (28 – 2)
(221 )
D 224 – 239 1110 Reserved for Multicasting
E 240 – 254 1111 Experimental; used for research

4/26/2021 Data Communication and Computer Networking 16


IP Address Classes…
 Examples
To which address classes do the following IP addresses belong to:
 91.168.10.10 →→  Class A
 205.50.50.21 →→  Class C
 172.16.10.10 →→  Class B
 225.10.10.10 →→  Class D
 190.20.30.44 →→  Class B
Find errors if any in the following IP addresses.
 111.56.045.78 →→  Leading zeros on 3rd octet is not possible
 221.34.7.8.20 →→  More than 4 octets are not allowed
 75.45.257.14 →→  257 is out of the allowed range of [0-255]
 11100010.4.1.67 →→  Mixed notations are not correct.

4/26/2021 Data Communication and Computer Networking 17


Subnet Masking
Every device on a network running IPv4 assigned a subnet mask.
Subnet mask:- is special 32-bit number assigned to a device together with IP
address to inform the rest of networks about a network to which the device attached
With the advent of subnetting, Parts of IP address that are used as the network ID
and host ID have changed, and additional information is required to determine them.
To determine the network ID and host id in IP address Subnet mask is required.
Subnet mask distinguish the network ID and host ID in IP address, regardless of
classful or classless (subnetted) network.
Like IP address, subnet masks are composed of four octets (32 bits) and can be
expressed in either binary or dotted-decimal notations.
The bits of subnet mask are defined as:
 All bits that correspond to Network ID sets to 1s.
 All bits that correspond to Host ID sets to 0s.
 E.g 255.255.255.0 (11111111.11111111.11111111.0000000)
There are two types of subnet masks:
 Default subnet mask
 Custom subnet mask
4/26/2021 Data Communication and Computer Networking 18
Subnet Masking…
Default Subnet Mask:-
 A default subnet mask is used on the classful IP address
 It is used on TCP/IP networks that are not divided into subnets.
 Bits fall on natural octet boundary. (bits in the same octet are similar)
For each address classes, there are default address classes as follows:
Address Subnet Mask (Binary Bits ) Subnet Mask
Network Prefix
(decimal notation)
Class notation
Class A 11111111.00000000.00000000.00000000 255.0.0.0 /8
Class B 11111111.11111111.00000000.00000000 255.255.0.0 /16
Class C 11111111.11111111.11111111.00000000 255.255.255.0 /24
Default subnet masks are assigned on TCP/IP by default automatically.
Network Prefix notation: is a short hand representation of a subnet mask which is
denoted by forward slash(/) followed by number of network bits.
4/26/2021 Data Communication and Computer Networking 19
Subnet Masking…
Network Prefix notation: is a short hand representation of a subnet mask
which is denoted by forward slash(/) followed by number of network bits.
For example, the class B network ID 131.107.0.0 with the subnet mask of
255.255.0.0 would be expressed in network prefix notation as: 131.107.0.0/16.
Subnet masks are assigned in the same way as IP address are
assigned:
 manually by network administrator or
 automatically by DHCP (Dynamic Host Configuration Protocol)

4/26/2021 Data Communication and Computer Networking 20


Subnet Masking…
Custom Subnet Mask:-
 used to identify network and host id in subnetted, supernetted and the classless
IP address
 Bits do not fall on natural octet boundary. (we can find mixed bits on the same
octet)
 E.g. 11111111.11111111.11111111.11110000 (255.255.255.240)
 Custom subnet masks can be obtained by borrowing one or more host bits.
Example
 Given class C network IP address of 199.84.189.0 and wanted to divide it
into six subnets. Determine the possible subnet mask
 Solution:
For given subnets (S) and borrowed bits (BB) 2BB =S
2BB =6, in this case 3 borrowed bits (BB) are required to create 6 subnets.
Class C default subnet mask: 11111111.11111111.11111111.00000000=255.255.255.0
The custom subnet mask: 11111111.11111111.11111111.11100000=255.255.255.224 21
Subnet Masking…
Custom Subnet Mask:-…
 To find the custom subnet mask, we have to determine the number of
borrowed bits required to create the subnets needed.
 Subnets are always the power of two.(21=2, 22=4, 23=8, 24=16, …
 For example: for the required number of 7 subnets, it is not possible to
create exactly 7 subnets, since no power of two gives 7. in this case should
determine the minimum possible borrowed bits that can satisfy the required
number of subnets. In this case :
 Two borrowed bits gives (22) 4 subnets, which cannot satisfy requirement
 Three borrowed bits gives (23) 8 subnets, which is sufficient. Here we will
have 1 extra subnet and it can be reserved for future growth.

22
Determining the Network ID(Index)
 To extract the network ID from random IP address using an arbitrary subnet mask,
logical ANDing operation is used.
 32-bit of IP address make logical AND with the 32-bit subnet mask. This operation
is known as a bit-wise logical ANDing.
 The result of the bit-wise logical AND of the IP address and the subnet mask is the
network ID.
 In logical ANDing operation, the result of the two bits is 1 when both bits being
compared are 1; otherwise, the result is 0.
 For example, what is the network ID of the IP node 131.107.189.41 with a
subnet mask of 255.255.240.0?
 To obtain the result, turn both into their binary equivalents and line them up.
Then perform the ANDing operation on each bit and write down the result.
10000011 01101011 10111101 00101001 IP Address (131.107.189.41)
11111111 11111111 11110000 00000000 Subnet Mask (255.255.240.0)
10000011 01101011 10110000 00000000 Network ID (131.107.176.0)
4/26/2021
The network ID is 131.107.176.0.
Data Communication and Computer Networking 23
Subnetting
Internet addresses classes are assigned based on how many networks and
hosts are required per given network.
The class A network ID has over 16 million hosts on the same network.
 All the hosts on the same physical network bounded by IP routers share the
same broadcast traffic; they are in the same broadcast domain.
 It is not practical to have 16 million nodes in the same broadcast domain. The
result is that most of the 16 million host addresses are not assignable and are
wasted.
Even a class B network with 65 thousand hosts is also impractical.
In order to use addresses effectively, network subnetting technique
developed.
Subnetting:- is a process of subdividing a single class of network into
multiple, smaller logical network segments called subnets.
 Subnetting help to create smaller broadcast domains thereby reducing
traffic collision and to better utilize the bits in the host ID.
4/26/2021 Data Communication and Computer Networking 24
Subnetting…
Subnetting is performed by borrowing one or more host bits to represent
network.

To determine how many subnets we can create, use the following Subnet
formula:
2BB =S
 where the exponent BB is borrowed bits (masked bits)from the host portion.
 S is number of subnets created
4/26/2021 Data Communication and Computer Networking 25
Subnetting…
Subnet Design Considerations
 There are three subnet design considerations on which we can design
subnetting:
1. Subnetting based on required number of subnets
2. Subnetting based on required number of hosts per subnets
3. Subnetting based on given IP address & Subnet Mask, finding
original network range (reverse engineering a subnet problem)

4/26/2021 Data Communication and Computer Networking 26


Subnetting…
1. Subnetting based on required number of subnets
 Here the number of required subnets are given
 subnetting designed using the given number of subnets and IP address
 Example: A service provider has given you the Class C network Address
209.50.1.0. Your company wants to break the network into 4 separate subnets.
Determine:-
A. The custom subnet mask.
B. The number of possible subnets that can be created.
C. The ranges of each subnet
D. The number of usable hosts per subnets
E. Ranges of valid hosts of each subnets
F. Broadcast address of each subnets
4/26/2021 Data Communication and Computer Networking 27
Subnetting…
1. Subnetting based on required number of subnets…
 Given
Number Required subnets=4
Given IP address=209.50.1.0 (Class C)

 Solution:
A. The custom subnet mask.
 To determine the custom subnet mask, first we should decide the number of
borrowed bits that can provide 4 subnets. Using subnet formula 2BB=4→2BB= 22. so
that, BB=2, here we will have 2 borrowed bits in subnet mask as follows:
Class C default subnet mask: - 255.255.255.0 = 11111111.11111111. 11111111.00000000
Custom subnet mask: - 255.255.255.192 = 11111111.11111111.11111111.11000000

4/26/2021 Data Communication and Computer Networking 28


Subnetting…
1. Subnetting based on required number of subnets…
 Solution:
B. The number of possible subnets that can be created.
 The number of subnet that can be created depend on the number of borrowed bits.
 In custom subnet mask, we have 2 borrowed bits
 Using subnet formula 2BB=4→22=4. so that, 4 subnets can be created.
C. The ranges of each subnet

Subnet range = 2host bits in subnetted octet


Subnet range= 26 = 64 (we have 6 host bits in custom subnet mask.)
 Subnet 1: 209.50.1.0- 209.50.1.63
 Subnet 2: 209.50.1.64- 209.50.1.127
 Subnet 3: 209.50.1.128- 209.50.1.191
 Subnet 4: 209.50.1.192- 209.50.1.255
4/26/2021 Data Communication and Computer Networking 29
Subnetting…
1. Subnetting based on required number of subnets…
 Solution:
D. The number of usable (valid) hosts per subnets
 The number of usable(valid) hosts in each subnet can be calculated by using the following
host formula: host bits
# of valid hosts per subnet= 2 -2
 Host bits are bits in custom subnet mask remaining after borrow (all zeros in custom subnet mask).
 Two addresses (the beginning address and the ending addresses of the subnet range are reduces and
reserved for subnet index and broadcast services respectively. They are not used for hosts address.)
 In this example we have 6 host bits in custom subnet mask
 number of valid hosts per subnet= 26 -2 = 64-2 = 62
E. Ranges of valid hosts of each subnets
 Subnet 1: 209.50.1.1- 209.50.1.62
 Subnet 2: 209.50.1.65- 209.50.1.126
 Subnet 3: 209.50.1.129- 209.50.1.190
 Subnet 4: 209.50.1.193- 209.50.1.254
4/26/2021 Data Communication and Computer Networking 30
Subnetting…
1. Subnetting based on required number of subnets…
 Solution:
F. Broadcast address of each subnets
 In the each subnet range,
 The beginning address of the subnet range is subnet index(network
address) and
 The ending addresses of the subnet range is broadcast address.

Subnets Network address Broadcast address


Subnet 1 209.50.1.0 209.50.1.63
Subnet 2 209.50.1.64 209.50.1.127
Subnet 3 209.50.1.128 209.50.1.191
Subnet 4 209.50.1.192 209.50.1.255
4/26/2021 Data Communication and Computer Networking 31
Subnetting…
2. Subnetting based on required number of hosts per subnets
 Here the number of required number of hosts per subnets are given
 subnetting designed using the given number of given hosts per subnet
and the IP address
 Example. The Internet Service Provider(ISP) granted a Network ID of 162.160.0.0
to certain private company. The company needs to create sets of subnets that can
support at least 500 hosts. Determine:-
A. The custom subnet mask.
B. The number of possible subnets that can be created.
C. The ranges of the first three subnet
D. The number of usable hosts per subnets
E. Ranges of valid hosts of the first three subnets
F. The network and Broadcast address of the first three subnets
4/26/2021 Data Communication and Computer Networking 32
Subnetting…
2. Subnetting based on required number of hosts per subnets…
 Given
Number Required hosts per subnet=500
Given IP address=162.160.0.0 (Class B)
 Solution:
A. The custom subnet mask.
 To determine the custom subnet mask, first we should decide the number of borrowed bits.
 To have 500 host in the subnet, we needs 9 host bits which can provide 29=512 are
required. (note: we cannot have 500 host addresses, but 512 host addresses)
 To find custom subnet mask, we will keep 9 host bits (0) and we will set all the
remaining bits to 1s in default subnet mask as follows:
Class B default subnet mask: - 255.255.0.0 = 11111111.11111111.00000000.00000000
Custom subnet mask: - 255.255.254.0 = 11111111.11111111.11111110.00000000
 Host bits=9
4/26/2021
 Borrowed bits=7 33
Data Communication and Computer Networking
Subnetting…
2. Subnetting based on required number of hosts per subnets…
 Solution:
B. The number of possible subnets that can be created.
 In custom subnet mask, we have 7 borrowed bits
 Using subnet formula subnets=2BB→27=128 subnets. so that, 128 subnets can be created.
C. The ranges of the first three subnet
Subnet range = 2host bits in subnetted octet
 In the custom subnet mask, we have 1 host bit in subnetted octet.
 The Subnet range= 21 → 2
 Subnet 1: 162.160.0.0 -- 162.160.1.255
 Subnet 2: 162.160.2.0 -- 162.160.3.255
 Subnet 3: 162.160.4.0 -- 162.160.5.255
 … … …
 Subnet 128: 162.160.254.0 - 162.160.255.255
4/26/2021 Data Communication and Computer Networking 34
Subnetting…
2. Subnetting based on required number of hosts per subnets…
 Solution:
D. The number of usable hosts per subnets
 The number of usable(valid) hosts in each subnet can be calculated by using the following
host formula:
# of valid hosts per subnet= 2host bits -2
 Host bits are all zeros in custom subnet mask (we have 9 host bits )
 Number of valid hosts per subnet = 29 -2 = 512-2 = 510
 Two addresses are reduces for subnet index and broadcast services respectively.
E. Ranges of valid hosts of the first three subnets
 Subnet 1: 162.160.0.1 -- 162.160.1.254
 Subnet 2: 162.160.2.1 -- 162.160.3.254
 Subnet 3: 162.160.4.1 -- 162.160.5.254
 … … …
 Subnet 128: 162.160.254.1 -- 162.160.255.254
4/26/2021 Data Communication and Computer Networking 35
Subnetting…
2. Subnetting based on required number of hosts per subnets…
 Solution:
F. Broadcast address of each subnets
 In the each subnet range,
 The beginning address of the subnet range is subnet index(network
address) and
 The ending addresses of the subnet range is broadcast address.
Subnets Network address Broadcast address
Subnet 1 162.160.0.0 162.160.1.255
Subnet 2 162.160.2.0 162.160.3.255
Subnet 3 162.160.4.0 162.160.5.255
… … …
Subnet 128 162.160.254.1 162.160.255.255
4/26/2021 Data Communication and Computer Networking 36
Subnetting…
3. Subnetting based on given IP address & Subnet Mask…
 Here the IP address and Custom subnet mask are given
 subnetting designed using the given IP address and subnet mask
 Example 1: given IP address of 172.16.0.0 and subnet mask of 255.255.240.0.
Determine:
A. The number of possible subnets that can be created.
B. The ranges of the first three subnet
C. The number of usable hosts per subnets
D. Ranges of valid hosts of the first three subnets
E. The network and Broadcast address of the first three subnets

4/26/2021 Data Communication and Computer Networking 37


Subnetting…
3. Subnetting based on given IP address & Subnet Mask…
 Solution:
 Given IP address= 172.16.0.0 (class B)
 Given custom subnet mask=255.255.240.0 = 11111111.11111111.11110000.00000000
 Class B default subnet mask=255.255.0.0 = 11111111.11111111.00000000.00000000
 In the given custom subnet mask, we have 4 borrowed bits, 12 host bits, and 4 host
bits in masked/subnetted octet
A. The number of possible subnets that can be created.
✓ subnets = 2bb = 24= 16
B. The ranges of the first three subnet
Subnet range = 2host bits in subnetted octet = 24= 16
 172.16.0.0 - 172.16.15.255
 172.16.16.0 - 172.16.31.255
 172.16.32.0 - 172.16.47.255
… - …
 172.16.240.0.- 172.16.255.255
4/26/2021 Data Communication and Computer Networking 38
Subnetting…
3. Subnetting based on given IP address & Subnet Mask…
 Solution:
C. The number of usable hosts per subnets
# of valid hosts per subnet= 2host bits -2
212-2 = 4094
D. Ranges of valid hosts addresses of the first three subnets
Subnet range Range of valid host Broadcast
172.16.0.0—172.16.15.255 172.16.0.1—172.16.15.254 172.16.15.255
172.16.16.0—172.16.31.255 172.16.16.1—172.16.31.254 172.16.31.255
172.16.32.0—172.16.47.255 172.16.32.1—172.16.47.254 172.16.47.255
172.16.48.0—192.16.63.255 172.16.48.1—192.16.63.254 192.16.63.255
E. The network and Broadcast address of the first three subnets
 The last column on the table above contains the broadcast addresses of the first
Four subnets

4/26/2021 Data Communication and Computer Networking 39


Subnetting…
3. Subnetting based on given IP address & Subnet Mask…
 Here the IP address and Custom subnet mask are given
 subnetting designed using the given IP address and subnet mask
 Example 2: Consider you have given A network address of 10.0.0.0 and subnet
mask of 255.255.248.0. Answer the following questions:
A. How many new subnets can be created?
B. How many usable hosts are there per network?
C. What is the range of the first three networks?

4/26/2021 Data Communication and Computer Networking 40


4/26/2021 Data Communication and Computer Networking 41

You might also like