Create New Article

Wiki Search

Personal tools

Subnetting Explained For CCNA Exam

From Proprofs

Subnetting Explained For CCNA Exam

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


This tutorial is contributed by SemSim CCNA Router Simulator.

Interactive version of this document is available as tutorial at:

Cisco CCNA Subnetting Tutorial - Interactive Version

[edit section] Course Objectives

By the end of the course, you should be able to:

  • define subnet and subnet masks
  • calculate network address
  • define private addressing, and finally,
  • subnet a network, given a scenario.

[edit section] Pre-test

The pre-requisites for the course are:

  • Knowledge of Network
  • TCPIP Protocol
  • IP Address
  • Internet addressing

Adequate knowledge of the above subjects is essential to benefit from the course.

[edit section] Pre-Assessment

Fill in the blank by clicking on the appropriate choice. Once you have finished, click on Submit.

1. _______ is used to identify the destination machine when transmitting data through the internet.

a. IP Address

b. Protocol

c. Subnet

2. A collection of terminals, computers, servers and components that allows easy flow of data and use of resources between one another __________.

a. Subnet

b. Network

c. Gateway

3. The binary value for 128 is ____________.

a. 10000000

b. 10101010

c. 11111111

4. MAC stands for____________.

a. Memory Access Card

b. Media Access Control

c. Macintosh Apple computer

5. NIC stands for____________.

a. Network Interface Card

b. National Informatics Corporation

c. Neutral Integrated Circuit

6. is an example of ___________.

1. Class A

2. Class B

3. Class C

7. ___________ is a default subnet mask for Class A.




8. For an IP address -, the binary value for the network address is___

a. 00001111.00000000.00000000.00000000

b. 0111100.00000000.00000000.00000000

c. 11001100.00000000.00000000.00000000

9. ___________________ is the default mask for Class A network.





10. The maximum decimal value for a byte is 255

a. True

b. False



  • Imagine an organization that has 500 employees connected to a single network.
  • Each employee is assigned a unique IP address.
  • There is no security built in.
  • All the employees use the network for both official and personal use.

The result'

  • Due to heavy transfer of data, the packets become slow resulting in collusion and retransmission.
  • As there is no security, critical data can be accessed by any employee.

This can be avoided by using SUBNET

Let’s see how ..

[edit section] What is a subnet?

A portion of a network

  • which may be a physically independent network or
  • which shares a network address with other portions of a bigger network
  • that uses bits from the host portion of the IP address and reserves them to define a subnet address. The more the subnets, the less the bits available for defining hosts.

[edit section] Why Subnet?

  • To better control network traffic (all nodes on a segment on an Ethernet network view all the packets transmitted by all other nodes on that segment).
  • To allow the flow of network traffic between hosts to be segregated, based on a network configuration.
  • To regulate IP traffic.
  • To improve network security and performance by organizing hosts into logical groups.

[edit section] How to subnet?

  • Routers are used between different networks or subnets to control the flow of data or packets.
  • A Router is a hardware network device that transmits data based on preset conditions of transmission and security.

[edit section] Check your understanding

1. Why do you need subnet?

a. To regulate IP Traffic and improve security

b. To preserve address space

c. To create more IP address

d. All the above

2. Subnets organize the hosts into logical groups.

a. True

b. False

[edit section] SUBNET MASK


There are three default subnet masks•

  • Class A - 11111111.00000000.00000000.00000000•

Represents: Network.Host.Host.Host

  • Class B - 11111111.11111111.00000000.00000000•

Represents: Network.Network.Host.Host

  • Class C - 11111111.11111111.11111111.00000000.

Represents: Network.Network.Network.Host

[edit section] Private Subnets

  • There are three IP network addresses reserved for private networks. and

  • These can be used by anyone setting up internal IP networks such as Labs, Homes, LANs behind a NAT or proxy server or router
  • They are always safe to use because routers on the Internet will never forward packets coming from these addresses.

Check your understanding

1. What is the network address for the IP address




2. What is the default subnet mask for class b address?




3. Which of these is a private IP address?




d: All of the above

[edit section] Customizing Subnets

