0% found this document useful (0 votes)
149 views

08.MAC and IP Fundamentals

The document discusses MAC and IP addressing fundamentals. It defines a MAC address as a unique identifier for network interfaces that allows devices to identify themselves on a network. MAC addresses are formed according to IEEE standards and are usually assigned by the manufacturer. It also explains IP addressing, including how IPv4 addresses are structured with a network and host portion separated by a subnet mask. The key address types of unicast, broadcast, and multicast are described for both MAC and IP networks.

Uploaded by

ksav yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
149 views

08.MAC and IP Fundamentals

The document discusses MAC and IP addressing fundamentals. It defines a MAC address as a unique identifier for network interfaces that allows devices to identify themselves on a network. MAC addresses are formed according to IEEE standards and are usually assigned by the manufacturer. It also explains IP addressing, including how IPv4 addresses are structured with a network and host portion separated by a subnet mask. The key address types of unicast, broadcast, and multicast are described for both MAC and IP networks.

Uploaded by

ksav yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

MAC and IP Address

Fundamentals
Introduction to MAC Address
MAC Address
• A media access control address (MAC address) of a device is a unique identifier assigned to network
interfaces for communications

• It allows a device to be able to individual identify itself within a group of devices and only then can it
receive or send signals.

• MAC addresses are most often assigned by the manufacturer of a network interface controller (NIC) and
are stored in its hardware, such as the card's read-only memory or some other firmware mechanism.

• MAC addresses are formed according to the rules of name spaces managed by the Institute of Electrical
and Electronics Engineers (IEEE)
Ethernet MAC Addresses
MAC Addresses and Hexadecimal
• An Ethernet MAC address is a 48-bit binary value
expressed as 12 hexadecimal digits (4 bits per hexadecimal
digit).

• Hexadecimal is used to represent Ethernet MAC addresses


and IP Version 6 addresses.
– Hexadecimal is a base sixteen system using the numbers 0 to
9 and the letters A to F.
– It is easier to express a value as a single hexadecimal digit
than as four binary bits.
– Hexadecimal is usually represented in text by the value
preceded by 0x (E.g., 0x73).

• Convert the decimal or hexadecimal value to binary, and


then to convert the binary value to either decimal or
hexadecimal as needed.
Ethernet MAC Addresses
MAC Addresses: Ethernet Identity
• MAC addresses were created to identify the actual
source and destination.
– The MAC address rules are established by
IEEE.
– The IEEE assigns the vendor a 3-byte (24-bit)
code, called the Organizationally Unique
Identifier (OUI).

• IEEE requires a vendor to follow two simple rules:


– All MAC addresses assigned to a NIC or other
Ethernet device must use that vendor's
assigned OUI as the first 3 bytes.
– All MAC addresses with the same OUI must
be assigned a unique value in the last 3 bytes.
Ethernet MAC Addresses
Frame Processing
• The MAC address is often referred to as
a burned-in address (BIA) meaning the
address is encoded into the ROM chip
permanently.

• When the computer starts up, the first


thing the NIC does is copy the MAC
address from ROM into RAM.

• When a device is forwarding a message


to an Ethernet network, it attaches
header information to the frame.

• The header information contains the


source and destination MAC address.
Ethernet MAC Addresses
MAC Address Representations
• Use the ipconfig /all command on a
Windows host to identify the MAC
address of an Ethernet adapter.

• On a MAC or Linux host, the ifconfig


command is used.

• Depending on the device and the


operating system, you will see various
representations of MAC addresses.
Ethernet MAC Addresses
Unicast MAC Address
• A unicast MAC address is the unique
address used when a frame is sent
from a single transmitting device to
a single destination device.

• For a unicast packet to be sent and


