Create New Article

Wiki Search

Personal tools

IP Addressing and Subnetting

From Proprofs

IP Addressing and Subnetting

You are here: Home > Schools > Cisco > CCNA Certification > Wiki Home >CCNA Wiki

Cisco CCNA Study Guide

By Cbrzana

Table Of Contents

IP Addressing and Subnetting

IP Subnetting treats a subdivision of a single Class A, B, or C network as if it were a network itself.

The Boolean AND Operation: Value only equals zero if both values are 1. To find subnet, perform AND on Address and Subnet Mask.


1001 0110 1001 0110 0000 0010 0000 0001

1111 1111 1111 1111 1111 1111 0000 0000

1001 0110 1001 0110 0000 0010 0000 0000

Prefix Notation: Using /8, /16, /24, etc for subnet masks

How Many Hosts/Subnets?

A few following facts need to be kept in mind:

  • The network part of the address is defined by class rules
  • Host is always defined by mask (zeros)
  • Subnet part of the address is what's left over of the 32 bits

For more difficult subnet masks, convert to binary form for easy analysis.

Valid Binary values of Subnet Mask

Decimal Binary
0 0000 0000
128 1000 0000
192 1100 0000
224 1110 0000
240 1111 0000
248 1111 1000
252 1111 1100
254 1111 1110
255 1111 1111

Number of subnets = 2number of subnet bits - 2

Number of hosts per subnet = 2number of host bits - 2

1. Identify the structure of the IP address

2. Identify the size of the network part of the address (Class A, B, or C)

3. Identify the size of the host part of the address based on the # of zeros in the mask

4. Identify the subnet part ( = 32 - # of network bits + number of host bits)

5. Define # of subnets/hosts per subnet.

Finding the Subnet Broadcast Address: Change all host bit values to binary 1s.

Finding the Range of Valid IP Addresses in a subnet: One more than the subnet number - one less than the broadcast address.

  • 1st Valid Address: Copy the subnet number, add 1 to last octet
  • Last Valid Address: Copy the subnet broadcast address, subtract 1 from last octet

Subnet Shortcut

Octet 1 2 3 4 Comments
Address 130 4 102 1  
Mask 255 255 252 0  
Subnet # 130 4 100 0 Magic = 256 - 252 = 4; 25 * 4 = 100, closest multiple <= 102
'1st 'Address 130 4 100 1 Add 1 to 4th octet of subnet
Broadcast 130 4 103 255 Subnet-interesting-octet + magic - 1 (100 + 4 - 1)
Last Address 130 4 103 254 Subtract 1 from 4th octet

Step 1: Create and complete the easy parts of a subnet chart.

  • Create a generic subnet chart
  • Write down the IP address and subnet mask in the 1st two rows
  • Draw a box around the column of the interesting octet
  • Copy the address octets to the left of the line into the final 4 rows of chart

Step 2: Derive the subnet number and the first valid IP address.

  • Write down 0s in the subnet number for the octets to the right of box
  • Find the magic number (256-masks interesting octet)
  • Find the multiple of the magic number that is closest to, but not great than, the address's interesting octet
  • Write down that multiple of the magic number as the value of the subnet
  • To find the first valid IP address in the subnet, copy and add 1 to the 4th octet

Step 3: Derive the broadcast address and the last valid IP address.

  • Write down255s in the broadcast address octets to the right of the line
  • To find the broadcast address's interesting octet value, Subnet number interesting value + magic number -1
  • To find the last valid IP address, copy broadcast - 1 from the 4th octet

What Subnet Masks Meet the Stated Design Requirements?

Plug values into 2x - 2, until the value is at least the number of desired subnets  

(Same for number of hosts)

What are the other Subnet Numbers?

Octet 1 2 3 4
Network Number 130 4 0 0
Mask 255 255 252 0
Subnet Zero 130 4 0 0
'1st 'Subnet        
Next valid subnet        
Skip a lot        
Last subnet        
Broadcast Subnet        

1. Write down the network number and subnet mask in the first two rows of the subnet list chart.

2. Write down the network number in the third row.

3. Do the following two tasks, stopping when the next number that would be written in the interesting column is 256.

a. Copy all three non-interesting octets from the previous line.

b. Add the magic number to the previous interesting octet, and write that down as the value of the octet.

Scaling the IP Address Space for the Internet

CIDR (Classless Interdomain Routing): defined in RFC 1817, aggregates multiple network numbers into a single routing entity. Created to help scalability of Internet routers.

  • Classless view of number is attained (routes subnet/network number)
  • Ignore Class A/B/C rules
  • Allows allocation of a subset of a Class A/B/C network

Private Addressing: When there is no internet connectivity, you can use any IP address you want. Private addresses defined in RFC 1918.

Range of Addresses Class of Networks Number of Networks to A 1 to B 16 to C 256

In order to use private addressing within the intranet, and use the Internet, must use NAT

NAT (Network Address Translation): Defined in RFC 1631, allows a host that doesn't have a valid registered IP to communicate with other hosts through the Internet.

- > To conserve addresses, NAT also uses Port Address Translation (PAT), which "disguises" the port address as well.

Image: Nat.GIF

- > The NAT Router keeps a table entry for every active connection

(private IP and port + translated public I address and port)

- > Can support more than 64,000 connections using one public IP address

IP Version 6 Addressing: Uses a 128-bit address, written in hexadecimal notation. Colon written after every 4 symbols.


Feature IPv4 IPv6
Size of address 32 bits, 4 octets 128 bits, 16 octets
Example address ::FFFF:FFFF:0A13:0101
Number of possible addresses (approx) 232 2128

<<                              Table Of Contents                               Next Page>>>

Top 5 Contributors to this article

UsersArticle Contributions
Jbrown 3 contribs

Home  |  Site Map  |  Contact
Copyright © 2005-2014 - Privacy & Terms