Example: 192.168.1.0/24
BEFORE SUBNET:
Network Address: 192.168.1.0
Broadcast Address: 192.168.1.255
Host Address Range: 192.168.1.1 --> 192.168.1.254
Subnet Mask: 255.255.255.0
Usable Host Addresses: 2^h - 2 = 2^8 - 2 = 254
-------------------------------
* Subnetting:
- Number of subnets = 2^s
(s: Represent number of bits borrowed from host portion)
- Number of hosts per subnet = 2^h - 2
(h: Represent number of bits left in host portion)
==============================
AFTER SUBNET: 192.168.1.0/24 ----> /26
Procedure:
Step 1: Check bit location in which octet, in this example: /26 is in octet 4
Step 2: Take the max bit in octet 4 to minus it
32 - 26 = 6 bits
Step 3: Take 2^6bits = 64
Step 4: We get 4 subnets
Subnet 0 : 192.168.1.0/26
Subnet 1 : 192.168.1.64/26
Subnet 2 : 192.168.1.128/26
Subnet 3 : 192.168.1.192/26
==========================
IP Characteristic:
- Decimal dotted notation
- Have 4 octets (1 octet = 8 bits)
- Bit range is 32 bits
- Separate into 2 portions
Network portion | Host portion
ex: 8bits | ---> 24bits
---> 24bits | 7bits
=============================
*** Have 5 Classes as below: (Actually, we use 3 classes in the network everyday)
1) Class A: check octet 1, if 1 ---> 126,
Default Subnet Mask: 255.0.0.0 = or /8
Ex: IP address 11.192.180.255
2) Class B: check octet 1, if 128 ---> 191,
Default Subnet Mask: 255.255.0.0 = or /16
Ex: IP address 180.192.11.255
3) Class C: check octet 1, if 192 ---> 223,
Default Subnet Mask: 255.255.255.0 = or /24
Ex: IP address 192.11.180.0
4) Class D: check octet 1, if 224 ---> 239,
This is for network system used Multicast process.
5) Class E: check octet 1, if 240 ---> 255,
This is for experience used.
=============================
*** Divide into 2 type used:
- Private IP of Class A: 10.0.0.0 ---> 10.255.255.255 (10.0.0.0/8)
- Private IP of Class B: 172.16.0.0 ---> 172.31.255.255 (172.16.0.0/12)
- Private IP of Class C: 192.168.0.0 ---> 192.168.255.255 (192.168.0.0/16)
==============================================
Example: 192.168.1.130/25
Network Address:?
Broadcast Address:?
Host Address Range:?
Subnet Mask:?
Usable Host Addresses:?
-------------------------------
Procedure:
Step 1: Check bit location in which octet, in this example: /25 is in octet 4
Step 2: Take the number of IP in octet 4 convert to binary
130 = 10000010
Step 3: Split bit between network portion and host portion.
Represent bit 0 in host portion to get the Network Address.
Represent bit 1 in host portion to get the Broadcast Address
1 | 0000010
| 0000000 : ---> Network Address
| 111111 : ---> Broadcast Address
Step 4: Convert to decimal to get the IP.
Network Address: 192.168.1.128
Broadcast Address: 192.168.1.255
Step 5: Host address range is started from higher 1 value of Network address till lower 1 value of Broadcast address.
Host Address Range: 192.168.1.129 ---> 192.168.1.254
Step 6: In this example is /25 mean bit 1 = 25 in network portion
/25 = 11111111.11111111.11111111.10000000
255 . 255 . 255 . 128
Subnet Mask: 255.255.255.128
Step 7: Number of usable host addresses 2^h -2 (h : represent number of bits in host portion)
In this example, h = 7 bits
2^7 - 2 = 126
Usable Host Addresses: 126