received, a destination IP address
must be in the IP packet header and
a corresponding destination MAC
address must also be present in the
Ethernet frame header.
Ethernet MAC Addresses
Broadcast MAC Address
• Many network protocols, such as
DHCP and ARP, use broadcasts.
• A broadcast packet contains a
destination IPv4 address that has all
ones (1s) in the host portion
indicating that all hosts on that local
network will receive and process the
packet.
• When the IPv4 broadcast packet is
encapsulated in the Ethernet frame,
the destination MAC address is the
broadcast MAC address of FF-FF-FF-
FF-FF-FF in hexadecimal (48 ones in
binary).
Ethernet MAC Addresses
Multicast MAC Address
• Multicast addresses allow a
source device to send a packet to
a group of devices.
– Devices in a multicast group are
assigned a multicast group IP
address in the range of
224.0.0.0 to 239.255.255.255
(IPv6 multicast addresses begin
with FF00::/8).
– The multicast IP address
requires a corresponding
multicast MAC address that
begins with 01-00-5E in
hexadecimal.
Introduction to IP Addressing
Binary and Decimal Conversion
IPv4 Addresses
• IPv4 addresses are
expressed in 32 binary bits
divided into 4 8-bit octets.

• Also known as logical


address
Binary and Decimal Conversion
IPv4 Addresses (Cont.)
• IPv4 addresses are commonly expressed in dotted decimal notation
IPv4 Address Structure
Network and Host Portions
• An IPv4 address is hierarchical.
– Composed of a Network portion and Host portion.

• All devices on the same network must have the identical network portion.

• The Subnet Mask helps devices identify the network portion and host portion.
Subnet Mask
• A subnet (short for "subnetwork") is separate part of an organization's network. Typically, a subnet may
represent all the machines at one geographic location, in one building, or on the same local area
network (LAN).

• When we set an IP address its Subnet Mask is auto set by the OS.

• Subnet mask is a mask used to determine what subnet an IP address belongs to.

• Subnet will separate the Network ID octets and the Host ID octets of the address

• It will also determine the maximum no. of Hosts that can be connected to the network
IPv4 Address Structure
The Subnet Mask
• Three IPv4 addresses must be configured on a
host:
– Unique IPv4 address of the host.
– Subnet mask - identifies the network/host
portion of the IPv4 address.
– Default gateway -IP address of the local
router interface.
IPv4 Address Structure
The Subnet Mask (Cont.)
• The IPv4 address is compared to the subnet mask bit by bit, from left to right.

• A 1 in the subnet mask indicates that the corresponding bit in the IPv4 address is a network bit.
IPv4 Address Structure
The Prefix Length
▪ The Prefix Length:
• Shorthand method of
expressing the subnet
mask.
• Equals the number of
bits in the subnet mask
set to 1.
• Written in slash
notation, / followed by
the number of network
bits.
IPv4 Address Structure
Logical AND
▪ A logical AND is one of three basic
binary operations used in digital logic.
▪ Used to determine the Network
Address
▪ The Logical AND of two bits yields the
following results:
IPv4 Address Structure
Network, Host, and Broadcast Addresses
▪ Types of Addresses in Network 192.168.10.0/24
• Network Address - host portion is all 0s
(.00000000)
• First Host address - host portion is all 0s and ends
with a 1 (.00000001)
• Last Host address - host portion is all 1s and ends
with a 0 (.11111110)
• Broadcast Address - host portion is all 1s
(.11111111)
IPv4 Unicast, Broadcast, and Multicast
Static IPv4 Address Assignment to a Host
▪ Some devices like printers, servers and
network devices require a fixed IP
address.
▪ Hosts in a small network can also be
configured with static addresses.
IPv4 Unicast, Broadcast, and Multicast
Dynamic IPv4 Address Assignment to a Host
▪ Most networks use Dynamic Host Configuration
Protocol (DHCP) to assign IPv4 addresses
dynamically.
▪ The DHCP server provides an IPv4 address, subnet
mask, default gateway, and other configuration
information.
▪ DHCP leases the addresses to hosts for a certain
length of time.
▪ If the host is powered down or taken off the
network, the address is returned to the pool for
reuse.
IPv4 Unicast, Broadcast, and Multicast
IPv4 Communication

▪ Unicast – one to one ▪ Broadcast– one to all. ▪ Multicast – one to a


communication. select group.
IPv4 Unicast, Broadcast, and Multicast
Unicast Transmission
▪ Unicast – one to one
communication.
• Use the address of the
destination device as the
destination address.
IPv4 Unicast, Broadcast, and Multicast
Broadcast Transmission

