### Subnetting Network

Here is another scenario where subnetting is needed. Pretend that a web host with a Class C network needs to divide the network so that parts of the network can be leased to its customers. Let’s assume that a host has a network address of 216.3.128.0 (as shown in the example above). Let’s say that we’re going to divide the network into 2 and dedicate the first half to itself, and the other half to its customers.

```   216 .   3 . 128 . (0000 0000)  (1st half assigned to the web host)
216 .   3 . 128 . (1000 0000)  (2nd half assigned to the customers)
```

Subnetting an IP network is to separate a big network into smaller multiple networks for reorganization and security purposes. All nodes (hosts) in a subnetwork see all packets transmitted by any node in a network. Performance of a network is adversely affected under heavy traffic load due to collisions and retransmissions.

```IP:   1101 1000 . 0000 0011 . 1000 0000 . 0000 1100  (216.003.128.012)
Mask: 1111 1111 . 1111 1111 . 1111 1111 . 0000 0000  (255.255.255.000)
---------------------------------------------
1101 1000 . 0000 0011 . 1000 0000 . 0000 0000  (216.003.128.000)
```

The web host will have the subnet mask of 216.3.128.128 (/25). Now, we’ll further divide the 2nd half into eight block of 16 IP addresses.

```   216 .   3 . 128 . (1000 0000)  Customer 1 -- Gets 16 IPs (14 usable)
216 .   3 . 128 . (1001 0000)  Customer 2 -- Gets 16 IPs (14 usable)
216 .   3 . 128 . (1010 0000)  Customer 3 -- Gets 16 IPs (14 usable)
216 .   3 . 128 . (1011 0000)  Customer 4 -- Gets 16 IPs (14 usable)
216 .   3 . 128 . (1100 0000)  Customer 5 -- Gets 16 IPs (14 usable)
216 .   3 . 128 . (1101 0000)  Customer 6 -- Gets 16 IPs (14 usable)
216 .   3 . 128 . (1110 0000)  Customer 7 -- Gets 16 IPs (14 usable)
216 .   3 . 128 . (1111 0000)  Customer 8 -- Gets 16 IPs (14 usable)
-----------------------------
255 . 255 . 255 . (1111 0000)  (Subnet mask of 255.255.255.240)
```

#### CIDR – Classless Inter Domain Routing

```   216.3.128.12, with subnet mask of 255.255.255.128 is written as