IP Subnetting and Related Topics A Tutorial by Chris Uriarte <chrisjur@cju.com> Updated April 2001



Similar documents
Subnetting Examples. There are three types of subnetting examples I will show in this document:

Classless Subnetting Explained

APPENDIX B. Routers route based on the network number. The router that delivers the data packet to the correct destination host uses the host ID.

2.3 IPv4 Address Subnetting Part 2

Activity 6.7.4: IPv4 Address Subnetting Part 2

Classful Subnetting Explained

IT:101 Cisco Networking Academy I Subnetting

Number of bits needed to address hosts 8

Question Question Question EdTech 552: Lab 3 Answer Sheet

Module 4, Assignment 3-2

3201 Computer Networks 2014/2015 Handout: Subnetting Question

Pre-lab Preparation: 1. Read thoroughly and prepare the experiment sheet. 2. You must bring a printed copy of this experiment with you to the lab.

Source net: Destination net: Subnet mask: Subnet mask: Router Hub

Module 10 Subnetting Class A, B and C addresses. Solutions to the Lab Exercises a, b, c and d

TCP/IP Drill Pack. By Donna Warren. Created by Donna P. Warren Revised: 1/2/2012 Page 1 of 19

How to Create Subnets To create subnetworks, you take bits from the host portion of the IP address and reserve them to define the subnet address.

Lab a Basic Subnetting

SYMETRIX SOLUTIONS: TECH TIP April 2014

Seven Steps to Subnetting

Lab IP Addressing Overview


Packet Tracer - Subnetting Scenario 1 (Instructor Version)

Expert Reference Series of White Papers. Simple Tricks To Ace the Subnetting Portion of Any Certification Exam COURSES.

2. What is the maximum value of each octet in an IP address? A. 28 B. 255 C. 256 D. None of the above

examines the ideas related to Class A, Class B, and Class C networks (in other words, classful IP networks).

Subnetting Study Guide

Computer Networks By Bahaa Q. Al-Mussawi Subnetting Basics Reduced network traffic Optimized network performance Simplified management

IP Addressing. and Subnetting. Workbook Version 1.5. Student Name:

IP Subnetting Colin Weaver, ITdojo

Expert Reference Series of White Papers. Binary and IP Address Basics of Subnetting

Type of addressing in IPv4

Lab#2: IP Addressing and Subnetting

Chapter 4 IP Addresses: Classful Addressing

Expert Reference Series of White Papers. Basics of IP Address Subnetting

MEP Y9 Practice Book A

Topics. Subnetting. The Basics of Subnetting Subnet Mask Computing subnets and hosts Subnet Routing Creating a Subnet Example of Subnetting 1/37

Sybex CCENT Chapter 4: Easy Subnetting. Instructor & Todd Lammle

Chapter 5. IPv4 Addresses. TCP/IP Protocol Suite 1 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

CCNA R&S: Introduction to Networks. Chapter 9: Subnetting IP Networks

TCP/IP Cheat Sheet. A Free Study Guide by Boson Software, LLC

SUBNETTING SCENARIO S

Fast and Easy Subnetting. Marc Khayat, Technical Advocacy Team May 2011

Table of Contents 1 IP Addressing Configuration 1-1

Chapter 4. IP Addresses: Classful Addressing

IP Subnetting: Practical Subnet Design and Address Determination Example

Concepts in IP Addressing...

CCNA Tutorial Series SUBNETTING

Advanced Topics: IP Subnetting A WHITE PAPER PREPARED FOR ASPE TECHNOLOGY. toll-free:

ECE 358: Computer Networks. Solutions to Homework #4. Chapter 4 - The Network Layer

IP Networking Part 3- IP Address Management A webinar to help you prepare for the CBNE Certification

Lecture 15. IP address space managed by Internet Assigned Numbers Authority (IANA)

Table of Contents. Cisco IP Addressing and Subnetting for New Users

One of the most important topics in any discussion of TCP/IP is IP. IP Addressing

The Subnet Training Guide

Base Conversion written by Cathy Saxton

