Why do we need MAC addresses when you have local IP addresses
Asked Answered
P

3

23

From what I understood, MAC addresses are physical addresses only used in LAN to identify a device.
However, local IP addresses can also identify a device on a local network as it is unique. So why do we bother to include MAC addresses when we could have only used IP addresses for both LAN and WAN ?
I understand that this is what the OSI model and some protocols are based on but my question is rather why has it been made that way in the first place ? It seems like additional unnecessary data to send through the network and MAC addresses it can be spoofed.

Pelf answered 20/2, 2021 at 9:58 Comment(0)
V
8

Let me give you a simple answer. THE local IP address will dynamically change when you are disconnected from the WIFI network or ethernet. (sometimes it's not changing because that anyone else is not connected to the network to reserve your recent IP). so MAC address is a unique address for your network card. We can uniquely identify your device from it. It cannot be changed but nowadays also can change it.

V1 answered 20/2, 2021 at 10:12 Comment(2)
Why are dynamic IP addresses a problem ? For example routers have a routing table for MAC adresses. Why couldn't we make a dynamic routing table that would store local IP adresses and that would be updated upon connection / disconnection of a device ? Or maybe the problem is elsewhere, I'm a bit confused why the dynamic part is a problem.Pelf
I think maybe your idea is right. but think, IP address is unique for a device while it is connected to the internet. but MAC address is unique for any time either it is connected to the network or not. MAC address is a fixed address to the network card. The network card's designer put a unique mac address into the network card. So, the best thing is to store the MAC address in the routing table, not IP address. That's my opinion.V1
E
17

Why are dynamic IP addresses a problem ? For example routers have a routing table for MAC adresses. Why couldn't we make a dynamic routing table that would store local IP adresses and that would be updated upon connection / disconnection of a device ? Or maybe the problem is elsewhere, I'm a bit confused why the dynamic part is a problem.

A packet can sure get to the target device with an IP table instead of MAC table, but with dynamic IP, the packet may finally get to the wrong device(when the old device get offline and a new device takes the same IP), the new device cannot decide if the packet is to itself without the an identifier, that's when the MAC come in.

Elegancy answered 17/8, 2021 at 4:18 Comment(0)
V
8

Let me give you a simple answer. THE local IP address will dynamically change when you are disconnected from the WIFI network or ethernet. (sometimes it's not changing because that anyone else is not connected to the network to reserve your recent IP). so MAC address is a unique address for your network card. We can uniquely identify your device from it. It cannot be changed but nowadays also can change it.

V1 answered 20/2, 2021 at 10:12 Comment(2)
Why are dynamic IP addresses a problem ? For example routers have a routing table for MAC adresses. Why couldn't we make a dynamic routing table that would store local IP adresses and that would be updated upon connection / disconnection of a device ? Or maybe the problem is elsewhere, I'm a bit confused why the dynamic part is a problem.Pelf
I think maybe your idea is right. but think, IP address is unique for a device while it is connected to the internet. but MAC address is unique for any time either it is connected to the network or not. MAC address is a fixed address to the network card. The network card's designer put a unique mac address into the network card. So, the best thing is to store the MAC address in the routing table, not IP address. That's my opinion.V1
F
2

To answer "why has it been made that way in the first place", you need to understand what problems needed to be tackled.

Ethernet addressing was created to address different devices on the same physical network. Depending on the topology, different things needed to be taken into account.

IP protocol was invented mainly to tackle the problems of routing and introduce an abstraction layer from the physical layout, which a local network may have:

The selection of address formats is a problem
between networks because the local network
addresses of TCP’s may vary substantially in format
and size. A uniform internetwork TCP address
space, understood by each GATEWAY and TCP, is
essential to routing and delivery of internetwork
packets.

Source: A Protocol for Packet Network Intercommunication

Fawcette answered 20/2, 2021 at 18:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.