Networks Training

  • About
  • My Books
  • SUGGESTED TRAINING
  • HOME
  • Cisco Networking
    • Cisco General
    • Cisco IOS
    • Cisco VPN
    • Cisco Wireless
  • Cisco ASA
    • Cisco ASA General
    • Cisco ASA Firewall Configuration
  • Certifications Training
    • CCNA Training
    • Cisco Certifications
    • I.T Training
  • General
    • General Networking
    • IP Telephony
    • Network Security
    • Product Reviews
    • Software
  • Cisco Routers
  • Cisco Switches
You are here: Home / General Networking / Comparison and Differences Between MAC vs IP Address

Comparison and Differences Between MAC vs IP Address

Written By Harris Andrea

Every host or device that is connected to a TCP/IP network must have two addresses in order to send and receive traffic on the network. These are MAC and IP addresses.

mac vs ip address comparison

Knowing the details and functionality of these two address types is essential for anyone working in networking or in I.T in general.

In this article we will discuss and compare MAC vs IP Address, explain their differences and several other interesting concepts so let’s get started.

Table of Contents

  • MAC vs IP – Comparison Table
  • What is MAC Address
    • How MAC is used – How it works
  • What is IP Address
    • IPv4
    • Private IP addresses
    • Public IP Addresses
    • IPv6
  • Tracking IP addresses on the Internet
  • IP address Configuration on a Windows Machine:
  • IP address Configuration on an Apple MacBook:
  • IP address Configuration on Linux:
  • How to find your own MAC and IP address
    • Related Posts

Before moving on with the details of our article, let’s first see a quick comparison table between the two addresses:

MAC vs IP – Comparison Table

Characteristic MAC Address IP Address
Term Meaning Media Access Control Address Internet Protocol Address
OSI Layer Layer 2 Layer 3
Network Device Switch Router
Address Length 48-bits 32-bits (IPv4) or 128-bits (IPv6)
Configuration Hardware coded at manufacture time on NIC card Configured by the Administrator
Can be used on Internet NO YES
Network usage In LAN Ethernet networks or WiFi networks In all kinds of TCP/IP networks
Who assigns it The manufacturer of the NIC card. Administrators, ISPs, IANA etc
Can be changed? NO YES
Traceable on Internet NO YES

What is MAC Address

Media Access Control (MAC) addresses are Layer 2 network addresses that are designed to be unique.

They are made up of 48 bits in total and are displayed as a string of 12 Hexadecimal digits with each digit ranging from 0 to F.

mac address

Each double set of digits is called an ‘octet’ and each octet is often shown as separated by a colon; this is known as Colon Hexadecimal Notation.

On Cisco devices you will often see the output of a MAC Address displayed as 3 digits separated by a dot or period.

This is called Period Separated Hexadecimal notation, but whichever way is used the MAC address remains the same.  For example:

CC:46:D6:A5:B4:C3 – Colon Hexadecimal Notation

CC4.6D6.A5B.4C3 – Period-separated Hexadecimal Notation.

Every device that is network capable (including Ethernet networks, WiFi networks and Bluetooth networks), whether it is a wired device or a wireless device, it has a Network Interface Card (NIC) inside.

Every NIC that has ever been manufactured in the world has its own unique MAC address permanently assigned during the manufacturing process.

This is why MAC addresses are often referred to as “burned in” addresses or “physical addresses” or “hardware addresses”.

The first three octets identify the manufacturer of the NIC card, so in the example above CC:46:D6 would represent the manufacturer,  which in this case is Cisco and the last 3 octets are randomly generated.

The first digits which identify the manufactured are also called OUI (Organizational Unique Identifier).

If you need to identify a network device and you have its’ MAC address, there are many websites available where you can enter the first 3 Octets (6-hex digits) and it will tell you who the manufacturer is based on the Organizational Unique Identifier (OUI).

This can help with narrowing down what the device might be, because if the manufacturer is Apple, then you know the device could be an Apple TV, a laptop or a phone etc, and it’s unlikely to be a printer or a network switch.

How MAC is used – How it works

As mentioned earlier, MAC addresses are Layer 2 addresses that operate at the Data Link -Layer 2 of the OSI model.

MAC addresses are used by network switches to keep track of what devices are connected to each switch interface and they store these mappings in a table called a CAM table or MAC address table.

Because MAC addresses only operate at Layer 2 of the OSI model they are not forwarded by Routers.

Routers are Layer 3 devices which communicate using Internet Protocol (IP) addresses and not MAC addresses. It is this reason that you will never see MAC addresses on the internet.

MAC addresses are not routable nor found on the Internet. They are only found in Local Area Networks (LAN) or in WiFi networks.

If a switch wants to send a message to every device in its network segment; it will send a broadcast message using a destination MAC address of FF:FF:FF:FF:FF:FF.

This broadcast address will be passed between switches but will be dropped at the Router.

This area, where broadcasts are forwarded, is known as a Broadcast Domain and is separated by Routers.

