KEMBAR78
Notes Subnetting | PDF | Ip Address | Domain Name System
0% found this document useful (0 votes)
200 views6 pages

Notes Subnetting

Subnetting allows a single IP network address to be divided into multiple logical subnetworks to improve efficiency and reduce routing complexity. This is done by using a subnet mask that defines which bits identify the network versus the hosts. For example, extending the mask of the Class C network 204.17.5.0 from 255.255.255.0 to 255.255.255.224 would create 8 subnets of 30 addresses each. Subnet masks are specified in CIDR notation such as /27 to indicate the number of contiguous 1 bits in the mask. Routers require an IP address for each connected subnet. Special addresses like network addresses of all 0s and broadcast addresses of all 1s are reserved for specific functions.

Uploaded by

virat
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)
200 views6 pages

Notes Subnetting

Subnetting allows a single IP network address to be divided into multiple logical subnetworks to improve efficiency and reduce routing complexity. This is done by using a subnet mask that defines which bits identify the network versus the hosts. For example, extending the mask of the Class C network 204.17.5.0 from 255.255.255.0 to 255.255.255.224 would create 8 subnets of 30 addresses each. Subnet masks are specified in CIDR notation such as /27 to indicate the number of contiguous 1 bits in the mask. Routers require an IP address for each connected subnet. Special addresses like network addresses of all 0s and broadcast addresses of all 1s are reserved for specific functions.

Uploaded by

virat
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/ 6

NOTES ON SUBNETTING and CIDR

We had introduced the problems of Class-full Addressing and how it leads to the problem of
running out of IPv4 addresses. There are FIVE main problems:

1. The network and host portions being fixed. There are two few addresses for large networks.
Class A is unsuited (only 126 networks). Class C can only accommodate 254 hosts (too
small), Class B networks lead to waste of several network addresses if there are not too
many hosts. The two layer hierarchy is inefficient with both Class A and B addressing. By
carving subnets, this can be made efficient.
2. There is no flexibility in classful addressing which is now almost obsolete . If an
organization needs 2000 addresses, then both Class A and B are unsuitable (126/16,384
respectively). With Class C we need to use at least 8 class C address blocks (2000/ 254 =
7.8), which may unnecessarily load the routing tables. Routing on Internet needs to have
an entry for each network address (see slide no 4 and 5 of the previous class notes). In 1993
itself the size of routing tables exceeded the capacity of routers. So we move to the
classless CIDR system.
3. The IPv4 address space of 32 bits is also getting insufficient …we are moving to IPv6 ( we
may not cover this due to time constraints)

SUBNETTING

Subnetting provides a simple way to reduce the total number of network numbers that are assigned.
The idea is to take a single IP network number and allocate the IP addresses with that network
number to several physical networks, which are now referred to as subnets. Subnets can be freely
assigned within the organization. Internally, subnets are treated as separate networks Subnet
structure is not visible outside the organization. With subnetting, IP addresses use a 3-layer
hierarchy: Network, Subnet and Host. It Improves efficiency of IP addresses by not consuming an
entire address space for each physical network. It also reduces router complexity. Since external
routers do not know about subnetting, the complexity of routing tables at external routers is
reduced. Dividing a network into subnets is useful for both security and performance reasons.
SUBNET MASKS: The division of the prefix and suffix portions is made more flexible by using

subnet masks. A mask is a 32 bit number in which the 𝑛leftmost bits are ones and the rightmost

32-𝑛 bits are zeros. In addition to setting an IP address, one also sets a subnet mask which specifies

which portion of the address is used to identify the network and which portion is used to identify

the hosts within a network. There are two types of notations used : length notation and slash

notation. In the length notation, typical subnet mask looks like

11111111.11111111.11110000.00000000 or in decimal equivalent something like this

255.255.255.224 . One extracts the subnet address by performing a bitwise AND operation on the

mask and the IP address. ( We will do some exercises on this ) . IP addresses must be unique. The

network portion (prefix) is assigned by an external agency. The host portion (suffix) is assigned

by the network administrator. In the CIDR notation it is conveniently given by just the value of 𝑛

preceded by a slash: [x.y.z.t/n].. The 1’s in the subnet mask correspond to the network part, the 0’s

correspond to the host parto simplify the handling of addresses, the Internet authorities impose three

restrictions on classless address blocks:

1. The addresses in a block must be contiguous, one after another.

2. The number of addresses in a block must be a power of 2 (1, 2, 4, 8, ... ).

