Training / Certifications / CompTIA Network+ / IPv4 Addressing: Public, Private and Classes

CompTIA Network+ (N10-009) · Lesson 12

IPv4 Addressing: Public, Private and Classes

Tell public from private (RFC 1918) IPv4 addresses, recognize APIPA and loopback addresses and what they mean, and identify an address's class (A to E) and default mask from its first octet.

Domain 1.0: Networking Concepts (23%)Objective 1.7About 5:32CaptionsStatic view for reduced motion
Lesson 12: IPv4 addressing Illustrative example: addresses are samples Anatomy of an IPv4 address192.168.1.20192110000008 bits168101010008 bits1000000018 bits20000101008 bits32 bits = 4 octets, written in dotted decimalNetwork part: 192.168.1Host: 20Example with a /24 mask (subnet masks: lesson 13)Each octet holds a value from 0 to 255Public addresses: reachable from anywhereCustomerInternetStore web server203.0.113.10Who hands out public addressesIANAglobal poolRIRe.g. ARINISPproviderStoreone addressGlobally unique: no two networks may share onePrivate addresses: RFC 1918192.168.1.10192.168.1.11192.168.1.12NATRouter203.0.113.5InternetBlockRangeFalls in10.0.0.0/810.0.0.0 – 10.255.255.255class A172.16.0.0/12172.16.0.0 – 172.31.255.255class B192.168.0.0/16192.168.0.0 – 192.168.255.255class CReused inside every organizationAPIPA: 169.254.0.0/16LaptopDHCP request…DHCP serverno replyAssigns itself169.254.37.12Neighbor169.254.80.4same link: worksRouterwon't forward itLoopback: 127.0.0.1 (localhost)Your computerTraffic loops backinside the host(never on the wire)> ping 127.0.0.1Reply from 127.0.0.1: time<1mslocalhost is the name for 127.0.0.1The whole 127.0.0.0/8 block is loopbackIPv4 address classesABCDE0128192224240255Class by the value of the first octetClass1st octetFirst bitsDefault maskHosts eachA1–1260/8 255.0.0.016,777,214B128–19110/16 255.255.0.065,534C192–223110/24 255.255.255.0254127 is set aside for loopback, 0 for “this network”Usable hosts = 2^(host bits) − 2CIDR (1993) replaced classful addressingClass1st octetFirst bitsUsed forD224–2391110Multicast: one to a groupE240–2551111Experimental (reserved)No default mask: never assigned to a single host255.255.255.255 = limited broadcast(all hosts on the local network)Identify the address10.4.0.7Private, class A172.32.1.1Public, class B169.254.10.3APIPA: no DHCP192.168.50.5Private, class C224.0.0.5Multicast, class DThe format32 bits in four octetsDotted decimal: 192.168.1.20Each octet: 0 to 255Network part + host partThe mask marks where thenetwork part endsExam clueOctet = 8 bits;address = 32 bitsPublic addressesGlobally uniqueRoutable on the internetIANA → regional registries(RIRs) → ISPs → youFive RIRs, e.g. ARIN, RIPE NCCNeeded for internet-facingserversExam clueReachable from the internet= public addressPrivate (RFC 1918)10.0.0.0/8172.16.0.0/12 (172.16–172.31)192.168.0.0/16Free to reuse in any networkNot routed on the internetNAT shares a public address(NAT: lesson 18)Exam clue172.16 to 172.31 only:172.32.x.x is publicAPIPAAutomatic Private IP AddressingSelf-assigned when DHCP fails169.254.0.0/16 (link-local)Talks only on the local linkRouters never forward itClue: check the DHCP serveror the path to itExam clueUser has 169.254.x.x andno internet = DHCP problemLoopback / localhost127.0.0.0/8 is reserved127.0.0.1 = localhostNever leaves the hostping 127.0.0.1 tests thecomputer's own TCP/IP stackIPv6 loopback: ::1Exam clueTest the local TCP/IPstack = ping 127.0.0.1Classes A, B, CSet by the first octetA: 1–126, default /8B: 128–191, default /16C: 192–223, default /24Fewer networks, more hostsas you go from C to AExam clueFirst octet 150 =class B, mask /16Classes D and ED: 224–239, multicast(routing updates, video)E: 240–255, experimentalNeither is given to a hostClasses still name ranges,but CIDR sets real masksExam clue224–239 = multicast(class D)How to decideCheck the special blocks first:127, 169.254, RFC 1918Then read the first octetfor the class172.16–172.31 is private;other 172s are publicExam clueSpecial block first,then the classPublic vs. privatePublic: unique on theinternet. Private:RFC 1918 rangesSpecial addressesAPIPA when DHCPfails; loopback fortesting the hostAddress classesA to E by the firstoctet, with defaultmasksObjective 1.7: given a scenario, use appropriate IPv4 network addressingSubnetting with CIDR and VLSM is the next lessonIf the question says……think“Host has 169.254.x.x and can't reach the internet”APIPA: DHCP failed“Test the local TCP/IP stack”ping 127.0.0.1“Address in 10.x, 172.16–31.x or 192.168.x”Private (RFC 1918)“Needs to be reachable from the internet”Public address“First octet 224 to 239”Class D multicast“First octet 128 to 191”Class B, /16“Experimental, 240 and above”Class EPublic vs. privatePublic: globally uniquePrivate: 10/8,172.16/12, 192.168/16NAT links the twoSpecialAPIPA: 169.254.x.x,DHCP failedLoopback: 127.0.0.1,tests the hostClassesA 1–126 (/8)B 128–191 (/16)C 192–223 (/24)D multicast, E reservedCheck the special blocks first, then read the first octet for the class.

