DEV Community

TUNDE OGUNMODEDE
TUNDE OGUNMODEDE

Posted on

Computer Networking Fundamentals: IP Addresses, DNS, and Network Communication

Computer networking allows devices to communicate and exchange data. Whether you're accessing a website, connecting to a remote server, or deploying cloud infrastructure, networking concepts determine how that communication happens.

Understanding these fundamentals is essential for working with Linux, cloud platforms, and DevOps tools.

This guide covers network communication, IP addressing, routing, DNS, and related concepts.

1. Local Area Networks (LANs) and Ethernet

A Local Area Network (LAN) connects devices within a limited geographical area, such as a home, office, or data centre.

Devices on a LAN can communicate with one another and share resources, depending on how the network is configured.

Ethernet is a widely used technology for wired networking. Wi-Fi provides a common alternative for wireless LAN connections.

Although Ethernet is commonly associated with LANs, the terms are not interchangeable: a LAN describes the network's scope, while Ethernet describes a networking technology.

MAC addresses

A Media Access Control (MAC) address is an identifier associated with a network interface.

For example:

00:1A:2B:3C:4D:5E
Enter fullscreen mode Exit fullscreen mode

MAC addresses are used in local network communication, particularly when Ethernet frames are delivered between devices on the same network segment.

A MAC address and an IP address serve different purposes:

  • MAC address: Used for link-layer delivery within a local network.
  • IP address: Used for addressing and routing packets across IP networks.

A device's MAC address is not necessarily permanent or globally unique in every practical situation. Software can change or randomize it, and virtual machines can have their own virtual MAC addresses.

2. How Devices Share a Network

When multiple devices share a communication medium, rules are needed to coordinate transmission.

Two important concepts are CSMA/CD and CSMA/CA.

CSMA/CD

Carrier Sense Multiple Access with Collision Detection (CSMA/CD) was used by traditional shared, half-duplex Ethernet networks.

The process works broadly as follows:

  1. A device listens to determine whether the medium is available.
  2. If the medium is idle, it begins transmitting.
  3. If a collision occurs, the device detects it.
  4. The devices stop transmitting and wait for a randomly selected interval before trying again.

This waiting mechanism is called exponential backoff. The waiting period is selected from an increasingly large range as collisions recur, helping reduce repeated collisions.

Traditional shared Ethernet relied on this approach. Modern switched, full-duplex Ethernet generally doesn't use CSMA/CD because devices have dedicated full-duplex links.

CSMA/CA

Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) is associated with Wi-Fi.

Because wireless devices cannot reliably detect every collision while transmitting, Wi-Fi uses mechanisms designed to reduce the likelihood of collisions.

These mechanisms include waiting for the channel to become available and using randomized backoff periods.

Bandwidth

Bandwidth describes a network link's data-carrying capacity, commonly measured in bits per second.

For example, a connection rated at 100 Mbps has a nominal capacity of 100 megabits per second.

However, actual throughput may be lower because of protocol overhead, congestion, interference, and other conditions.

3. Collision Domains and Network Switches

A collision domain is a portion of a network in which simultaneous transmissions could interfere with one another under the relevant networking technology.

In traditional shared Ethernet, devices sharing the same medium belonged to the same collision domain.

Ethernet switches changed this arrangement.

A switch forwards Ethernet frames based on MAC addresses. Each switch port generally creates a separate collision domain, and modern full-duplex connections avoid the traditional Ethernet collision problem.

This is one reason switched Ethernet performs better than older shared-medium Ethernet.

Don't confuse a collision domain with a broadcast domain. They describe different things, and VLANs are commonly used to divide switched networks into separate broadcast domains.

4. Routing and Packet Delivery

When one device communicates with another across different IP networks, routers help move packets toward their destinations.

What is a packet?

A packet is a formatted unit of data carried by a network-layer protocol such as IP.

An IP packet contains information such as source and destination IP addresses, along with the data being transported.

Routers examine packet headers and use routing information to determine where packets should be forwarded next.

Packets belonging to the same communication may take different paths, depending on network conditions and routing decisions.

What is a hop count?

A hop is one step along a route through a network, typically involving a router forwarding a packet.

Hop count refers to the number of hops along a route or the number of router hops a packet traverses.

For example, if a packet passes through three routers before reaching its destination, it has traversed three router hops.

In IPv4, the Time to Live (TTL) field is reduced by routers as the packet is forwarded. When it reaches zero, the packet is discarded.

This helps prevent packets from circulating indefinitely because of routing loops.

5. Circuit Switching and Message Switching

Different communication systems use different methods to move information.

Circuit switching

Circuit switching establishes a dedicated communication path or circuit between endpoints for the duration of a connection.

Traditional telephone networks are a familiar example.

The reserved path provides predictable communication resources, but those resources may remain allocated even when no data is being sent.

Message switching

Message switching forwards complete messages from one intermediate system to another.

Each intermediate system receives and stores the message before forwarding it toward the destination. This is often called a store-and-forward approach.

Unlike circuit switching, message switching doesn't require a dedicated end-to-end circuit.

Modern IP networks generally use packet switching instead: data is divided into packets that can be forwarded independently.

6. IP Addresses: IPv4 and IPv6

An IP address identifies a network interface at the IP layer and supports communication across interconnected networks.

There are two major versions of IP: IPv4 and IPv6.

IPv4

IPv4 uses 32-bit addresses.

Because each bit has two possible values, IPv4 provides:

[
2^{32} = 4,294,967,296
]

possible address values—approximately 4.3 billion.

An IPv4 address is commonly written as four decimal numbers separated by periods.

