Day 5 - Network Infrastructure implementations, IPv4, IPv6

Shreyas LadheShreyas Ladhe
12 min read

Design vs Function

When describing a network, you have a couple of different options. Are you going to describe its design or its function?

If you are going to describe the network's design, then the first place to start is to describe its topology (e.g., bus, star, or point-to-point). If you are going to describe the network’s function, then the first place to start is to describe its category or infrastructure implementation.

Categories of Networks

  • Local area network (LAN)

    1. Most LANs are encompassed by a single network address range.

      • The address range may be broken into subgroups.

      • Each of these subgroups is called a virtual local area network (VLAN).

    2. LANs can span from a small area (a single room) to a building or a smail group of buildings.

    3. They tend to be high speed.

    4. 802.3 (Ethernet) and 802.11 (wireless local area network, WLAN) are the most common types of network found in the LAN.

  • Metropolitan area network (MAN)

    1. Is larger than a LAN.

    2. Most often it contains multiple LANs.

    3. They are often owned by municipalities.

    4. When a MAN is owned by a private entity, it is sometimes called a campus area network (CAM).

  • Wide area network (WAN)

    1. A network which spans significant geographic distances.

    2. They can be described as a network of networks.

    3. The best example is the Internet.

    4. As a general rule, if all of the infrastructure implementation has a single owner, then it is not a WAN.

  • Personal area network (PAN)

    1. Extremely distance and size limited.

      • Most often it is a connection between only two devices.
    2. Common examples include:

      • Bluetooth connection between a keyboard and computer.

      • Infrared (IR) connection between a smartphone and a printer.

      • Near field communication (NFC) between a smartphone and a payment terminal.

    3. They tend to provide low throughput of data and have a low power output.

      • As the distance between devices increases, throughput decreases.
  • Supervisory control and data acquisition (SCADA)

    1. A type of industrial control system (ICS) that is designed to control large scale deployments of equipment. The controlled equipment is usually at more than one site.

      • SCADA is often deployed in energy distribution systems by utility companies.
    2. Uses a distributed control system (DCS) to communicate with programmable logic controllers (PLCs) and/or remote terminals to control equipment and processes from a central location.

    3. These systems are often proprietary and often require additional training to understand and operate.

  • Media net

    1. Networks designed and implemented specifically to handle voice and video.

    2. Designed and implemented to remove quality of service (QoS) issues (e.g., latency and jitter) that can occur in other infrastructures.

      • A video teleconference (VTC) network is an example.
    3. It may be implemented as its own infrastructure or as a sub- infrastructure.

Introduction to IPv4

IPv4 address properties

As IPv4 is made up of a 32- bit binary number, there are 232 possible address combinations.

That’s 4,294 967,296 possible combinations. With all of these possibilities, a process needed to be developed to keep everything neat and tidy and, most of all, findable. The implementation of the subnet mask wes the answer.

  • Initial properties of IPv4.

    1. 32-bit binary number.

    2. Divided into four sets of eight (called octets) that are separated by periods (each octet is 8 bits, which is equal to one byte).

    3. Represented in human friendly format by a dotted decimal format.

    4. Requires the use of a mask to determine which portion defines the network and which portion defines the node. This is called the subnet mask.

    5. The subnet mask has the same format as the IP address (32- bits and represented in dotted decimal format).

  • Interaction of IP address and subnet mask

    1. 192. 168.1.9 255.255 255.0

    2. 192 168 19 = the IP address

    3. 255 255 255 0 = the subnet mask.

  • Deconstructing the IP address.

    1. First octet = 11000000 = 192

    2. Second octet = 10101000 = 168

    3. Third octet = 00000001 = 1

    4. Fourth octet = 00001001 =9

  • Subnet mask characteristics.

    1. Anything other than an 0 defines the network address.
  • Network address

    1. The network address = 192.168.1
  • Node address

    1. The node address = 9

Classes of addresses

Internet Protocol v.4 (IPv4) is a binary addressing scheme that is used for networking. It was finalized as a standard in 1981.

