IP Address Notation - What Is An IP Address?
This tutorial explains the technology behind Internet Protocol (IP) networking.
IPv4 and IPv6
Internet Protocol (IP) technology was developed in the 1970s to support some of the first research computer networks. Today, IP has become a worldwide standard for home and business networking as well. Our network routers, Web browsers, email programs, instant messaging software - all rely on IP or other network protocols layered on top of IP. Two versions of IP technology exist today. Essentially all home computer networks use IP version 4 (IPv4), but an increasing number of educational and research institutions have adopted the next generation IP version 6 (IPv6).IPv4 Addressing Notation
An IPv4 address consists of four bytes (32 bits). These bytes are also known as octets. For readability purposes, humans typically work with IP addresses in a notation called dotted decimal. This notation places periods between each of the four numbers (octets) that comprise an IP address. For example, an IP address that computers see as- 00001010 00000000 00000000 00000001
- 10.0.0.1
IPv6 Addressing Notation
IP addresses change significantly with IPv6. IPv6 addresses are 16 bytes (128 bits) long rather than four bytes (32 bits). This larger size means that IPv6 supports more than- 300,000,000,000,000,000,000,000,000,000,000,000,000
- hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh
- E3D7:0000:0000:0000:51F4:9BC8:C0A8:6420
- E3D7::51F4:9BC8:C0A8:6420
- E3D7::51F4:9BC8:192.168.100.32
Classes of IP Addresses, IP Broadcast and IP Multicast
IPv4 Address Classes
The IPv4 address space can be subdivided into 5 classes - Class A, B, C, D and E. Each class consists of a contiguous subset of the overall IPv4 address range.With a few special exceptions explained further below, the values of the leftmost four bits of an IPv4 address determine its class as follows:
Class | Leftmost bits | Start address | Finish address |
A | 0xxx | 0.0.0.0 | 127.255.255.255 |
B | 10xx | 128.0.0.0 | 191.255.255.255 |
C | 110x | 192.0.0.0 | 223.255.255.255 |
D | 1110 | 224.0.0.0 | 239.255.255.255 |
E | 1111 | 240.0.0.0 | 255.255.255.255 |
All Class C addresses, for example, have the leftmost three bits set to '110', but each of the remaining 29 bits may be set to either '0' or '1' independently (as represented by an x in these bit positions):
110xxxxx xxxxxxxx xxxxxxxx xxxxxxxxConverting the above to dotted decimal notation, it follows that all Class C addresses fall in the range from 192.0.0.0 through 223.255.255.255.
IP Address Class E and Limited Broadcast
The IPv4 networking standard defines Class E addresses as reserved, meaning that they should not be used on IP networks. Some research organizations use Class E addresses for experimental purposes. However, nodes that try to use these addresses on the Internet will be unable to communicate properly. A special type of IP address is the limited broadcast address 255.255.255.255. A broadcast involves delivering a message from one sender to many recipients. Senders direct an IP broadcast to 255.255.255.255 to indicate all other nodes on the local network (LAN) should pick up that message. This broadcast is 'limited' in that it does not reach every node on the Internet, only nodes on the LAN.Technically, IP reserves the entire range of addresses from 255.0.0.0 through 255.255.255.255 for broadcast, and this range should not be considered part of the normal Class E range.
IP Address Class D and Multicast
The IPv4 networking standard defines Class D addresses as reserved for multicast. Multicast is a mechanism for defining groups of nodes and sending IP messages to that group rather than to every node on the LAN (broadcast) or just one other node (unicast). Multicast is mainly used on research networks. As with Class E, Class D addresses should not be used by ordinary nodes on the Internet.IP Address Class A, Class B, and Class C
Class A, Class B, and Class C are the three classes of addresses used on IP networks in common practice, with three exceptions as explained next.IP Loopback, IP Private Addresses, and IPv6 Address Types
IP Loopback Address
127.0.0.1 is the loopback address in IP. Loopback is a test mechanism of network adapters. Messages sent to 127.0.0.1 do not get delivered to the network. Instead, the adapter intercepts all loopback messages and returns them to the sending application. IP applications often use this feature to test the behavior of their network interface.As with broadcast, IP officially reserves the entire range from 127.0.0.0 through 127.255.255.255 for loopback purposes. Nodes should not use this range on the Internet, and it should not be considered part of the normal Class A range.
Zero Addresses
As with the loopback range, the address range from 0.0.0.0 through 0.255.255.255 should not be considered part of the normal Class A range. 0.x.x.x addresses serve no particular function in IP, but nodes attempting to use them will be unable to communicate properly on the Internet.Private Addresses
The IP standard defines specific address ranges within Class A, Class B, and Class C reserved for use by private networks (intranets). The table below lists these reserved ranges of the IP address space.Class | Private start address | Private finish address |
A | 10.0.0.0 | 10.255.255.255 |
B | 172.16.0.0 | 172.31.255.255 |
C | 192.168.0.0 | 192.168.255.255 |
Nodes are effectively free to use addresses in the private ranges if they are not connected to the Internet, or if they reside behind firewalls or other gateways that use Network Address Translation (NAT).
IPv6 Address Types
IPv6 does not use classes. IPv6 supports the following three IP address types:- unicast
- multicast
- anycast
IPv6 Reserved Addresses
IPv6 reserves just two special addresses: 0:0:0:0:0:0:0:0 and 0:0:0:0:0:0:0:1. IPv6 uses 0:0:0:0:0:0:0:0 internal to the protocol implementation, so nodes cannot use it for their own communication purposes. IPv6 uses 0:0:0:0:0:0:0:1 as its loopback address, equivalent to 127.0.0.1 in IPv4.Internet Protocol Summary - Facts about IP
Name:
Internet Protocol - abbreviated "IP"
Description:
IP is used by many higher level network protocols, principally TCP and UDP. Many Internet software applications including Web browsers, FTP clients, and email programs, rely on Internet Protocol.
OSI Model:
Network layer (Layer 3)
Datagram Format:
A base header 20 bytes (5 "longwords") in length, with the option for expanded header options, followed by data.
Header:
Word 1 -
- Version - 4 bits
- Header Length (in longwords) - 4 bits
- Type of Service / Differentiated Services Code Point (DSCP) - 8 bits
- Datagram Length (in bytes) - 16 bits
- ID Number - 16 bits
- Fragmentation Flags - 3 bits
- Fragmentation Offset - 13 bits
- Time to Live - 8 bits
- Transport Protocol - 8 bits
- Header Checksum - 16 bits
- Source IP Address - 32 bits
- Destination IP Address - 32 bits
- Options
- Padding
Payload:
IP datagram payloads can be of variable length. The minimum size of an IP datagram is 28 bytes, using the minimum 20 bytes of header information, followed by the minimum of 8 bytes of data. The maximum size of an IP datagram payload is 65,535 bytes minus the header size.
Footer:
Internet Protocol does not use its own datagram footer.
Domain Name System - DNS
Domain Naming and Registration with DNS
Though IP addresses allow computers and routers to identify each other efficiently, humans prefer to work with names rather than numbers. The Domain Name System - DNS - supports the best of both worlds... (see below)... . DNS allows nodes on the public Internet to be assigned both an IP address and a corresponding name, called a domain name. For DNS to work as designed, these names must be unique worldwide. Hence an entire "cottage industry" has emerged around the purchasing of domain names in the Internet name space.
Below this level are the second-level registered domains such as about.com. These are domains that organizations can purchase from any of numerous accredited registrars. For nodes in the com, org, and edu domains, the Internet Corporation for Assigned Names and Numbers (ICANN) oversees registrations.
Below that, local domains like compnetworking.about.com are defined and administered by the overall domain owner. DNS supports additional tree levels as well. The period ('.') always separates each level of the hierarchy in DNS.
The top level of the DNS hierarchy, also called the root level, is maintained by a set of 13 servers called root name servers. These servers have gained some notoriety for their unique role on the Internet. Maintained by various independent agencies, the servers are uniquely named A, B, C and so on up to M. Ten of these servers reside in the United States, one in Japan, one in London, and one in Stockholm, Sweden.
DNS Name Space
DNS is a hierarchical system. DNS organizes all registered names in a tree structure. At the base or root of the tree are a group of top-level domains including familiar names like com, org, and edu and numerous country-level domains like fi (Finland), ca (Canada), and my (Malaysia). One generally cannot purchase names at this level. However, in a well-publicized and controversial event in 2000, the island nation of Tuvalu agreed to receive a large payment in return for rights to the root domain tv.Below this level are the second-level registered domains such as about.com. These are domains that organizations can purchase from any of numerous accredited registrars. For nodes in the com, org, and edu domains, the Internet Corporation for Assigned Names and Numbers (ICANN) oversees registrations.
Below that, local domains like compnetworking.about.com are defined and administered by the overall domain owner. DNS supports additional tree levels as well. The period ('.') always separates each level of the hierarchy in DNS.
DNS Root Level and Other Servers
DNS is also a distributed system. The DNS database contains a list of registered domain names. It further contains a mapping or conversion between each name and one or more IP addresses. However, DNS requires a coordinated effort among many computers (servers); no one computer holds the entire DNS database. Each DNS server maintain just one piece of the overall hierarchy - one level of the tree and then only a subset or zone within that level.The top level of the DNS hierarchy, also called the root level, is maintained by a set of 13 servers called root name servers. These servers have gained some notoriety for their unique role on the Internet. Maintained by various independent agencies, the servers are uniquely named A, B, C and so on up to M. Ten of these servers reside in the United States, one in Japan, one in London, and one in Stockholm, Sweden.
DNS Resolvers
DNS works in a client/server fashion. DNS servers respond to requests from DNS clients called resolvers. ISPs and other organizations set up local DNS resolvers as well as servers. Most DNS servers also act as resolvers, routing requests up the tree to higher-level DNS servers, and also delegating requests to other servers. DNS servers eventually return the requested mapping (either address-to-name or name-to-address) to the resolver.DNS and DHCP
DNS was not designed to work with dynamic addressing such as that supported by DHCP. DNS requires that fixed (static) addresses be maintained in the database. Web servers in particular require fixed IP addresses for this reason.IP Network Numbering | |
IP Network PartioningComputer networks consist of individual segments of network cable. The electrical properties of cabling limit the useful size of any given segment such that even a modestly-sized local-area network (LAN) will require several of them. Gateway devices like routers and bridges connect these segments together although not in a perfectly seamless way... (see below) |
... . Besides partitioning through the use of cable, subdividing of the network can also be done at a higher level. Subnets support virtual network segments that partition traffic flowing through the cable rather than the cables themselves. The subnet configuration often matches the segment layout one-to-one, but subnets can also subdivide a given network segment.
IP Network Numbering
Even without subnetting (explained later), hosts on the Internet or any other IP network are assigned a network number. Network numbering allows a group of hosts (peers) to communicate efficiently with each other. Hosts on the same network may be computers located in the same facility or all computers used by a workgroup, for example. Multi-homed hosts, that contain multiple network adapters, can belong to multiple networks, but each adapter is assigned exactly one network number. Network numbers look very much like IP addresses, but the two should not be confused. Consider for example the host IP address 10.0.0.1, an address commonly used on private networks. Because it is a Class A address, with no subnetting employed, its leftmost byte (eight bits) by default refer to the network address and all other bits remain set at zero. Thus, 10.0.0.0 is the network number corresponding to IP address 10.0.0.1.The portion of the IP address that does not refer to the network refers instead to the host address - literally, the unique identifier of the host on that network. In the above example, the host address becomes '0.0.0.1' or simply '1'. Also note that a network address becomes a reserved address that should not be assigned to any actual host. Configuring a live host at 10.0.0.0 in the example above could impact communications for all hosts on that network.
The table below illustrates the default numbering scheme for Class A, B, and C networks.
Class | Host address range | Network address | Default mask |
A | 0.0.0.0 - 127.255.255.255 | x.0.0.0 | 255.0.0.0 |
B | 128.0.0.0 - 191.255.255.255 | x.x.0.0 | 255.255.0.0 |
C | 192.0.0.0 - 223.255.255.255 | x.x.x.0 | 255.255.255.0 |
Benefit of Network Addressing
Network addressing fundamentally organizes hosts into groups. This can improve security (by isolating critical nodes) and can reduce network traffic (by preventing transmissions between nodes that do not need to communicate with each other). Overall, network addressing becomes even more powerful when introducing subnetting and/or supernetting.Subnet Masks and Subnetting
A subnet allows the flow of network traffic between hosts to be segregated based on a network configuration. By organizing hosts into logical groups, subnetting can improve network security and performance.
Subnet Mask
Perhaps the most recognizable aspect of subnetting is the subnet mask. Like IP addresses, a subnet mask contains four bytes (32 bits) and is often written using the same "dotted-decimal" notation. For example, a very common subnet mask in its binary representation- 11111111 11111111 11111111 00000000
- 255.255.255.0
Applying a Subnet Mask
A subnet mask neither works like an IP address, nor does it exist independently from them. Instead, subnet masks accompany an IP address and the two values work together. Applying the subnet mask to an IP address splits the address into two parts, an "extended network address" and a host address. For a subnet mask to be valid, its leftmost bits must be set to '1'. For example,- 00000000 00000000 00000000 00000000
- 11111111 11111111 11111111 11111111
Subnetting in Practice
Subnetting works by applying the concept of extended network addresses to individual computer (and other network device) addresses.An extended network address includes both a network address and additional bits that represent the subnet number... (see below)
... . Together, these two data elements support a two-level addressing scheme recognized by standard implementations of IP. The network address and subnet number, when combined with the host address, therefore support a three-level scheme.
Consider the following real-world example. A small business plans to use the 192.168.1.0 network for its internal (intranet) hosts. The human resources department wants their computers to be on a restricted part of this network because they store payroll information and other sensitive employee data. But because this is a Class C network, the default subnet mask of 255.255.255.0 allows all computers on the network to be peers (to send messages directly to each other) by default.
The first four bits of 192.168.1.0 -
1100place this network in the Class C range and also fix the length of the network address at 24 bits. To subnet this network, more than 24 bits must be set to '1' on the left side of the subnet mask. For instance, the 25-bit mask 255.255.255.128 creates a two-subnet network as follows.
Network address (24 bits) | Subnet number (1 bit) | Extended network | Host address range |
11000000 10101000 00000001 | 0 | 192.168.1.0 | 192.168.1.1 - 192.168.1.127 |
11000000 10101000 00000001 | 1 | 192.168.1.128 | 192.168.1.129 - 192.168.1.255 |
Private Networks and Subnets
As mentioned earlier in this tutorial, the governing bodies that administer Internet Protocol have reserved certain networks for internal uses. In general, intranets utilizing these networks gain more control over managing their IP configuration and Internet access. The default subnet masks associated with these private networks are listed below.Network address range | Default mask |
10.0.0.0 - 10.255.255.255 | 255.0.0.0 |
172.16.0.0 - 172.31.255.255 | 255.240.0.0 |
192.168.0.0 - 192.168.255.255 | 255.255.0.0 |
Subnetting Review
Subnetting allows network administrators some flexibility in defining relationships among network hosts. Hosts on different subnets can only "talk" to each other through specialized network gateway devices like routers. The ability to filter traffic between subnets can make more bandwidth available to applications and can limit access in desirable ways.CIDR - Classless Inter-Domain Routing
CIDR Notation and IP Tutorial
IDR stands for Classless Inter-Domain Routing. CIDR was developed in the 1990s as a standard scheme for routing network traffic across the Internet.
Why Use CIDR?
Before CIDR technology was developed, Internet routers managed network traffic based on the class of IP addresses. In this system, the value of an IP address determines its subnetwork for the purposes of routing. CIDR is an alternative to traditional IP subnetting that organizes IP addresses into subnetworks independent of the value of the addresses themselves. CIDR is also known as supernetting as it effectively allows multiple subnets to be grouped together for network routing.CIDR Notation
CIDR specifies an IP address range using a combination of an IP address and its associated network mask. CIDR notation uses the following format -- xxx.xxx.xxx.xxx/n
- 192.168.12.0/23
- 192.168.12.0/23 = 192.168.12.0/24 + 192.168.13.0/24
- 10.4.12.0/22
- 10.0.0.0/8
- 172.16.0.0/16
- 192.168.3.0/24
How CIDR Works
CIDR implementations require certain support be embedded within the network routing protocols. When first implemented on the Internet, the core routing protocols like BGP (Border Gateway Protocol) and OSPF (Open Shortest Path First) were updated to support CIDR. Obsolete or less popular routing protocols may not support CIDR. CIDR aggregation requires the network segments involved to be contiguous (numerically adjacent) in the address space. CIDR cannot, for example, aggregate 192.168.12.0 and 192.168.15.0 into a single route unless the intermediate .13 and .14 address ranges are included (i.e., the 192.168.12/22 network).Internet WAN or backbone routers (those that manage traffic between Internet Service Providers) all generally support CIDR to achieve the goal of conserving IP address space. Mainstream consumer routers often do not support CIDR, therefore private networks (including home networks) and even small public networks (LANs) often do not employ it.
No comments:
Post a Comment