Difference Public and Private IP

D' Sandy

A unique Internet Protocol (IP) address, known as a public IP address, is assigned to every computer that connects to the Internet. The IP addressing scheme makes it possible for computers to “find each other” online and exchange information. Within a private network, computers use addresses excluded by convention from use on the Internet.

The difference between a private IP address and a public IP address then, is that private IP addresses are reserved for private networks, and public IP addresses are reserved for the Internet.

The Internet Assigned Numbers Authority (IANA), a once-autonomous organization, now works within the purview of the Internet Corporation for Assigned Names and Numbers (ICANN). IANA is responsible for overseeing global allocation of IP numbers, among other related protocols. Within the range of publicly available IP addresses are specific, excluded ranges withheld for private network use. These private IP ranges are as follows:

A class 10.0.0.0 ...10.255.255.255

B class 172.16.0.0 ... 172.31.255.255

C class 192.168.0.0 … 192.168.255.255

Computers within a private network are each assigned a unique address in order to exchange files and share resources with one another. The network router, which routes information, will pass data back and forth among the connected computers, using the respective addresses. But how do computers on a private network connect to the Internet?

Assuming the network has Internet connectivity, the computer connected to the digital subscriber line (DSL) modem is assigned a public IP address by the Internet Service Provider (ISP). This single public IP address is used to identify the network on the Internet. Now the network’s router acts as a gatekeeper between the private network and the public Internet. Using a built-in Network Address Translator (NAT), the router passes requests to the Internet using the assigned public IP address. Returning data is routed back to the public IP address, with the router determining which private IP address requested the information. In essence, the private IP address is daisy-chained to the public IP address through processes in the router.

A public IP address can be static or dynamic. A static public IP address does not change and is used primarily for hosting webpages or services on the Internet. Some gamers also prefer static IPs for interactive gaming. A dynamic public IP address is chosen from a pool of available addresses and changes each time one connects to the Internet. Most people have a dynamic public IP address, as it is the standard type of public IP address assigned when purchasing Internet connectivity.

Read More......

What is Subneting???

D' Sandy

Subnetting allows you to create multiple logical networks that exist within a single Class A, B, or C network. If you do not subnet, you are only able to use one network from your Class A, B, or C network, which is unrealistic.

Each data link on a network must have a unique network ID, with every node on that link being a member of the same network. If you break a major network (Class A, B, or C) into smaller subnetworks, it allows you to create a network of interconnecting subnetworks. Each data link on this network would then have a unique network/subnetwork ID. Any device, or gateway, connecting n networks/subnetworks has n distinct IP addresses, one for each network / subnetwork that it interconnects.

In order to subnet a network, extend the natural mask using some of the bits from the host ID portion of the address to create a subnetwork ID. For example, given a Class C network of 204.17.5.0 which has a natural mask of 255.255.255.0, you can create subnets in this manner:

204.17.5.0 -      11001100.00010001.00000101.00000000
255.255.255.224 - 11111111.11111111.11111111.11100000
--------------------------|sub|----

By extending the mask to be 255.255.255.224, you have taken three bits (indicated by "sub") from the original host portion of the address and used them to make subnets. With these three bits, it is possible to create eight subnets. With the remaining five host ID bits, each subnet can have up to 32 host addresses, 30 of which can actually be assigned to a device since host ids of all zeros or all ones are not allowed (it is very important to remember this). So, with this in mind, these subnets have been created.

204.17.5.0 255.255.255.224     host address range 1 to 30
204.17.5.32 255.255.255.224    host range 33 to 62
204.17.5.64 255.255.255.224    host range 65 to 94
204.17.5.96 255.255.255.224    host range 97 to 126
204.17.5.128 255.255.255.224   host range 129 to 158
204.17.5.160 255.255.255.224   host range 161 to 190
204.17.5.192 255.255.255.224   host range 193 to 222
204.17.5.224 255.255.255.224   host range 225 to 254