Tip: turn your phone sideways or use full screen for larger labels.

Captions match the narration word for word. Press Space to play or pause and the arrow keys to change scenes.

Learning objective

Tell public from private (RFC 1918) IPv4 addresses, recognize APIPA and loopback addresses and what they mean, and identify an address's class (A to E) and default mask from its first octet.

Exam mapping

Domain 1.0: Networking Concepts (23%). Objective 1.7 in the official N10-009 exam objectives.

Key takeaways

  • An IPv4 address is 32 bits written as four octets in dotted decimal (each 0-255); the mask splits it into a network part and a host part.
  • Public addresses are globally unique and routable on the internet; IANA allocates them to the five regional internet registries, which pass them to ISPs and organizations.
  • RFC 1918 private ranges are 10.0.0.0/8, 172.16.0.0/12 (172.16.0.0-172.31.255.255) and 192.168.0.0/16. They are reused everywhere, not routed on the internet, and reach it through NAT.
  • APIPA (link-local) addresses come from 169.254.0.0/16 when a host can't get a DHCP lease; they work only on the local link because routers never forward them.
  • 127.0.0.0/8 is loopback: 127.0.0.1 (localhost) never leaves the host, so pinging it tests the local TCP/IP stack. IPv6 loopback is ::1.
  • Classes by first octet: A 1-126 (/8), B 128-191 (/16), C 192-223 (/24), D 224-239 (multicast), E 240-255 (experimental). CIDR replaced classful assignment in 1993.

Exam tips

How the exam asks about this

Questions describe a situation and expect you to recognize the concept behind it.

If the question mentions…Think
Host has a 169.254.x.x address and no internet accessAPIPA: the DHCP server couldn't be reached
Verify the local TCP/IP stack worksping 127.0.0.1 (localhost)
Addresses reusable in any company, not routed on the internetPrivate (RFC 1918)
172.16.0.0 to 172.31.255.255Private, the 172.16.0.0/12 block
Web server that customers on the internet must reachPublic address
First octet 224 to 239Class D (multicast)
Default mask 255.255.0.0, first octet 128 to 191Class B
First octet 240 to 255Class E (experimental)

