Mac Address & Ipv4 Addressing

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

- MAC Address & IPv4 Addressing -

Hardware AddressingA hardware address is used to


uniquely identify a host within a local network.
Hardware addressing is a function of the Data-Link
layer of the OSI model (Layer-2). Ethernet
utilizes the 48-bit MAC address as its hardware
address. The MAC address is often hardcoded on
physical network interfaces, though some
interfaces support changing the MAC address using
special utilities. In virtualization environments,
dynamically assigning MAC addresses is very common.
A MAC address is most often represented in
hexadecimal, using one of two accepted formats:
00:43:AB:F2:32:13 0043.ABF2.3213 The first six
hexadecimal digits of a MAC address identify the
manufacturerof the physical network interface.
This is referred to as the OUI (Organizational
Unique Identifier). The last six digits uniquely
identify the host itself, and are referred to as
the host ID. The MAC address has one shortcoming
– it contains no hierarchy. MAC addresses provide
no mechanism to create boundaries between networks.
There is no method to distinguish one network from
another. This lack of hierarchy poses significant
difficulties to network scalability. If only
Layer-2 hardware addressing existed, all hosts
would technically exist on the same network.
Internetworks like the Internet could not exist,
as it would be impossible to separate my network
from your network. Imagine if the entire Internet
existed purely as a single Layer-2 switched
network. Switches, as a rule, will forward a
broadcast out every port. With billions of hosts
on the Internet, the resulting broadcast storms
would be devastating. The Internet would simply
collapse. The scalability limitations of Layer-2
hardware addresses are mitigated using logical
addresses, covered in great detail in this guide.

Logical AddressingLogical addressing is a


function of the Network layer of the OSI Model
(Layer-3), and provides a hierarchical structure
to separate networks. Logical addresses are never
hardcoded on physical network interfaces, and can
be dynamically assigned and changed freely. A
logical address contains two components: •Network
ID – identifies which network a host belongs to.
•Host ID – uniquely identifies the host on that
network. Examples of logical addressing protocols
include Internetwork Packet Exchange (IPX) and
Internet Protocol (IP). IPX was predominantly used
on Novell networks, but is now almost entirely
deprecated. IP is the most widely-used logical
address, and is the backbone protocol of the
Internet.

nternet Protocol (IP)In the 1970’s, the Department


of Defense developed the Transmission Control
Protocol (TCP), to provide both Network and
Transport layer functions. When this proved to be
an inflexible solution, those functions were
separated - with the Internet Protocol (IP)
providing Network layer services, and TCP
providing Transport layer services. Together, TCP
and IP provide the core functionality for the
TCP/IP or Internet protocol suite. IP provides two
fundamental Network layer services:•Logical
addressing – provides a unique address that
identifies both the host, and the network that host
exists on. •Routing – determines the best path
to a particular destination network, and then
routes data accordingly. IP was originally defined
in RFC 760, and has been revised several times. IP
Version 4 (IPv4) was the first version to
experience widespread deployment, and is defined
in RFC 791. IPv4 will be the focus of this guide.
IPv4 employs a 32-bit address, which limits the
number of possible addresses to 4,294,967,296.
IPv4 will eventually be replaced by IP Version 6
(IPv6), due to a shortage of available IPv4
addresses. IPv6 is covered in great detail in
another guide.

IPv4 AddressingA core function of IP is to provide


logical addressing for hosts. An IP address
provides a hierarchical structure to both uniquely
identify a host, and what network that host exists
on. An IP address is most often represented in
decimal, in the following format: 158.80.164.3 An
IP address is comprised of four octets, separated
by periods: First Octet Second OctetThird Octet
Fourth Octet 158 80 164 3 Each octet is an 8-bit
number, resulting in a 32-bit IP address. The
smallest possible value of an octet is 0, or
00000000 in binary. The largest possible value of
an octet is 255, or 11111111 in binary. The above
IP address represented in binary would look as
follows: First Octet Second OctetThird Octet
Fourth Octet 10011110 01010000 10100100 00000011

Decimal to Binary ConversionThe simplest method of