You can probably work with decimal. binary numbers needed by the. Working with binary numbers is time- consuming & error-prone.

Guide to TCP/IP, Third Edition. Chapter 2: IP Addressing and Related Topics

Expert Reference Series of White Papers. Solving the Mysteries of Subnetting COURSES.

Binary Numbers. Binary Octal Hexadecimal

Internet Protocol Address

IP Addressing Introductory material.

Everything you wanted to know about using Hexadecimal and Octal Numbers in Visual Basic 6

Lecture 8. IP Fundamentals

Lab Calculating VLSM Subnets

IP Sub Networking Mini Howto

(Refer Slide Time: 02:17)

Expert Reference Series of White Papers. Solving the Mysteries of Subnetting

Part2. Chapter 8. Advanced TCP/IP Network Design - CLASSLESS ADDRESSING AND VARIABLE- LENGTH SUBNET MASKS

IP Addressing and Subnetting for New Users

IP Subnetting for the Masses Or How a 12 year old kid can subnet the most complex network.

Subnetting/Supernetting and Classless Addressing

Section #6: Addressing

IP Addressing A Simplified Tutorial

CONFIGURING TCP/IP ADDRESSING AND SECURITY

IP Subnetting. Subnetting

7 TRANSMISSION CONTROL PROTOCOL/ INTERNET PROTOCOL (TCP/IP)

Networking Basics for Automation Engineers

1. How many unique network IDs are there in class A addresses? # of unique hosts?

Packet Tracer 3 Lab VLSM 2 Solution

Solution Guide Chapter 14 Mixing Fractions, Decimals, and Percents Together

SNMP/HTTP Access Control User Manual

VLSM and CIDR Malin Bornhager Halmstad University

TCP/IP works on 3 types of services (cont.): TCP/IP protocols are divided into three categories:

IP Addressing. IP Addresses. Introductory material.

WHITE PAPER. Understanding IP Addressing: Everything You Ever Wanted To Know

Subnetting. TELE301 Laboratory Manual. 1 In-Class Exercises Subnetting in IPv6... 4

COMPSCI 210. Binary Fractions. Agenda & Reading

Computer Network Foundation. Chun-Jen (James) Chung. Arizona State University

Chapter 19 Network Layer: Logical Addressing 19.1

Lab Calculating VLSM Subnets

IP Addressing and Subnetting. 2002, Cisco Systems, Inc. All rights reserved.

2. IP Networks, IP Hosts and IP Ports

CE363 Data Communications & Networking. Chapter 6 Network Layer: Logical Addressing

Part A:Background/Preparation

Desirable Properties Of An Internet Addressing Scheme

Lecture Computer Networks

IPv4 Addressing Simplified. by Ken Foster B.S. IT Information; Security and Forensics Kaplan University January 23, 2011

Slide 1 Introduction cnds@napier 1 Lecture 6 (Network Layer)

- IPv4 Addressing and Subnetting -

Transcription:

IP Subnetting and Related Topics A Tutorial by Chris Uriarte <chrisjur@cju.com> Updated April 2001 IP Addresses and their Binary Equivalents First and foremost, it s important to understand that every IP address has a binary number equivalent. We use the binary equivalents to compute subnet information. It s very important that you are comfortable with simple binary math, especially binary addition and converting decimal number to their binary equivalents. For example, the IP address 206.20.36.1 has a binary equivalent of: 11001110. 00010100. 00100100.00000001 (11001110 represents 206; 00010100 represents 20; 00100100 represents 36; 00000001 represents 1) We say that each IP address is composed four groups of eight bits, ranging from 00000000 to 11111111 (binary). Therefore, IP addresses fall into the range: 00000000.00000000.00000000.00000000 to 11111111.11111111.11111111.11111111 (binary) or the decimal equivalent: 0.0.0.0 to 255.255.255.255 (in reality, we don t actually assign IP addresses starting or ending with 0 or 255 to s you ll learn a bit more later). IP Address Classes There are three general classes of IP address blocks: Class A - supports 16+ million s on each network Class B - supports 65,000+ s on each networks Class C - supports 254 s on each network Organizations can be assigned classes of IP addresses based on their needs. For example, an organization can be allotted the IP address block of 206.20.36.* (where * represents any valid number), which includes the IP addresses 206.20.36.0 to 206.20.36.255 (256 IP addresses total). The IP block 206.20.36.* is considered a Class C network. As another example, a company may be allotted the IP address block 206.20.*.*, which includes the IP addresses 206.20.0.0 to 206.20.255.255 (65K+ addresses total). 206.20.*.* is considered a class B network. Useable IP Addresses On a Network Although a Class C network contains a total of 256 IP addresses (206.20.36.0 to 206.20.36.255, for example), there are actually only 254 IP addresses that can be assigned to s on the network. This is because there are 2 special IP addresses in each network that cannot be assigned to s.