/*** There are two ways to denote these masks. First, since you are using three bits more than the "natural" Class C mask, you can denote these addresses as having a 3-bit subnet mask. Or, secondly, the mask of 255.255.255.224 can also be denoted as /27 as there are 27 bits that are set in the mask. This second method is used with CIDR. Using this method, one of these networks can be described with the notation prefix/length. For example, 204.17.5.32/27 denotes the network 204.17.5.32 255.255.255.224. When appropriate the prefix/length notation is used to denote the mask throughout the rest of this document.



The more host bits you use for a subnet mask, the more subnets you have available. However, the more subnets available, the less host addresses available per subnet. For example, a Class C network of 204.17.5.0 and a mask of 255.255.255.224 (/27) allows you to have eight subnets, each with 32 host addresses (30 of which could be assigned to devices). If you use a mask of 255.255.255.240 (/28), the break down is:

204.17.5.0 -      11001100.00010001.00000101.00000000
255.255.255.240 - 11111111.11111111.11111111.11110000
--------------------------|sub |---


Since you now have four bits to make subnets with, you only have four bits left for host addresses. So in this case you can have up to 16 subnets, each of which can have up to 16 host addresses (14 of which can be assigned to devices).

Take a look at how a Class B network might be subnetted. If you have network 172.16.0.0 ,then you know that its natural mask is 255.255.0.0 or 172.16.0.0/16. Extending the mask to anything beyond 255.255.0.0 means you are subnetting. You can quickly see that you have the ability to create a lot more subnets than with the Class C network. If you use a mask of 255.255.248.0 (/21), how many subnets and hosts per subnet does this allow for?

172.16.0.0  -   10101100.00010000.00000000.00000000
255.255.248.0 - 11111111.11111111.11111000.00000000
-----------------| sub |-----------


You are using five bits from the original host bits for subnets. This allows you to have 32 subnets (25). After using the five bits for subnetting, you are left with 11 bits for host addresses. This allows each subnet so have 2048 host addresses (211), 2046 of which could be assigned to devices.

Read More......

Net Mask

D' Sandy

A network mask helps you know which portion of the address identifies the network and which portion of the address identifies the node. Class A, B, and C networks have default masks, also known as natural masks, as shown here:

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

An IP address on a Class A network that has not been subnetted would have an address/mask pair similar to: 8.20.15.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.


8.20.15.1 = 00001000.00010100.00001111.00000001
255.0.0.0 = 11111111.00000000.00000000.00000000

Once you have the address and the mask represented in binary, then identifying the network and host ID is easier. 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.

8.20.15.1 = 00001000.00010100.00001111.00000001
255.0.0.0 = 11111111.00000000.00000000.00000000
-----------------------------------
net id | host id

netid = 00001000 = 8
hostid = 00010100.00001111.00000001 = 20.15.1

Read More......

IP Address Introduction

D' Sandy

An Internet Protocol (IP) address is a numerical identification (logical address) that is assigned to devices participating in a computer network utilizing the Internet Protocol for communication between its nodes. The address is made up of 32 binary bits which can be divisible into a network portion and host portion with the help of a subnet mask.

The 32 binary bits are broken into four octets (1 octet = 8 bits). Each octet is converted to decimal and separated by a period (dot). For this reason, an IP address is said to be expressed in dotted decimal format (for example, 172.16.81.100). 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. The bit just to the left of that holds a value of 21. This continues until the left-most bit, or most significant bit, which holds a value of 27. So if all binary bits are a one, the decimal equivalent would be 255 as shown here:


1    1  1  1 1 1 1 1
128 64 32 16 8 4 2 1 (128+64+32+16+8+4+2+1=255)

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

0  1 0 0 0 0 0 1
0 64 0 0 0 0 0 1 (0+64+0+0+0+0+0+1=65)

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

10.       1.      23.      19      (decimal)
00001010.00000001.00010111.00010011 (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. This document focuses on addressing classes A to C, since classes D and E are reserved and discussion of them is beyond the scope of this document.

Given an IP address, its class can be determined from the three high-order bits. Image 2 shows the significance in the three high order bits and the range of addresses that fall into each class. For informational purposes, Class D and Class E addresses are also shown.

image 2 :


In a Class A address, the first octet is the network portion, so the Class A example in image 2 has a major network address of 1.0.0.0 - 127.255.255.255. Octets 2, 3, and 4 (the next 24 bits) are for the network manager to divide into subnets and hosts as he/she sees fit. Class A addresses are used for networks that have more than 65,536 hosts (actually, up to 16777214 hosts!).

In a Class B address, the first two octets are the network portion, so the Class B example in image 2 has a major network address of 128.0.0.0 - 191.255.255.255. Octets 3 and 4 (16 bit are for local subnets and hosts. Class B addresses are used for networks that have between 256 and 65534 hosts.

In a Class C address, the first three octets are the network portion. The Class C example in image 2 has a major network address of 192.0.0.0 - 233.255.255.255. Octet 4 (8 bits) is for local subnets and hosts - perfect for networks with less than 254 hosts.

Read More......