Classless Subnetting: IPv4 & IPv6 CIDR Notation | CompTIA Network+ N10-007 | 1.4c

In this video you will learn about IPv4 & IPv6 CIDR notation for classless subnetting.

CIDR Notation

Classless Inter-Domain Routing (CIDR…also known as prefix notation or slash notation) is a method for allocating IP addresses and for IP routing.  CIDR notation was introduced in 1993 to replace the previous classful network addressing architecture on the Internet.  Its goal was to slow the growth of routing tables on routers across the internet, and to help slow the rapid exhaustion of IPv4 addresses.

IPv4 CIDR Notation

Binary to Decimal Cheat Sheet

Example 1

Class A address:  101.0.0.1

Subnet mask:  255.0.0.0

  • Binary:  11111111.00000000.00000000.00000000
    • 1’s = network bits (8 bits), 0’s = host bits on each network (24 bits)
  • CIDR notation:  /8

Example 2

Class B address:  129.0.0.1

Subnet mask:  255.255.0.0

  • Binary:  11111111.11111111.00000000.00000000
    • 1’s = network bits (16 bits), 0’s = host bits on each network (16 bits)
  • CIDR notation:  /16

Example 3

Class C address:  193.0.0.1

Subnet mask:  255.255.255.0

  • Binary:  11111111.11111111.11111111.00000000
    • 1’s = network bits (24 bits), 0’s = host bits on each network (8 bits)
  • CIDR notation:  /24

Example 4

IPv4 address:  198.0.0.1 /14

Subnet mask:  255.252.0.0

  • Binary:  11111111.11111100.00000000.00000000
    • 1’s = network bits (14 bits), 0’s = host bits on each network (18 bits)
  • CIDR notation:  /14

Example 5

IPv4 address:  201.1.0.0 /21

Subnet mask:  255.255.248.0

  • Binary:  11111111.11111111.11111000.00000000
    • 1’s = network bits (21 bits), 0’s = host bits on each network (11 bits)
  • CIDR notation:  /21

Reverse Example 1

CIDR Notation:  /27

Subnet mask:  11111111.11111111.11111111.11100000

  • 1’s = network bits (27 bits), 0’s = host bits on each network (5 bits)
  • Decimal:  255.255.255.224

Reverse Example 2

CIDR Notation:  /19

Subnet mask:  11111111.11111111.11111000.00000000

  • 1’s = network bits (21 bits), 0’s = host bits on each network (11 bits)
  • Decimal:  255.255.248.0

IPv6 CIDR Notation

An IPv6 address is usually distributed by the Internet Assign Numbers Authority (IANA).  The IANA is responsible for providing address blocks to the Regional Internet Registries (RIRs) who then assign smaller blocks of IPv6 addresses out to Internet Service Providers (ISPs).  From there, the ISP will then assign you (the end user) with an IPv6 address that has a /64 subnet, which you can then further subnet down as needed.

Remember, an IPv6 address is 128 bits long (8 blocks of 16 bits) & the values/numbers are hexadecimal numbers NOT decimal numbers.

Breakdown of an IPv6 address

IPv6 Address: 2500:AAAA:3333:0001:0000:0000:0000:0001

  • Global Routing Prefixes (48 bits)
    • IANA: 2500 (1st block)
    • RIR: AAAA (2nd block)
    • ISP: 3333 (3rd block)
  • Locally assigned by end user (subnet = 16 bits, for creating network IDs)
    • 0001 (4th block)
      • 0002:0000:0000:0000:0001
      • 0003:0000:0000:0000:0001
      • 0004:0000:0000:0000:0001 etc
    • 16 subnet bits = 65,536 total subnets
  • Host ID (Host bits = 64 bits, for assigning IPv6 addresses to devices in network)
    • Host ID:  0000:0000:0000:0001 (last 4 blocks)
    • 2^64 hosts approx. 18 million trillion hosts per subnet
  • Subnet address:  2500:AAAA:3333:0001:0000:0000:0000:0000
    • 2500:AAAA:3333:1:: /64
      • /64 represents the subnet mask portion of this IPv6 address
        • 0000:0000:0000:0000
        • 64 bits = 4 blocks of 16 bits a piece
IPv6 Subnetting Example