1

Consider a typical basic-ish Ethernet network, not using VLANs.

We have a bunch of wires and transceivers connecting some devices - the physical layer. At this layer we can only send groups of bytes between directly-connected devices - not terribly useful.

Then we have an Ethernet network built out of those wires and transceivers - the data-link layer. At this layer, we can send a packet to any device on the network, using its MAC address. This layer also adds a checksum to each packet, and a tag identifying the next-layer protocol. "Ethernet routers" (i.e. switches) route packets at this level, and have some restrictions (e.g. no loops).

Then we have an IP network built out of one or more Ethernet networks. At this layer, we can send a packet to any device on the network, using its IP address. This layer also adds a checksum to each packet, and a tag identifying the next-layer protocol. Wait a minute, that sounds familiar. It also supports fragmentation, and more advanced routing.

On top of that we run TCP, UDP, etc...

Hang on, the IP layer can do everything the Ethernet data-link layer can do! So why do we need the Ethernet data-link layer? Why not run TCP over IP directly over the Ethernet physical layer?

Alternatively, why not expand the Ethernet data-link layer to do the things IP can do, then run TCP over the Ethernet data-link layer, without IP?

2
  • You don't actually need the Ethernet layer. Ethernet is common because it's flexible and plug and play. Many carrier cores however don't actually have an Ethernet layer. ATM, Frame Relay, etc. – Dog Aug 26 '15 at 12:26
  • @Dog and why do you need one of those? why not IP over wires? – user253751 Mar 31 at 13:59
0

First what comes to my mind is situation when we have a lot number of users and they standby or communicate. L2 still update their MAC's and broadcast that they are there. A lot of traffic. And services like NAT: using NAT we have 1 public adress for multiple users inside our network.

Are you suggesting using only L2 ?:)

1
  • No, only using L3. – user253751 Aug 26 '15 at 11:32
0

Ethernet defines a common format that is used on all different sorts of physical channels. It is therefore responsible for Medium Access, so getting onto a wire or on a satellite link. L1 provides you with a way to send a single bit. May it be over radio, satellite, cable or whatever. This does not add reliability, as e.g. L2 protocols for wireless communication do. It sometimes also defines certain rules to ensure proper collision-free communication. IP does nothing like that... no reliability and no collision detection nor avoidance. This is also why TCP again adds a layer of reliability.

Today, with mostly star topologies, where a wire only connects two nodes, the Ethernet addresses are really not that important if you know how to differentiate between data you sent and the data your peer sent. But as Ethernet comes from a time, where bus topologies where present, it is really important that you have addressing. Otherwise, participants listening on the bus cannot tell whether a packet is for them or for someone else. This is also true for hubs which, in contrast to switches, don't do "store-and-forward", but instead forward a single bit they receive on an incoming port to all other ports.

The checksum point is important as even with L1 service of transmitting a bit, nobody ensures that the bit is received correctly. Ethernet can detect errors by the checksum. You said correctly that checksums are done in L3 with IP, but if you take a closer look at IPv6, you see that they dropped the checksum. The motivation behind this is that Ethernet does checksums anyway (L2) and TCP also ensures reliable data transfer through ACKs and sequence numbers (L3).

8
  • "L1 provides you with a way to send a single bit." - in that case, don't we just need a preamble and an inter-packet gap from L2? No checksums or addresses? – user253751 Aug 26 '15 at 11:08
  • @immibis: I added some explanation on checksums and addresses. – Darneas Aug 26 '15 at 11:14
  • For addressing, obviously you would start using IP addresses for all routing, you wouldn't just broadcast everything. – user253751 Aug 26 '15 at 11:22
  • Yes, but that is what hubs do. I am afraid I don't get your remaining question. What is unclear? – Darneas Aug 26 '15 at 11:23
  • 1
    If you replace all switches with routers, then you don't need MAC addresses, right? And if you had NICs that could filter packets based on their destination IP address (instead of MAC address) – user253751 Aug 26 '15 at 11:39

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