# Internet Protocol Analysis/Subnetting

This lesson continues the Internet layer and looks at subnetworks, Classless Inter-Domain Routing (CIDR), subnetting, and supernetworks. Activities include IPv4 subnetting, and using the Cisco Subnet Game.

## Readings

* Wikipedia: Subnetwork
* Wikipedia: IPv4 subnetting reference
* Wikipedia: CIDR notation
* Wikipedia: Classless Inter-Domain Routing
* Wikipedia: Supernetwork

## Multimedia

* YouTube: Subnetting, Cisco CCNA, Binary Numbers - Part 1
* YouTube: Subnetting, Cisco CCNA, Binary Numbers - Part 2
* YouTube: Subnetting, Cisco CCNA, Binary Numbers - Part 3
* YouTube: Subnetting, Cisco CCNA, Binary Numbers - Part 4
* YouTube: Subnetting Cisco CCNA - Part 1 The Magic Number
* YouTube: Subnetting Cisco CCNA - Part 2 The Magic Number
* YouTube: Subnetting Cisco CCNA - Part 3 The Magic Number
* YouTube: Subnetting Cisco CCNA - Part 4 The Magic Number
* YouTube: Subnetting Cisco CCNA - Part 5 The Magic Number
* YouTube: Subnetting Cisco CCNA - Part 6 The Magic Number

## Activities

* Review Cisco: IP Addressing and Subnetting for New Users.
* Review Understanding TCP/IP addressing and subnetting basics.
* Experiment with an online subnet calculator such as Online IP Subnet Calculator.
* Generate practice subnetting questions using this Subnet Calculator.
* Review EasySubnetting.com subnetting resources.
* Play the Cisco: Subnet Troubleshooting Game.
* Consider situations in which a packet analyzer might be used to troubleshoot subnetting and routing traffic.

## Lesson Summary

* An IP address has two fields, a network prefix and a host identifier.
* The network prefix is identified using CIDR notation.
* In IPv4, the network prefix may also be identified using a 32-bit subnet mask in dotted-decimal notation.
* A network is divided into two or more subnetworks by dividing the host identifier field into separate subnet number and smaller host identifier fields.
* All hosts on a subnetwork have the same network prefix.
* Traffic between subnets is exchanged through a router.
* The first address on any given IPv4 network or subnet is reserved for the network itself.
* The last address on any given IPv4 network or subnet is reserved for broadcast.
* The separation of the network prefix/subnet number from the host identifier is performed by a bitwise AND operation between the IP address and the (sub)network mask.
* The number of subnetworks created by subnetting can be calculated as 2$^n$, where n is the number of bits used for subnetting.
* The number of available hosts on each subnet can be calculated as 2$^n$ -2 ,where n is the number of bits available for the host identifier.
* The goal of Classless Inter-Domain Routing was to slow the growth of routing tables on routers across the Internet, and to help slow the rapid exhaustion of IPv4 addresses.
* Classless Inter-Domain Routing is based on variable-length subnet masking (VLSM), which allows a network to be divided into variously sized subnets, providing the opportunity to size a network more appropriately for local needs.
* The benefits of supernetting are conservation of address space and efficiencies gained in routers in terms of memory storage of route information and processing overhead when matching routes.

## Key Terms
### bitwise AND

    A binary operation that takes two representations of equal length and performs the logical AND operation on each pair of corresponding bits. The result in each position is 1 if the first bit is 1 and the second bit is 1; otherwise, the result is 0.

### CIDR notation

    A compact specification of an Internet Protocol address and its associated routing prefix.

### provider-independent address space

    A block of IP addresses assigned by a regional Internet registry (RIR) directly to an end-user organization.

### routing table

    A data table stored in a router or a networked computer that lists the routes to particular network destinations, and in some cases, metrics (distances) associated with those routes.

### subnet

    A logically visible subdivision of an IP network.

### subnet mask

    A bitmask that encodes the (sub)network prefix length in dotted-decimal notation, starting with a number of 1 bits equal to the prefix length, ending with 0 bits, and encoded in four-part dotted-decimal format.

### subnetting

    The practice of dividing a network into two or more networks.

### supernet

    An Internet Protocol (IP) network that is formed from the combination of two or more networks (or subnets) with a common Classless Inter-Domain Routing (CIDR) prefix.

## Review Questions

Click on a question to see the answer.
* An IP address has two fields, _____. An IP address has two fields, a network prefix and a host identifier.
* The network prefix is identified using _____. The network prefix is identified using CIDR notation.
* In IPv4, in addition to using CIDR notation, the network prefix may be identified using _____. In IPv4, in addition to using CIDR notation, the network prefix may be identified using a 32-bit subnet mask in dotted-decimal notation.
* A network is divided into two or more subnetworks by dividing _____. A network is divided into two or more subnetworks by dividing the host identifier field into separate subnet number and smaller host identifier fields.
* All hosts on a subnetwork have the same _____. All hosts on a subnetwork have the same network prefix.
* Traffic between subnets is exchanged through a _____. Traffic between subnets is exchanged through a router.
* The first address on any given network or subnet is reserved for _____. The first address on any given IPv4 network or subnet is reserved for the network itself.
* The last address on any given IPv4 network or subnet is reserved for _____. The last address on any given IPv4 network or subnet is reserved for broadcast.
* The separation of the network prefix/subnet number from the host identifier is performed by _____. The separation of the network prefix/subnet number from the host identifier is performed by a bitwise AND operation between the IP address and the (sub)network mask.
* The number of subnetworks created by subnetting can be calculated as _____. The number of subnetworks created by subnetting can be calculated as 2$^n$, where n is the number of bits used for subnetting.
* The number of available hosts on each subnet can be calculated as _____. The number of available hosts on each subnet can be calculated as 2$^{n-2}$, where n is the number of bits available for the host identifier.
* The goal of Classless Inter-Domain Routing was to _____. The goal of Classless Inter-Domain Routing was to slow the growth of routing tables on routers across the Internet, and to help slow the rapid exhaustion of IPv4 addresses.
* Classless Inter-Domain Routing is based on _____. Classless Inter-Domain Routing is based on variable-length subnet masking (VLSM).
* The benefits of supernetting are _____. The benefits of supernetting are conservation of address space and efficiencies gained in routers in terms of memory storage of route information and processing overhead when matching routes.

## Assessments

* Lesson Flashcards
* Terms Flashcards
* Quiz