Ipv4 and Ipv6 Subnetting Demo
Total Page:16
File Type:pdf, Size:1020Kb
IPv4 and IPv6 Subnetting Demo Instructor: Networks rely on the use of IP addresses to allow devices to communicate with each other. These addresses are often obtained as a single large block and are given to the organizations that require them. However, a single block of addresses rarely meets the needs of a network and it needs to be segmented in order to better accommodate the network. An IP address is made up of two parts, the address itself and the subnet mask. The subnet mask helps us determine which part of the address defines the network and which part defines the specific host in the network. This is done by comparing the binary bits of the subnet mask to the address itself. Where there is a one in the subnet mask, we are looking at the network portion of the address; where there is a zero, we are looking at the host portion, or the identifier of the specific machine. The subnet can be represented in "CIDR" notation which includes a slash followed by the number of ones, or network bits, in the subnet. So the subnet mask 255.255.255.0 could be shortened to /24 because there are 24 binary ones. Subnets are an effective way to segment a single large network into a Page 1 of 4 group of smaller ones. In IPv4, this concept is fairly simple. A network will be assigned an address block, let's say 192.168.1.0/24. Then, we determine the amount of subnets we need and how many hosts we need in each subnet. For example, we may need two subnets, one with 100 hosts and another with 50. Using the block that we were assigned, we borrow bits from the host portion which creates more subnets and allows us to segment the network even further. IPv6 addresses are similar in that they have a network and host portion. However, they differ in the fact that they are written in hexadecimal, rather than decimal, and are 128 bits long. They have a network prefix which often takes the first 48 bits of the address and the last 64 bits are usually used for the host portion. The 16 bits immediately following the network prefix are used to subnet, allowing for about 64,000 subnets to be created which should be more than enough for any organization. These bits can range anywhere between 0000 to FFFF. In this network, we have one router that will be configured with both IPv4 and IPv6 addresses. Let's begin by configuring IPv4. To assign an address, we have to be in global configuration mode so we'll enter enable, and then configure terminal. Page 2 of 4 Once here, we define the interface that we want to assign this address to. We'll begin with the FastEthernet0/0 interface. Then we use the "IP address" command followed by our IP address and subnet mask to set the address of this interface. We were given the block 1192.168.1.0/24, so we subnetted by borrowing one bit from the host portion which gave us the mask 255.255.255.128 and allows us to have two subnets, each with 128 addresses, of which 126 are usable. This last subnet ended with the address 192.168.1.127 so the next one will start with 192.168.1.128. We will apply this to the FastEthernet0/1 interface. Next, we'll assign two IPv6 addresses to the second network. So we'll enter into the interface, and assign the address with the "IPv6 address" command. This is a fairly typical address that allows for about 64,000 subnets due to the first 48 bits being used for the network and the 16 immediately following it being used to subnet. We could also assign a different, reserved address to another interface. The /96 indicates that the first 96 bits of the address will be used as the network identifier portion. Page 3 of 4 Subnetting plays a vital role in networking because it allows organizations to segment their networks by dividing a once large and uniform block of addresses to a more diverse range of them. These varying ranges can be assigned to different networks that have different needs, therefore making IP addressing a lot more functional. Notices Notices © 2015 Carnegie Mellon University This material is distributed by the Software Engineering Institute (SEI) only to course attendees for their own individual study. Except for the U.S. government purposes described below, this material SHALL NOT be reproduced or used in any other manner without requesting formal permission from the Software Engineering Institute at [email protected]. This material was created in the performance of Federal Government Contract Number FA8721-05-C-0003 with Carnegie Mellon University for the operation of the Software Engineering Institute, a federally funded research and development center. The U.S. government's rights to use, modify, reproduce, release, perform, display, or disclose this material are restricted by the Rights in Technical Data-Noncommercial Items clauses (DFAR 252-227.7013 and DFAR 252-227.7013 Alternate I) contained in the above identified contract. Any reproduction of this material or portions thereof marked with this legend must also reproduce the disclaimers contained on this slide. Although the rights granted by contract do not require course attendance to use this material for U.S. government purposes, the SEI recommends attendance to ensure proper understanding. THE MATERIAL IS PROVIDED ON AN “AS IS” BASIS, AND CARNEGIE MELLON DISCLAIMS ANY AND ALL WARRANTIES, IMPLIED OR OTHERWISE (INCLUDING, BUT NOT LIMITED TO, WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE, RESULTS OBTAINED FROM USE OF THE MATERIAL, MERCHANTABILITY, AND/OR NON-INFRINGEMENT). CERT ® is a registered mark owned by Carnegie Mellon University. 2 Page 4 of 4.