Common traps

  • Only 172.16.x.x to 172.31.x.x is private. 172.32.0.1 or 172.15.0.1 is a public address.
  • 169.254.x.x is not one of the RFC 1918 ranges: it is APIPA (link-local), and it points to a DHCP problem, not a working private network.
  • 127.x.x.x is not class A for hosts: the whole 127 block is loopback, so class A hosts use 1 to 126.
  • 100.64.0.0/10 is shared address space used by carrier-grade NAT (RFC 6598), not an RFC 1918 private block.

Practice

Exam-style questions

Answer each one before you open the explanation.

Question 1. A user reports no internet access. The laptop shows the address 169.254.48.20 with a 255.255.0.0 mask. What is the most likely cause?

  1. The laptop has a duplicate public address
  2. The laptop could not reach a DHCP server
  3. The router is translating the address with NAT
  4. The laptop is using a class D multicast address
Show answer

B. The laptop could not reach a DHCP server. 169.254.0.0/16 is the APIPA (link-local) range, which a host assigns itself when it can't get a DHCP lease. It is not an RFC 1918 range translated by NAT, and multicast addresses start at 224.

Question 2. Which TWO addresses are private RFC 1918 addresses? (Select TWO.)

  1. 172.20.14.1
  2. 172.33.0.10
  3. 192.168.200.5
  4. 169.254.1.1
  5. 11.0.0.1
Show answer

A. 172.20.14.1 and C. 192.168.200.5. 172.20.14.1 falls inside 172.16.0.0-172.31.255.255, and 192.168.200.5 is inside 192.168.0.0/16. 172.33.0.10 is outside the 172.16/12 block, 169.254.1.1 is APIPA (link-local), and 11.0.0.1 is public.

Question 3. A technician wants to confirm that a computer's TCP/IP stack is working, without involving the network. Which address should the technician ping?

  1. 192.168.1.1
  2. 255.255.255.255
  3. 224.0.0.1
  4. 127.0.0.1
Show answer

D. 127.0.0.1. 127.0.0.1 (localhost) is the loopback address: traffic to it never leaves the host, so a reply proves the local stack works. 192.168.1.1 would test the network path, 255.255.255.255 is the limited broadcast, and 224.0.0.1 is multicast.

Question 4. Using classful rules, which class and default mask apply to the address 150.12.8.1?

  1. Class A, 255.0.0.0
  2. Class B, 255.255.0.0
  3. Class C, 255.255.255.0
  4. Class D, no default mask
Show answer

B. Class B, 255.255.0.0. A first octet from 128 to 191 is class B, whose default mask is 255.255.0.0 (/16). Class A ends at 126 (127 is loopback), and class C starts at 192.

Question 5. A network engineer sees traffic to 239.1.1.5 on the network. What kind of address is this?

  1. A class E experimental address
  2. An APIPA address
  3. A class D multicast address
  4. A public class C host address
  5. A loopback address
Show answer

C. A class D multicast address. First octets 224 to 239 are class D, used for multicast groups. Class E begins at 240, and class C hosts end at 223.

Transcript

Lesson transcript

The full narration, scene by scene. The captions file contains the same text with timings.

Scene 1 · 0:00

Lesson 12: IPv4 addressing. Welcome to lesson twelve. Objective 1.7 asks you to use appropriate IPv4 addressing in a given scenario. We'll cover three ideas. Public and private addresses, including the private ranges defined in RFC 1918. Two special addresses you'll meet when troubleshooting: APIPA and loopback. And the address classes, A through E, which the exam still expects you to know. Subnetting with CIDR and VLSM comes in the next lesson.

Scene 2 · 0:30

Anatomy of an IPv4 address. First, what an IPv4 address is. It's a 32-bit number, written as four octets of eight bits each, in dotted decimal. So each octet holds a value from 0 to 255. Take 192.168.1.20, one of our online store's office computers. Part of the address identifies the network, and the rest identifies the host on that network. With the /24 mask shown here, the first three octets are the network and the last octet is the host.

Scene 3 · 1:02

