IPv4 Addressing
IPv4 Addressing
network portion (devices in the same LAN have to have it the same)
Host portion (devices in the same LAN have to have it different
To identify the network and host portions of an IPv4 address, the subnet mask is compared to the IPv4
address bit for bit.
Instead of dotted decimal format we can also use prefix, slash format, counted as how many 1s do we
have in subnet for example /24
The AND operation is used in determining the network addresses like this:
1 and 0 = 0
0 and 0 = 0
0 and 1 = 0
1 and 1 = 1
ANDing between IPv4 address and subnet mask bit by bit determine the network address.
It tells the host which network it belongs.
To determine the broadcast address, we take network address and change the host portion to all
binary ones
First address in the network is network address, the last broadcast address
Multicast:
IPv4 has reserved the 224.0.0.0 to 239.255.255.255 addresses as a multicast range
each multicast group has a single IPv4 multicast address
Routing protocols as OSPF use reserved OSPF address – 224.0.0.5, only devices with OSPF
enabled will receive these packets addressed like that
Public IPv4 addresses are globally routed between ISP routers.
With the introduction of WWW, and depletion of IPv4 addresses, private IPv4 addresses were made and
they are not unique
ISP translates private IPv4 addresses to public IPv4 addresses using NAT.
Organizations such as web servers do not have private IPv4 addresses, this is called demilitarized zone.
Loopback addresses, are used to control for example TCP/IP message, by sending it to itself. 127.0.0.1.
We can use the command ping to determine it.
Link local addresses are used by DCHP clients to address the host and there are no DHCP servers available.
Automatic Private IP Addressing (APIPA) has addresses 169.254.0.0/16 to 169.254.255.254
Classful addressing:
Class A (0.0.0.0/8 to 127.0.0.0/8)
Class B (128.0.0.0 /16 - 191.255.0.0 /16)
Class C (192.0.0.0 /24 - 223.255.255.0 /24)
Class D (224.0.0.0 - 239.0.0.0) - used for multicast
Class E (240.0.0.0 - 255.0.0.0) - experimental
As WWW introduction, class system became legacy and only used in private networks.
RIR is responsible for forwarding packets over the internet to ISPs
Subnets:
Subnets are used to create smaller broadcast domains.
Longer prefix lengths decreases the number of hosts of each network in subnet.
Bigger Subnets are done by borrowing the host portion to network portion.
Next subnets are numbered by next number in network portion.
In public networks, to minimalize the number of unused hosts we use Variable Subnet Length
Masking (VSLM)
VSLM can take 1 subnet from for example 4 subnets, and split this one into 2 new subnets with 1
bit more in the subnet (for example from /26 to /27), as long as the space for IP addresses affect
only this 1 subnet space. In this situation we do not have to use 8 subnets to create 5 subnet
network.
It is important to plan IPv4 network addressing before actual addressing. This will prevent us from
mistakes in the process.