MORE READING:  Cisco Branch Virtual Office Solutions - Network Design

Devices communicating within the same broadcast domain use MAC addresses for the Source and Destination address, however, in order to communicate with a device that is located in another broadcast domain, an IP address will need to be used.

To keep track of these communications between Broadcast domains, Routers and hosts map the source MAC addresses to IP Addresses and store them in a table called an Address Resolution Protocol table or ARP table.

If a host on a network segment wants to send an IP packet to a destination host, it will send first an ARP broadcast which is essentially asking the question “what is the MAC address of the host with destination IP a.b.c.d ?”.

If the destination host is on the same broadcast domain, it will reply to the ARP broadcast and announce its MAC address. Therefore, the source host will now send an Ethernet frame directly to the destination host’s MAC address.

The switch receives this packet and checks its own MAC address table to see which interface this MAC address is mapped to and then it forwards the packet out of the interface that matches the MAC address.

If a duplicate MAC address is seen on the network this is a security concern because it means that another device is ‘spoofing’ or copying the MAC address of a genuine device on the network in order to bypass security. This is called MAC Address Spoofing.

What is IP Address

An IP address is a Layer 3 address (as mapped on the OSI Model) that is used by Routers to forward packets between different network segments.

ip address format

For a device to be able to communicate inside or outside of its network segment it needs to be assigned a unique IP address.

If you assign the same IP address to different devices on the same network, this will cause a conflict and the router or hosts will not know which device to send the packets to.

An analogy for IP addressing is thinking of them like postal address and postcode on a letter.

If you want to send a letter to another town you would add the address and post code for that town to your letter and the postal service would use this address to determine where they should send the letter.

This is the same principle with IP addresses as the router will read the IP addresses in the sent packet and use its routing table to determine which interface the packet should be sent out of.

There are various types of IP addresses, but the two most important ones to know are IP Version 4 (IPv4) and IP Version 6 (IPv6).

IPv4

This is the oldest but still the most widely used version of the Internet Protocol. IPv4 addresses are made up of 32 bits and each set of 8 bits are called an Octet. There are 4 Octets per IP address and these Octets range from 0 to 255 as shown below:

88.21.35.250

There are a maximum number of unique addresses that can be created using the IPv4 addressing scheme and to solve this problem the address range of IPv4 was split into Private and Public addresses.

Private IP addresses

These addresses are used to address all devices within the same network. Like MAC addresses, Private IP addresses should not be seen on the internet as the WAN Router or Firewall uses a process called Network Address Translation or NAT to change or translate the Private IP address to the Public IP address that is provided by the Internet Service Provider and used to forward packets over the internet.

Private IP Address Ranges:

10.0.0.0 – 10.255.255.255

172.16.0.0 – 172.31.255.255

192.168.0.0 – 192.168.255.255

Another method used to save on the number of IP addresses used on an IPv4 network is Classless Inter-Domain Routing (CIDR).

This method allows the Subnetting of IP addresses to prevent large blocks of addresses from being wasted.

Public IP Addresses

These IP addresses are allocated by the Internet Assigned Number authority or (IANA) which is responsible for allocating blocks of public IP addresses to different ISP’s.

The ISP then allocates addresses from the given blocks to their customers to assign to their WAN Routers. All addresses outside of the Private address ranges mentioned earlier are Public addresses and can be used to forward traffic over the internet.

IPv6

IPv6 was invented as a solution to the problem of the limited number of unique addresses that are available with the IPv4 addressing scheme.

There is a maximum of 232 (4,294,967,296) unique addresses available when using IPv4 addressing but a massive 2128 unique addresses available with IPv6 which is Trillions upon Trillions of addresses.

IPv6 addresses are made up of 128bits and like MAC addresses they are displayed using Colon Hexadecimal Notation.

MORE READING:  Comparison of EIGRP vs OSPF Routing Protocols

Each digit is a Hexadecimal number 0 to F and each 4 sets of digits are separated by a colon as shown below:

2001:dc9:8765::f450:2676:ffdd/64

IPv6 also has Private and Public IP address ranges but the application of these are very different to the application of IPv4 addresses.

Public IPv6 addresses are similar to public IPv4 addresses as they are globally unique and are assigned to devices such as Web Servers or Email servers by an ISP.

Private addresses make up a very small portion of the IPv6 scope and are used for local links and as such should also not be seen on the internet.

Tracking IP addresses on the Internet

Devices use their IP addresses to communicate with each other over the internet. When you browse to a website you are sending packets from your computer with your Public IP address as the source address to the Public IP address of the web server that hosts the web content where you are browsing.

The server therefore keeps track of your IP address and therefore you can be traced on the Internet from server logs.

As all Public IP addresses are registered with the IANA it is possible to see where a particular IP address is registered.

If you are a home user your Public IP address will be registered to the ISP that you use so the registered address would be that of your ISP.

Therefore, when someone is looking up your IP address would see what country the IP address is registered to and to what organization.

Websites such as whatismyip.com can be used to lookup the registration details for a particular IP address.