For example:

192.168.1.10
Enter fullscreen mode Exit fullscreen mode

Each number represents eight bits and ranges from 0 to 255.

IPv6

IPv6 uses 128-bit addresses.

It provides:

[
2^{128}
]

possible address values, offering an enormously larger address space than IPv4.

An IPv6 address is commonly written in hexadecimal groups separated by colons.

For example:

2001:db8::1
Enter fullscreen mode Exit fullscreen mode

The 2001:db8::/32 block is reserved for documentation and examples; it is not intended for ordinary public deployment.

IPv6 was developed partly to address IPv4 address exhaustion and includes other protocol improvements.

Static and dynamic IP addresses

IP addresses can also be classified by how they are assigned.

Static IP: An address configured to remain fixed, unless an administrator or system changes it.

Dynamic IP: An address assigned automatically, commonly through DHCP, and potentially changed over time.

These terms describe address assignment, not IP versions. Either IPv4 or IPv6 can use static or dynamic configuration.

For example, a cloud server may need a stable public IP address so that users or other systems can reach it consistently.

7. Congestion Control

Network congestion occurs when the volume of traffic exceeds the capacity available along a network path.

This can result in packet loss, increased latency, and reduced throughput.

Congestion control helps prevent senders from overwhelming the network.

TCP, for example, uses congestion-control algorithms to adjust its sending behaviour in response to network conditions.

Congestion control is not the same as load balancing.

  • Congestion control regulates traffic to reduce or respond to overload.
  • Load balancing distributes traffic across multiple resources or paths to improve resource utilization, performance, or availability.

Both can help improve network performance, but they solve different problems.

8. TCP/IP, ICMP, and BGP

These protocols serve different purposes within network communication.

TCP/IP

TCP/IP refers to the family of protocols used for communication across IP networks.

IP handles addressing and packet forwarding. TCP provides a reliable, ordered byte stream between applications running on communicating hosts.

Other transport protocols, such as UDP, provide different delivery characteristics.

ICMP

The Internet Control Message Protocol (ICMP) supports error reporting and diagnostic functions associated with IP communication.

For example, ping commonly uses ICMP Echo Request and Echo Reply messages to test reachability.

ICMP is not the same as TCP. They perform different functions.

BGP

The Border Gateway Protocol (BGP) is used to exchange routing information between autonomous systems.

An autonomous system is a network or group of networks managed under a common routing policy.

BGP helps large networks, including internet service providers and major organizations, determine how traffic can reach destinations across the internet.

9. The Internet of Things (IoT)

The Internet of Things (IoT) describes physical devices connected to networks so they can collect, exchange, or act on data.

Examples include:

  • Smart home sensors.
  • Industrial monitoring equipment.
  • Connected security cameras.
  • Environmental monitoring devices.
  • Wearable devices.

These devices often communicate with cloud platforms that store information, process data, and provide monitoring or control interfaces.

Networking knowledge is important for IoT because devices need appropriate addressing, connectivity, security, and reliable communication.

10. DNS: The Domain Name System

The Domain Name System (DNS) translates domain names into information that applications can use, including IP addresses.

For example, when a user accesses a website using a domain name, DNS resolution can help determine the IP address associated with that name.

DNS is often described as the internet's phonebook, but it is more accurately a distributed, hierarchical naming system.

It does not store every website in one central location.

How DNS resolution works

Consider a DNS lookup for an address record associated with a domain.

Several components may participate in finding the answer.

1. Recursive resolver

The recursive resolver receives the query on behalf of the client. If it doesn't already have a usable cached answer, it can query other DNS servers to obtain one.

2. Root nameserver

A root nameserver directs the resolver toward the appropriate top-level domain (TLD) nameservers.

3. TLD nameserver

A TLD nameserver directs the resolver toward the authoritative nameservers for the domain.

For example, a .com TLD nameserver can provide a referral for a domain ending in .com.

4. Authoritative nameserver

The authoritative nameserver holds the DNS records for the domain and can return the requested information.

The resolver can then return the answer to the client and cache it when appropriate.

This is a simplified description: the exact process depends on the query, existing cached data, and the DNS configuration.

DNS caching

DNS caching temporarily stores DNS answers so they can be reused for subsequent queries.

If a resolver already has a valid cached answer, it may return that answer without repeating the entire lookup process.

Caching reduces unnecessary queries and can improve response times.

What is DNS Time to Live (TTL)?

A DNS record's Time to Live (TTL) specifies how long a DNS answer can generally remain cached before it needs to be refreshed.

For example, a DNS record with a TTL of 3,600 seconds can ordinarily be cached for up to one hour.

A shorter TTL can allow changes to be reflected sooner after caches expire, but it can also increase DNS query traffic.

A longer TTL can reduce repeated queries, although changes may take longer to be reflected by clients using cached answers.

Important distinction: DNS TTL is different from the TTL field in an IPv4 packet. DNS TTL governs caching time, while IPv4 TTL limits how many router hops a packet can traverse before being discarded.


Conclusion

Computer networking combines several technologies and protocols to enable communication between devices.

Understanding LANs, MAC and IP addressing, routing, packet delivery, TCP/IP, and DNS provides a foundation for troubleshooting connectivity and understanding how applications reach network services.

These concepts also underpin cloud networking, where engineers configure virtual networks, subnets, routing tables, IP addresses, DNS records, and security controls.

A solid understanding of networking fundamentals makes it easier to reason about what happens when a service becomes unreachable, a DNS lookup fails, or traffic cannot reach its destination.

References for Further Reading

Top comments (0)