The Network Address is the first address on a subnet and is essentially used to identify the network (think of it as the name of network). In the Class C network 206.20.36.*, 206.20.36.0 is the network address. The Broadcast Address is the last IP address on a subnet and represents an all s address, utilized to send packets to every on a subnet. In the Class C network 206.20.36.*, 206.20.36.255 is the broadcast address. Therefore, given a subnet that contains a total of N IP addresses, the total number of IP addresses you can assign to s is N-2. Subnetting: Dividing IP Networks Into Smaller Blocks A subnet is a portion of a network that shares a common address component with other portions of the network. On TCP/IP networks, subnets are defined as all devices whose IP addresses have the same prefix. For example, all devices with IP addresses that start with 206.20.36. would be part of the same subnet. Dividing a network, such as a Class B or Class C network, into subnets is useful for security and performance reasons, as well as for reasons of practicality. As noted before, a Class B network contains a total of 65K+ IP addresses, while a Class C network contains 254 IP addresses. Since IP addresses must be assigned to organizations in blocks, what happens if a an organization requires only 500 IP addresses??- too many IP addresses for a Class C network, but far too little addresses to justify the use of an entire Class B network. This is a prime example of why we use bubnetting. In this example, we can divide a Class B network into smaller blocks, or subnets, to accommodate the need of 500 addresses. IP networks are divided into subnets using a subnet mask. A subnet mask is used to determine what subnet an IP address belongs to. An IP address has two components: the network address and the address. For example, consider the IP address 206.20.36.1. Assuming this is part of a Class B network, the first two (206.20) represent the Class B network address, and the second two (36.1) identify a particular on this network. Subnetting enables the network administrator to further divide the portion of the address into two or more subnets. The combination of a network address (explained earlier) and a subnet mask tell us exactly the IP addresses contained within a subnet. For example, the network address 206.30.36.0 with a subnet mask of 255.255.255.0 tells us that the IP addresses in this subnet are 206.20.36.0 to 206.20.36.255. Given the fact that we cannot assign the first address in the block (the network address) or the last address (the broadcast address) to s, the useable IP addresses in this subnet are 206.20.36.1 to 206.20.36.254. The next step is to explain how we actually calculate subnets and subnet masks. Calculating Subnet Information A. Given an IP address and a subnet mask, determine its associated network address. Determining a subnet s network address from an IP address and a subnet mask is quite simple. We simply execute the following steps: 1. Convert both the IP address and subnet mask to their binary equivalents. Line each digit up so they evenly match on paper. We usually place the IP address above the subnet mask. If either 8-bit block does not contain 8 digits, you must pad the front of the 8-bit block with zeros until the block becomes 8 digits. Given the IP address 206.20.36.1 and a subnet mask of 255.255.255.0, we have: IP Address: 11001110.00010100.00100100.00000001

