Třídy IP adres

⚡ Chytré shrnutí

IP Address Classes divide the IPv4 address space into five groups, A through E, based on the first octet. Each class defines its own address range, default subnet mask, and intended network size.

  • 📊 Five Classes: Class A covers first octets 1 to 126, Class B covers 128 to 191, and Class C covers 192 to 223.
  • 🎯 Special Ranges: Class D handles multicast, Class E remains experimental, and the 127 block is reserved for loopback.
  • 🔧 Quick Identification: Reading the first octet of any address reveals its class and default subnet mask.
  • 🔒 Private Blocks: RFC 1918 reserves 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 for internal networks.
  • ???? Vývoj: CIDR replaced classful addressing in 1993 to slow address exhaustion and improve allocation efficiency.

Třídy IP adres

Co je IP adresa?

Adresa IP (Internet Protocol) je číselný štítek přiřazený zařízením připojeným k počítačové síti, která používá IP pro komunikaci.

An IP address acts as an identifier for a specific machine on a particular network. It also helps you to establish a virtual connection between a destination and a source. The IP address is also called an IP number or internet address. It helps you to specify the technical format of the addressing and packet scheme. Most networks combine TCP with IP.

An IP address consists of four numbers, and each number contains one to three digits. A single dot (.) separates each number or set of digits, as the image below illustrates.

Části IP adresy

An IP adresa je rozdělena na dvě části:

  • Předpona: The prefix part of an IP address identifies the physical network to which the computer is attached. The prefix is also known as the network address.
  • Přípona: The suffix part identifies the individual computer on the network. The suffix is also called the host address.

Jak funguje IP adresa?

An IP address works like a postal address. A postal address combines your area, represented by a PIN code, and your house address. The area address is shared by every house in that locality, while the house address is unique to your home.

In the same way, the network address identifies all hosts that belong to a specific network, while the host address uniquely identifies a particular host within it.

Next, let us see how this address space was organized into classes.

Co je třídní adresování?

Classful addressing is the network addressing architecture the Internet used from 1981 until Classless Inter-Domain Routing (CIDR) was introduced in 1993.

This addressing method divides the IPv4 address space into five separate classes based on the leading bits of the first octet.

Here, classes A, B, and C offer addresses for networks of three distinct sizes. Class D is only used for multicast, and Class E is reserved exclusively for experimental purposes, as the image below shows.

Types of IPv4 Classes

IP Header Classes

The following table summarizes the first octet range, default subnet mask, and typical application of each IPv4 class:

Třída First Octet Range Výchozí maska ​​podsítě Příklad IP Leading Bits Max Number of Networks Počet hostitelů v síti editaci videa
IP třída A 1 126 na 255.0.0.0 1.1.1.1 0 126 16,777,214 Used for very large networks.
IP třída B 128 191 na 255.255.0.0 128.1.1.1 10 16,384 65,534 Used for medium-size networks.
IP třída C 192 223 na 255.255.255.0 192.1.11.1 110 2,097,152 254 Used for local area networks.
IP třída D 224 239 na NA 224.0.0.1 1110 NA NA Reserved for multicasting.
IP třída E 240 255 na NA 240.0.0.1 1111 NA NA Reserved for research and development purposes.

Note: First octet 0 is reserved, and the 127 block is reserved for loopback, so the usable Class A range is 1 to 126.

Let us look at each class in detail:

Síť třídy A

This IP address class is used when a network contains a large number of hosts. In a Class A network, the leading bit is 0, the first 8 bits (also called the first octet) identify the network, and the remaining 24 bits identify the host within that network.

An example of a Class A address is 102.168.212.226. Here, “102” helps you identify the network and “168.212.226” identifies the host.

Class A addresses from 127.0.0.0 to 127.255.255.255 cannot be assigned to devices because this block is reserved for loopback and diagnostic functions.

Síť třídy B

In a Class B IP address, the binary address starts with the leading bits 10, so the decimal value of the first octet falls between 128 and 191. The first 16 bits (known as two octets) help you identify the network. The remaining 16 bits indicate the host within the network.

An example of a Class B IP address is 168.212.226.204, where “168.212” identifies the network and “226.204” identifies the host on that network.

Síť třídy C

