Wednesday, February 22, 2017

IPv4 - Address Classes


Internet Protocol hierarchy contains several classes of IP Addresses to be used efficiently in various situations as per the requirement of hosts per network. Broadly, the IPv4 Addressing system is divided into five classes of IP Addresses. All the five classes are identified by the first octet of IP Address.
Internet Corporation for Assigned Names and Numbers is responsible for assigning IP addresses.
The first octet referred here is the left most of all. The octets numbered as follows depicting dotted decimal notation of IP Address:
IP decimal notationThe number of networks and the number of hosts per class can be derived by this formula:
Number of networksWhen calculating hosts' IP addresses, 2 IP addresses are decreased because they cannot be assigned to hosts, i.e. the first IP of a network is network number and the last IP is reserved for Broadcast IP.

Class A Address

The first bit of the first octet is always set to 0 (zero). Thus the first octet ranges from 1 – 127, i.e.
Class A AddressesClass A addresses only include IP starting from 1.x.x.x to 126.x.x.x only. The IP range 127.x.x.x is reserved for loopback IP addresses.
The default subnet mask for Class A IP address is 255.0.0.0 which implies that Class A addressing can have 126 networks (27-2) and 16777214 hosts (224-2).
Class A IP address format is thus: 0NNNNNNN.HHHHHHHH.HHHHHHHH.HHHHHHHH

Class B Address

An IP address which belongs to class B has the first two bits in the first octet set to 10, i.e.
Class B AddressesClass B IP Addresses range from 128.0.x.x to 191.255.x.x. The default subnet mask for Class B is 255.255.x.x.
Class B has 16384 (214) Network addresses and 65534 (216-2) Host addresses.
Class B IP address format is: 10NNNNNN.NNNNNNNN.HHHHHHHH.HHHHHHHH

Class C Address

The first octet of Class C IP address has its first 3 bits set to 110, that is:
Class C AddressesClass C IP addresses range from 192.0.0.x to 223.255.255.x. The default subnet mask for Class C is 255.255.255.x.
Class C gives 2097152 (221) Network addresses and 254 (28-2) Host addresses.
Class C IP address format is: 110NNNNN.NNNNNNNN.NNNNNNNN.HHHHHHHH

Class D Address

Very first four bits of the first octet in Class D IP addresses are set to 1110, giving a range of:
Class D AddressesClass D has IP address rage from 224.0.0.0 to 239.255.255.255. Class D is reserved for Multicasting. In multicasting data is not destined for a particular host, that is why there is no need to extract host address from the IP address, and Class D does not have any subnet mask.

Class E Address

This IP Class is reserved for experimental purposes only for R&D or Study. IP addresses in this class ranges from 240.0.0.0 to 255.255.255.254. Like Class D, this class too is not equipped with any subnet mask.

Tuesday, January 10, 2017

How Are IP Addresses Assigned?

How Are IP Addresses Assigned?


We don't "own" our IP address—for instance, it's not like a homeowner's address, which is linked to a piece of land and a building on it. Your IP address can change and it's never really tied to your name or address, at least not in a way the public can see it.
But this doesn't mean we can randomly choose any IP address—for instance, like the way you're allowed to choose a username for an email account. Because when it comes to something the size of the Internet—and the complexity and intricate networking involved—that sort of randomness would produce nothing but chaos.
That's why behind the extensive and global yet seemingly simple Internet, there is an order and system that helps keep it working smoothly...even with details as small as our IP address.

Meet IANA.

For networking administrators and those who want to build private home or office networks, there are blocks of private IP addresses that are reserved for special use. But when it comes to the rest of us and our need for global IP addresses, there has to be some sort of ordering scheme to assign IP addresses in a logical, orderly and working fashion.
For the Internet, there is a single, worldwide "allocation" process for this, and it begins with an organization—the Internet Assigned Numbers Authority, or IANA.
IANA, based in the United States, is an Internet-specific organization that gives out (assigns and allocates) IP addresses in a systematic, organized and consistent manner that benefits everyone.
Still, with more than four billion IP addresses assigned worldwide, it's a bit overwhelming for just one single organization to handle, so IANA has some help from other Internet associations.
Part of the IP address allocation process has been simplified by assigning large blocks of IP addresses to Regional Internet Registries (RIR). Each RIR is responsible for managing the IP addresses assigned to their region on behalf of IANA.
There a number of Internet organizations involved with helping to keep the network operating smoothly and efficiently. Each one takes care of one aspect of the Internet and carefully follows policies and procedures (that are set up by other Internet organizations).
IANA and RIRs make sure our IP addresses will work when we need them to work, whatever that IP address at any one time is and wherever we happen to be.

