08.MAC and IP Fundamentals
08.MAC and IP Fundamentals
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).
• 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
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