Network Technology Basics · Topic 1 of 2

IP Addressing and Network Technologies

Learn network devices and models, IPv4 classes, private and special addresses, subnet masks, network and broadcast addresses, and subnetting with examples.

  • 6 min
In a nutshell
  • IPv4 is 32 bits; the mask separates the network part from the host part.
  • Private ranges: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16. Loopback is 127.0.0.0/8.
  • Usable hosts = 2^n minus 2, where n is the number of host bits.

What it is

A network connects devices so they can exchange data. Switches join hosts within one local network, routers join different networks, and firewalls control what may pass between them.

An IP address identifies a network interface at Layer 3. It has a network part, which says which network the host is on, and a host part, which says which host it is. The subnet mask marks where one part ends and the other begins.

Application dataTransportTCP or UDP portNetworkIP addressData linkMAC addressPhysicalbits on the medium

How it works

Network concepts and devices

A LAN covers a small area such as a building, usually with Ethernet. A WAN connects sites over long distances, often through a carrier.

DeviceLayerForwards by
Layer 2 switchData linkMAC address
RouterNetworkIP address and routing table
Layer 3 switchNetworkSwitches in VLANs and routes between them
FirewallNetwork and aboveSecurity policies, sessions and zones

In a virtualized data center, virtual switches inside each host do the Layer 2 job for VMs.

Reference models

OSI layerTCP/IP layerPDUExamples
7 Application, 6 Presentation, 5 SessionApplicationDataHTTP, DNS, FTP, SSH
4 TransportTransportSegmentTCP, UDP
3 NetworkNetworkPacketIP, ICMP (ARP links layers 2 and 3)
2 Data linkData linkFrameEthernet, 802.1Q
1 PhysicalPhysicalBitsCables, optical signals

On the way down, each layer adds a header, which is encapsulation. The receiver strips the headers in reverse, which is decapsulation. ARP resolves a known IP address to a MAC address on the local link.

IPv4 address structure

An IPv4 address is 32 bits, written as four decimal octets such as 192.168.10.25. The subnet mask has 1 bits for the network part and 0 bits for the host part. It is written as 255.255.255.0 or as a prefix length, /24.

ClassFirst octetDefault maskUse
A1 to 126/8 (255.0.0.0)Unicast, very large networks
B128 to 191/16 (255.255.0.0)Unicast, medium networks
C192 to 223/24 (255.255.255.0)Unicast, small networks
D224 to 239NoneMulticast
E240 to 255NoneReserved

Modern networks use classless addressing (CIDR), where any prefix length is allowed.

Private and special addresses

RangePurpose
10.0.0.0/8Private
172.16.0.0/12 (172.16.0.0 to 172.31.255.255)Private
192.168.0.0/16Private
127.0.0.0/8Loopback, the host itself
169.254.0.0/16Link-local, self-assigned when DHCP fails
255.255.255.255Limited broadcast
0.0.0.0This host, or any address in a default route

Private addresses are not routed on the internet. Hosts using them reach the internet through NAT.

Network, broadcast and usable hosts

In every subnet, the address with all host bits 0 is the network address, and the address with all host bits 1 is the broadcast address. Neither can be given to a host.

With n host bits, a subnet has 2^n addresses and 2^n minus 2 usable host addresses. A /24 has 8 host bits, 256 addresses and 254 usable hosts.

PrefixMaskAddressesUsable hosts
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/30255.255.255.25242

Subnetting and the gateway

Subnetting borrows host bits to make several smaller networks. A host compares the destination with its own network. Same network means deliver directly with ARP; a different network means send to the default gateway, a router interface on the local subnet.

Destination IPCompare with own networkuse the maskSame subnetARP for the hostOther subnetsend to the gateway

IPv6 at a glance

IPv6 addresses are 128 bits, written as eight groups of four hexadecimal digits, and leading zeros and one run of zero groups can be shortened with ::. IPv6 has no broadcast; it uses multicast instead.

A worked example

An administrator splits 192.168.1.0/24 into four equal subnets for management, storage, service and backup traffic. Borrowing 2 bits gives /26, with a block size of 64.

The subnets are 192.168.1.0/26, 192.168.1.64/26, 192.168.1.128/26 and 192.168.1.192/26. For the second one, the network address is 192.168.1.64, the broadcast address is 192.168.1.127, and hosts use 192.168.1.65 to 192.168.1.126, which is 62 addresses.

How the exam asks about this

  • "How many usable host addresses does a /27 subnet provide?" → 30.
  • "Which of the following is a private address: 172.20.1.1, 172.32.1.1 or 192.169.1.1?" → 172.20.1.1, because 172.16.0.0/12 runs to 172.31.255.255.
  • "What is the network address of 10.1.1.130/25?" → 10.1.1.128.

What to remember for the exam

  • IPv4 is 32 bits; the mask separates the network part from the host part.
  • Private ranges: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16. Loopback is 127.0.0.0/8.
  • Usable hosts = 2^n minus 2, where n is the number of host bits.
  • Network address has all host bits 0; broadcast address has all host bits 1.
  • Switches forward by MAC address at Layer 2; routers forward by IP address at Layer 3.
Watch out

127.0.0.0/8 is not class A unicast space you can assign. The class A range for hosts is 1 to 126 in the first octet, and 127 is reserved for loopback.

Common mistakes

Forgetting to subtract 2. A /28 has 16 addresses but only 14 usable hosts, because the network and broadcast addresses are reserved.

Misreading 172.16.0.0/12. The private range covers 172.16 to 172.31, not all of 172.x.x.x. An address such as 172.32.1.1 is public.

Thinking the gateway can be on another subnet. The default gateway must be reachable directly, so it is always an address in the host's own subnet.

Check yourself

  • What is the broadcast address of 192.168.10.0/26?

    192.168.10.63. A /26 has a block size of 64, so the first subnet runs from .0 to .63.

  • Which address range is assigned automatically when a host fails to get an address from DHCP?

    169.254.0.0/16, the link-local range.

  • At which layer does a router forward traffic, and by what address?

    At Layer 3, the network layer, by the destination IP address and its routing table.

Topic 1 of 2 in Network Technology Basics

Test yourself on Network Technology Basics

The full Huawei H13-511 question bank has 600 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Huawei. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.