Class C is a type of IP address that is used for small networks. In this class, three octets are used to identify the network, and the first octet ranges between 192 and 223.

In this type of network addressing method, the leading bits are set to 110, which makes the first 24 bits of the address the network address and the remaining 8 bits the host address. Most local area networks use Class C IP addresses to connect with the network.

Example of a Class C IP address:

192.168.178.1

Síť třídy D

Class D addresses are only used for multicasting applications and never for regular networking operations. In this class, the first three bits are set to “1” and the fourth bit is set to “0”, giving the leading bits 1110. All the values within the range 224.0.0.0 to 239.255.255.255 are used to identify multicast groups uniquely.

Therefore, there is no need to extract a host address, so Class D does not have any subnet mask.

Example of a Class D IP address:

227.21.6.173

Síť třídy E

A Class E IP address is defined by the first four bits of the address being set to 1, which covers addresses from 240.0.0.0 to 255.255.255.255. However, Class E is reserved and its usage has never been defined, so many network implementations discard these addresses as undefined or illegal.

Example of a Class E IP address:

243.164.89.28

How to Identify the Class of an IP Address

You do not need software to find the class of an IPv4 address. The first octet alone tells you the class, the default subnet mask, and how the address splits into network and host portions. Follow these steps:

  1. Read the first octet: Take the number before the first dot. For the address 172.20.10.5, the first octet is 172.
  2. Match it to a class range: A first octet of 1 to 126 means Class A, 128 to 191 Class B, 192 to 223 Class C, 224 to 239 Class D, and 240 to 255 Class E.
  3. Apply the default subnet mask: Since 172 falls in the Class B range, the default mask is 255.255.0.0.
  4. Split the address: With a Class B mask, the network portion is 172.20 and the host portion is 10.5.
👍 Tip: In binary, the leading bits identify the class: 0 = Class A, 10 = Class B, 110 = Class C, 1110 = Class D, and 1111 = Class E.

Private and Reserved IP Address Ranges

Within Classes A, B, and C, RFC 1918 sets aside one block each as private address space. Public Internet routers do not forward packets from these ranges, making them ideal for home and office networks. Network Address Translation (NAT) maps them to a public address for Internet access.

Třída Private Address Range Notace CIDR Počet adres
A 10.0.0.0 10.255.255.255 na 10.0.0.0/8 16,777,216
B 172.16.0.0 172.31.255.255 na 172.16.0.0/12 1,048,576
C 192.168.0.0 192.168.255.255 na 192.168.0.0/16 65,536

Two other reserved ranges: 127.0.0.0/8 for loopback testing and 169.254.0.0/16, which devices assign themselves when no DHCP server responds.

Pravidla pro přidělování ID sítě

ID sítě bude přiděleno na základě níže uvedených pravidel:

  • The network ID cannot start with 127 because 127 belongs to the Class A range and is reserved for internal loopback functions.
  • A network ID with all bits set to 1 is reserved for use as an IP broadcast address and cannot be assigned.
  • A network ID with all bits set to 0 denotes a particular host on the local network and should not be routed. Admins who want to skrýt IP adresu details from external scans usually combine these reserved ranges with a privacy tool.

Omezení klasického IP adresování

Here are the drawbacks/cons of the classful IP addressing method:

  • Riziko brzkého vyčerpání adresního prostoru
  • Hranice tříd nepodporovaly efektivní přidělování adresního prostoru

These inefficiencies are why CIDR replaced classful addressing in 1993.

Nejčastější dotazy

IPv4 uses 32-bit addresses written as four decimal numbers and supports about 4.3 billion addresses. IPv6 uses 128-bit hexadecimal addresses, and does not use address classes.

The Internet Assigned Numbers Authority (IANA) allocates blocks to five Regional Internet Registries, which distribute them to Internet Service Providers (ISPs) for end users.

CIDR notation expresses the network prefix length after a slash, such as 192.168.1.0/24. It replaced fixed class boundaries with flexible prefix lengths.

AI-powered IP address management (IPAM) tools analyze allocation patterns, predict subnet exhaustion, automate assignments, and flag conflicts before they disrupt the network.

Yes. Machine learning models analyze traffic by source IP, flag unusual ranges, detect spoofed or blacklisted addresses, and identify botnet behavior in real time.

Shrňte tento příspěvek takto: