IP Address and MAC Address Basics
IP Address and MAC Address Basics. Foundational Computer Awareness explanations, examples and explained practice questions for banking and recruitment exam preparation.
By Akhilesh Saini
What you will learn
- What an IP address identifies and why networks use it.
- The basic appearance of IPv4 and IPv6 addresses.
- Distinguish private and public IPv4 addresses, and static versus dynamically assigned addresses.
- Recognize a MAC address and explain why it is different from an IP address.
Why this topic matters
Exams often ask which address uses 32 bits, which typically uses 48 bits, or which protocol helps deliver data between networks. You do not need to learn binary subnet calculations for this module; you need to recognize what the addresses do and avoid overgeneralizations.
IP address: identifying an interface for IP communication
An IP (Internet Protocol) address identifies a network interface in an IP communication context and supports sending packets toward that interface or network destination. A device may have multiple IP addresses (for example, separate Wi-Fi, cellular and virtual interfaces). IP addresses may change when a device moves to a different network or its configuration is updated.
IPv4 uses 32-bit addresses, commonly written in dotted-decimal form with four numbers called octets separated by periods. Each octet represents a value from 0 to 255.
Example reserved for teaching: 192.0.2.10.
IPv6 uses 128-bit addresses, commonly written as hexadecimal groups separated by colons. IPv6 permits forms of abbreviation for groups containing zeros.
Example reserved for teaching: 2001:db8::10.
The examples above use addresses reserved for documentation; they are not presented as real customer or production network addresses. IPv6 is not merely IPv4 with six components; it is a distinct version of the Internet Protocol with a substantially larger address space.
Private versus public IPv4
Private IPv4 addresses are intended for internal networks and are not routed as ordinary public Internet destinations. The RFC 1918 private IPv4 blocks are:
| Private address block | Often recognized by |
|---|---|
10.0.0.0/8 | 10.x.x.x |
172.16.0.0/12 | 172.16.x.x through 172.31.x.x |
192.168.0.0/16 | 192.168.x.x |
A common exam trap is claiming all 172.x.x.x addresses are private. Only the specified 172.16–172.31 block belongs to that private IPv4 range.
A publicly routable IPv4 address is generally used for communication over public Internet routing, subject to assignment and policy. Not every address outside RFC 1918 is ordinary public unicast: loopback, link-local, multicast and documentation/reserved ranges exist. Thus 192.0.2.10 is a documentation address, not a production public address.
Many home/office networks use private addresses internally. NAT (Network Address Translation) at a router may translate between internal and external addressing when devices communicate outward. NAT is not a replacement for authorization, encryption or a firewall policy.
Static, dynamic and local addressing
- Static IP configuration: Address is assigned and generally stays as set until reconfigured.
- Dynamic address: A network service such as DHCP (Dynamic Host Configuration Protocol) can assign and manage configuration information automatically for a period.
- Loopback: An address representing the host's own IP networking interface; IPv4
127.0.0.1is the best-known example. - Default gateway: Local next-hop interface/router used for reaching destinations outside the directly connected network.
Example: A laptop joins a new Wi-Fi network and gets a different local IP address. That is normal; the address reflects the network context and assignment.
MAC address: a link-layer identifier
A MAC (Media Access Control) address is a link-layer identifier used by technologies such as Ethernet and Wi-Fi. Traditional Ethernet MAC addresses are commonly 48 bits long and shown as six pairs of hexadecimal digits, such as 02:00:00:00:00:01 (a locally administered example).
A MAC address is typically associated with a network interface, but do not treat it as a globally fixed, unchangeable, secret identity for a person or device. Virtual interfaces, software configuration and MAC randomization can produce locally assigned or changing MAC addresses. Some link technologies also use address formats beyond the common 48-bit representation.
A local Ethernet switch often uses learned MAC-address information to forward frames within a LAN. Internet routers generally route IP packets using IP addresses. The MAC addresses used on one physical/link-layer hop are not simply the same as end-to-end Internet routing addresses.
IP versus MAC — the essential comparison
| Feature | IP address | MAC address |
|---|---|---|
| Main job | IP-layer delivery/routing | Link-layer identification/forwarding |
| Typical lesson examples | IPv4 / IPv6 | Ethernet/Wi-Fi 48-bit MAC |
| Common length | IPv4: 32 bits; IPv6: 128 bits | Usually 48 bits in Ethernet |
| Example notation | 192.0.2.10 | 02:00:00:00:00:01 |
| Assignment | Network configuration / DHCP etc. | Hardware-assigned or locally configured/randomized |
| Inter-network IP routing? | IP addresses guide routing | MAC addresses primarily guide local-link delivery |

