ARP Why Mac address, why not simply use IP addresses?
BobbyBrown123
Registered Users Posts: 3 ■□□□□□□□□□
in Off-Topic
I understand private versus public IP addresses; however, I would think this would have nothing to do with ARP, since broadcasting is stopped at the router. That being said, why do we use Mac addresses with IP addresses, if our IP address is statically set and not dynamic? Any insight would be appreciated. I also get that Mac is 48 bit while IP is 32 bit, but not sure why you couldn't pad the ip address.
Comments
-
RobertKaucher Member Posts: 4,299 ■■■■■■■■■■To really answer I need to review some basics:
1. MAC Addresses do not in any way give you the ability to tell where a node is on the network. The only information that can be gleaned from them is the vendor and the node identifier. This means they are flat and not hierarchical.
2. Because of that routing tables would need to contain all the individual nodes and would be unmanageably large. Networks would become brital and inflexible.
3. A MAC Address, because it is theoretically unique, is much more efficiently used when the devices that are talking to each other are directly connected. This is why switches have ARP tables. IP addresses can change for different reasons. A computer might move to another building, a laptop might float from floor to floor, from a management perspective even the entire class prefix might change or the subnet mask might expanded or even contracted for various reasons. Having two addresses at the local level allows for much more flexibility in network design, maintenance, and management.
If we only had MAC addresses the amount of chatter created every time a device came online or moved, combined with the gigantic ARP tables that would be required would cripple an enterprise network. Even if your IP address is statically assigned, if you could go down the single address path all flexibility and scalability would be forever left behind. -
BobbyBrown123 Registered Users Posts: 3 ■□□□□□□□□□Sorry, but if I read this right, you answered on why not to use Mac addresses. I already understand why not to use Mac addresses. My question is why not simply use IP addresses? If the IP address is unique to each host, then why the need for the Mac address? When they designed how to send packets, why did they feel the need to use the Mac address?
-
m3zilla Member Posts: 172If we only use L3 address, how would a router be able to tell whether a packet is destined for itself, or to be routed through it?
Remember, L3 address is end-to-end, it does not change per hop. L2 addresses, on the other, changes at every hop. With that in mind, if we only have L3 address, how would Host A, communicate to Host B, if it has to go through Router A? What IP would Host A put in the destination IP field? Host B or Router A? If it's Router A address, how would Router A know to forward that to Host B? If it's Host B address, how would the packet get to Router A?
This is why we use L3 and L2 addresses. When host A wants to communicate with Host B, it will create a packet with Host B as the L3 destination IP. However, it the L2 (mac) address would be that of Router A. This is how the packet gets to Router A. Once Router A gets it, it looks at the IP address, and sees that its for Host B. This is how Router A knows the packet is not destined for itself, but to be routed through it. -
RobertKaucher Member Posts: 4,299 ■■■■■■■■■■BobbyBrown123 wrote: »Sorry, but if I read this right, you answered on why not to use Mac addresses. I already understand why not to use Mac addresses. My question is why not simply use IP addresses? If the IP address is unique to each host, then why the need for the Mac address? When they designed how to send packets, why did they feel the need to use the Mac address?
My answer addresses why both are required and I stand by it.IP addresses can change for different reasons. A computer might move to another building, a laptop might float from floor to floor, from a management perspective even the entire class prefix might change or the subnet mask might expanded or even contracted for various reasons. Having two addresses at the local level allows for much more flexibility in network design, maintenance, and management.
You need two addresses. One that is relatively static and identifies the node uniquely, and one that has the ability to locate a device in space. Think of the IP as your house address, but the MAC as a government ID number. How different would your life be if you were forever confined to having the same home address? You could never move, never go to a different city, expand to a new home for your family to grow.
I stated quite clearly in the final sentence:Even if your IP address is statically assigned, if you could go down the single address path all flexibility and scalability would be forever left behind. -
m3zilla Member Posts: 172I don't think the OP is suggesting that we use the MAC address for addressing. He's wondering why we need to use it in conjunction with IP address, rather than just using IP address.
-
blargoe Member Posts: 4,174 ■■■■■■■■■□Why not just IP?
You have to look back over a decade ago, when IP was just one of many networking protocols commonly in use. Each device has a physcial address that is like a fingerprint; it never changes, but the medium and the protocol in which its communications may be encapsulated could be anything. They had to create a standard way at the physical layer for devices to broadcast and receive/respond to broadcasts that was agnostic of the packets being transmitted that are only understood by the next layer up in the stack. Today, that next layer is using IPv4 predominately, but the tide is turning toward IPv6 ever so slowly.
Also, there are not enough IPv4 addresses in the world for each device to have a unique one, there's another reason why not.IT guy since 12/00
Recent: 11/2019 - RHCSA (RHEL 7); 2/2019 - Updated VCP to 6.5 (just a few days before VMware discontinued the re-cert policy...)
Working on: RHCE/Ansible
Future: Probably continued Red Hat Immersion, Possibly VCAP Design, or maybe a completely different path. Depends on job demands... -
RobertKaucher Member Posts: 4,299 ■■■■■■■■■■I don't think the OP is suggesting that we use the MAC address for addressing. He's wondering why we need to use it in conjunction with IP address, rather than just using IP address.
Again, I have explained why we need two types of addresses. Did you read my post? Why you need two types is the answer to why you cannot have just one. It doesn't matter if the question is, "Why can't we just have a MAC address?" or, "Why can't we just have an IP address?"
We need one for a (theoretically) unique ID for frame deliver on a LAN.
We need a second to allow for routed communication across networks.
Having both increases flexibility and scalability. Having only one forever dooms you to a single network topology that is fixed in stone and married to that protocol forever. Nothing can ever move or change and your network is brittle and prone to minor changes breaking it. Networks that use two addressing systems: one assigned at layer 2 (hardware) one assigned at layer 3 (software) allows networks to be modular and to shrink or grow.
blargoes's point goes directly to scalability. If we used only 1 protocol (say IPv4) we could never abandon it in favor of another layer 3 protocol (IPv6) because our hardware would be tied to it. The reverse is true as well. IP is an abstraction that allows for multiple layer 2 protocols such as Ethernet, Frame Relay, or ATM. Flexibility, manageability, and scalability. A LAN systems could use just one protocol, but it would forever remain a LAN. -
hiddenknight821 Member Posts: 1,209 ■■■■■■□□□□I understand what the OP is trying to suggest. One of my professors at my previous school had asked me the same question, which I didn't have an answer to at that time until after I completed my CCNA. I believe the network would become problematic as it's not scalable using only immutable addresses. In an IPv6 network, of course there are plenty of addresses to give away from the ISP. However, let's say one workstation has to move to another location. Does it get to keep the same immutable address (combined layer 2 & 3) as the only mean to communicate with the other hosts that it was once interconnected with? I don't think so. It would also mean that there would be no such thing as network segments as any hosts can communicate with any hosts. Either a host would be broadcasting to itself or all hosts are sending out and receiving broadcasts.
So, it's necessary to have one immutable address (layer 2) and mutable address (layer 3) assigned to a host so that flexibility and scalability can become possible. -
m3zilla Member Posts: 172I did!MAC Addresses do not in any way give you the ability to tell where a node is on the network. The only information that can be gleaned from them is the vendor and the node identifier. This means they are flat and not hierarchical.
You're talking as if the OP wants to use replace IP address with the MAC address.Because of that routing tables would need to contain all the individual nodes and would be unmanageably large. Networks would become brital and inflexible
Why? Why can't we summarize routes just because there's no MAC?A MAC Address, because it is theoretically unique, is much more efficiently used when the devices that are talking to each other are directly connected. This is why switches have ARP tables. IP addresses can change for different reasons. A computer might move to another building, a laptop might float from floor to floor, from a management perspective even the entire class prefix might change or the subnet mask might expanded or even contracted for various reasons. Having two addresses at the local level allows for much more flexibility in network design, maintenance, and management.
So, we need MAC addresses because they're unique? When we move to IPv6, does that mean we no longer need MAC addresses?If we only had MAC addresses the amount of chatter created every time a device came online or moved, combined with the gigantic ARP tables that would be required would cripple an enterprise network. Even if your IP address is statically assigned, if you could go down the single address path all flexibility and scalability would be forever left behind.
Again, the OP isn't looking to replace IP with MAC addresses. He's asking why we need both. -
m3zilla Member Posts: 172hiddenknight821 wrote: »So, it's necessary to have one immutable address (layer 2) and mutable address (layer 3) assigned to a host so that flexibility and scalability can become possible.
So in IPv6, you have a Link Local, and a globally unique. Do you still need a MAC then?
Don't get me wrong, I know we need both a L2 and L3 address, I'm just trying to understand this "flexibility and scalability" reasoning. If you guys want to say that you need a L2 address becaues switches operates at L2, and makes their forwarding decision by looking at L2 addresses, fine. But I'm not sure I understand the flexibility and scalability bit -
hiddenknight821 Member Posts: 1,209 ■■■■■■□□□□So in IPv6, you have a Link Local, and a globally unique. Do you still need a MAC then?
Short answer. No. If I recall correctly, Link Local is suppose to be unique even though they aren't immutable. Although, I know it's possible to assign two hosts with the same Link Local address. However, if they are on the same network segment, then I would expect problems. I don't have a lot of experience or expertise with IPv6, but I am confident that it is almost impossible to have a network without two type of addresses. The engineers that came up with the Link Local address knew it must be done so that hosts can communicate with each other. Link Local is more efficient than the APIPA and MAC address. If you want answers, then join the IETF. I'm not here to argue as I'm not an expert. -
m3zilla Member Posts: 172RobertKaucher wrote: »blargoes's point goes directly to scalability. If we used only 1 protocol (say IPv4) we could never abandon it in favor of another layer 3 protocol (IPv6) because our hardware would be tied to it. The reverse is true as well. IP is an abstraction that allows for multiple layer 2 protocols such as Ethernet, Frame Relay, or ATM. Flexibility, manageability, and scalability. A LAN systems could use just one protocol, but it would forever remain a LAN.
And I agree with Blargoes/you. If you had posted this instead of house number/government ID analogy, I wouldn't have questioned what you said.
But, just for learning purposes, suppose that if instead of a L2/L3 header, you have an extra IP header field, that specifies next hop IP. So your L3 header would have- Final destination IP
- Next Hop IP
-
it_consultant Member Posts: 1,903BobbyBrown123 wrote: »I understand private versus public IP addresses; however, I would think this would have nothing to do with ARP, since broadcasting is stopped at the router. That being said, why do we use Mac addresses with IP addresses, if our IP address is statically set and not dynamic? Any insight would be appreciated. I also get that Mac is 48 bit while IP is 32 bit, but not sure why you couldn't pad the ip address.
I think you need to learn about the ARP protocol. The switch can't make forwarding decisions based on an IP address, it can only forward (basic, nonmanaged, layer 2 switch) based on a MAC address. If you had a static IP without a MAC address, the switch would not function correctly. You could plug your computer directly into a router and have assign yourself a 255.255.255.255 IP subnet, MAYBE, in that case, you could get away with not having a MAC address.
Keep in mind that bridging technology was developed before TCP/IP became dominant. Almost all layer 2 technologies (token ring, etc) requires MAC addresses. As switches were developed they had to use MAC addresses in order to work on the different layer 3 networks. If we knew, back in the day, that it was going to be TCP/IP and ethernet, we could have deprecated MAC addresses a long time ago. -
Claymoore Member Posts: 1,637There are - or really were, for all practical considerations today - other networking protocols than just TCP/IP. Sometimes multiple protocols were used within the same network, especially if you had Microsoft and Novell servers with a mainframe or two thrown in. TCP/IP is ubiquitous today, but that wasn't always the case. We have had networks in general, and ethernet in particular, longer than TCP/IP has been around.ARP has been implemented in many combinations of network and overlaying internetwork technologies, such as IPv4, Chaosnet, DECnet and Xerox PARC Universal Packet (PUP) using IEEE 802 standards, FDDI, X.25, Frame Relay and Asynchronous Transfer Mode (ATM), IPv4 over IEEE 802.3 and IEEE 802.11 being the most common cases.
IPX/SPX - Wikipedia, the free encyclopedia
Banyan VINES - Wikipedia, the free encyclopedia
Xerox Network Systems - Wikipedia, the free encyclopedia
DECnet - Wikipedia, the free encyclopedia -
vishaw1986 Member Posts: 40 ■■□□□□□□□□Hey BobbyBrowm ,
Here a very simple explanation : Suppose you want to go to market from your home . Your Home is located at point A and market is at point D .
You know that the market is at point D but you dont know how to reach there , what will you do ? You just came out of your home and saw a sign board toward market D and take that path . After some point you see another sign toward marker D and take that path and finally reach D.
What you get from here . A and D are the IP address for end to end delivery .
and the sign are the MAC address for the next hope fwding. -
Mishra Member Posts: 2,468 ■■■■□□□□□□It's used as a common denominator between multiple protocols including TCP/IP (among, of course, some other reasons stated in this article).
Just read the RFC, and specifically this portion.
RFC 826 - Ethernet Address Resolution Protocol: Or Converting Network Protocol Addresses to 48.bit Ethernet Address for Transmission on Ethernet Hardware
The Problem:
The world is a jungle in general, and the networking game contributes many animals. At nearly every layer of a network architecture there are several potential protocols that could be used. For example, at a high level, there is TELNET and SUPDUP for remote login. Somewhere below that there is a reliable byte stream protocol, which might be CHAOS protocol, DOD TCP, Xerox BSP or DECnet. Even closer to the hardware is the logical transport layer, which might be CHAOS, DOD Internet, Xerox PUP, or DECnet. The 10Mbit Ethernet allows all of these protocols (and more) to coexist on a single cable by means of a type field in the Ethernet packet header. However, the 10Mbit Ethernet requires 48.bit addresses on the physical cable, yet most protocol addresses are not 48.bits long, nor do they necessarily have any relationship to the 48.bit Ethernet address of the hardware. For example, CHAOS addresses are 16.bits, DOD Internet addresses are 32.bits, and Xerox PUP addresses are 8.bits. A protocol is needed to dynamically distribute the correspondences between a <protocol, address> pair and a 48.bit Ethernet address.
Motivation:
Use of the 10Mbit Ethernet is increasing as more manufacturers supply interfaces that conform to the specification published by DEC, Intel and Xerox. With this increasing availability, more and more software is being written for these interfaces. There are two alternatives: (1) Every implementor invents his/her own method to do some form of address resolution, or (2) every implementor uses a standard so that his/her code can be distributed to other systems without need for modification. This proposal attempts to set the standard.