Basic Network Security Concepts · Topic 2 of 7

Network Addresses, Segmentation and NAT

Learn how IPv4, IPv6 and MAC addresses, CIDR notation, NAT, private and public networks and network segmentation affect the security of a network.

  • 5 min
In a nutshell
  • IPv4 has 32 bit addresses, and IPv6 has 128 bit addresses.
  • A MAC address is a 48 bit local link address, and it can be spoofed.
  • A /24 network has the mask 255.255.255.0.

What it is

Network addresses identify devices, and how you organise them decides what an attacker can reach.

An address tells you where a device sits and who it can talk to. Good address planning lets you separate systems into groups, which limits the damage when one group is attacked.

This page covers the address types, how CIDR describes a network, NAT, and why segmentation is a core security control.

Internetpublic addressespasses throughFirewallNAT and rulesprotectsServersprivate subnetseparate fromStaff PCsprivate subnet

How it works

Addresses work at different layers, and each can be abused or used for protection.

IPv4, IPv6 and MAC addresses

AddressSizeWritten asNotes
IPv432 bitsFour decimal numbers, such as 192.168.1.10Short supply, so NAT is common
IPv6128 bitsEight groups of hex digits, such as 2001:db8::1Very large space, built for growth
MAC48 bitsSix hex pairs, such as aa:bb:cc:dd:ee:01Identifies a network card on the local link

An IP address is logical and can change, and it is used to route traffic between networks. A MAC address is tied to the network interface and is used only on the local network. A MAC address can be changed in software, which is called MAC spoofing, so it is not a reliable proof of identity.

IPv6 has its own security needs. Devices often have IPv6 switched on without anyone planning for it, so firewall rules and monitoring must cover both IPv4 and IPv6.

CIDR notation

CIDR (Classless Inter-Domain Routing) writes an address followed by a slash and the number of bits that belong to the network part.

CIDRSubnet maskUsable hosts
/8255.0.0.0About 16 million
/16255.255.0.065,534
/24255.255.255.0254
/30255.255.255.2522

So 192.168.1.0/24 means the first 24 bits identify the network, and the last 8 bits identify hosts. A longer prefix means a smaller network. Small networks are easier to protect and monitor, which is one reason CIDR matters for security.

Public and private networks

Private addresses are for use inside organisations and are not routed on the internet. The private IPv4 ranges are:

  • 10.0.0.0/8
  • 172.16.0.0/12
  • 192.168.0.0/16

Public addresses are unique on the internet and can be reached from outside. Systems on public addresses are exposed to scanning and attack all day, so they need careful hardening. Private systems are not directly reachable from the internet, but they are not automatically safe, because an infected device inside can still attack others.

NAT

Network Address Translation (NAT) changes the addresses in packets as they cross a boundary. The usual form lets many private hosts share one public address. When many hosts share one address by using different port numbers, this is often called PAT or NAT overload.

NAT has a useful side effect. Outside hosts cannot start a connection to a private host unless a rule allows it, and internal addresses are hidden from the outside. However, NAT was built to save public addresses, not to be a security tool, so it does not replace a firewall.

Network segmentation

Network segmentation divides a network into smaller zones, with controls between them. The zones can be made with separate subnets, VLANs or physical networks.

Benefits of segmentation:

  • an infection or intruder in one segment cannot freely reach the others
  • sensitive systems, such as payment or HR servers, get stronger rules
  • guest and IoT devices can be kept away from business systems
  • monitoring is simpler, because traffic between segments can be inspected

Segmentation supports defence in depth and the principle of least privilege. Traffic between segments is normally controlled by a firewall or access control list.

What to remember for the exam

Seven facts cover most questions on this topic.

  • IPv4 has 32 bit addresses, and IPv6 has 128 bit addresses.
  • A MAC address is a 48 bit local link address, and it can be spoofed.
  • A /24 network has the mask 255.255.255.0.
  • The private IPv4 ranges are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16.
  • NAT hides internal addresses but is not a replacement for a firewall.
  • Segmentation limits how far an attack can spread.
  • Firewall rules and monitoring must cover IPv6 as well as IPv4.
Exam tip

A longer prefix such as /30 means a smaller network, and a shorter one such as /8 means a larger network.

Common mistakes

These four errors are common.

Treating NAT as a firewall. NAT changes addresses. It does not inspect traffic or decide what is allowed.

Trusting MAC addresses as identity. They can be copied, so use stronger authentication.

Assuming private means safe. A private network still needs controls, because attacks can start from the inside.

Forgetting IPv6. Leaving IPv6 unfiltered can leave a path that the IPv4 rules do not cover.

Watch out

A flat network with no segmentation lets one infected device reach every other device.

Check yourself

Work through these three questions.

  • How many bits are in an IPv4 address and an IPv6 address?

    An IPv4 address has 32 bits and an IPv6 address has 128 bits.

  • Why is NAT not a replacement for a firewall?

    NAT only changes addresses and hides internal hosts. It does not inspect traffic or decide what is allowed.

  • How does segmentation improve security?

    It splits the network into zones with controls between them, so an attack in one segment cannot freely reach the others.

Topic 2 of 7 in Basic Network Security Concepts

Test yourself on Basic Network Security Concepts

The full Cisco CCST 100-160 Cybersecurity question bank has 864 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 Cisco. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.