Network Addressing
100%

Network Basics · Lesson 4

Network Addressing

Learn how link addresses, IP addresses, and hostnames identify different parts of network communication.

Network communication uses different identifiers at different scopes. Link-layer addresses deliver frames on a local link, IP addresses support routed delivery, and names help applications and people select services.

Link-Layer Addresses

An Ethernet MAC address is 48 bits, commonly written as six hexadecimal octets such as 00:c4:b5:45:b2:43. A source address identifies an interface on the current link, while a destination can be unicast, multicast, or broadcast.

MAC addresses are not guaranteed permanent or globally unique. Software can assign a locally administered address, virtual interfaces generate addresses, and Wi-Fi privacy features can randomize them. Routers normally replace Ethernet framing at each hop, so a remote server does not receive the original local Ethernet source address.

What is the normal scope of an Ethernet MAC address in packet delivery?

IP Addresses and Prefixes

IPv4 addresses are 32 bits, or four octets, while IPv6 addresses are 128 bits. An IP address is normally assigned to an interface and interpreted with a prefix length such as 192.0.2.10/24 or 2001:db8::10/64. The prefix identifies which leading bits describe the network.

One interface can have several IP addresses, and an address can change through DHCP, privacy addressing, failover, or administration. Private IPv4 addresses can be reused in separate networks; public routing and NAT policies determine external reachability.

How large is an IPv4 address?

Hostnames and Name Resolution

A hostname is a name, not an address. Name resolution can consult /etc/hosts, DNS, multicast systems, or other sources according to the host's name-service configuration. One name can resolve to multiple addresses, and several names can refer to one service.

Use the system resolver path when testing what an application is likely to see:

$ getent ahosts example.com

DNS answers can change or be cached, and successful resolution does not prove that the service is reachable.

Why use getent ahosts during a name-resolution check?

Inspecting a Linux Host

View link and IP configuration separately:

$ ip -brief link
$ ip -brief address

Then inspect routes and neighbor state when diagnosing reachability. Never infer the correct source interface or address from naming alone; route selection, policy rules, namespaces, and tunnels can change the path.

Which command view focuses on assigned IP addresses?

Lesson complete

You finished Network Addressing

You can now distinguish names and addresses by their networking scope.

  • Treat MAC addresses as local-link identifiers that may change.

  • Read IPv4 and IPv6 addresses with their prefix lengths.

  • Recognize that interfaces can hold several logical addresses.

  • Query hostnames through the configured system resolver.

Keep your learning progress

Create a free account to save this lesson and continue learning on any device.

Create a free account
Next Lesson
Back to Network Basics