IPv4 Addressing
Dariusz Dwornikowski,
Andrzej Stroiński
Problems
IPv4 Address
Example:
001110010001010 01110111001000111
Network part
Computer part
Decimal Notation
00111001 00010100 11101110 01000111
57 . 20 . 238 . 71
byte range - 0 (00000000) - 255 (11111111)
Special addresses - network address
not only computers but also network has its own address
Network address - the computer part of an address is filled with zeroes (0)
Example:
Assuming 16 bits comp. part:
150.254.0.0
1001011011111110000000000000000
Assuming 8 bit comp. part:
192.168.1.0
11000000101010000000000100000000
Special addresses - broadcast address
The computer part of an address is filled with ones (1)
Any packet sent to this address will be received by all computers in a network.
Example:
Assuming 16 bits comp. part:
150.254.255.255
1001011011111111111111111111111
Assuming 8 bit comp. part:
192.168.1.255
11000000101010000000000111111111
IP address mask
IP address mask
Example:
11111111111111110000000000000000
255.255.0.0
/16
For an IP address the network part will be 16 bits long, so we have 16 bit for computer addressing.
Calculating network address
Example:
computer address: 150.150.10.10 /16
mask: 255.255.0.0
10010110 10010110 00001010 00001010
AND .......
11111111 11111111 00000000 00000000
Net. addr 10010110 10010110 00000000 00000000
150.150.0.0/16
Calculating the addressing range
network address: 150.150.0.0/16
10010110 10010110 00000000 00000000
10010110 10010110 00000000 00000001
10010110 10010110 00000000 00000010
...
10010110 10010110 11111111 11111110
10010110 10010110 11111111 11111111
Net. address: 150.150.0.0/16
Computers : 150.150.0.1 -150.150.255.254
Bcast : 150.150.255.255
Network address
1st computer
Broadcast address
Public addresses
Addressing in the Internet needs to meet two requirements:
First requirement - regional institutions controlled by IANA regulate assigning of IP networks.
Second requirement must be met by the administrator.
Private addresses
Private address - no registration, not routable in the Internet.
10.0.0.0/8 (old class A)
172.16.0.0/12 (old class B)
192.168.0.0/16 (old class C)
Public addresses
Classful Allocation (historical)
This was inefficient and dropped fast.
2. Classful addressing divided address space into classes
A - big networks, most significant bit 0, min. mask /8
B - medium, most significant bits 10, min.mask /16
C - small, most significant bits 110, min. mask /24
D - multicast, 1110
E - reserved (now given away)
Exercises: