Be free…. be yourself with Linux.

IP address

Every house or office is recognized by postal address. When you send a postcard to someone, just write down the address and it will delivered by postman. It is the same with a machine. It has a unique address called IP address (Internet Protocol) address. When your machine send data to other machine, it will set the ip address as the destination.

My IP address is 192.168.0

If you see the number on above, there are four parts of number which are separated by 3 dots. Actually, each part of those number are Bytes that is is written into decimal number.

Is that what all we need to make our computer talk to the other computer?

If we do that, then it will bet not enough ip addresses for all computers in the world.

Then how is the trick?

All this connected computers are grouped. This group we know as LAN (Local Area Network). Then all these LANs are connected into a big network called Internet. We may say a minimum Internet is a connected two LANs and we are only part of small sub set of the entire network (internet).

Communicate to other computer in a different LAN.

When you send data to the other computer, it will check, “Am I in the same local network?” (or group as I said before)? The computer can not do this unless it has another parameter named ‘netmask‘.

Your computer will say:

“If I am in the same network with the destination computer that I want to send my data to, then I can continue the process.”

Mean, “netmask” will be used to set the range of IP address that can be reached.

How combination of IP address and Netmask set the range of IP address?

Netmask consist of 4 bytes and written as decimal number, same like ip address.

Netmask: 255.255.255.0

Number 255 will say that your first byte, second byte and third byte of your ip address are the same with other computer.

So, the range will be:

Your IP: 192.168.0.1

Netmask: 255.255.255.0

Your range: 192.168.0.0 –192.168.0.255 (see, that the 3 bytes from left to right are the same).

You IP: 192.168.45.125

Netmask: 255.255.0.0

Your range: 192.168.0.0 – 192.168.255.255 (see, that the 2 bytes from left to right are the same).

In a stand alone network, the netmask must be the same and all IP address must be in the same range.

PC-A IP: 192.168.0.10 Netmask: 255.255.255.0

PC-B IP: 192.168.0.2 Netmask: 255.255.255.0

PC-C IP: 192.168.0.200 Netmask: 255.255.255.0

If PC-A is not in the same netmask and IP range with PC-B and PC-C then PC-A will see the network in a different way.