Day 5 - Network Infrastructure implementations, IPv4, IPv6
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)
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).
LANs can span from a small area (a single room) to a building or a smail group of buildings.
They tend to be high speed.
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)
Is larger than a LAN.
Most often it contains multiple LANs.
They are often owned by municipalities.
When a MAN is owned by a private entity, it is sometimes called a campus area network (CAM).
Wide area network (WAN)
A network which spans significant geographic distances.
They can be described as a network of networks.
The best example is the Internet.
As a general rule, if all of the infrastructure implementation has a single owner, then it is not a WAN.
Personal area network (PAN)
Extremely distance and size limited.
- Most often it is a connection between only two devices.
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.
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)
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.
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.
These systems are often proprietary and often require additional training to understand and operate.
Media net
Networks designed and implemented specifically to handle voice and video.
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.
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.
Converting binary to decimal
It's very useful to understand how to convert binary (base 2) to decimal (base 10).
- http://www wikihow.com/Convert-from-Binary-to-Decimal.
Initial properties of IPv4.
32-bit binary number.
Divided into four sets of eight (called octets) that are separated by periods (each octet is 8 bits, which is equal to one byte).
Represented in human friendly format by a dotted decimal format.
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.
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
192. 168.1.9 255.255 255.0
192 168 19 = the IP address
255 255 255 0 = the subnet mask.
Deconstructing the IP address.
First octet = 11000000 = 192
Second octet = 10101000 = 168
Third octet = 00000001 = 1
Fourth octet = 00001001 =9
Subnet mask characteristics.
- Anything other than an 0 defines the network address.
Network address
- The network address = 192.168.1
Node address
- 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
Address range = 0 to 127 in the first octet.
- 0.0.0.0 to 127.255.255.255
Binary representation = 0XXXXXXX
Node addresses available = 16,777,214
Subnet mask = 255.0.0.0
Class B network address
Address range = 128 to 191 In the first octet.
- 128.0.0.0 to 191.255.255.255
Binary representation = 10XXXXXX
Node addresses available = 65,534
Subnet mask = 255.255 0.0
Class C network address
Address range = 192 to 223 in the first octet.
- 192.0.0.0 to 223.255.255.255
Binary representation = 110XXXXX
Node addresses available = 254
Subnet mask = 255.255.255.0
Class D network address
Address range = 224 to 239 in the first octet.
- 224.0.0.0 to 239.255.255.255
Binary representation = 1110XXXX
Subnet mask = not defined.
Used for multicast communication.
Automatic Private IP Addressing (APIPA)
In some cases the Dynamic Host Configuration Protocol (OHCP) process may fail; in these cases, a node will self configure an APIPA address.
Address range = 168.254 in the first octet.
Public IP addresses
Routable
Each must be unique. (For any of you “Highlander” fans out there, remember. “There can only be one.”)
Not flexible; you are assigned to your network space.
Private IP addresses
Non-routable
10.0.0.0 to 10.255.255.255 (1 Class A license).
172.16.0.0 to 172.31.255.255 (16 Class B licenses).
192.168.0.0 to 192.168.255.255 (256 Class C licenses).
Highly flexible; you assign the network space.
Classless IPv4 addressing
Classes of addresses limited flexibility
- First routing protocols required the class structure.
Classless addressing
Classless Inter-Domain Routing (CIDR).
Slow the growth of routing tables.
Slow the exhaustion of IPv4 addresses.
Create more flexibility.
- The subnet mask becomes fluid.
Does not affect the private address space ranges.
Subnetting is now possible and desirable.
CIDR notation
192.168.0.9 255.255.255.0 becomes 192. 168.0.9/24.
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.
Creates flexibility in network design.
Creates efficiency in address space utilization.
Small office network example
223.15.1.0/24 network = 254 hosts available (hosts can't use 223.15.1.0 of 223. 15.1.255).
All hosts can get to all other hosts.
For security considerations, you want two separate networks.
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
- 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
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).
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.
2128 is roughly equal to 340 x 1036
340,282,308,020,998,463,463,374,607,431,708,211,456
IPv6 local address structure
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.
The local address is called the link local address and it always begins with fe80.
IPv6 global address structure
The host address is always the last 64 bits.
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.
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
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
Original address: 2001:0db8:0000:0000:0000:ff00:0042:8329
Drop the leading 0s = 2001:db8:0:0:0:ff00:42:8329
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
One-to-one communication.
- A specific device sending network traffic to another specific device.
Unicast can occur on the local network (fe80) or it can occur on the global network (2000 to 3999).
Multicast
One-to-a-few communication.
- A specific device sending network traffic to a specific group of devices that have registered to receive that traffic.
Routers register to receive multicast transmissions that involve the routing protocols they are programmed to use.
- Multicast addresses always begin with an ff.
Anycast
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.
Involves implementing DHCPv6.
DHCPv6
IPv6 is capable of auto-configuring its own local and global addresses.
- In certain situations, that is not always desirable.
DHCPv6 can be configured to hand out specific IPv6 addresses (or duplicate IPv6 addresses) when necessary.
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
MAC addresses come in two basic different formats that are either 48, or 64 bits in length and are represented by hexadecimal numbers.
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.
Theoretically, no two interfaces will have the same MAC address.
EUI-64
- 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
An area of the network where network packets can collide.
- A collision can occur when two devices send packets at the same time
Collision domains are broken up by switches, bridges, and routers.
Collision domains are not broken up by hubs.
Broadcast domains
Defined as all the nodes that can be reached by a broadcast transmission.
- All nodes that can be reached reside in the same network.
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!!
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.