1. MAC Address (Media Access Control Address)
- Definition:
A physical address hard-coded into a device’s Network Interface Card (NIC) by the manufacturer. - Format:
- 48-bit hexadecimal address (e.g.,
00:1A:2B:3C:4D:5E
). - Groups of two hexadecimal digits separated by colons or hyphens.
- 48-bit hexadecimal address (e.g.,
- Purpose:
Identifies a device within a local network (LAN). - Type:
Permanent and unique to the hardware (cannot be changed easily). - Scope:
Operates within the same network (Layer 2 of the OSI model – Data Link Layer). - Key Feature:
Does not change, even if the device moves to another network. - Example:
Laptop’s NIC MAC address:3C:52:82:A3:34:FF
.
2. IP Address (Internet Protocol Address)
- Definition:
A logical address assigned to a device by a network (e.g., a router or DHCP server). - Format:
- IPv4: 32-bit address (e.g.,
192.168.1.1
). - IPv6: 128-bit address (e.g.,
2001:0db8:85a3:0000:0000:8a2e:0370:7334
).
- IPv4: 32-bit address (e.g.,
- Purpose:
Identifies a device globally, allowing communication between different networks. - Type:
Temporary and can change (dynamic IPs) or be fixed (static IPs). - Scope:
Operates globally (Layer 3 of the OSI model – Network Layer). - Key Feature:
Changes when the device connects to a new network. - Example:
A device on a home network might have the IP192.168.0.100
.
Key Differences Between MAC and IP Addresses
Feature | MAC Address | IP Address |
---|---|---|
Definition | Physical address burned into the NIC | Logical address assigned by the network. |
Purpose | Identifies devices on the same LAN. | Enables communication across networks. |
Scope | Local (within the same network). | Global (across networks). |
Format | Hexadecimal (48-bit or 64-bit). | IPv4 (32-bit) or IPv6 (128-bit). |
Type | Permanent (hardware-based). | Temporary or permanent (software-based). |
Layer | Data Link Layer (Layer 2). | Network Layer (Layer 3). |
Changes? | No, remains fixed. | Yes, can change with network. |
Example | 00:1A:2B:3C:4D:5E | 192.168.1.1 |
3. How MAC and IP Work Together
- When a device communicates over the internet:
- IP Address: Used to locate the destination device across networks.
- MAC Address: Used within the local network to deliver the data to the correct device.
4. Mnemonics to Remember
- MAC:
- “M” for Manufacturer: It’s hardware-specific and permanent.
- Works Locally (Local Area Network).
- IP:
- “I” for Internet: It’s global and logical.
- Changes when you switch networks.
5. Applications
- MAC Address:
- Ethernet communication, Wi-Fi networks, device authentication.
- IP Address:
- Internet browsing, website communication, VoIP calls.
Quick Tip: MAC = Hardware | IP = Location.
MCQ
What does MAC in MAC address stand for?
a) Media Access Control
b) Machine Access Code
c) Memory Access Control
d) Media Authentication Code
Answer: a) Media Access Control
Which OSI layer does the MAC address belong to?
a) Layer 1 – Physical Layer
b) Layer 2 – Data Link Layer
c) Layer 3 – Network Layer
d) Layer 4 – Transport Layer
Answer: b) Layer 2 – Data Link Layer
An IP address operates at which OSI layer?
a) Layer 1 – Physical Layer
b) Layer 2 – Data Link Layer
c) Layer 3 – Network Layer
d) Layer 4 – Transport Layer
Answer: c) Layer 3 – Network Layer
What type of address is a MAC address?
a) Logical address
b) Temporary address
c) Physical address
d) Virtual address
Answer: c) Physical address
What type of address is an IP address?
a) Logical address
b) Physical address
c) Permanent address
d) Ethernet address
Answer: a) Logical address
Which of the following is a correct format of a MAC address?
a) 192.168.1.1
b) 00:1A:2B:3C:4D:5E
c) 255.255.255.0
d) FF00:AB00:CD12:34FE
Answer: b) 00:1A:2B:3C:4D:5E
What is the length of a MAC address?
a) 16 bits
b) 32 bits
c) 48 bits
d) 64 bits
Answer: c) 48 bits
What is the length of an IPv4 address?
a) 16 bits
b) 32 bits
c) 48 bits
d) 128 bits
Answer: b) 32 bits
Which version of IP uses 128-bit addressing?
a) IPv4
b) IPv6
c) Both IPv4 and IPv6
d) None of these
Answer: b) IPv6
Which protocol dynamically assigns an IP address to devices on a network?
a) DNS
b) DHCP
c) ARP
d) ICMP
Answer: b) DHCP
Which address uniquely identifies a device on a local network?
a) IP address
b) MAC address
c) Subnet mask
d) Default gateway
Answer: b) MAC address
Which address can change when a device moves to another network?
a) MAC address
b) IP address
c) Subnet mask
d) Gateway address
Answer: b) IP address
Which address is globally routable on the internet?
a) IP address
b) MAC address
c) Subnet mask
d) Default gateway
Answer: a) IP address
What happens to a MAC address when a device connects to a new network?
a) It changes dynamically.
b) It remains the same.
c) It is assigned by the router.
d) It is replaced by an IP address.
Answer: b) It remains the same.
What is the primary use of an IP address?
a) To identify devices on the same LAN
b) To identify devices across networks
c) To control access to a device
d) To manage device authentication
Answer: b) To identify devices across networks
Which address is used by switches to forward packets within a LAN?
a) IP address
b) MAC address
c) Subnet mask
d) Gateway address
Answer: b) MAC address
Which address is required for devices to communicate over the internet?
a) MAC address
b) IP address
c) Subnet mask
d) ARP address
Answer: b) IP address
What protocol maps an IP address to a MAC address?
a) DNS
b) ARP
c) DHCP
d) ICMP
Answer: b) ARP
What is the primary role of a router in a network?
a) Assign MAC addresses
b) Forward data packets using IP addresses
c) Create physical connections
d) Assign subnet masks
Answer: b) Forward data packets using IP addresses
Which address is required for Ethernet communication within the same network?
a) IP address
b) MAC address
c) Subnet mask
d) Default gateway
Answer: b) MAC address
Which address is susceptible to spoofing in a local network?
a) IP address
b) MAC address
c) Subnet mask
d) Default gateway
Answer: b) MAC address
Which address is used in IP spoofing attacks?
a) MAC address
b) IP address
c) Subnet mask
d) ARP address
Answer: b) IP address
What is a significant limitation of a MAC address?
a) Cannot be spoofed
b) Cannot identify devices globally
c) Changes with network
d) Limited to IPv4 networks
Answer: b) Cannot identify devices globally
How is a static IP address different from a dynamic IP address?
a) It is assigned manually and remains fixed.
b) It is assigned by the MAC address.
c) It changes automatically when needed.
d) It is encrypted for security.
Answer: a) It is assigned manually and remains fixed.
Which address is used in device authentication for network security?
a) MAC address
b) IP address
c) Subnet mask
d) Gateway address
Answer: a) MAC address
Focus Areas:
- MAC Address: Physical, fixed, used in local communication, Layer 2.
- IP Address: Logical, dynamic or static, used globally, Layer 3.
- Understand the roles of ARP (maps IP to MAC) and DHCP (assigns IPs).
- Differences between IPv4 (32-bit) and IPv6 (128-bit).
- Remember that MAC identifies devices locally, and IP identifies devices across networks.