The TCP/IP packet uses 32 bits to contain the IP address.

  • It is made up of a network and host address (Net ID and Host ID).
  • The more bits used for network address, the fewer remain for hosts.
  • Certain high-order bits identify class types and some numbers are reserved.

Details of the Maximum network & host calculation of this table follow.

The TCP/IP packet uses 32 bits to contain the IP address

Calculating number of subnets & hosts

The number of subnets can be calculated by using the formula (2^n-2) where n = number of masked bits in subnet field n is the number of 1’s in the octet for that class that is available for subnetting.

The number of nodes/hosts can be calculated by using the formula (2^y-2) where y = number of off bits in host field.

Calculating number of subnets & hosts

Class A = Total 24 bits to use for subnetting

Class B = Total 16 bits to use for subnetting

Class C = Total 8 bits to use for subnetting

[edit section] Practical Tips

Broadcast address = the number before the next subnet. It consists of all host bits turned on.

256 - subnet mask = base number or first subnet (add this number to itself to find remaining subnets)

Valid hosts = Numbers between subnets excluding all 0’s and all 1’s


  • Node addresses of all "0"s and all "1"s are reserved for specifying the local network (when a host does not know it’s network address) and all hosts on the network (broadcast address), respectively.
  • This also applies to subnets.
  • A subnet address cannot be all "0"s or all "1"s.
  • This also implies that a 1-bit subnet mask is not allowed.
  • This restriction is required because older standards enforced this restriction.

Check your understanding

1. What is the maximum number of subnets that can be assigned to networks when using the address with a subnet mask of

a. 16

b. 32

c. 30

d. 14

2. Using the address how many subnets and hosts are available?

a. 62 networks and 2 hosts

b. 6 networks and 30 hosts

c. 8 networks and 32 hosts

d. 16 networks and 16 hosts

e. 14 networks and 14 hosts

3. Given an IP address of and a subnet mask of, to which subnet does the host belong?






[edit section] Classless InterDomain Routing - CIDR

[edit section] Disadvantages of ’Classful’ subnet

The classful address system of allocating IP addresses can be very wasteful:

a. If somebody needs more than 254 hosts, were automatically given a class B address block, which consist of 65533 host addresses. Most of them are simply not used.

b. Companies and organizations were allocated Class A address blocks of over 16 million host addresses.

c. Only a tiny percentage of the allocated Class A and Class B address space has ever been actually assigned to a host computer on the Internet.

A Better Alternative

  • By eliminating the Class system, addresses can be conserved.
  • Accurately allocating only the amount of address space that is actually needed to address can avoid space crisis for many years.

[edit section] Supernetting

  • First proposed in the year 1992.
  • The classful subnet masks were extended so that a network address and subnet mask could specify multiple Class C subnets with one address.
  • If the IP networks are contiguous, you may be able to use a supernet.
  • It is the reverse of subnetting.
  • Motivation is that although the Internet is running out of Class B addresses, there are still Class C addresses available. With supernetting it is possible to combine multiple Class C addresses into the equivalent of a Class B.
  • CIDR was invented to keep the Internet from running out of IP addresses.
  • Under CIDR, the subnet mask notation is simplified, listing only 1s bits that start the mask.
  • The use of a CIDR notated address is the same as for a Classful address. Classful addresses can easily be written in CIDR notation (Class A = /8, Class B = /16, and Class C = /24).

Example If I need about 1000 addresses, I could supernet 4 Class C networks together:

CIDR notation

  • Instead of writing the address and subnet mask as and respectively, the network address can be written simply as
  • Such a number indicates starting address of the network, and number of 1s bits (22) in the network portion of the address.
  • Look at the subnet mask in binary to see how this notation works. 11111111.11111111.11111100.00000000


  • Currently, it is almost impossible for an individual or company to be allocated their own IP address blocks.
  • 10 years ago, there were less than 5000 network routes in the entire Internet.
  • Today, there are over 100,000.
  • Using CIDR, the biggest ISPs are allocated large chunks of address space (usually with a subnet mask of /19 or even smaller);
  • The ISP’s customers (often other, smaller ISPs) are then allocated networks from the bigger ISP’s pool.
  • Due to this, all the big ISP’s customers (and their customers, and so on) are accessible via 1 network route on the Internet.