: 11111111.11111111.11111111.11111111 2. Now apply the Bitwise AND operation on each corresponding digit in the IP Address and. The Bitwise AND operation is a function that compares two and returns true, or 1, if both are true. In the binary number world, the Bitwise AND operation produces results according to the chart below: Number 1 Number 2 Bitwise AND Result 0 0 0 0 1 0 1 0 0 1 1 1 So, for this example, we compare each digit in the IP address with the digit directly below it in the subnet mask. If they are both 1, the Bitwise AND result is 1. IP Address: 11001110.00010100.00100100.00000001 : 11111111.11111111.11111111.00000000 Bitwise AND Result: 11001110.00010100.00100100.00000000 3. Finally, convert the Bitwise AND result to from Binary to Decimal format. The example above, gives us the address of 206.20.36.0, which is the network address associated with our IP address and subnet mask above. Example A: Given an IP address of 192.168.14.95 and a subnet mask of 255.255.255.192, what is the network address associated with this subnet? 1. Convert 192.168.14.95 (IP Address) and 255.255.255.192 () to binary: IP: 11000000.10101000.00001110.01011111 Mask: 11111111.11111111.11111111.11000000 2. Perform the Bitwise AND operation between the corresponding digits in each address: IP: 11000000.10101000.00001110.01011111 Mask: 11111111.11111111.11111111.11000000 Bit. AND: 11000000.10101000.00001110.01000000 3. Convert the Bitwise AND result into decimal format to its decimal equivalent of 192.168.14.64 this is the network address. B. Given an IP address or Network Address and a subnet mask, determine the usable IP addresses in the subnet. This scenario is commonly encountered when you know the IP address and subnet mask of a on the network, but are unsure of what IP addresses you can assign to other s on your network. There are several ways to figure out subnet IP address ranges in a Class C network through manual calculations and table lookups. I will demonstrate both methods.

First, let s examine the manual procedure, which, again, utilizes simple binary arithmetic: 1. First, convert each IP address (or network address) into their binary forms. Line each digit up so they evenly match on paper, as we did earlier. Remember, if either 8-bit block does not contain 8 digits, you must pad the front of the 8-bit block with zeros until the block becomes 8 digits. Given the IP address 192.168.14.95 and a subnet mask of 255.255.255.192, we have: IP Address: 11000000.10101000.00001110.01011111 : 11111111.11111111.11111111.11000000 2. Given the IP address and subnet comparison above, we now need to break the IP address bits into a portion and a network portion. You will notice that every subnet mask begins with a series of 1 s. The IP address s bits that correspond to (i.e. are directly above) the subnet mask s 1 s are part of the network portion of the address these are the bits that are common to all s in this particular subnet. The IP address s bits that correspond to the 0 s in the subnet mask are part of the portion of the address these are the bits that uniquely identify each in the subnet. In the example above, I have separated the portion of the addresses from the network portion. The network portion appears in blue, while the portion appears in red. IP Address: 11000000.10101000.00001110.01011111 : 11111111.11111111.11111111.11000000 3. Next, we want to figure out exactly how many IP addresses are in each subnet of this Class C. To do this, we count the number of bits contained in the portion of our address. In the address above, the magic number is 6, since we have 6 bits. We now compute 2 to the 6 th power to determine how many IP addresses are in each subnet: 2 6 = 64 Therefore, each subnet in this class C contains 64 IP addresses. In addition, it is now easy to compute just how many subnets are contained in this Class C, given the subnet mask above. Common sense tells you that if there are 256 IP addresses in a Class C block, you must have (4) blocks of 64 IP addresses. However, you can also count the number of bits in the subnet portion after the last decimal point in the IP address, or subtract your magic number above, 6, from 8 (8 6 = 2). Now we raise 2 to the 2 nd power to get the number 4, which represents the number of subnets in the class C. You may start to notice a pattern here: if you extend the network portion of the address (make the subnet mask larger), you increase the number of subnets in a class C, but decrease the number of IP addresses in each subnet. For example, if we extend the subnet mask one additional bit in the example above, this class C will contain 2 3, or 8, subnets of 32 s. 4. Now that you know that there are 64 s in each subnet of class C 192.168.14.* you can begin to make a chart of the subnet blocks in the class C, keeping in mind that the first IP address in a Class C starts with zero: Subnet Blocks in Class C 192.168.14.* with subnet mask of 255.255.255.192:

