IPv4

From wiki
Jump to navigation Jump to search

IPv4 is the original addressing scheme for IP networks.

IPv4 addresses are 32 bits long so that is some more than 4 billion addresses. That is a lot but not enough when everything that needs communication get at least 1 address. That is why IPv6 has been invented that has 128 bit addresses that is really a lot (3.402823669×10³⁸)

An address looks like aaa.bbb.ccc.xxx

The netmask defines how many addresses are within the subnet and where packets are routed to. Addresses within the subnet are routed to the interface, address outside the subnet to the default gateway (router). Net netmask is traditionally expressed in the same format as an address (e.g. 255.255.255.0), later CIDR was invented that just specified the number of bits that specify the subnetwork.

Class Addresses Netmask CIDR Remark
A 1-126.xxx.xxx.xxx 255.0.0.0 /8
A private 10.xxx.xxx.xxx 255.0.0.0 /8 Private range, not routed
B 128-191.xxx.xxx.xxx 255.255.0.0 /16
B private 172.16-31.xxx.xxx 255.255.0.0 /16 Private, not routed
C 192-223.xxx.xxx.xxx 255.255.255.0 /24
C private 192.168-xxx.xxx 255.255.255.0 /24 Private, not routed
D 224-239.xxx.xxx.xxx Multicasting addresses, not for host assignment
E 240-255.xxx.xxx.xxx Reserved addresses, not for public use