▪ Broadcast– one to all


• Message sent to everyone in the LAN
(broadcast domain.)
• destination IPv4 address has all ones
(1s) in the host portion.
IPv4 Unicast, Broadcast, and Multicast
Multicast Transmission

▪ Multicast– one to a select group.


• 224.0.0.0 to 239.255.255.255 addresses
reserved for multicast.
• routing protocols use multicast
transmission to exchange routing
information.
Types of IPv4 Addresses
Special User IPv4 Addresses
• Loopback addresses (127.0.0.0 /8 or 127.0.0.1)
– Used on a host to test if the TCP/IP configuration is operational.

• Link-Local addresses (169.254.0.0 /16 or 169.254.0.1)


– Commonly known as Automatic Private IP Addressing (APIPA) addresses.
– Used by Windows client to self configure if no DHCP server available.
• TEST-NET addresses (192.0.2.0/24 or 192.0.2.0 to 192.0.2.255)
– Used for teaching and learning.
Types of IPv4 Addresses
Legacy Classful Addressing
• In 1981, Internet IPv4 addresses were assigned using classful addressing (RFC 790)
• Network addresses were based on 3 classes:
– Class A (0.0.0.0/8 to 127.0.0.0/8) – Designed to support extremely large networks with more
than 16 million host addresses.
– Class B (128.0.0.0 /16 – 191.255.0.0 /16) – Designed to support the needs of moderate
to large size networks up to approximately 65,000 host addresses.
– Class C (192.0.0.0 /24 – 223.255.255.0 /24) – Designed to support small networks with
a maximum of 254 hosts.
Types of IPv4 Addresses
Legacy Classful Addressing
• There are 5 classes of IP address
❑ Class A, B, C, D and E

• Class A, B, and C are used in networking

• Class D is used for Multicast

• Class E is reserved for Research

• The Class of IP is identified by the value given in the


First Octet

• The following values can be given within an Octet


– 1st Octet – 1 to 223
– 2nd, 3rd and 4th – 0 to 255
IP Addressing scheme
CLASS First octet Network ID Host ID octets No. of Hosts
range octets
A 1 - 126 1ST OCTET ONLY 2ND,3RD & 4TH OCTETS 16,777,214

B 128 - 191 1ST AND 2ND OCTETS 3RD & 4TH OCTETS 65,534

C 192 - 223 1ST, 2ND & 3RD OCTETS 4TH OCTET ONLY 254

D 224 - 239 NA NA NA

E 240 - 254 NA NA NA
Default Subnet Mask
Types of IPv4 Addresses
Classless Addressing
• Classful Addressing wasted addresses and exhausted the availability of IPv4 addresses.
• Classless Addressing Introduced in the 1990s
– Classless Inter-Domain Routing (CIDR, pronounced “cider”)
– Allowed service providers to allocate IPv4 addresses on any address bit boundary (prefix
length) instead of only by a class A, B, or C.
Types of IPv4 Addresses
Classless Addressing
Types of IPv4 Addresses
Public and Private IPv4 Addresses
• Private Addresses
– Not routable
– Introduced in mid 1990s due to depletion of IPv4
addresses
– Used only in internal networks.
– Must be translated to a public IPv4 to be routable.
– Defined by RFC 1918

• Private Address Blocks


– 10.0.0.0 /8 or 10.0.0.0 to 10.255.255.255
– 172.16.0.0 /12 or 172.16.0.0 to
172.31.255.255192.168.0.0 /16
– 192.168.0.0 to 192.168.255.255
Private IP & Public IP
Types of IPv4 Addresses
Assignment of IP Addresses
• The following organizations manage and maintain IPv4 and IPv6 addresses for the
various regions.
– American Registry for Internet Numbers (ARIN)- North America.
– Réseaux IP Europeans (RIPE) - Europe, the Middle East, and Central Asia
– Asia Pacific Network Information Centre (APNIC) - Asia and Pacific regions
– African Network Information Centre (AfriNIC) – Africa
– Regional Latin-American and Caribbean IP Address Registry (LACNIC) - Latin America and some
Caribbean islands
Types of IPv4 Addresses
Assignment of IP Addresses

You might also like