converting between decimal and binary is to
remember the following table: 128 64 32 16 8 4 2
1 To convert a decimal number of 172 to binary,
start with the leftmost column. Since 172 is
greater than 128, that binary bit will be set to
1. Next, add the value of the next column (128 +
64 = 192). Since 172 is less than 192, that binary
bit will be set to 0. Again, add the value of the
next column (128 + 32 = 160). Since 172 is greater
than 160, that binary bit will be set to 1. Continue
this process until the columns with binary bits set
to 1 add up to 172: Decimal128 64 32 16 8 4 2 1 Binary
1 0 1 0 1 1 0 0

Binary to Decimal ConversionConverting from


binary back to decimal is even simpler. Apply the
binary number to the conversion table, and then add
up any columns with binary bits set to 1. For
example, consider the binary number of 11110001:
Decimal128 64 32 16 8 4 2 1 Binary 1 1 1 1 0 0 0
1 By adding 128 + 64 + 32 + 16+ 1, it can be
determined that 11110001 equals 241.

The Subnet MaskPart of an IP address identifies the


network. The other part of the address identifies
the host. A subnet mask is required to provide this
distinction: 158.80.164.3 255.255.0.0 The above
IP address has a subnet mask of 255.255.0.0. The
subnet mask follows two rules: •If a binary bit is
set to a 1 (or on)in a subnet mask, the
corresponding bit in the address identifies the
network. •If a binary bit is set to a 0 (or off)
in a subnet mask, the corresponding bit in the
address identifies the host. Looking at the above
address and subnet mask in binary: IP Address:
10011110.01010000.10100100.00000011 Subnet Mask:
11111111.11111111.00000000.00000000 The first 16
bits of the subnet mask are set to 1. Thus, the
first 16 bits of the address (158.80) identify the
network. The last 16 bits of the subnet mask are
set to 0. Thus, the last 16 bits of the address
(164.3)identify the unique host on that network.
The network portion of the subnet mask must be
contiguous. For example, a subnet mask of
255.0.0.255 is not valid.

P Address ClassesThe IPv4 address space has been


structured into several classes. The value of the
first octet of an address determines the class of
the network:Class First Octet Range Default Subnet
Mask Class A 1 - 127 255.0.0.0 Class B 128 - 191
255.255.0.0 Class C 192 - 223 255.255.255.0 Class
D 224 - 239 - Class A networks range from 1 to 127.
The default subnet mask is 255.0.0.0. Thus, by
default, the first octet defines the network, and
the last three octets define the host. This results
in a maximum of 127 Class A networks, with
16,777,214 hosts per network! Example of a Class
A address: Address: 64.32.254.100 Subnet Mask:
255.0.0.0 Class B networks range from 128 to 191.
The default subnet mask is 255.255.0.0. Thus, by
default, the first two octets define the network,
and the last two octets define the host. This
results in a maximum of 16,384 Class B networks,
with 65,534 hosts per network. Example of a Class
B address: Address: 152.41.12.195 Subnet Mask:
255.255.0.0 Class C networks range from 192 to 223.
The default subnet mask is 255.255.255.0. Thus, by
default, the first three octets define the network,
and the last octet defines the host. This results
in a maximum of 2,097,152Class C networks, with 254
hosts per network. Example of a Class C address:
Address: 207.79.233.6 Subnet Mask: 255.255.255.0
Class D networks are reserved for multicast
traffic. Class D addresses do not use a subnet
mask.
Private addresses

Early network design, when global end-to-end connectivity was envisioned for
communications with all Internet hosts, intended that IP addresses be globally unique.
However, it was found that this was not always necessary as private networks
developed and public address space needed to be conserved.

Three non-overlapping ranges of IPv4 addresses for private networks are


reserved. These addresses are not routed on the Internet and thus their
use need not be coordinated with an IP address registry

Private IP Range

Mask bits
CLASS A 10.0.0.0 – 10.255.255.255
CLASS B 172.16.0.0 – 172.31.255.255
CLASS C 192.168.0.0 – 192.168.255.255

You might also like