1. IP-Address
1.1. What's an IP-Address?
When we are connecting to the Internet, we have assigned a unique number worldwide, called The
IP-address. This number contains four sets of numbers and each set can contain at most three
digits. The IP-Address is expressed as four three-digit numbers, separated by dots.
Example: 234.567.8.9
Each number in the set is represented by a series of only the digits 0 or 1 in the computer and must
be a byte (= 8 bits). The larget number can we have is 11111111 (eight 1s); that is 255 , written
in the decimal representation.
The unit of information is the bit, or binary digit.
255 = 1.27 + 1. 26 + 1.25 + 1.24 + 1.23 + 1.22 + 1.21 + 1.20
= 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1
We write,
In binary system: 11111111, and
In decimal system: 255
The number 255 takes eight binary digits.
The IP-Adress is 4 8-bit in length (= 32 bits).
Since it is an 8-bit long, the last number that fit in eight bits is 255 and the number 100000000,
that is 256 (0r more)is never allowed.
(11111111 + 1 = 100000000, that is 256 +1 = 256)
1.2. Network IP-Adresses' classes
The general the syntax for an IP-Adress is : abc.def.ghi.jkl
- If we are assigned just the first three sets, abc.def.ghi, we call this protocol
class C and we have only 255 nodes, that is we can connect 255 computers
in this IP-address.
- Instead, if we gave assigned just the first two sets, abc.def, we call this protocol
class B and we have 256 x 256 ? 64,0000 nodes, that is we can connect 64,000 computers
in this IP-address.
- If we gave assigned just the first set, abc, we call this protocol
class A and we have 256 x 256 x 256 ? --0000 millions nodes, that is we can connect
-- millions computers in this IP-address.
1.3. Reserved Addresses
Example for the class C network: 234.567.8.x
234.567.8.0
234.567.8.1
234.567.8.255
are reserved
Three of these 256 addresses are reserved for networking purposes.
- The zero address is the network address, used by the router outside the
LAN to send a packet over this LAN.
- The address that ends with .255 is the broadcast address, used also by the router
to send messages all over the machines in the network.
- The address that ends with .1 is usually the gateway address. The machines on a LAN send their
outgoing packets to be routed to another LAN, or to the Internet.
2. Netmasks
Example for the class C network: 224.168.56.x
If we are given this IP-address, we have 255 - 3 = 252 possibilities
for the machines of the LAN (3 reserved)
to assign IP-Addresses for our LAN. They are:
In binary:
11100000.10101000.00111000.00000000 through: 11100000.10101000.00111000.11111111
In decimal: 224.168.56.0 through: 224.168.56.255
Now, if we want to block some of them, or to make the 255 possibilities more
shorter, we use netmasks. It is also an 4-bytes numer (32 bits)
The rule is to put 1s to block and 0s to let free.
Let's give to the netmask the folowing number and write:
In decimal: 255.255.255.15
In binary: 11111111.11111111.11111111.00001111
In the last set of 8 digits, which is 00001111, all the numbers from 1 through 15
are blocked except from 16 to 255. Thus, the allowed numbers for this class C are
From 16 through 255 (239 nodes).
If we had for the netmask: 255.255.255.128, that is
11111111.11111111.11111111.10000000, we will be allowed 255 - 129 = 126
numbers from 129 to 255 addresses (126 addresses).
If we are assigned the IP-Address address: 224.168.56.32, with
the above netmask 255.255.255.128, we will be able to assign
126 numbers from 32 to 158 (126 + 32)
3. Notation
The set IP address and the related netmask is often written as:
IP-Address/n
n is the number of 1's bits in the netmask address and /n is the subnet mask.
Examples:
224.168.56.0/24 means that we have the subnet mask /24 that is : 255.255.255.0
or 11111111 11111111 11111111 00000000 ( 24 1's)
In this cas, we hace a Class C network.
224.168.56.0/16 means that the netmask is : /16 = 255.255.0.0
or : 11111111 11111111 00000000 00000000
In this cas, we hace a Class B network.
|