Address Classes: N Blue
Address Classes: N Blue
Address Classes: N Blue
Address Classes
There are 5 different address classes. You can determine which
class any IP address is in by examining the first 4 bits of the IP
address.
• Class A addresses begin with 0xxx, or 1 to 126 decimal.
• Class B addresses begin with 10xx, or 128 to 191 decimal.
• Class C addresses begin with 110x, or 192 to 223 decimal.
• Class D addresses begin with 1110, or 224 to 239 decimal.
• Class E addresses begin with 1111, or 240 to 254 decimal.
Addresses beginning with 01111111, or 127 decimal, are reserved
for loopback and for internal testing on a local machine; [You can
test this: you should always be able to ping 127.0.0.1, which points
to yourself] Class D addresses are reserved for multicasting; Class
E addresses are reserved for future use. They should not be used
for host addresses.
Now we can see how the Class determines, by default, which part
of the IP address belongs to the network (N, in blue) and which
part belongs to the node (n, in red).
• Class A -- NNNNNNNN.nnnnnnnn.nnnnnnnn.nnnnnnnn
• Class B -- NNNNNNNN.NNNNNNNN.nnnnnnnn.nnnnnnnn
• Class C --
NNNNNNNN.NNNNNNNN.NNNNNNNN.nnnnnnnn
In the example, 140.179.220.200 is a Class B address so by default
the Network part of the address (also known as the Network
Address) is defined by the first two octets (140.179.x.x) and the
node part is defined by the last 2 octets (x.x.220.200).
Private Subnets
There are three IP network addresses reserved for private
networks. The addresses are 10.0.0.0, Subnet Mask 255.0.0.0,
172.16.0.0, Subnet Mask 255.240.0.0, and 192.168.0.0, Subnet
Mask 255.255.0.0. These addresses are also notated 10.0.0.0/8,
172.16.0.0/12, and 192.168.0.0/16; this notation will be explained
later in this tutorial. They can be used by anyone setting up internal
IP networks, such as a lab or home LAN behind a NAT or proxy
server or a router. It is always safe to use these because routers on
the Internet by default will never forward packets coming from
these addresses. These addresses are defined in RFC 1918.
EXAMPLE
#
Subnet Mask CIDR # Subnets # Hosts Nets * Hosts
bits
2 255.192.0.0 /10 2 4194302 8388604
3 255.224.0.0 /11 6 2097150 12582900
Logical Operations
This page will provide a brief review and explanation of the
common logical bitwise operations AND, OR, XOR (Exclusive
OR) and NOT. Logical operations are performed between two data
bits (except for NOT). Bits can be either "1" or "0", and these
operations are essential to performing digital math operations.
In the "truth tables" below, the input bits are in bold, and the
results are plain.
AND
The logical AND operation compares 2 bits and if they are both
"1", then the result is "1", otherwise, the result is "0".
0 1
0 0 0
1 0 1
OR
The logical OR operation compares 2 bits and if either or both bits
are "1", then the result is "1", otherwise, the result is "0".
0 1
0 0 1
1 1 1
XOR
The logical XOR (Exclusive OR) operation compares 2 bits and if
exactly one of them is "1" (i.e., if they are different values), then
the result is "1"; otherwise (if the bits are the same), the result is
"0".
0 1
0 0 1
1 1 0
NOT
The logical NOT operation simply changes the value of a single
bit. If it is a "1", the result is "0"; if it is a "0", the result is "1".
Note that this operation is different in that instead of comparing
two bits, it is acting on a single bit.
0 1
1 0