IP Address

What is it?

IP is the address of a networked computer. In the current version, IPv4, the format is a set of four octets separated by a dot. The smallest and biggest IP are 0.0.0.0 (default net) and 255.255.255.255 (default broadcast) respectively.

Three classes of IP are:

Class A -- 1-octet net and 3-octet node/host (large network)
Class B -- 2-octet net and 2-octet node/host (medium-sized network)
Class C -- 3-octet net and 1-octet node/host (small network)
It is not possible to tell from an IP its class without other information. The loopback is 127.0.0.1 or localhost.

The authority

IPs are assigned by the Internet Corporation for Assigned Names and Numbers (ICANN). IPs which are meant for internet use are called public IPs. Although the use of public IP is a must, It makes sense not to assign public IPs to machines which are rarely or not connected to internet.

Know your own IP

To get the public IP of your system:

Press q to quit.
$ lynx http://www.whatismyip.com

An alternative:
Press q to quit.
$ lynx http://www.ipchicken.com

Private IPs

Three ranges of IPs have been allocated to private use, namely:

In addition, Microsoft is allocating 169.254.0.0 to Windows auto-configuration.
Subnet       Bit  Start IP      End IP
192.168.0.0   16   192.168.0.0   192.168.255.255 
172.16.0.0    12   172.16.0.0    172.31.255.255
10.0.0.0       8   10.0.0.0      10.255.255.255

To get the private IP of your system:

You must be root to use this command
# ifconfig

Types of IPs

An IP address may be dynamic as in a DHCP environment or static. Both are use in local area network and internet.

Everyday example

The everyday equivalence of IP is the address label on an envelope. In an organisation, it may be as simple as John Doe, Sales for internal mails in Super Duper Inc. or as complete as John Doe, Super Duper Inc. 12345 Duper Ave, XYZ City, ZIPCODE for a postal mail. The first example is a private IP and the second a public IP. If we were to use the first address, our letter will never reach John Doe because the postman does not know where to deliver it. When our letter with the second address reaches Super Duper Inc, someone there will deliver to Sales Department where John Doe is.





Q&A

Can I use a private IP for internet connection?

No. Private IPs are not valid for internet connections. Accordingly, you can not use a private IP to host an internet-accessible server.

But I have seen private IP used in the internet...

Sure you have. Those are people who are hiding behind a proxy. If I were you, I will stay away from them.

What is a proxy?

A proxy is a go-between. It substitutes your public IP with its own in your out-going packets and then do a reversal when reples are received. It is a router (specifically NAT) so to speak.

Why are private IPs always used in server installation guides?

Servers are supposed to be hosted on a protected host within the local net. The private IP is translated by a router to public IP and vice versa. The setup of [public IP] — router — [private IP] also provides for efficient use of limited resources.

What is bandwidth?

It is a measure of the amount of data being transferred, typically used by hosting services to levy charges on their customers. If you are hosting DVD images on a rented server with 40GB monthly bandwidth, your bandwidth will expire after 8 downloads and your server will not be opened for the rest of the month.

What is gateway?

The point at which network traffic is being transferred to another network.