IPv4 is a common network addressing scheme that is deployed today There is an issue though because of its structure and the growth in popularity of the Internet, most of the world has run out of assignable IPv4 addresses Thanks to some forethought though, it's still a valid scheme.

  • Class A network address

    1. Address range = 0 to 127 in the first octet.

      • 0.0.0.0 to 127.255.255.255
    2. Binary representation = 0XXXXXXX

    3. Node addresses available = 16,777,214

    4. Subnet mask = 255.0.0.0

  • Class B network address

    1. Address range = 128 to 191 In the first octet.

      • 128.0.0.0 to 191.255.255.255
    2. Binary representation = 10XXXXXX

    3. Node addresses available = 65,534

    4. Subnet mask = 255.255 0.0

  • Class C network address

    1. Address range = 192 to 223 in the first octet.

      • 192.0.0.0 to 223.255.255.255
    2. Binary representation = 110XXXXX

    3. Node addresses available = 254

    4. Subnet mask = 255.255.255.0

  • Class D network address

    1. Address range = 224 to 239 in the first octet.

      • 224.0.0.0 to 239.255.255.255
    2. Binary representation = 1110XXXX

    3. Subnet mask = not defined.

    4. Used for multicast communication.

  • Automatic Private IP Addressing (APIPA)

    1. In some cases the Dynamic Host Configuration Protocol (OHCP) process may fail; in these cases, a node will self configure an APIPA address.

    2. Address range = 168.254 in the first octet.

  • Public IP addresses

    1. Routable

    2. Each must be unique. (For any of you “Highlander” fans out there, remember. “There can only be one.”)

    3. Not flexible; you are assigned to your network space.

  • Private IP addresses

    1. Non-routable

    2. 10.0.0.0 to 10.255.255.255 (1 Class A license).

    3. 172.16.0.0 to 172.31.255.255 (16 Class B licenses).

    4. 192.168.0.0 to 192.168.255.255 (256 Class C licenses).

    5. Highly flexible; you assign the network space.

Classless IPv4 addressing

  • Classes of addresses limited flexibility

    1. First routing protocols required the class structure.
  • Classless addressing

    1. Classless Inter-Domain Routing (CIDR).

    2. Slow the growth of routing tables.

    3. Slow the exhaustion of IPv4 addresses.

    4. Create more flexibility.

      • The subnet mask becomes fluid.
    5. Does not affect the private address space ranges.

    6. Subnetting is now possible and desirable.

  • CIDR notation

    1. 192.168.0.9 255.255.255.0 becomes 192. 168.0.9/24.

    2. 182.168.128.0/23 = subnet mask of 255.255. 128.0

      • Network = 192.168. 128.0

      • Host range = 192.1668.128.1 to 192.168.129.254 (512)

      • Broadcast address = 102.168.120.266