[edit section] Check your understanding

1. What is the total number of hosts in Class B address?

a. 65533

b. 17000

c. 65000

2. What is the total number of network id available in Class A?

a. 1600000

b. 126

c. 255

Answer : B.126

[edit section] Post-assessment

1. What is the network address for a host with the IP address ?


b. 1231.200.8.32





2. If you take a dotted-decimal class A IP address such as and convert the first octet to binary, which of the following is the correct bit pattern for the first octet?

a. 0xxxxxxx

b. 10xxxxxx

c. 110xxxxx

d. 1110xxxx

e. 11110xxx

3. Which of the following hardware devices can be used to segment your network?

a. Repeater

b. Switch

c. Router

d. Media converter

4. Using a Class C address range, your network needs twenty-eight subnets. Which subnet mask should you use?






5. You have been assigned a Class C network address. Your manager has asked you to create 30 subnets with at least 5 hosts per subnet for the different departments in your organization. What should the subnet mask be to create 30 subnets?


b. c.


6. Your ISP has provided you the following Class B network range Which of the following statements is true regarding this network? (Choose any two.)

a. There are 254 usable hosts per subnet

b. There is one usable network

c. There are 255 usable hosts per subnet

d. There are 254 usable subnets

e. There are 30 usable subnets

f. There are 62 usable hosts per subnet.

Answer: A or D

7. Using the following address and subnet mask, what is the total number of networks and the total number of host per network?

a. 1 network with 254 hosts.

b. 2 networks with 128 hosts.

c. 4 networks with 64 hosts.

d. 6 networks with 30 hosts.

8. IP addresses use hierarchical numbering. What portion of the address identifies the network number?

a. Subnet Mask.

b. Dots between octets.

c. Class of first octet.

d. Assignments of DHCP.

e. Address Resolution Protocol.

9. Looking at this address, which one of the following is true?

a. IP, a flooded broadcast.

b. IP, a directed broadcast.

c. IPX, a flooded broadcast.

10. What does ISP stand for?

a. Internet Service for Profit

b. Internet Site Processing

c. Internet Service Provider

11. How many USABLE HOST addresses are available on a class B, unsubnetted network?

a. 2 raised to the 16 power

b. 2 raised to the 14 power

c. 2 raised to the 14 power minus 2

d. 2 raised to the 16 power minus 2

12. How many unique Class B NETWORK addresses are there?

a. 2 raised to the 16 power

b. 2 raised to the 14 power

c. 2 raised to the 14 power minus 2

d. 2 raised to the 16 power minus 2

13. There are ___ bits in an IP address.

a. 4

b. 8

c. 24

d. 32

14. In a Class A address where 4 bits have been borrowed for subnetting, ____ bits are left for host addresses.

a. 24

b. 20

c. 16

d. 4

15. What is the high order bit pattern that all Class B addresses start with in their first octet?

a. 01_ _ _ _ _ _

b. 10_ _ _ _ _ _

c. 1_ _ _ _ _ _ _

d. 0 _ _ _ _ _ _ _

16. Which of the following assists devices on the same network in determining a packet’s final destination?

a. Host ID

b. Host protocol

c. vendor number

d. source IP address

17. What is the broadcast address of the second usable subnet in Class C where 4 bits were borrowed?

a. x.x.x.255

b. x.x.x.47

c. x.x.x.95

d. x.x.x.63

18. Every eight bits in an IP address is referred to as ____ ?

a. Class Address

b. Octet

c. Address group

d. Decimal group

19. The source and destination address appear in an IP packet’s ____

a. Header

b. Footer

c. Field

d. ADRS frame

20. Hosts that reside on a network with the same network ID can communicate directly with each other.

a. True

b. False

21. Given a Class A address that has been subnetted (8 bits borrowed), what is the subnet mask?





22. Using a Class C address you need five subnets with a maximum of 17 hosts on each of these subnets. Which subnet mask would you use?




Top 5 Contributors to this article

UsersArticle Contributions
Jbrown 26 contribs
Debonium231 1 contribs

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