Advertisement

Deep Ethernet Question

Started by September 21, 2003 06:04 PM
5 comments, last by Telamon 21 years, 4 months ago
Question for the ethernet hardware pros out there: If there are two computers on a LAN who have ethernet cards with identical hardware ethernet addresses, what happens? I know hardware ethernet addresses are meant to be globally unique, but for the sake of this post, let''s pretend that it''s possible (through what ever various software/hardware hack you want to imagine). How are IP addresses translated to hardware ethernet addresses? I assume there''s some kind of translation layer. Is this layer "smart" in that it checks for duplicate hardware addresses? What if both computers are browsing the web on port 80 at the same time. Will they both receive each other''s packets resulting in Internet Explorer waving its hands in frustrated confusion at trying to sort through the two? Or is there some ethernet/TCP/IP magic that makes it all work out ok despite having identical hardware addresses? ---------------------------------------- Let be be finale of seem, seems to me. ---------------------------------------- Coding: http://www.stanford.edu/~jjshed/coding Miscellany: http://www.stanford.edu/~jjshed

Shedletsky's Bits: A Blog | ROBLOX | Twitter
Time held me green and dying
Though I sang in my chains like the sea...

It depends on what those two connectors are connected to.

* unswitched (dumb) hub: Bad things. Both computers will acknowledge packets sent to them; both will send out packets. Any host connecting to either of them is likely to get multiple initial TCP sequence numbers, so it''s a tossup whether a particular connection will end up getting made. Depending on various parameters (chiefly the model of ethernet card and the operating system on each computer) both connections, or just one connection, may be completely useless.

* switched hub (switch): Worse things. The switch will vacillate back and forth as to which port to find that particular MAC on. Half of the packets to each host will be lost when both hosts are trying to use a connection simultaneously. Both connections will be useless.

"How are IP addresses translated to hardware ethernet addresses?" Using ARP. If the packet originated outside the LAN, then a router does it. This part is rather complex, and probably mostly outside the scope of this discussion, but suffice to say that they CANNOT have different IP addresses.

"Will they both receive each other''s packets resulting in Internet Explorer waving its hands in frustrated confusion at trying to sort through the two?" No, the differing sequence numbers mean that the connections just won''t be successfully established in the first place.

"Or is there some ethernet/TCP/IP magic that makes it all work out ok despite having identical hardware addresses?" No way. If you fuck up the network like this, it''ll be fucked. No magic there.


How appropriate. You fight like a cow.

Advertisement
> If there are two computers on a LAN who have ethernet
> cards with identical hardware ethernet addresses, what happens?

This should never happen since the MAC is stamped on the network card during the manufacturing process. The only exception would be 803.11 wireless nodes.

> but for the sake of this post, let's pretend that it's possible

Hmmmm. This sounds like a homework...|8-}

> How are IP addresses translated to hardware ethernet addresses?

Address aliasing is a problem on shared access LAN technologies only ( by 'LAN' I mean how local computers are plugged to one another). Ethernet I/II, MacLink (AppleTalk) and Token Ring are particularly susceptible to aliasing as all computers in a sub-node share the same physical serial cable. 10Base2/5 connector-based network cards are particularly bad at this. On more modern hardware such as the 10Base-T (the infamous 'RJ45' jack), this enforces a star-like network topology and routers & hubs are managing the messages going in and out of jacks rather than by MAC addresses.

In essence, if the one cable going to the router is shared amongst many computers you have potential problems; conversely, if each computer have their own cable going into the router there is no such problem.

-cb

[edited by - cbenoi1 on September 22, 2003 10:00:24 AM]
quote:
Original post by cbenoi1
> If there are two computers on a LAN who have ethernet
> cards with identical hardware ethernet addresses, what happens?

This should never happen since the MAC is stamped on the network card during the manufacturing process. The only exception would be 803.11 wireless nodes.



That is somewhat true, but manufacturers have made it possible to change that value in software for so long that the newest Windows DDK (2000/XP) even has a standard function for doing it. The ability to change MAC addresses in software is not without merit, as certain companies *cough* Cisco *cough* who shall remain nameless, *cough* Cisco *cough*, have been known to make major screwups by releasing hardware with overlapping MAC addresses.
That little 8-pin dip you see on the network card has the MAC address in it, its a serial eeprom. You could always hack it off to change it

