7 ms·
Why couldn't MAC addresses be used instead of IPv4|6 for networking?
- AUmrysh 14y agoTypically, MAC is assigned by the hardware manufacturer (sometimes you can change/spoof it). IP is typically assigned either by the network administratior or DHCP. If all addresses were based on mac, you could easily intercept the messages from anyone. IP allows a layer of abstraction in which you can group multiple subnets into the same external IP or set up subnets within those subnets even. Another problem is that numerous devices will share the same MAC address, it's just statistically unlikely to find them on the same network. It's an especially big problem with cheap/knockoff network equipment. See: http://www.linuxquestions.org/questions/linux-networking-3/multiple-nics-with-the-same-mac-address-930357/ http://www.linuxquestions.org/questions/linux-networking-3/m...
- liquidsnake 14y agoActually the main problem of MAC vs IP, as the response states, is the lack of hierarchy vs the presence of it. Both IPs and MACs can be changed by the administrators and both can be set such that duplicates exist in the network. However the fact that MACs are set by manufacturer makes them impossible to route as the values are not related to the network locations but related to hardware origin. Edit: As one of the replies stated, they are also used in Stateless autoconfig in IPV6 (see: https://en.wikipedia.org/wiki/IPv6_address#Modified_EUI-64 https://en.wikipedia.org/wiki/IPv6_address#Modified_EUI-64)
- derleth 14y ago> If all addresses were based on mac, you could easily intercept the messages from anyone. So you encrypt stuff you don't want anyone else to read. Security isn't the concern of the networking layers; it's all done, to the extent it is done, at the application layer. That's the original design, anyway. Edited to add: Well, the original original designs were by people who weren't thinking of security at all. That's why telnet and FTP are the way they are. > Another problem is that numerous devices will share the same MAC address, it's just statistically unlikely to find them on the same network. This, on the other hand, really is a perversion of the intended model. 48 bits was intended to be globally unique.
- mburns 14y ago>it's all done, to the extent it is done, at the application layer. Sometimes true but often not. Encryption can and does happen at various layers of the (OSI) networking stack (Secure Session Layer, Transport Layer Security, Internet Protocol Security). >That's why telnet and FTP are the way they are. Those programs are the way they are due to a holdover from the Unix philosophy: do one thing and do it well. Sure, functioning at all was more important than functioning securely. If you ran your connections over a VPN, SSL or IPSec line, the fact that telnet didn't also support encryption would be moot. The Application layer is for the applications data. If you want to secure the transmission of that data, it shouldn't be up to each and every individual application to support encryption. This is why things like IPv6 or SPDY/HTTP2 have baked-in encryption below the application layer.
- sliverstorm 14y ago48 bits was intended to be globally unique And it well could be, but guaranteeing uniqueness is rarely as easy of a problem as you might wish.
- kruk 14y agoMAC and IP are in two different layers of OSI model and while both are technically addresses, they are independent of each other and their role is different. Not every network uses IP addressing and not every device has a MAC address.
- hapless 14y agoNo reason at all. Novell Netware did exactly this. The host portion of your address was your MAC. Networks were identified by their local netware servers.
- neild 14y agoThat's pretty much exactly what IPv6 with stateless autoconfig does--network address in the upper 64 bits, MAC address (slightly modified) in the lower 64.
- astrodust 14y agoThis is one of the reasons why IPX was a bad idea and never took off. Automagical discovery is always great until it doesn't work.
- bdunbar 14y agoand never took off. IPX was everywhere NetWare was. NetWare got into everything, like dust, in the 80s and part of the 90s.
- iioowwee 14y agoThey already are. Part of the IPv6 address is derived from your MAC. Despite not owning the network for which they are being allocated, IPv4 is a "paying job" to some people. And sometimes an ego boost too, i.e., people who get their kicks from creating "IP address policy". Needless to say this easy "work." Hello ARIN. It's a lot like ICANN. On CircleID someone recently pointed out that IPv6 will make this sort of "job" meaningless. There is so much IPv6 address space that playing favorites and charging hefty fees is unjustifiable. Back to your point about MAC's: This is also why the "we're out of IP addresses" meme seems silly. Because we don't see the IEEE complaining they are "running out of MAC's". And IPv6 addresses use MAC's. The thing to keep in mind is that just because something, e.g. a better addressing scheme, or true network-level peer-to-peer networking, is not "widely adopted" does not mean it isn't available, _right now_. It may have been available for years. There were people at universities still teaching the use of punch cards even after a well-known computer professional in Canada was already programming using a terminal display. And there were other Canadians sending emails before DARPA. Do not assume that the crowd is always wise. And be wary of the "hype". 80/20 rules - another great internet meme - mean than we can have 80% of the people being stupid. And the 20% have to suffer. When the "new" naming, "new" addressing and "new" peer-to-peer solutions are offered up the next time, keep an open mind. Try not to be so quick to dismiss any sort of change to the "status quo". Evaluate the approach carefully. It might have merit, and maybe it's not immediately obvious. Many times (in fact almost all the time), the solutions are not new. We're just waiting for people to finally catch on and realize there is "a better way". We're waiting for people to "try something 'new'".
- regularfry 14y agoNo. An IPv6 address can be partially derived from a MAC, but a lot of the time it won't be. For instance, none of the VMs we operate (which all have an IPv6 /64 assigned) have real network hardware, so it makes no sense to generate the IPv6 address from a MAC there. And you can still multihome a single IPv6 address across more than one physical interface, so again, that's not somewhere you'd want to put a MAC into an IP address. > On CircleID someone recently pointed out that IPv6 will make this sort of "job" meaningless. Er... not sure how that follows. If routing tables aren't going to grow without bound, there's no less need for central allocation authorities than there is with IPv4. The important job isn't rationing, it's keeping allocation as contiguous as possible so the network hardware can keep up. > Back to your point about MAC's: This is also why the "we're out of IP addresses" meme seems silly. Because we don't see the IEEE complaining they are "running out of MAC's". And IPv6 addresses use MAC's. Not quite sure what you're getting at here. When people say "we're out of IP addresses", they're talking about IPv4 addresses. That's not silly at all - it's real, it's happening now, and IPv6 still hasn't quite got the penetration to get us out of the hole yet. The rest of your post would be more useful with some specifics.
- trout 14y agoLots of reasons. From a security perspective - IPv6 SLAAC (sort of like DHCP) does this - it uses the MAC as the last 48 bits of the 128 bit address. However, this is largely seen as a security problem things like RFC 4941 [1] have argued against this idea. If you think having your iPhone keep a track of which cell phone towers you've been to is bad, think about the consequences of being globally reachable by the same IP address at all times, which means you can be tracked to where that devices is and has been based on the routing rules. As well, ethernet is not IP. They are different layers of the OSI model. Just because you're on ethernet (wired/wireless) doesn't mean you're using IP, and vice versa. Some devices don't have MAC addresses. Frame relay uses DLCI's for instance. Historically there were lots of other technologies using IP that weren't ethernet - FDDI, token ring, ATM, etc. Ethernet has replaced nearly all of those, but not all. Routing scalability - another huge problem. But this will rear it's head in IPv6 with the exponentially large amount of possible routes. Right now the routing tables are around 350k-400k routes. Compare that to the billions of devices that connect to the internet simultaneously. MAC addresses are locally assigned addresses. There would be no way to prevent duplicates. In most networks, your IP address will specify the way you are routed through the network and your security level. If that isn't centrally managed you have no security or IP addressing schemes. [1] http://tools.ietf.org/html/rfc4941 http://tools.ietf.org/html/rfc4941
- bdb 14y agoIt'll certainly be interesting to see if scalability of the IPv6 DFZ routing table is actually better or worse than that of v4 (adjusted for growth in number of multihomed organizations, of course.) One could make an argument that the bloat in the v4 table today is largely due to disaggregated allocations from the RIRs due to exhaustion-avoidance address space allocation policy. It is entirely possible that large organizations will be able to advertise fewer prefixes, as they have large, contiguous allocations, and thus can more efficiently aggregate at the border. (Sorry, this is a bit late, but your comment got me to thinking...)
- 0x0 14y agoRouting packets based on MACs would be impossible. That's why. My laptop has the same MAC whether it is connected at home, at work, or in the airport. How would ISPs and the internet backbone routers know where to send the packets to reach me?
- sneak 14y agoThank you for summarizing the answer in the linked article. You may now proceed to posting solutions to FizzBuzz in Jeff Atwood's blog.
- 0x0 14y agoWell, what kind of discussion would you expect for an article like this? Perhaps you should spend your time revising your HN bio instead.
- nodrama 14y agowell.. technically it is possible. The mobile phone network works like this without a problem. You turn off your phone, go to the other half of the planet, turn it on, it updates it's "location" and you are back "online". The reason to use IPs is that you don't have to update and maintain all those "locations". IPs mark the end of a cable. MACs mark an equipment. Equipments can migrate easily (you need updates), "end of cables" less so.
- tptacek 14y agoIt's not impossible, just untenable; it would be the equivalent of advertising every IP address today as a /32 prefix.
- wmf 14y agoThere's some interesting research in this area, but the current state of the art is pretty inefficient. http://www.cs.uiuc.edu/~caesar/papers/rofl.pdf http://www.cs.uiuc.edu/~caesar/papers/rofl.pdf http://conferences.sigcomm.org/co-next/2010/CoNEXT_papers/20-Singla.pdf http://conferences.sigcomm.org/co-next/2010/CoNEXT_papers/20...
- cllunsford 14y ago
- vdm 14y agoInterconnections: Bridges, Routers, Switches, and Internetworking Protocols (2nd Edition) Radia Perlman http://www.amazon.com/dp/0201634481/ http://www.amazon.com/dp/0201634481/ This book explains how conventions in data networking were established, how words became used as the terms for particular obvious but slightly ambiguous concepts, e.g. 'names' vs 'addresses', bridging vs routing. It also puts IP in to context viz. other LAN protocols before it became dominant. Recommended.
- nikcub 14y ago"Why don't we use social security numbers to deliver mail"
- inopinatus 14y agoWell, although that's a nice metaphor for the answer, in practice I can imagine that using a personally unique ID for physical mail routing is quite possible. A billion or so rows in a database that links an ID number to spatial coordinates is perfectly conceivable, it'd only be in the tens of gigabytes. It'd also aid in redeliveries and redirections. There would be no reason to even keep this unique, one could have many such numbers to avoid correlations. Using the SSN itself, of course, has vast privacy & security complications. Why doesn't this work for IP? Because on that scale, the route table is too large to advertise and too large to keep in the working memory of current router linecard ASICs for sub-microsecond lookup, speeds a postal service does not aspire to.
- cwb71 14y agoI do not understand why this story is being upvoted. Are we supposed to duplicate the answers on serverfault here (which seems to be most of the comments) or are we making fun of the question or what?
- inopinatus 14y agoNone of the reasons given seem correct to me. Many of the reasons I see given are conventions arising from use and misuse. The simple answer is this: An IP address identifies a host, whilst a MAC address identifies an interface. That is all. Absolutely everything else, such as route aggregation, routing policy, and the behavioural differences between layers, stems from this primary distinction between logical and physical. (Note: it remains a common - indeed, conventional - configuration & design error to bind an IP address to an interface. There is no such requirement and this complicates many networks. I was irritated to learn that IPv6 makes use of the MAC address in self-autoconfiguration) (ObAuthority: I used to make ISP management systems for a living)
- est 14y ago> An IP address identifies a host, whilst a MAC address identifies an interface. ... while a MAC can host multiple IP addresses (see vmware bridged network for guest OS), and the same interface can have multiple MAC addresses. And a devince can have multiple real/virtual interfaces.
- vacri 14y agoAnd if your NIC dies and needs to be replaced, imagine having to update all the other machines that referred to the old MAC.
- vacri 14y agoWe need a public service announcement to show the differences, something along the lines of "I'm a MAC, I'm an IP"
- yskchu 14y agoNoone seems to have hit the nail on the head yet, the reason's quite simple. Routing. Let's say you have an IP of 202.20.10.5 and you live in New York. Your ISP allocated 202.20.10.x to New York Your ISP owns 202.20.0.0, and advertises this over BGP When someone tries to reach you, they first lookup: 202.20.0.0/16, the closest match. Then then know to send the packet to your ISP, who sends it to 202.20.10.0/24 (New York), who then routes it to you. How about if we use mac addresses? So let's say your mac address is: EW:34:AO:QW:RE:80 How would someone be able to find you? If they needed to do that, then: 1) Your ISP will need to advertise EW:34:AO:QW:RE:80 2) They send the IP packet to your ISP, who routes it to you. If the ISP has 1 million customers, then it'll have to advertise 1 million MAC addresses in its lookup table... Instead of just 202.20.0.0/16 (one entry) It's not scalable to use MAC addresses for Internet use. On the other hand, if you're talking about a local LAN, then yes, MAC addresses are used, and is actually already being used, for networking.
- notime 14y agoI personally think that regardless of how it would be done, having a hardware specified ID for a user is a good idea. MAC wouldn't be the right thing to use, but something programmable similar to the ID on a SIM card. If done years ago, it would have solved a myriad of ID-related issues we've had since. Computers would not be interchangeable tools that employers can buy for you, but rather they would be more of an extension of ourselves that we could carry around with us. Google wouldn't have provided 2 factor auth if OpenID were sufficient. 2 factor auth requires a mobile phone which is assumed to be on the user's person at almost any time. Hmm... that sounds like the scenario I was talking about where the device is an extension of yourself and is associated with something that is your personal ID- your phone#, and not some transient IP address. P.S.: Reading the serverfault comments under one of the answers made me want to have enough rep to downvote Chopper3. That guy had some asinine remarks which I've never seen before on any of the fogcreek sites, and despite his 60k rep should be docked down to 0 for that.