Saturday, January 7, 2017

What is a Private IP Address?

What is a Private IP Address?


 
When you send a letter from your house to a friend, you have to know the address to send it to so that the postman knows which street and which house to take it to. Computer networks such as the Internet are no different, except instead of sending your Web traffic to an address like 1145 Main Street, your computer's "location" (the destination for your emails and Google inquiries) is known by its IP (Internet protocol) address.
In theory, your individual computer has to have its own unique IP address so that it will only receive the information that is meant for you. You don't want your emails and the responses to your Google searches going anywhere else. (If you go to the WhatIsMyIPAddress.com home page, you can see your public IP address.)
However, there is a major exception to this: That would be those network computers that are linked to a router and share the same IP address. Included in that number are home/office networks. All routers have an IP address built in.
In this instance, the router—once it has established its Internet connection through an Internet Service Provider—sends data to each individual device on that network based on something called a Network Address Translator (NAT).
The organization that doles out IP addresses to the world reserves a range of IP addresses for private networks. Private networks can use IP addresses anywhere in the following ranges:
  • 192.168.0.0 - 192.168.255.255 (65,536 IP addresses)
  • 172.16.0.0 - 172.31.255.255 (1,048,576 IP addresses)
  • 10.0.0.0 - 10.255.255.255 (16,777,216 IP addresses)
The assumption is that these private address ranges are not directly connected to the Internet, so the addresses don't have to be unique. In today's world, these private address ranges are often used for the protected network behind network translation devices.
Why is that? Because in a private network, the router connects to the Internet. From there, the router connects the other devices (usually desktops, laptops and tablets).
Because the private address ranges in a network don't have to be synchronized with the rest of the world, the complete address range is available from any network. A network administrator using these private addresses has more room for subnetting, and many more assignable addresses.
These blocks of addresses can be used by anyone, anywhere. Even if your neighbor is using the exact same addresses, it won't cause a problem. This is possible because these addresses are known as non-routable addresses. The network devices on the Internet are programmed to recognize these addresses. These devices (known as routers) will recognize that these are private addresses belonging to your network and will never forward your traffic onto the Internet.
You do need to obtain one real address from the general pool so that your home router can perform what is known as Network Address Translation (NAT). NAT is a process in which your router changes your private IP Address into a public one so that it can send your traffic over the Internet, keeping track of the changes in the process. When the information comes back to your router, it reverses the change—from a real IP address into a private one—and forwards the traffic back to your computer.
A typical home network router keeps two IP addresses: one for local devices to connect to across the local area network (LAN), and one for the external or wide area network (WAN) Internet connection.
The internal LAN-IP address is normally set to a default, private number. Linksys brand routers, for example, use 192.168.1.1 for their internal IP address. No matter the brand of router, its default internal IP address is listed in the manufacturer's documentation. Administrators have the option to change this IP address during router setup or at any time later. Unless someone manually changes it, however, this private LAN-IP address remains fixed.
The external WAN-IP address of the router is set when the router connects to the Internet service provider. This address can also be viewed on the router's administrative console. Alternatively, the WAN-IP address can be found by visiting a Web-based IP address lookup service—such as WhatIsMyIPAddress.com—from any computer on the home LAN.

I'm being attacked by one of these IP addresses!

If you are seeing unexplained Internet traffic to your computer from these numbers, it is important to remember the following things:
  • The traffic does not come from IANA. As the authority for IP addresses, they do not use or operate them, and they are not the source of the traffic.
  • As use of these numbers is untracked and unrestricted, we can not tell you who is using these numbers.
  • It is perfectly normal to see traffic from these numbers if you have a small home or office network. By default, most routers and access points use these numbers to assign to your local computers. It is most likely these numbers represent computers on your own internal network.
  • If you see these numbers in the headers of an unsolicited email, they usually indicate transit between servers within a corporate network or ISP. They are not useful in identifying the origin of an email. In such cases you can usually find the true origin by looking for the earliest "Received" mail header.