IP addressing - basic, network and host portion, class A,B,C,D,E
IP addressing - teaches the way computers distinguish different classes of address.
At the early stage of IP netowk, no classes of addresses existed. As the number of networks grew, the IP addresses were broken into classes to accomodate different sizes of networks.
It's better to remember these facts about address classes sooner than later, because we will have to remember them to pass the CCENT test anyway:
- Class A (1-126): The Class A address category was designed to support extremely large networks. A class A address uses only the first octet to indicate the network address. The remaining three octets are used for host addresses. The first bit of a Class A address is always 0; therefore, the lowest number that can be represented is 00000000 (decimal 0), and the highest number that can be represented is 01111111 (decimal 127). However, these two network numbers, 0 and 127, are
reserved and cannot be used as a network address. Any address start with 127 is reserved for loopback. - Class B (128-191): The Class B address category was designed to support middle-sized and large-sized networks. A Class B address uses the first two octets to indicate the network address. The remaining two octets are used for host addresses. The first two bits of a Class B address is alsways binary number 10; therefore, the lowest number that can be represented is 10000000 (decimal 128), and the highest number that can be represented is 1011111 (decimal 191).
- Class C (192-223): The Class C address category is designed to support small-sized networks. A Class C address uses the first three octets to indicate the network address. The remaining one octet is used for host addresses. The first three bits of a Class C address is always binary number 110; therefore the lowest number that can be represented is 11000000 (decimal 192), and the highest number that can be represented is 11011111 (decimal 223).
- Class D: 224-239 reserved for multicasting, so that a single station can simultaneously transmit a signle stream of datagrams to multiple recipients. The first four bits of Class D address is always binary number 1110.
- Class E: 240-255 "experimental addresses", reserved by the Internet Engineering Task Force (IETF) for its own research.
The block at the beginning and end of each class is called network address and broadcast address, respectively. These two special IP addresses are reserved and cannot be assigned to individual devices on a network.
- Network address: An IP address that has all host bits set to 0. This address identifies the network itself and cannot be assigned to individual devices on a network. For example, 61.0.0.0 is the Network address of the network containing the host 61.4.64.21.
- Broadcast address: An IP address with all host bits set to 1. Broadcast address, as the name suggests, used to send data to all the devices on a network. For example, 61.255.255.255 is the Broad address of the network containing the host 61.4.64.21. The network broadcast is also known as a directed broadcast and is capable of being routed. The router would forward broadcast packets out all the interfaces with the same network ID. Cisco routers disable broadcast-forwarding by default.
If an IP device wants to communicate with all devices on all networks, it sends packets to address 255.255.255.255. This is used in RARP and DHCP protocols. An all network broadcast is not capable of being routed, it stays local to LAN segment or VLAN, therefore is also called local broadcast.
prefix notation -- short-hand notation for subnet mask (more about subnet in later post):
10.0.0.0/8 (/8 means the subnet mask have 8 leading 1s, which is 255.0.0.0)
172.16.0.0/12 (/12 = 255.240.0.0)
The default subnet mask:
- class A -- 255.0.0.0 (/8) creating 3 octets for the host field.
- class B -- 255.255.0.0 (/16) creating 2 octets for the host field.
- class C -- 255.255.255.0 (/24) creating 1 octets for the host field.
To sum up:
The list of the Class A, B, C, D, E IP address.
Class | Leading bits | Start | End | Default Subnet Mask in dotted decimal |
---|---|---|---|---|
A (CIDR /8) | 0 | 0.0.0.0 | 127.255.255.255 | 255.0.0.0 |
B (CIDR /16) | 10 | 128.0.0.0 | 191.255.255.255 | 255.255.0.0 |
C (CIDR /24) | 110 | 192.0.0.0 | 223.255.255.255 | 255.255.255.0 |
D | 1110 | 224.0.0.0 | 239.255.255.255 | |
E | 1111 | 240.0.0.0 | 255.255.255.254 |
The block at the beginning and end of each class (A, B and C) were designated as reserved for purpose such as future experimentation, internal use in managing the Internet etc. In another words, 0. x.x.x and 127. x.x.x are reserved for class A; 128.0.x.x and 191.255.x.x are reserved for class B; 192.0.0.x and 223.255.255.x are reserved for class C.
While the 127.0.0.0/8 network is in the Class A area, it is designated for loopback and used for testing purpose and cannot be assigned to a network.
Loopback
Last but not least, let's revisit loopback ip addresses. The 127.0.0.0/8 address in the Class A range is a reserved address range and used for testing purposes. IP address in this range are commonly mapped to localhost and loopback, so that the processes running on the same machine can communicate without knowing the concrete ip address.
Network administrator often ping 127.0.0.0/8 network address to verify TCP/IP protocol works without another network computer's involve. It can also be used for administrative and maintain purpose because packets with loopback ip as destination are routed locally and don't generate network traffic.
ICND1 and ICND2 break down
[...] The LAN contains 2 hosts, 2 switches and 2 routers. The hosts and routers are assigned with class C IP addresses, which all belong to 192.168.10.0 network if using default class C subnetmask 255.255.255.0 or [...]
ReplyDelete