Week 1 · Lesson 4

Internet Protocol Version 4 (IPv4) — Part 1

Every packet on the Internet carries a 32-bit IPv4 address. This lesson takes that address apart: the four octets, the dotted-decimal notation, and the binary arithmetic you must be able to do on paper without a calculator.

CCNA 200-301 Domain 1.6 · IPv4 Addressing Verified 2026-10-11
Part 1

Why do we need addresses?

A network moves data between hosts. For a message to arrive at the correct destination, and for the reply to come back, every host needs a unique way to be identified on its network. IPv4 provides that identity as a logical address — logical because it is assigned by software or an administrator and can change, unlike the permanent MAC address burned into the network card.

IP addressing lives at the Network layer (Layer 3) of the OSI model. A router reads the IPv4 address to decide where to forward a packet, and this is exactly what lets a packet cross from one network to another, all the way across the Internet. The rules that define the format are specified in RFC 791, the original 1981 standard for the Internet Protocol.

Definition — IPv4 address. An IPv4 address is a 32-bit logical address assigned to a host interface. It is written as four decimal numbers separated by dots, e.g. 192.168.10.42, and identifies the host within the Layer 3 network.
Part 2

The 32-bit address and dotted-decimal notation

An IPv4 address is exactly 32 bits long. A bit is one binary digit, either 0 or 1. Thirty-two bits give a theoretical address space of 232 = 4,294,967,296 unique addresses. That sounds huge, but it is the very shortage of these addresses that drove the design of private addressing (Lesson 5) and, later, IPv6.

The 32 bits are divided into four equal groups of 8 bits. Each group is called an octet (from “octo”, eight). Because 8 bits can represent 28 = 256 different values, each octet ranges from 0 to 255. That is the single most important range fact in IPv4.

Exam tip. Remember 32 bits = 4 octets = 8 bits each, and every octet is 0–255. If an option lists an address containing 256 or 300, it is invalid — a classic distractor.

Writing 32 ones and zeros every time would be unreadable, so IPv4 uses dotted-decimal notation: each 8-bit octet is converted to its decimal value, and the four decimal numbers are separated by dots. The address 11000000.10101000.00001010.00101010 in binary becomes 192.168.10.42 in dotted-decimal. Both forms describe the same address; they are just two encodings of the same 32 bits.

Dotted-decimal: 192 . 168 . 10 . 42 192 168 10 42 . . . 11000000 10101000 00001010 00101010 Octet 1 Octet 2 Octet 3 Octet 4 Place value of each bit inside an octet: 128 64 32 16 8 4 2 1
Is this address valid? · type one in

Part 3

Octets and place values

Inside an octet, every bit position has a fixed place value, doubling from right to left, exactly like the decimal hundreds/tens/units idea but in base 2. The eight place values are:

Bit position:   1    2    3    4    5    6    7    8
Place value:  128   64   32   16    8    4    2    1

To read an octet, add up the place values wherever a 1 appears; ignore the positions holding a 0. If every bit is 1 the sum is 128+64+32+16+8+4+2+1 = 255; if every bit is 0 the value is 0. That is why an octet can never exceed 255.

Toggle the bits · watch the value

Part 4

Binary and decimal conversion

You must be able to convert an octet both ways by hand. Both directions use the same eight place values.

Binary → decimal

Convert 11000000 to decimal. Write the place values above the bits and add the ones that are set:

Place value:  128  64  32  16   8   4   2   1
Binary bit:     1   1   0   0   0   0   0   0
Included:     128+ 64 = 192
Result:       11000000 = 192

Now convert 00101010:

Place value:  128  64  32  16   8   4   2   1
Binary bit:     0   0   1   0   1   0   1   0
Included:      32 + 8 + 2 = 42
Result:       00101010 = 42

Only the positions marked with a 1 are added. 00101010 has ones at the 32, 8 and 2 positions, giving 32 + 8 + 2 = 42. Always confirm your answer is between 0 and 255.

Decimal → binary

Going the other way, subtract the largest place value that still fits, then repeat with the remainder. Convert 173:

Place values: 128  64  32  16   8   4   2   1
173 - 128 = 45   -> 128 bit = 1
 45 -  32 = 13   ->  64 bit = 0,  32 bit = 1
 13 -   8 =  5   ->  16 bit = 0,   8 bit = 1
  5 -   4 =  1   ->   4 bit = 1
  1 -   1 =  0   ->   2 bit = 0,   1 bit = 1

Binary: 10101101
Check:  128 + 32 + 8 + 4 + 1 = 173  (correct)
Method. For decimal→binary, walk the place values left to right (128, 64, 32, …). If the value fits, write 1 and subtract it; if it does not fit, write 0 and move on. When you reach the end the remainder must be 0.
Decimal to binary · drag the value
Value:

Part 5

A conversion table

Learn the patterns rather than memorising every value. The table below shows the octets you will meet most often, with the arithmetic spelled out:

DecimalBinaryWorking (set place values)
000000000none
1000000011
10000010108 + 2
420010101032 + 8 + 2
16810101000128 + 32 + 8
19211000000128 + 64
22411100000128 + 64 + 32
24011110000128 + 64 + 32 + 16
25411111110128 + 64 + 32 + 16 + 8 + 4 + 2
25511111111128 + 64 + 32 + 16 + 8 + 4 + 2 + 1
Note. Binary in this course is written as plain eight-digit groups (for example 11000000). Some programming contexts prefix a binary literal with 0b, so 0b11000000 is the same value 192. The 0b prefix is just a label meaning “this is binary”.
Part 6

Reading a full address

Put it together for 192.168.10.42. Set each octet below and watch the table convert the whole address, octet by octet.

Read a full address · set each octet
OctetDecimalBinaryWorking

The full 32-bit binary form of 192.168.10.42 is 11000000.10101000.00001010.00101010. Notice how the dots fall every eight bits, which is why the decimal dots and the binary dots line up. This skill — converting an address both ways — is the mechanical foundation for everything that follows: masks, subnets, and the AND operation in Lesson 7.

Part 7 · Your turn

Review

Check what you have learned with these review questions.

Review · 6 questions

Sources

Sources & references

  1. Postel, J. RFC 791: Internet Protocol (1981). The IPv4 address format. rfc-editor.org/rfc/rfc791.
  2. Braden, R. RFC 1122: Requirements for Internet Hosts — Communication Layers (1989). rfc-editor.org/rfc/rfc1122.
  3. Rekhter, Y. et al. RFC 1918: Address Allocation for Private Internets (1996). rfc-editor.org/rfc/rfc1918.
  4. Arkko, J., Cotton, M. & Vegoda, L. RFC 5737: IPv4 Address Blocks Reserved for Documentation (2010). rfc-editor.org/rfc/rfc5737.
  5. Cotton, M. & Vegoda, L. RFC 5735: Special Use IPv4 Addresses (2010). rfc-editor.org/rfc/rfc5735.
  6. Cheshire, S., Aboba, B. & Guttman, E. RFC 3927: Dynamic Configuration of IPv4 Link-Local Addresses (2005). rfc-editor.org/rfc/rfc3927.
  7. Weil, J. et al. RFC 6598: IANA-Reserved IPv4 Prefix for Shared Address Space (2012). rfc-editor.org/rfc/rfc6598.
  8. IANA. IPv4 Special-Purpose Address Registry. iana.org.
  9. Cisco. CCNA (200-301) Exam Topics, Network Fundamentals (IP addressing). cisco.com.

Target exams: CCNA 200-301 v1.1 · CyberOps Associate 200-201. Last content verification: 2026-10-11.