Basic address-resolution idea
On a normal IPv4 Ethernet LAN, a device may need to learn the link-layer MAC address for an on-link IP destination or its local next-hop router. ARP (Address Resolution Protocol) helps map an IPv4 address to an Ethernet-style MAC address on that local network. IPv6 uses a different neighbour-discovery mechanism, not ordinary IPv4 ARP.
You only need the basic awareness-level association: ARP — IPv4-to-link-layer address resolution on a local network. Detailed ARP frame formats are outside this module.
Worked examples
Example 1 — Identification: 192.0.2.10 is IPv4 dotted-decimal notation; 2001:db8::10 is IPv6 notation.
Example 2 — Byte count: IPv4 has 32 bits, equivalent to four bytes. IPv6 has 128 bits, equivalent to sixteen bytes.
Example 3 — Private classification: 192.168.5.20 is within a private IPv4 block; 172.20.4.1 is too. 172.40.4.1 is not in the 172.16–172.31 RFC 1918 private block.
Example 4 — Address changes: When a phone moves from Wi-Fi to mobile data, it may use a different IP address; the phone still performs Internet communication.
Example 5 — Switch and router: A basic LAN switch forwards frames with MAC information; a router forwards between IP networks using IP addresses.
Important terms
| Term | Meaning |
|---|---|
| IP | Internet Protocol |
| IPv4 | 32-bit Internet Protocol address version |
| IPv6 | 128-bit Internet Protocol address version |
| MAC | Media Access Control |
| DHCP | Dynamic Host Configuration Protocol |
| NAT | Network Address Translation |
| ARP | Address Resolution Protocol |
| Default gateway | Next-hop route for nonlocal destinations |
| Loopback | Host's own network interface address |
| Private IPv4 | RFC 1918 internal-use address range |
Common confusions and exam traps
- IPv4 is 32-bit, IPv6 is 128-bit. Do not infer them from number of punctuation marks.
- Standard Ethernet MAC is 48-bit, but MAC values can be randomized or assigned locally.
- Private ≠ automatically secure: Internal addressing alone does not control access.
- 172.x.x.x is not all private: Only
172.16.0.0/12of that first-octet family is in RFC 1918. - Public ≠ any non-private address: Other reserved/special-purpose ranges exist.
- IP address ≠ domain name: DNS often helps resolve names to addresses (covered in
CA-06-03).
Objective-exam facts to remember
| Asked fact | Answer |
|---|---|
| IPv4 address size | 32 bits |
| IPv6 address size | 128 bits |
| Typical Ethernet MAC address size | 48 bits |
| Automatic IPv4 network configuration | DHCP |
| IPv4 address to local MAC address | ARP |
| Common local self-address | 127.0.0.1 |
| Private ranges | 10/8, 172.16/12, 192.168/16 |
Quick revision
- IP addresses help identify and reach destinations on IP networks.
- IPv4 is 32-bit; IPv6 is 128-bit.
- Common Ethernet MAC addresses are 48-bit link-layer identifiers.
- DHCP assists dynamic configuration; ARP assists local IPv4 address resolution.
- Private addresses are not public Internet destinations, but private alone does not guarantee security.
Practice questions — CA-07-06
1. How many bits are in a conventional IPv4 address?
A. 48
B. 128
C. 64
D. 32
2. How many bits are used by IPv6 addresses?
A. 32
B. 128
C. 48
D. 16
3. What is the common length of an Ethernet MAC address?
A. 48 bits
B. 128 bits
C. 8 bits
D. 32 bits
4. Which notation is typical of IPv4?
A. 2001:db8::1
B. aa:bb:cc:dd:ee:ff
C. user@example.org
D. 192.0.2.10
5. Which example is an IPv6 address?
A. 192.168.1.20
B. https://example.org
C. 2001:db8::10
D. 02:00:00:00:00:01
6. Which service frequently supplies IP configuration dynamically to a device?
A. PNG
B. DHCP
C. POP3
D. MICR
7. Which protocol helps resolve a local IPv4 address to a link-layer MAC address?
A. FTP
B. ARP
C. HTTP
D. SMTP
8. Which of these addresses belongs to a standard private IPv4 range?
A. 192.0.2.25
B. 172.40.2.5
C. 203.0.113.10
D. 192.168.12.4
9. Which statement about private addressing is correct?
A. 172.16 through 172.31 are included in the RFC 1918 172.16/12 block
B. Every 172.x.x.x address is private
C. A private IP address is always a VPN
D. Private addressing automatically encrypts traffic
10. Which is a familiar IPv4 loopback address?
A. 172.16.1.1
B. 10.1.1.1
C. 127.0.0.1
D. 192.168.0.1
11. A basic Ethernet switch generally uses which address type for local frame forwarding?
A. MAC address
B. Domain name only
C. PDF filename
D. Email address
12. Which assertion about MAC addresses is accurate?
A. They can never change
B. Every MAC address is 128 bits
C. They can be locally administered or randomized
D. They are secret passwords
Answers and explanations — CA-07-06
1. D — 32. IPv4 uses a 32-bit address structure, commonly displayed as four decimal octets.
2. B — 128. IPv6 uses 128-bit addresses, giving a much larger address space than IPv4.
3. A — 48 bits. Ordinary Ethernet MAC addresses are 48 bits, often written as six pairs of hexadecimal digits.
4. D — 192.0.2.10. IPv4 uses dotted-decimal form, while colon-separated hexadecimal groups are typical of IPv6.
5. C — 2001:db8::10. IPv6 uses 128-bit hexadecimal colon notation; 2001:db8::/32 is reserved for documentation.
6. B — DHCP. DHCP assigns or supplies network configuration such as addresses and default-gateway information.
7. B — ARP. ARP is used for IPv4 address resolution on many local link networks.
8. D — 192.168.12.4. 192.168.0.0/16 is an RFC 1918 private range; 192.0.2.0/24 and 203.0.113.0/24 are documentation ranges.
9. A — 172.16 through 172.31 are included in the RFC 1918 172.16/12 block. Only the range 172.16.0.0 through 172.31.255.255 belongs to that private IPv4 block.
10. C — 127.0.0.1. 127.0.0.1 is a local loopback address used to communicate with the host itself.
11. A — MAC address. Basic Layer-2 switching uses link-layer MAC addressing; routers use IP addresses for inter-network packet routing.