192.168.14.0 to 192.168.14.63 192.168.14.64 to 192.168.14.127 192.168.14.128 to 192.168.14.191 192.168.14.192 to 192.168.14.255 Notice that we created 4 subnets containing 64 IP addresses in each. Remember, however, that you can only assign 62 of these addresses to s, as the first and last IP addresses of the subnet are the network address and broadcast address, respectively. Assuming you have a on the network 192.168.14.95, you can see that it falls into the second subnet in this Class C: 192.168.14.64 to 192.168.14.127. Taking away the network and broadcast addresses, this tells you that you can assign any IP address between 192.168.14.65 and 192.168.14.127 to s on your network. The procedure above demonstrates the manual method used to compute subnet IP address ranges. There are, however, freely available charts available in books an on the Internet that will map out subnet IP ranges for each available subnet mask. I have included a chart at the end of this document. Example B: Given and IP address of 206.20.36.1 and a subnet mask of 255.255.255.240, what are valid IP addresses that can be assigned to s on this subnet? 1. Convert 206.20.36.1 (IP Address) and 255.255.255.240 () to binary: IP: 11001110.00010100.00100100.00000001 Mask: 11111111.11111111.11111111.11110000 2. Separate the addresses into network portions and portions: (The network portion is represented in blue, while the portion is represented in red) IP: 11001110.00010100.00100100.00000001 Mask: 11111111.11111111.11111111.11110000 3. Determine the number of s in the subnet by counting the number of bits. There are 4 bits in this address; therefore, there are 2 4, or 16, IP addresses in each subnet in this class C. You can now create a subnet map for the class C 206.20.36.*: 206.20.36.0 to 206.20.36.15 206.20.36.16 to 206.20.36.31 206.20.36.32 to 206.20.36.47 etc. etc. You can now see that the given IP address of 206.20.36.1 falls into the first subnet, which contains the IP addresses 206.20.36.0 to 206.20.36.15. Excluding the network (206.20.36.0) and broadcast (206.20.36.15) addresses, you can assign any address from 206.20.36.1 to 206.20.36.15 to any on this subnet.

Appendix A: IP Address Subnet Chart s 255.255.255.128 1/2 126 0 1-126 128 129-254 s 255.255.255.192 3/4 62 0 1-62 64 65-126 128 129-190 192 193-254 s 255.255.255.224 7/8 30 0 1-31 32 33-62

64 65-94 96 97-126 128 129-158 160 161-190 192 193-222 224 225-254 s 255.255.255.240 15/16 14 0 1-14 16 17-30 32 33-46 48 49-62 64 65-78 80 81-94 96 97-110 112 113-126 128 129-142 144 145-158 160 161-174 176 177-190 192 193-206 208 209-222 224 225-238 240 241-254

s 255.255.255.248 31/32 6 0 1-6 8 9-14 16 17-22 24 25-30 32 33-38 40 41-46 48 49-54 56 57-62 64 65-70 72 73-78 80 81-86 88 89-94 96 97-102 104 105-110 112 113-118 120 121-126 128 129-134 136 137-142 144 145-150 152 153-158 160 161-166 168 169-174 176 177-182 184 185-190 192 193-198 200 201-206 208 209-214 216 217-222 224 225-230 232 233-238

240 241-246 248 249-254 s 255.255.255.252 63/64 2 0 1-2 4 5-6 8 9-10 12 13-14 16 17-18 20 21-22 24 25-26 28 29-30 32 33-34 36 37-38 40 41-42 44 45-46 48 49-50 52 53-54 56 57-58 60 61-62 64 65-66 68 69-70 72 73-74 76 77-78 80 81-82 84 85-86 88 89-90 92 93-94

96 97-98 100 101-102 104 105-106 108 109-110 112 113-114 116 117-118 120 121-122 124 125-126 128 129-130 132 133-134 136 137-138 140 141-142 144 145-146 148 149-150 152 153-154 156 157-158 160 161-162 164 165-166 168 169-170 172 173-174 176 177-178 180 181-182 184 185-186 188 189-190 192 193-194 196 197-198 200 201-202 204 205-206 208 209-210 212 213-214 216 217-218 220 221-222 224 225-226 228 229-230 232 233-234

236 237-238 240 241-242 244 245-246 248 249-250 252 253-254