search the web

Monday, October 17, 2016

IP Subnetting

Subnetting

With the rapid growth of the Internet & the ever-increasing
demand for new addresses, the standard address class structure
has been expanded by borrowing bits from the Host portion to
allow for more Networks.

Subnetting reduces the size of the routing tables stored
in routers.
Subnetting extends the existing IP address base &
restructures the IP address.
As a result, routers must have a way to extract from a IP
address both the Network address & the Host address.

Subnetting Networks ID

A 3-step example of how the default Class A subnet
mask is applied to a Class A address:
subnetting networks ID
subnetting networks ID

Subnetting, Subnet & Subnet Mask



-Subnetting, a subnet & a subnet mask are all
different.
-In fact, the 1 st creates the 2 nd & is identified by the 3 rd .
-Subnetting is the process of dividing a network & its
IP addresses into segments, each of which is called a
subnetwork or subnet.

Subnetting

-A network has its own unique address, such as a
Class B network with the address 172.20.0.0 which
has all zeroes in the host portion of the address.

-From the basic definitions of a Class B network &
the default Class B subnet mask, you know that this
network can be created as a single network that
contains 65,534 individual hosts.

Benefits of Subnetting

-Fewer IP addresses are needed to provide
addressing to a network & subnetting.

-Subnetting usually results in smaller routing tables
in routers

Example of Subnetting

-when the network administrator divides the
172.20.0.0 network into 5 smaller networks: –
172.20.1.0, 172.20.2.0, 172.20.3.0, 172.20.4.0 &
172.20.5.0 –

-the outside world still knows the network as
172.20.0.0, but the internal routers now break the
network addressing into the 5 smaller subnetworks.

Subnetting Example
Subnetting Example 

Subnetmask Function

-The function of a subnet mask is to determine whether an IP address
exists on the local network or whether it must be routed outside the
local network.

-It is applied to a message’s destination address to extract the network
address.

-If the extracted network address matches the local network ID, the
destination is located on the local network.

-However, if they don’t match, the message must be routed outside the
local network.


Subnetting Concept

-The key concept in subnetting is borrowing bits from
the host portion of the network to create a subnetwork.

-Rules govern this borrowing, ensuring that some bits
are left for a Host ID.

-The rules require that two bits remain available to use
for the Host ID & that all of the subnet bits cannot be
all 1s or 0s at the same time ( -2 ).

Fixed Subnet (Classful)

Fixed Subnet (Classful)
Fixed Subnet (Classful)

CIDR: Classless InterDomain Routing

- Subnet portion of address of arbitrary length
- Address format: a.b.c.d/x, where x is # bits in subnet portion
of address subnet part host part:

Example:
11001000 00010111 00010000 00000000
200.23.16.0/23

Knowing How to Calculate Subnets

To determine the number of subnets & hosts per
subnet available for any of the available subnet
masks, 2 simple formulas to calculate these numbers:
Knowing How to Calculate Subnets
Knowing How to Calculate Subnets

Class A Subnetting Options
Class A Subnetting Options
Class A Subnetting Options

Class B Subnetting Options

Class B Subnetting Options
Class B Subnetting Options


Class C Subnetting Options

SubnetMask                      SubnetMask                   # Hosts
255.255.255.0/24                                                    256 (254)
255.255.255.128 /25                                              128 (126)
255.255.255.192 /26                                                  64 (62)
255.255.255.224 /27                                                  32 (30)
255.255.255.240 /28                                                  16 (14)
255.255.255.248 /29                                                      8 (6)
255.255.255.252 /30                                                      4 (2)

Subnetting

Example:
In network 192.168.10.0
255.255.255.0
We have here ONE Class C network, with 253 usable IPs
for Client-PCs.

The usable IP range of this network is
192.168.10.1 - 192.168.10.254

The very last IP of each Subnet is called:
Broadcast-Address

In this example 192.168.10.255 and it is NOT! usable for host
PCs
If we want to divide this network in two parts,we must use
subnetting

With subnetmask 255.255.255.128 we divide the network in two
Parts :

    192.168.10.1 – 192.168.10.127
    192.168.10.128 – 192.168.10.255

So in this example BEFORE, we had one big network but
With the change of the subnetmask we divided it in two smaller
networks

First with Subnetmask 255.255.255.0 we had this network:
192.168.10.0
The range:
192.168.10.1, 192.168.10.2
...
192.168.10.253, 192.168.10.254, 192.168.10.255

Now with Subnetmask 255.255.255.128 we have these two networks:
1st Subnet:
{ 192.168.10.0 (!NOT usable for Host PCs)
192.168.10.1, 192.168.10.2,192.168.10.3,
...
192.168.10.125, 192.168.10.126, 192.168.10.127 }

2nd Subnet:
192.168.10.128
192.168.10.129, 192.168.10.130,192.168.10.131,
...
192.168.10.253, 192.168.10.254,192.168.10.255 (is NOT! usable for Host PCs)

Used Bits for Network

Examples:

/16 = 255.255.0.0 =
11111111.11111111.00000000.00000000

/20 = 255.255.240.0 =
11111111.11111111.11110000.00000000


Calculation of a subnetmask for a specified number of hosts

Example:

You get the following order:
"Create a subnet with minimum 10 host Ips".
1st : 
Calculate a power of two, that is minimum 10:
2^3 = 8 Is it enough?
2^4 = 16
It is higher than 10 AND WORKS!

2nd :

Now put the LAST 4 Bits of your subnetmask to 0:

11111111.11111111.11111111.11110000
That is in decimal 255.255.255.240
With this subnetmask, you have at least 10 Host IPs in the
subnet, without wasting to much IP Addresses !

Assignment

A: You get this order as system administrator:

A. The company has a network with 150 computers. Create a Subnet from
“ 172.31.0.0 ” so that it is smallest possible subnet to provide
enough IPs.
B. Convert the second IP of your solution to Hexadecimal.

Calculating the the Broadcast IP of a Subnet

Example:

There is a subnet 172.16.64.0/20
Question:
What is the BROADCAST of that subnet?

1st , /20 means 255.255.240.0

2nd , Analyze the subnet octet to find out the "network-jump"
240 means in binary 11110000
The last of the 1's is equal to decimal 16
That is our "network-jump"
(128/64/32/16/8/4/2/1)

The last network started at 172.16.64.0
16 is the "network-jump". That means our next
network starts from 172.16.80.0 – 172.16.95.255
and the next one?

+16    172.16.96.0 - 172.16.111.255
+16    172.16.112.0 – 172.16.127.255
...
Because the next subnet in the example starts from
172.16.80.0, the broadcast must be 172.16.79.255
Because that IP before the next subnet starts is the
Broadcast Address !

No comments: