raw network

Online IP Subnet Calculator

Robert Eisele

This free online subnet calculator can be used to calculate network configurations, using an IP or network address, a netmask, a Cisco wildcard mask or CIDR notation. The calculator can also be used to do reverse subnetting where the number of hosts is known, but the netmask is unknown. By giving a second netmask, it's possible to design subnets and supernets.

Address

Example Inputs

Please note: IP addresses can be cut off, if the remaining octets are just zero. So "8" is equal to "8.0.0.0" or "16.4" is equal to "16.4.0.0".

What is CIDR?

CIDR or Classless Inter Domain Routing was developed to reduce the increasing size of routing tables of large routers, which was quite hard with classful routing. The memory usage of classful routing is enormous, which results in unreasonable expensive hadware. But also the performance was compromised, since large tables need to be looked up without a more dynamic IP interval mechanism, like CIDR imposes. Another problem with a classful setup is, that the bandwidth usage is quite high when routers exchange their routing information.

Simply spoken, CIDR using address aggregation can be used to address multiple networks with one single routing entry. Consider this example, where a router needs to distribute traffic for eight separate networks through the gateway 192.168.1.1:

ip route 192.168.2.0/27 192.168.1.1
ip route 192.168.2.32/27 192.168.1.1
ip route 192.168.2.64/27 192.168.1.1
ip route 192.168.2.96/27 192.168.1.1
ip route 192.168.2.128/27 192.168.1.1
ip route 192.168.2.160/27 192.168.1.1
ip route 192.168.2.192/27 192.168.1.1
ip route 192.168.2.224/27 192.168.1.1

Without CIDR, the routing table would become quite large, as every network needs an own entry. With CIDR, the networks can be condensed into one single rule (using 192.168.2.64/27/24 syntax for the calculator):

ip route 192.168.2.0/24 192.168.1.1

Generally, within a subnet, two host addresses - all-zeros and one all-ones are reserved as network address and broadcast, respectively. For a /31 subnet with only two possible address, the number of usable addresses would be zero.

Definitions

Wildcard: The wildcard is the inverse of the subnet mask. It is used by certain firewalls and routers like Cisco for access control list

Broadcast: The broadcast of a network is a reserved address to send a message to all hosts in the subnet. IP broadcast addresses can be used only as the destination IP address. IP routers do not forward network broadcast packets.