3

I understand the concept of logical address, and physical address when it comes to computer memory. That is, physical is the actual address and logical address is what the applications think the address is. The operating system that lives between the applications and the physical memory translates between the programs memory and physical memory.

What's the equivalent of this when it comes to networks?

From what I've read, IP addresses are Logical, and MAC addresses are Physical. What does this mean exactly? When I send something to an IP address, I'm really sending to some translator who figures out which MAC address I want to send to? Does this mean that at any given time, every MAC online is assigned to one, and only one IP address?

Can you please clarify and explain, preferably with an example.

3
  • In IPv4 your last question is true, every MAC is mapped to one IP. But in IPv6 that changed, every MAC address can be mapped to as many IPv6 addresses as you like. you have to see your IP as a way to communicate out of the borders of your own Network. – eragon-2006 Jun 25 '14 at 17:50
  • 2
    @eragon-2006, you are incorrect. You can map a MAC to multiple IP addresses. Put a secondary IP address on a Cisco 6500 SVI and you will clearly find the same MAC address for both IP addresses in the ARP table. Similar is true of other devices/OSes as well. – YLearn Jun 25 '14 at 18:24
  • Did any answer help you? if so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer. – Ron Maupin Aug 10 '17 at 4:37
8

Do not try to compare networking to computer hardware. While in some cases this could help, it is comparing apples to oranges and clearly in this case it is causing some confusion. I think it may be best to just give a simple example to show how they are used differently.

Let's say your computer (192.168.10.1) wants to talk to a host (10.1.1.10). In this case, 10.1.1.10 is the logical destination or address you are attempting to send traffic.

Your computer however has no idea about the MAC or physical address of this server, nor does it know how to get to the logical address. However it does have a default gateway and knows 10.1.1.10 is not on the local subnet. So it sends the traffic to the gateway router with the logical destination of 10.1.1.10 and the physical destination of the gateway router's interface.

This router, will see that the logical address of the traffic is bound for another host, and will look up where it needs to send this traffic which indicates router2 is the next hop. It then changes the physical destination to router2's interface and forwards the traffic.

Router2 is directly connected to the server using IP address 10.1.1.10, so it changes the physical destination to the MAC address of the server and again forwards the traffic.

There can be number of additional routers on the path, but all through the process the logical destination address stays the same while the physical destination changes. This is also true for source logical/physical addresses along the route.

4
  • Third paragraph, second line.... did you mean "physical address"? – CodyBugstein Jun 25 '14 at 20:36
  • So it sends the traffic to the gateway router with the logical destination of 10.1.1.10 and the physical destination of the gateway router's interface. What do you mean by "gateway router's interface"? – CodyBugstein Jun 25 '14 at 20:38
  • 2
    No I meant logical address. Generally speaking, your computer has no idea how to get to any specific logical address not on the local subnet. It just knows to send any traffic not on the local subnet to the default gateway. – YLearn Jun 25 '14 at 20:40
  • 1
    Your computer is sending the traffic to the default gateway, which will provide routing services of some type. This makes it a router. Your computer will send the traffic to the physical address of the router interface that is on the same local subnet. Traffic is not sent to a device (which can have multiple interfaces each with a different physical address), rather it is sent to a specific interface's physical address. – YLearn Jun 25 '14 at 20:45
6

You need to remember that MAC addresses don't travel beyond a router, while IP addresses do.

During each hop on the way to the final destination, the MAC address is stripped and replaced with the devices own MAC address.

There are a couple basic steps that most devices will take to determine how to handle the data:

  1. The device looks at the destination IP address and compares it with its own IP address and subnet mask to determine whether the IP is local or remote.

  2. If the address is local, the system queries its ARP table for that IP's MAC address. If the IP is remote, it queries its ARP table for the default gateway's (router) MAC address.

  3. If there is no entry in the ARP table, then it sends a hardware broadcast requesting the MAC address from the owner of the IP. "Who owns 192.168.0.100?" (local) or "Who owns 192.168.0.1?" (default gateway).

  4. Once the MAC address of next hop is determined, the device sends the packet to that MAC address. i.e: 8.8.8.8 is Remote, so packet stays labelled as 8.8.8.8 but is sent to 192.168.0.1's MAC address to be routed to the internet.

These steps are repeated at every hop on the way to the final destination up until the final router determines that the IP address is local. This means the routers ARP table/broadcast has a MAC address mapped to that IP, so it doesn't need to keep routing it.

This has been slightly simplified to convey the idea better.


To address some of the specific points of your question:

  • There is no need for a 1:1 map of MAC:IP. A single MAC address can have as many IP's as it wants.

  • The 'translator' is either your own computer if local, or the router closest to the destination (local to them). See Address Resolution Protocol

  • While MAC addresses should be unique, they are only required to be unique to the Layer 2 segment. Every computer on the internet could have the same MAC address in theory, provided that they were all on separate networks.

I hope you are less confused after reading this.

1

Think of networks like the postal service. I send my letter address as

Name Street Town/City Country Post code/Zip code

I also include

Senders name Street Etc...

This is the IP address the logical route taken by the letter

The mac address is the postal services method of delivering this letter

Senders house - Post box

Post box - Source sorting office

Local sorting office - Main sorting office

Main Sorting office to - Destination sorting office

Destination sorting office - Destination Home

This is the concept of logical and physical addressing in networking.

The logical is the source and destination only.

The physical is how to deliver it.

1

Media Access Control (MAC) address are the addresses which indicates the physical address from/to you are sending the data. This address is same for all time. For example MAC address of your computer, mobile or any other device is same for all time either you are sending message to Bob or Alice.

Internet protocol (IP) address are different for every node. for example if you are sending message to Bob whose IP is 10.61.1.100. your data will send to Bob through different devices like routers, nodes etc. and every time your destination address will be changed, which will be the address of the next node.

For more details I suggest you to read the book "Data communication and Networking by forouzan. https://hasdiputra.files.wordpress.com/2014/09/data-communication-and-networking-by-behrouz-a-forouzan-4th-edition.pdf

and one more thing that every time when you change your internet connectivity via modem or any other method you see that your IP address will change every time while your MAC address will be same for all time.

So I think now your doubt on Logical and physical address is clear now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.