Public addresses. The store's website must be reachable by customers anywhere, so its web server needs a public address. Public addresses are globally unique and routable across the internet. They're handed out in a chain. IANA allocates large blocks to the five regional internet registries, such as ARIN in North America and RIPE NCC in Europe. The registries assign blocks to internet providers and large organizations, and the provider gives the store its addresses.

Scene 4 · 1:34

Private addresses: RFC 1918. The office computers don't need to be reachable from the internet, so they use private addresses. RFC 1918 sets aside three blocks: 10.0.0.0/8, 172.16.0.0/12, which runs from 172.16 to 172.31, and 192.168.0.0/16. Any organization can reuse them, but they're not routed on the internet. To get online, the router uses network address translation, or NAT, to share a public address. You'll study NAT in lesson eighteen.

Scene 5 · 2:03

APIPA: when DHCP fails. Normally a laptop gets its address from a DHCP server. But what if the server doesn't answer? Most client operating systems then assign themselves an address from 169.254.0.0/16. That's Automatic Private IP Addressing, or APIPA, also called link-local addressing. The laptop can talk to neighbors on the same link that did the same, but routers never forward these addresses, so there's no internet. A 169.254 address is a classic clue: check DHCP.

Scene 6 · 2:34

Loopback: testing the host itself. The entire 127 block is reserved for loopback. The best-known address is 127.0.0.1, which has the name localhost. Traffic sent to it never leaves the computer: the operating system loops it straight back. So if you ping 127.0.0.1 and get a reply, the computer's own TCP/IP stack is working, even with the cable unplugged. In IPv6, the loopback address is colon colon one.

Scene 7 · 3:02

Classes A, B and C. Before 1993, addresses were split into classes, and you can tell the class from the first octet. Class A runs from 1 to 126 and uses a default mask of /8, giving a few huge networks. Class B runs from 128 to 191, with a /16 mask. Class C runs from 192 to 223, with a /24 mask and 254 usable hosts per network. 127 is missing from class A because it's reserved for loopback.

Scene 8 · 3:34

Classes D and E. The last two classes aren't for ordinary hosts. Class D, from 224 to 239, is multicast: one sender reaches a whole group of receivers, as routing protocols and video streams do. Class E, from 240 to 255, is reserved as experimental. Neither class has a default mask. One special address sits at the very top: 255.255.255.255 is the limited broadcast, which reaches every host on the local network.

Scene 9 · 4:04

Identify the address. Let's practice. Check the special blocks first, then read the first octet. 10.4.0.7 is private, in class A. 172.32.1.1 is a trap: private stops at 172.31, so this one is public, class B. 169.254.10.3 is APIPA, meaning DHCP failed. 192.168.50.5 is private, class C. And 224.0.0.5 starts with 224, so it's class D multicast. With a little practice, each one takes just a few seconds.

Scene 10 · 4:32

How the exam asks about this. On the exam, match the clue to the answer. A host with a 169.254 address and no internet means APIPA: DHCP failed. Testing the local TCP/IP stack means pinging 127.0.0.1. Addresses in 10, 172.16 to 31, or 192.168 are private. A server that must be reachable from the internet needs a public address. A first octet from 224 to 239 is class D multicast, and 128 to 191 is class B.

Scene 11 · 5:03

Recap: IPv4 addressing. To recap: an IPv4 address is 32 bits in four octets. Public addresses are globally unique; private RFC 1918 addresses are 10/8, 172.16/12 and 192.168/16, and reach the internet through NAT. A 169.254 address means APIPA, so DHCP failed, and 127.0.0.1 is loopback. Classes A, B and C have default masks of /8, /16 and /24. Next, we'll learn to split networks with subnetting, CIDR and VLSM.

Download captions (WebVTT)

Sources and accuracy

Checked against the official CompTIA N10-009 exam objectives and the standards below on October 24, 2026. Diagrams and addresses in the animation are illustrative.

This free course is independent and isn't affiliated with or endorsed by CompTIA. CompTIA and Network+ are trademarks of CompTIA, Inc.

Preparing a team for Network+?

I run hands-on networking and cloud training for teams, built around your own environment and goals.