Intro

In this lesson, I walk through how IPv4 and IPv6 addressing works you can download the script for this video from above or at the end of the video.

IP Defined

The internet protocol, or IP, operates at the network layer of the OSI model. It enables the internet by ensuring packets successfully locate and travel to their destinations via routing. There are two versions of IP in use IPv4 and IPv6.

IPv4 Structure

An IPv4 address consists of four binary octets for a total of 32 bits. The configuration of the octets determines network address and device address. Beginning at the left, one two or three octets represent a network or network segment, depending on the address class, which I cover in the next slide. Similarly, the device or host addresses begin at the right and move left. As we'll see in upcoming slides, there are two ways that network address and device address are handled: either classful or classless.

IPv4 Classful Addressing

Classes are used in classful routing. Classful routing protocols, as described in the video above, use predefined class assignments to determine which octets to use as the network and host address spaces. This table shows the classes in the octet assignments in classful routing. Reserved addresses are not assigned. Multicast addresses are used to deliver packets to a group with a single transmission. Note that the class used affects the number of host addresses. Let's look at how this works. Let's focus on the classes commonly used in classful routing for assigning addresses to devices. Those are classes A, B, and C. Again each class has a specific address range assigned to it. Class A addresses enable the most host addresses or device addresses per network, and the C class addresses provide the most network addresses. As the number of network addresses needed by an organization increase, the lower the number of host addresses. And the opposite is also true. As the number of required host addresses per network increases, the number of available network addresses falls. Note that there are three address spaces that are private. Private addresses are not routed over the internet. They can only be routed within the organization that assigns them. This contrasts with the remaining address spaces that are known as public addresses. Public addresses can be used internally and are routable. In other words, usable across the internet.

Classful Routing

This is an example of how we use classful network addresses. This router moves packets based on their IPv4 classful addresses. The IT team determined that each network segment would only need 100 or fewer host addresses, so it decided to use a Class C address space. If you remember, the first three octets in a Class C address represent the network or network segment. In this example the network addresses are 191.1.1 through 191.1.4.0. Note the subnet masks used to represent the classes. Subnet masks are used to specify the octets used for the network address by filling those octets with all ones or decimal 255 per octet. The octet with a value of 0 represents the host address space. This is a simple example of classful subnet masks. When we look at classless addressing, we'll see that we can get more granular. When the router sees a packet, it knows it is Class C by looking at the first octet. It then reads the first three octets to determine the network address. It then sends the packet out the interface connected to that network. Again, this is classful routing in which the routing protocol knows the content of the subnet mask because of the value of the first octet.

IPv4 Detailed Breakdown

Before looking at how the now commonly-used classless routing works, we need to further explore a breakdown of an IPv4 address. In this example, I used a private Class C address space. Remember that in classful routing, the subnet mask shown is used by default for Class C addresses. It is displayed in both decimal and binary notation. An important takeaway is that the routing protocol used determines how the router looks at an address. Classful routing protocols do not use customized, or variable-length, subnet masks sent during routing table convergence. Note that 24 bits are used for the Class C subnet mask. Another way to show this address space is 192.168.0.0/24, With 24 being the number of bits used for the network address. Further, the network of segments in this address range can only contain 256 hosts. Now let's look at how subnet masking works in classless routing.

IPv4 Classless Addressing

In this example, it determined IT needed more than 256 hosts in a network, but team members still wanted to use the private address space 192.168. Because they were using classless routing protocols, they knew that, unlike classful routing, the subnet mask is sent along with the network addresses during topology convergence. So they were able to move the least significant bit in the third octet to the host address space to create a variable-length subnet mask, or VLSM.

CIDR Notation

They did this by using CIDR notation. CIDR notation places a slash after the address, followed by the number of bits in the network address space. They can now place up to 512 hosts on a network segment. You can determine classless masking requirements by using the CIDR to IPv4 conversion tool at the address shown.

IPv6

Now let's look at IPv6. IPv6 was needed because of the expected saturation of the IPv4 address space. In other words, we were running out of IPv4 addresses, which we did in 2011. While IPv4 supports a global 4.3 billion addresses, or 4.3 times 10 to the 8th, IPv6 supports over 340 undecillion, or 340 times 10 to the 36th. This table shows some basic differences between IP4 and IP6. In addition, IPv6 is considered more secure. For the purposes of this lesson, I focus on IPv6 unicast addressing, or addressing for specific hosts. This table shows how an IPv6 address is broken down. The routing prefix is used for general routing over the internet. Values here are not available for manipulation by an organization setting up its network topology. Bits in the subnet ID field are allocated to individual organizations, usually by an ISP. They are used to break up the organization's network into network segments. The interface identifier is used to provide a unique address to a network interface. Each interface is associated with a single device on each subnet. This is an example of an IPv6 address. Each character in the address is a hexadecimal value, values 0 through F. This lesson is intended to only familiarize security analysts and managers with IP addressing techniques, Cisco publications and other resources provide much more detailed explanations for network engineers. IPv4 is slowly disappearing from general use as older routers, switches, and other devices are replaced. As this happens, IPv6 will take over most or all IP addressing needs of an organization. In many organizations, this is already the case. Well, that's it for this lesson. If you have questions please ask. ...and until next time be careful once you click.