Can two computers on separate parts of the internet have the same MAC? I think it will be posible since routing is based on IP addressed and not MACs
I don''t think it''s possible to predict what happens. After all, it''s highly unlikely that scenarios like the ones you suggest are tested by a lot of people. Most likely, the outcome is very NIC- and OS dependent.

I think Sneftel pretty much got what would happen on a switched LAN. However, I think the outcome would likely be different on an unswitched LAN.

The OS would get packets that are not meant to be received by it from the NIC, because the MAC matches. However, the same thing happens in promisc mode, so the OS should have some kind of filtering based on the IP address (then again, it might not). So, as long as the IP addresses don''t overlap, your network might actually work fine (inefficiently, but fine).
As soon as you''re using DHCP though, all bets are off. Most likely both PCs would get the same IP address (especially when they boot up at roughly the same time), which would obviously cause all sorts of fun things.

cu,
Prefect
Widelands - laid back, free software strategy
Advertisement
Hi Telamon,

--- If there are two computers on a LAN who have Ethernet cards with identical hardware Ethernet addresses, what happens?

--- I know hardware Ethernet addresses are meant to be globally unique, but for the sake of this post, let''s pretend that it''s possible (through what ever various software/hardware hack you want to imagine).

Those are very good questions. I have setup a half a dozen different environment with servers having duplicate MAC address before. The reasoning I did was for cheap Web Server Load balancing and Failover. The technology could be used on games servers too for the same purpose. It is bested to use it with sessionless connections but not impossible with session based connections.

--- How are IP addresses translated to hardware Ethernet addresses? I assume there''s some kind of translation layer. Is this layer "smart" in that it checks for duplicate hardware addresses?


Ethernet addresses are also known as Mac addresses. When you hook you computer to a network and start talking with a valid IP address the switches that you are connected to and the router that is your default gateway stores you MAC address in a table called an ARP table. Basically, it is MAC to IP lookup table that is dynamically built and refreshed. The next router does not know about your MAC address at all. It knows that to get to your computer it has to send the packet to your router.

It is kind of like the post office in a way. Let’s say you send a letter from New York, NY, USA and send a letter to Claremore, OK, USA. You put the letter in the mail box. The mail person (switch) picks up the mail and takes it to the post office (router). The NY, NY post office does not know where Claremore is, but it know that where to send mail for OK. So the NY, NY, USA post office send it to the main post office in OK. It just happens that that is OKCity, OK, USA. They say this is not for me but I know were to send it. They send it to the Post office (Router) in Tulsa, OK, USA. They say this is not for me but I know were to send it. They send it to the Post office (Router) in Claremore, OK, USA. Well the post office gives it to a mail person (Switch) to deliver it to the mail box.

--- What if both computers are browsing the web on port 80 at the same time. Will they both receive each other''s packets resulting in Internet Explorer waving its hands in frustrated confusion at trying to sort through the two? Or is there some Ethernet/TCP/IP magic that makes it all work out ok despite having identical hardware addresses?


Scenario 1:
2 Servers on the Internet located at a company. Server has an IP Address of y.y.y.160. Client located somewhere else on the Internet connect through an ISP. Client has an IP address of x.x.x.150. The IP are just possible examples.

Client sends a request to the servers. It takes the following path. Similar to a trace route.
x.x.x.150 client PC.
x.x.x.1 isp’s router that’s closest to the client
x.x.j.1 2nd hop on isp’s network.
x.x.k.1 isp’s router to the Internet
m.m.m.123 maybe a tier 1 provider’s router
n.n.n.193 another tier 1 providers router
y.y.t.1 companies isp’s router
y.y.p.1 company’s router
y.y.r.1 companies 2nd router
y.y.y.160 one of the 2 servers

The last hop is where it gets complicated. It is dependent on the switch manufacturer on what happened. If the switch allows duplicated MAC addresses functionality then both servers will get the packets. If the switch does not allow duplicate packets then you may get erratic behavior. Possible ARP cache flooding, disabling of one of the ports the server is plugged into etc…

Mac address are only stored on the local router and switch level. So in the Scenario 1 only the y.y.r.1 router knows the MAC address but does not know there is more than one server using it and the switch that the servers are plugged into know that 2 ports on the switch have the same MAC address. The rest of the computers and routers listed in the scenario only know the destination and source IP address.

Basically, the client only has to know the destination IP address and know its clients local router or default gateway.

I hope that helps. If you have more questions, just post.

Thanks,
Caveman

This topic is closed to new replies.

Advertisement