3. The first address must be evenly divisible by the number of addresses.

For example 205.16.37.32 to 205.16.37.47 is a block of address (How many?? 16) given to an

organization. After getting the block of address, the organization allocates the addresses to the different

devices that need internet connection. Note: The first address is called the network address and is not

assigned to any device it defines the organization to the rest of the world and is used by routers to direct

messages sent to the organization from outside.


Subnetting allows us to create multiple logical networks that exist within a network. If you do
not subnet, you can use only one network

128.143.0.0 /16 means 16 bits are ones and other 16 are zeros . (Default mask for Class B):

Note and understand clearly the concept of subnet masks. The same network with subnetting is as
shown below:

The slash 24 will mean that 32-24 = 8 : therefore last 8 bits are zeros the first 24 are ones :
check out the subnet masks
Example 1. Given a network of 204.17.5.0, create subnets by extending the natural mask to
be 255.255.255.224 .

(a) Which Class address is this ? Ans : “C” ;


(b) What is the natural mask? Ans : 255.255.255.0 or 204.17.5.0/24 in CIDR
(c) What will be the subnet mask in CIDR notation? :

Subnet mask 255.255.255.224 : Binary—11111111 11111111 11111111 11100000

Ans – 204.17.5.0 /27 because there are 27 bits that are set as one in the mask

204.17.5.0 : Binary— 11001100 . 00010001 . 00000101 . 00000000

255.255.255.224 : Binary—11111111 11111111 11111111 11100000

Note that we have taken 3 bits from the original host portion (last byte ) : thus we can create 8
subnets and each subnet can have 32 host addresses. (11100000) . Actually it will be 30 (remember
this) Why? Because host ids of all zeros and all ones not allowed. [This may be also referred as
3-bit sub-netting as we have stolen 3 bits from the host portion] Subnetting details :

204.17.5.0/27 : host address range 1 to 30

204.17.5.32 /27 : host address range 33 to 62

204.17.5. 64/27 : host address range 65 to 94

204.17.5.96 /27 : host address range 97 to 126 and so on …Complete the rest ….

Observe one important thing : Here we have used 3 bits for subnet masking. What if we used 4
bits?? Then we would have 16 subnets , each of which can have 16 host addresses…14 of them
can be assigned to host devices. More host bits used in subnet maskmore number of subnets
less host addresses per subnet. [ this is to be designed as per requirement]

#2 Repeat the above problem with subnet mask of 255.255.255.240 or (/28)

#3 Subnet a Class B network having address 172.16.0.0/16 extend it by using five bits from
the riginal host bits for subnets: ( Hint: verify that the subnet mask is 255.255.248.0)

How many subnets? (32) How many hosts in each subnet ? (2048 , how ?? )
Note: Length of the subnet mask need not be identical at all sub networks. We will see
examples of this type of design soon. [ Next lecture] …

Each data link on a network must have a unique network/subnetwork ID, and every node on that
linkis a member of the same network. Routers are also given IP addresses, actually they are given
2 or more addresses since a router connects to more than one physical network. To make network
administrator’s lives easier, they often assign the same suffix to the various router addresses. (The
prefixes must of course be different.). Any device such as routers that connects n
networks/subnetworks will have n distinct IP addresses, one for each net/subnet that it
interconnects.
Note : There are some special IP addresses
 Network Addresses: IP reserves the host (suffix) address of 0’s for a network
 Direct Broadcast: IP reserves the host (suffix) address of 1’s for broadcasting within the
network
 Limited Broadcast: Used during system startup by a computer that does not know its IP
address. The entire prefix and suffix are assigned all 1’s for the local network.

Dynamic Host Configuration Protocol (DHCP) is a protocol for assigning IP addresses


dynamically. A device’s IP address may change every time it connects to the network. It is even
possible to change the address while still connected. [We will not study this is more detail but this
is important: interested students may do a bit of self-study for knowledge]
A user does not have to know an IP address, a user often knows a domain name which stands in
for one or more IP addresses. Also a given IP may have more than one domain name. Because the
Internet is based on IP addresses, not domain names, every Web server requires a Domain Name
System (DNS) server to translate domain names into IP addresses. Every domain name has a suffix
that indicates which top level domain (TLD) it belongs to. There are only a limited number of such
domains. For example: gov - Government agencies, edu - Educational institutions org -
Organizations (nonprofit) , mil - Military com - commercial business, net - Network organizations
ac.in: This domain name is used for academic institutes in India, it represents academic institution
website in India.

You might also like