Internet Addresses

An IP address is an address used in order to uniquely identify a device on an IP network. These addresses are 32-bit numbers. These 32-bit addresses are normally written as four decimal numbers (four octets, 1 octet =1 Byte= 8bits). This is called dotted-decimal notation.
For example, 172.16.57.122. The value in each octet ranges from 0 to 255 decimal, or 00000000 - 11111111 binary.

Here is how binary octets convert to decimal:
The right most bit, or least significant bit, of an octet holds a value of 20 (=0). The bit just to the left of that holds a value of 21(=2). This continues until the left-most bit, or most significant bit, which holds a value of 27 (=128)
.

 

  27       26     25      24     23     22     21     20

  1       1      1      1     1     1     1      1    (bits)

128    64    32    16    8     4     2      1    (decimal)

If all bits in one octets are 1, decimal equivalent is 255, because (128+64+32+16+8+4+2+1=255).
 

Here is a sample  ctet conversion when not all of the bits are set to 1.

  27       26     25      24     23     22     21     20

  0       1      1      0     1     1     1      1    (bits)

128    64   32    16     8     4     2      1    (decimal)

(0+64+32+0+8+4+2+1=111)

 

And this is sample shows an IP address represented in both binary and decimal.

     172     .        16     .      0      .      1            (decimal)

10101100. 00010000.0000000.00000001    (binary)

 

These octets are broken down to provide an addressing scheme that can accommodate large and small networks. There are five different classes of networks, A to E. Addressing classes A to C, since classes D and E are reserved.

Terms "Class A, Class B" and so on are used  to help facilitate the understanding of IP addressing and subnetting. These terms are rarely used in the industry anymore because of the introduction of classless interdomain routing (CIDR).


Addressing classes:

Default Network - The IP address of 0.0.0.0 is used for the default network.

Loopback - The IP address 127.0.0.1 is used as the loopback address. This means that it is used by the host computer to send a message back to itself. It is commonly used for troubleshooting and network testing.

 

Network Mask

A network mask helps you know which portion of the address identifies the network and which portion of the address identifies the node. By organizing hosts into logical groups, subnetting can improve network security and performance. The mask is a 32-bit value that uses 1-bits for the network and subnet portions and 0-bits for the host portion.

Class A: 255.0.0.0
Class B: 255.255.0.0
Class C: 255.255.255.0

Class A network that has not been subnetted would have an address/mask pair similar to: 7.25.22.1 255.0.0.0. To see how the mask helps you identify the network and node parts of the address, convert the address and mask to binary numbers:

7.25.22.1 = 00000111.00011001.00010110.00000001
255.0.0.0 = 11111111.00000000.00000000.00000000
            ========|========.========.========
            Note ID |        Host ID
Note ID = 7 
Host ID = 25.22.1

Any address bits which have corresponding mask bits set to 1 represent the network ID. Any address bits that have corresponding mask bits set to 0 represent the node ID.

 

Public Addresses

Public addresses are assigned by InterNIC and consist of class-based network IDs or blocks of CIDR-based addresses (called CIDR blocks) that are guaranteed to be globally unique to the Internet.

When the public addresses are assigned, routes are programmed into the routers of the Internet so that traffic to the assigned public addresses can reach their locations. Traffic to destination public addresses are reachable on the Internet.

 

Private Addresses

When analyzing the addressing needs of organizations, the designers of the Internet noted that for many organizations, most of the hosts on the organization's intranet did not require direct connectivity to Internet hosts. Those hosts that did require a specific set of Internet services, such as the World Wide Web access and e-mail, typically access the Internet services through Application layer gateways such as proxy servers and e-mail servers. The result is that most organizations only required a small amount of public addresses for those nodes (such as proxies, routers, firewalls, and translators) that were directly connected to the Internet.

For the hosts within the organization that do not require direct access to the Internet, IP addresses that do not duplicate already-assigned public addresses are required. To solve this addressing problem, the Internet designers reserved a portion of the IP address space and named this space the private address space . An IP address in the private address space is never assigned as a public address.

  • 10.0.0.0/8
    The 10.0.0.0/8 private network is a class A network ID that allows the following range of valid IP addresses: 10.0.0.1 to 10.255.255.254. The 10.0.0.0/8 private network has 24 host bits that can be used for any subnetting.

  • 172.16.0.0/12
    The 172.16.0.0/12 private network can be interpreted either as a block of 16 class B network IDs or as a 20-bit assignable address space (20 host bits) that can be used for any subnetting. Following range of valid IP addresses: 172.16.0.1 to 172.31.255.254.

  • 192.168.0.0/16
    The 192.168.0.0/16 private network can be interpreted either as a block of 256 class C network IDs or as a 16-bit assignable address space (16 host bits) that can be used for any subnetting. Following range of valid IP addresses: 192.168.0.1 to 192.168.255.254.

 

 

 

 

 

Sources:

https://msdn.microsoft.com/en-us/library/aa918342.aspx

https://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800a67f5.shtml

https://www.techrepublic.com/article/cisco-ip-subnetting-101-five-things-you-should-know/5778292

https://learningnetwork.cisco.com/docs/DOC-1802

https://en.wikipedia.org/wiki/Binary_numeral_system

https://prahladvaishnav.wordpress.com/networking-tricks/95-2/
https://technet.microsoft.com/en-us/library/cc958825.aspx