Subnetting IPv4 addresses

  • Subnetting cuts the address space into smaller pieces.

    1. Creates flexibility in network design.

    2. Creates efficiency in address space utilization.

  • Small office network example

    1. 223.15.1.0/24 network = 254 hosts available (hosts can't use 223.15.1.0 of 223. 15.1.255).

    2. All hosts can get to all other hosts.

    3. For security considerations, you want two separate networks.

    4. You could use 223.15.1.0/25 and 223.15.1.128/25 by subnetting the original address as follows:

      • Network 1 host address range: 223.15.1.1 to 223.15. 1.126 (broadcast address ts: 223.15.1.127).

      • Network 2 host address range: 223.15.1.129 to 223.15. 1.254 (broadcast address is: 223.15. 1.255).

Introduction to IPv6

IPv6 is the answer to the question “What do we do about running out of IPv4 addresses?”

Unlike IPv4_ IPv6 will provide enough Internet Protocol (IP) addresses for the foreseeable future Shortly after IPv4's creation and implementation, the Internet Assigned Numbers Authority (IANA) the organization that is tasked with assigning routable IP addresses—realized that the available IPv4 address space would not be enough.

The IANA then set about creating the replacement and started work on IPv5. While working on IPv5, however, the IANA determined that it was not going to be sufficient for the task. They scrapped IPv5 and began working on IPv6. The IANA is confident that IPv6 will function as the replacement of IPv4 for many decades to come.

IPv6 address structure

  • IPv6 works at Layer 3 of the OSI model

    1. Layer 3 of the OSI model is also known as the network layer and its major focus is logical network and host addressing IPv6's job is to provide logical network and host addresses to devices.
  • IPv6 is a 128-bit binary addressing scheme

    1. The 128 bits are grouped together in sets, with each set being separated by a colon.

      • Each set is 2 bytes long (a byte is 8 bits).
    2. For human readability, the binary IPv6 number is converted to hexadecimal (base 16) with each hexadecimal number being equal to 4 bits (which can be referred to as a “nibble” because it Is half of a byte).

      • An IPv6 address is eight sets of four hexadecimal numbers with each set separated by colons.
  • There are over 340 undecillion addresses available to IPv6.

    1. 2128 is roughly equal to 340 x 1036

    2. 340,282,308,020,998,463,463,374,607,431,708,211,456

  • IPv6 local address structure

    1. The first 64 bits represent the local network and the last 64 bits represent the host.

      • The local address structure follows the Extended Unique Identifier (EUL) format EUI-64. The 48-bit MAC address is padded with 16 bits to make it 64 bits in length.
    2. The local address is called the link local address and it always begins with fe80.

  • IPv6 global address structure

    1. The host address is always the last 64 bits.

    2. The network portion is actually composed of the routing prefix and subnet.

      • It follows the Classless Inter-domain Routing (CIDR) convention with the number that follows the slash denoting the routing prefix.

      • The subnet is composed of the bits between the prefix and the EUI-64 host address.

    3. Global IPv6 addresses always begin in the range of 2000 to 3080.

In most cases, the need for Dynamic Host Configuration Protocol (DHCP) has been eliminated.

When implemented, IPv6 will auto configure both the local and global addresses that are required to be unique on the networks. When a device first comes online, it will use Neighbour Discover Protocol (NDP) to discover what the required network addresses are, both the local and global. This allows the device to configure its own IPv6 addresses.

  • IPv6 notation

    1. The 128-bit nature of IPv6 makes it cumbersome to write out and can take up unnecessary space. Because of this, some rules were developed to ease the burden and to save space

      • Leading 0s in a set can be dropped.

      • Any single set of consecutive 0s may be replaced by a double colon.

  • IPv6 notation example

    1. Original address: 2001:0db8:0000:0000:0000:ff00:0042:8329

    2. Drop the leading 0s = 2001:db8:0:0:0:ff00:42:8329

    3. Remove sets of consecutive 0s: 2001:db8::ff00:42:8329

      • Remember, only one set of consecutive 0s may be replaced with the double colon.

      • Even this it's still difficult for us mere mortals to remember, but it is easier to write out and it conserves space.

IPv6 Network Transmissions

  • Unicast

    1. One-to-one communication.

      • A specific device sending network traffic to another specific device.
    2. Unicast can occur on the local network (fe80) or it can occur on the global network (2000 to 3999).

  • Multicast

    1. One-to-a-few communication.

      • A specific device sending network traffic to a specific group of devices that have registered to receive that traffic.
    2. Routers register to receive multicast transmissions that involve the routing protocols they are programmed to use.

      • Multicast addresses always begin with an ff.
  • Anycast

    1. One-to-the-closest communication

      • A specific device sending network traffic to a specific IPv6 address that has been assigned to multiple devices.

      • The router only sends the communication to the closest one.

    2. Involves implementing DHCPv6.

  • DHCPv6

    1. IPv6 is capable of auto-configuring its own local and global addresses.

      • In certain situations, that is not always desirable.
    2. DHCPv6 can be configured to hand out specific IPv6 addresses (or duplicate IPv6 addresses) when necessary.

    3. Useful for when load balancing a network, or for when network redundancy has been created.

Special IP networking concepts

The media access control address

All networking interfaces come with a specified address already configured – the media access control (MAC).

The MAC address is often referred to as the physical address or the burned in address of the interface. While the MAC address may be changed (or spoofed), most often it is set by the manufacturer and never changes.

Switches and other Open Systems Interconnection (OSI) Layer 2 (data link layer) devices rely upon the MAC address in order to get network packets to the correct destinations.

  • MAC address format

    1. MAC addresses come in two basic different formats that are either 48, or 64 bits in length and are represented by hexadecimal numbers.

    2. Both formats can be broken down into two parts: the Organizationally Unique Identifier (OUI) and the Extended Unique Identifier (EUI).

      • The Institute of Electrical and Electronic Engineers (IEEE) assigns all electronics manufacturers their own 24-bit OUI, which makes up the first portion of the MAC.

      • Each manufacturer assigns either a 24-bit or 40-bit EUI to each device that is produced.

    3. Theoretically, no two interfaces will have the same MAC address.

  • EUI-64

    1. IPv6 requires that the node address be in an EUI-64 format.

If the EUI of the interface is only 24-bits in length, it is split into two parts, and 16-bits of padding (fffe) are added to create the EUI-64 format address.

Collision domain vs Broadcast domain

  • Collision domains

    1. An area of the network where network packets can collide.

      • A collision can occur when two devices send packets at the same time
    2. Collision domains are broken up by switches, bridges, and routers.

    3. Collision domains are not broken up by hubs.

  • Broadcast domains

    1. Defined as all the nodes that can be reached by a broadcast transmission.

      • All nodes that can be reached reside in the same network.
    2. Broadcast domains cannot pass routers, so the domain is also defined by the subnet mask (last available address that is allowed by the mask).

  • Special Note

    • Technically, IPv6 does not use broadcast transmissions.

      • IPv6 utilizes multicast instead of broadcast transmissions.

To keep expanding your knowledge base about networking and learning with me. Don't forget to subscribe to my newsletter to receive updates about my new learning everyday. Consider following me on LinkedIn. Want to know more about me!! follow me on Instagram!!

0
Subscribe to my newsletter

Read articles from Shreyas Ladhe directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Shreyas Ladhe
Shreyas Ladhe

I am Shreyas Ladhe a pre final year student, an avid cloud devops enthusiast pursuing my B Tech in Computer Science at Indian Institute of Information Technology Vadodara ICD. I love to learn how DevOps tools help automate complex and recurring tasks. I also love to share my knowledge and my project insights openly to promote the open source aspect of the DevOps community.