IP v4, IPv6 & MAC Addresses
Introduction to IPv4
IPv4, which stands for Internet Protocol version 4, is the fourth version of the Internet Protocol (IP) that was originally designed in the early 1980s and has been widely used since the early days of the internet.
IPv4 is the underlying technology that allows devices to communicate with each other over the internet and other IP-based networks.
IPv4 Addressing
192.168.0.1
IPv4 addresses are 32 bits in length, which allows for a total of approximately 4.3 billion unique addresses. Each IPv4 address is typically represented as four decimal numbers separated by periods.
In order to address the issue of IP address exhaustion (where there are more internet connected devices than available addresses) networks need to use a combination of public, private IP addresses and IP address pools in order for the internet to continue to function. This was the mean driver for the development of IPv6.
Hierarchical Structure
IPv4 addresses are structured hierarchically, with different portions of the address used to identify the network and the individual device within that network. This hierarchical addressing scheme is the basis for routing data across the internet.
Public IP Addresses
Public IP addresses are unique identifiers that are used for communication between devices on the internet and are crucial for identifying and routing data to specific devices or servers worldwide.
Internet Service Providers (ISPs) allocate public IP addresses to their customers, allowing them to access websites, online services, and resources on the internet.
Public IP addresses can be either static (unchanging) or dynamic (changing periodically) depending on the type of internet connection.
Private IP Addresses
Private IP addresses are used to identify devices within local or private networks, such as home networks, business intranets, or corporate LANs. Unlike public IP addresses, private IP addresses are not globally routable and cannot be used to directly access devices on the internet.
Private IP addresses provide a level of security by keeping internal network devices hidden from direct exposure to the internet, which can help protect against external threats and unauthorized access.
In order for data to be routed across the internet from a private IP address, the address must be replaced with a public IP address, using Network Address Translation (NAT).
Internet Protocol Version 6
IPv6, short for Internet Protocol version 6, is the successor to IPv4 (Internet Protocol version 4) and is designed to overcome the limitations of IPv4, primarily the exhaustion of available IP addresses.
The key new features of IPv6 are:
- Expanded address space
- Hexadecimal notation
What is the successor of IPv4?
IPv6 Address Space
IPv6 (Internet Protocol version 6) has a significantly larger address space compared to its predecessor, IPv4 (Internet Protocol version 4).
IPv6 uses 128-bit addresses which means there are 2^128 (about 340 undecillion) possible unique IPv6 addresses.
IPv6 Addressing
2001:0db8:85a3:0000:0000:8a2e:0370:7334
IPv6 addresses are typically represented in hexadecimal notation, separated by colons.
To simplify addresses, IPv6 allows for certain abbreviations, such as omitting leading zeros and using double colons (::) to represent consecutive groups of zeros. This is known is address compression.
For example:
- Full IPv6 Address: 2001:0db8:0000:0000:0000:0000:0000:0042
- Compressed IPv6 Address: 2001:db8::42
Which of the following is a valid IPv6 address?
Introduction to MAC Addresses
Media Access Control addresses play a crucial role in the functioning of local area networks (LANs) and other networked devices. These addresses are used to uniquely identify network interfaces, such as network interface cards (NICs) in computers and other devices that connect to a network.
They function at the:
- The data link layer of the TCP/IP Model
- The link layer (layer 2) of the OSI Model
What is the purpose of a MAC address?
MAC Address structure
Example : 00:1A:2B:3C:4D:5E
A MAC address is typically a 48-bit or 64-bit binary number, represented in a hexadecimal format. It is commonly written as six pairs of two hexadecimal digits separated by colons or hyphens, such as "00:1A:2B:3C:4D:5E" or "00-1A-2B-3C-4D-5E."
Which of the following is the correct representation of a MAC address?
MAC Address Assignment
MAC addresses are assigned by the manufacturer of the network interface card.
The first half of the MAC address (24 bits) is known as the OUI (Organizationally Unique Identifier), which is assigned to the manufacturer by the IEEE (Institute of Electrical and Electronics Engineers).
The second half is assigned by the manufacturer to uniquely identify each NIC they produce.
MAC address spoofing
MAC address spoofing is a technique used to change or falsify the Media Access Control (MAC) address of a network interface. This process involves modifying the MAC address of a network adapter, such as a network card or a wireless interface, to impersonate another MAC address.
This can be used for legitimate & malicious purposes:
- Increased privacy
- Bypassing network controls (such as 15 minute free internet access in airports)
- Performing Man In The Middle (MITM) attacks on routers or other devices.
IPv4
- Introduction to IPv4
- IPv4 Addressing
- Hierarchical Structure
- Public IP Addresses
- Private IP Addresses
IPv6
- Internet Protocol Version 6
- IPv6 Address Space
- IPv6 Addressing
MAC Addresses
- Introduction to MAC Addresses
- MAC Address structure
- MAC Address Assignment
- MAC address spoofing