0Pricing
Linux Networking & TCP/IP for Developers · Урок

IP-адресация и разбиение на подсети

Освойте IPv4-адресацию, классы сетей и разбиение на подсети для эффективной организации и управления IP-сетями

«IP-адресация и разбиение на подсети» — бесплатный урок Linux Networking & TCP/IP for Developers на CoddyKit. Это урок 2 из 4. Ты можешь прочитать весь урок бесплатно ниже — а потом практиковать его прямо в браузере с встроенным редактором кода и ИИ-репетитором 24/7. Это часть пути обучения Linux Networking & TCP/IP for Developers, и твой прогресс синхронизируется между веб-версией и приложением CoddyKit. Курс Linux Networking & TCP/IP for Developers содержит 4 уроков всего.

Части этого урока еще не переведены и отображаются на английском.

Your Device's Network Address

Every device connected to a network needs a unique identifier, much like a mailing address for your house. In computer networks, this identifier is called an Internet Protocol (IP) address.

An IP address allows devices to locate and communicate with each other across local networks and the internet.

The IPv4 Address Format

We primarily use IPv4 (Internet Protocol version 4) addresses. These are 32-bit numbers, typically written in a dotted-decimal format.

This format divides the 32 bits into four sections, called octets, separated by dots. Each octet can range from 0 to 255.

  • Example: 192.168.1.100
  • Each 'dot' separates an octet.

IP Addresses in Binary

While we see IP addresses in decimal, computers understand them in binary. Each octet is 8 bits (a byte), so an IPv4 address is 32 bits long (4 octets * 8 bits/octet).

For example, the decimal number 192 in binary is 11000000. Understanding this binary representation is key to comprehending subnetting.

Network and Host Portions

An IP address isn't just one big number; it's logically divided into two parts:

  • Network Portion (Network ID): Identifies the specific network a device belongs to. All devices on the same network share the same network ID.
  • Host Portion (Host ID): Uniquely identifies a specific device (host) within that network.

Think of it like a street address: the street name is the network, and the house number is the host.

What is a Subnet Mask?

How does a computer know which part of an IP address is the network portion and which is the host portion? It uses a subnet mask.

A subnet mask is another 32-bit number that works with an IP address to define the network and host parts. Like an IP address, it's often written in dotted-decimal format (e.g., 255.255.255.0).

How Subnet Masks Work

In binary, a subnet mask consists of a series of 1s followed by a series of 0s.

  • The 1s represent the network portion of the IP address.
  • The 0s represent the host portion.

By comparing an IP address with its subnet mask (a process called 'ANDing'), a device can determine its network ID and its unique host ID.

Historical Network Classes (A, B, C)

Historically, IP addresses were categorized into classes (A, B, C, D, E) based on their first octet. This system, known as classful addressing, defined default subnet masks:

  • Class A: First octet 1-126 (Default mask: 255.0.0.0)
  • Class B: First octet 128-191 (Default mask: 255.255.0.0)
  • Class C: First octet 192-223 (Default mask: 255.255.255.0)

Why Classful Addressing Was Inefficient

While simple, classful addressing led to significant waste of IP addresses. For example, a Class B network could support over 65,000 hosts, far too many for most organizations, but you couldn't easily divide it.

This inflexibility and inefficiency in allocating IP addresses spurred the need for a more granular approach: subnetting.

Subnetting: Dividing Networks

Subnetting is the process of dividing a single large IP network into smaller, more manageable subnetworks (subnets).

It involves borrowing bits from the host portion of an IP address to extend the network portion, creating more, smaller networks. Each subnet then has its own unique network ID.

Benefits of Subnetting

Subnetting offers several crucial advantages for network administrators:

  • Improved Efficiency: Reduces the waste of IP addresses compared to classful addressing.
  • Reduced Network Traffic: Smaller broadcast domains mean less unnecessary traffic.
  • Enhanced Security: Isolates segments of the network, limiting the impact of security breaches.
  • Easier Management: Organizes the network logically, making troubleshooting and administration simpler.

Quick Check: Network ID

You now understand how an IP address and subnet mask work together. Let's test your knowledge.

IP Addressing & Subnetting Recap

Great job! You've learned the fundamentals of IPv4 addressing, including how IP addresses are structured and divided into network and host portions using a subnet mask.

You also explored the historical classful addressing system and understood why subnetting became essential for efficient and flexible network design. Subnetting allows us to create smaller, more manageable subnets, improving network performance and security.

Часто задаваемые вопросы

Урок «IP-адресация и разбиение на подсети» бесплатный?

Да — полный текст урока «IP-адресация и разбиение на подсети» бесплатно доступен здесь в веб-версии. Чтобы практиковать его интерактивно (встроенный редактор кода и ИИ-репетитор 24/7) и разблокировать остальной курс Linux Networking & TCP/IP for Developers, подпишись на CoddyKit PRO. Курс Linux Networking & TCP/IP for Developers содержит 4 уроков всего.

Чему я научусь в уроке «IP-адресация и разбиение на подсети»?

Освойте IPv4-адресацию, классы сетей и разбиение на подсети для эффективной организации и управления IP-сетями Ты практикуешь Linux Networking & TCP/IP for Developers с помощью реального кода, который запускаешь прямо в браузере, и ИИ-репетитор 24/7 отвечает на твои вопросы во время урока.

Нужен ли мне опыт, чтобы начать Linux Networking & TCP/IP for Developers?

Предыдущий опыт не требуется. Linux Networking & TCP/IP for Developers на CoddyKit структурирован для всех уровней — от новичков до продвинутых, поэтому ты можешь начать отсюда или с самого начала и учиться в своем темпе. Это урок 2 из 4.

Сколько времени занимает урок «IP-адресация и разбиение на подсети»?

Большинство уроков CoddyKit занимают около 5–10 минут. Каждый из них компактный и интерактивный, поэтому ты постоянно делаешь прогресс и продолжаешь с того же места в веб-версии и приложении.

Можно ли писать и запускать код в этом уроке Linux Networking & TCP/IP for Developers?

Да. Каждый урок Linux Networking & TCP/IP for Developers включает встроенный редактор кода, поэтому ты пишешь и запускаешь реальный код прямо в браузере и получаешь моментальную обратную связь от AI — локальная установка не требуется.

Все уроки этого курса

  1. Понимание модели TCP/IP
  2. IP-адресация и разбиение на подсети
  3. Основы TCP и UDP
  4. ICMP и роль ping и traceroute
← Назад к Linux Networking & TCP/IP for Developers