Using a VPN service can hide your public IP address from the Webservers of the site you are visiting as your public IP address connects to your VPN provider and then the request to the webserver is sent from a public IP address associated with your VPN provider and your actual source IP address is not used.

IP address Configuration on a Windows Machine:

To enable DHCP or change other TCP/IP settings

Select Start , then select Settings  > Network & Internet.

Do one of the following:

  • For a Wi-Fi network, select Wi-Fi > Manage known networks. Choose the network you want to change the settings for, then select Properties.
  • For an Ethernet network, select Ethernet, then select the Ethernet network you’re connected to.

Under IP assignment, select Edit.

Under Edit IP settings, select Automatic (DHCP) or Manual.

To specify IPv4 settings manually:

Under Edit IP settings, choose Manual, then turn on IPv4.

To specify an IP address, in the IP address, Subnet prefix length, and Gateway boxes, type the IP address settings.

To specify a DNS server address, in the Preferred DNS and Alternate DNS boxes, type the addresses of the primary and secondary DNS servers.

To specify IPv6 settings manually:

Under Edit IP settings, choose Manual, then turn on IPv6.

To specify an IP address, in the IP address, Subnet prefix length, and Gateway boxes, type the IP address settings.

To specify a DNS server address, in the Preferred DNS and Alternate DNS boxes, type the addresses of the primary and secondary DNS servers.

When you select Automatic (DHCP), the IP address settings and DNS server address setting are set automatically by your router or other access point (recommended).

When you select Manual, you can manually set your IP address settings and DNS server address.

When you’re done, select Save.

https://support.microsoft.com/en-us/windows/change-tcp-ip-settings-bd0a07af-15f5-cd6a-363f-ca2b6f391ace

IP address Configuration on an Apple MacBook:

Follow these steps to enter your IP address or have it assigned automatically.

  1. On your Mac, choose Apple menu > System Preferences, then click Network.
  2. Select the network connection you want to use (such as Ethernet) in the list.
  3. Click the Configure IPv4 pop-up menu, then choose an option:
    • If your address will be assigned automatically, choose Using DHCP.
    • If your ISP or administrator gave you an IP address, choose Manually and enter the address in the IP Address field. Your ISP most likely gave you additional information such as the subnet mask, router and Domain Name System (DNS) server address. Enter the subnet mask and router in the labelled fields. To enter the DNS server address, click Advanced, click DNS, then click the Add button and enter the address.

https://support.apple.com/en-gb/guide/mac-help/mchlp2718/10.15/mac/10.15

IP address Configuration on Linux:

$ ifconfig <interface_name> <ip_address> netmask <netmask_address> 

Example: 

$ ifconfig enp0s3 192.168.178.32/24 

$ ifconfig enp0s3 192.168.178.32 netmask 255.255.255.0 

How to find your own MAC and IP address

On a Windows machine, open a command prompt window (cmd) and run the following command:

ipconfig /all

Check out the following picture:

ipconfig output showin ip and mac

Physical Address is the MAC address.

IPv4 address is your own computer’s private IP address.

Related Posts

  • What is OSPF NSSA (Not So Stubby Area) and How is it Configured?
  • Comparison of BOOTP vs DHCP Protocols in Computer Networks
  • Pros and Cons of SD-WAN in Networks – Description and Discussion
  • Comparison of GNS3 vs EVE-NG vs Packet Tracer for Networks Simulation
  • Subnetting vs Supernetting – What’s the Difference? (Explanation Guide)

Filed Under: General Networking

Download Free Cisco Commands Cheat Sheets

Enter your Email below to Download our Free Cisco Commands Cheat Sheets for Routers, Switches and ASA Firewalls.

We use Elastic Email as our marketing automation service. By submitting this form, you agree that the information you provide will be transferred to Elastic Email for processing in accordance with their Terms of Use and Privacy Policy. Also, you allow me to send you informational and marketing emails from time-to-time.

About Harris Andrea

Harris Andrea is an Engineer with more than two decades of professional experience in the fields of TCP/IP Networks, Information Security and I.T. Over the years he has acquired several professional certifications such as CCNA, CCNP, CEH, ECSA etc.

He is a self-published author of two books ("Cisco ASA Firewall Fundamentals" and "Cisco VPN Configuration Guide") which are available at Amazon and on this website as well.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search this site

About Networks Training

We Provide Technical Tutorials and Configuration Examples about TCP/IP Networks with focus on Cisco Products and Technologies. This blog entails my own thoughts and ideas, which may not represent the thoughts of Cisco Systems Inc. This blog is NOT affiliated or endorsed by Cisco Systems Inc. All product names, logos and artwork are copyrights/trademarks of their respective owners.

Amazon Disclosure

As an Amazon Associate I earn from qualifying purchases.
Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.

Search

BLOGROLL

Tech21Century
Firewall.cx

Copyright © 2023 | Privacy Policy | Terms and Conditions | Hire Me | Contact | Amazon Disclaimer | Delivery Policy

0 shares