MAC layer for a switch and a router

Bonjour,

I am thinking a curious thing I had never considered before, or simply forgot.

(1) A basic hub has no MAC layer, so it can look at Ethernet addresses.

(2) A basic switch is a layer 2 interconnection device, so it can consider Ethernet addresses.

(3) A basic router is a layer 3 interconnection device. It has a MAC layer like a switch but, besides, each port has it own Ethernet address.

What would be the difference between a "switch MAC layer" and a "router MAC layer" that makes in one case we don't have an Ehernet address and in the other case we have an Ethernet address? Perhaps the MAC layer can be divided in several sublayers.

Thanks for your advice, Michelot

Reply to
Michelot
Loading thread data ...

Bonjour Michelot,

The word "bridge" has really its importance for that. Routers and switches use both the MAC layer but not for the same services.

- Routers use MAC layer in the "vertical" sense (from MAC to level 3, and level 3 to MAC),

- Switches use MAC layer in a "transverse" sense (from MAC to MAC as a relay).

First services (for basic routers) are those specified by the OSI model, and second services (for basic switches) are the internal sublayer services specified by 802.1D.

Do you agree that, best regards, Michelot

Reply to
Michelot

Bonjour Michelot,

The word "bridge" has really its importance for that. Routers and switches use both the MAC layer but not for the same services.

- Routers use MAC layer in the "vertical" sense (from MAC to level 3, and level 3 to MAC),

- Switches use MAC layer in a "transverse" sense (from MAC to MAC as a relay).

First services (for basic routers) are those specified by the OSI model, and second services (for basic switches) are the internal sublayer services specified by 802.1D.

Do you agree that? best regards, Michelot

Reply to
Michelot

Actually, they both have addresses. All ports in a bridge are required to have their own MAC address, and that address gets used in L2 control protocols such as LACP. The MAC layer is the same in bridges and routers except that a bridge's MAC operates in promiscuous mode.

Anoop

Reply to
anoop

Bonsoir Anoop,

Thanks for these comments.

LACP is an optional sublayer. I think the basic switches have no need for a MAC address.

I think your statement also complete my idea in the previous post. Isn't it?

Best regards, Michelot

Reply to
Michelot

Bonsoir Michelot,

Hubs, i.e. repeaters, should not consider MAC addresses at all. An incoming frame is flooded to all other interfaces of the hub, emulating the experience of parallel-connected hosts in a coax Ethernet.

The most basic bridges also operate this way, even if they have a MAC address for every port. The original purpose of bridges was to tie together different Ethernet media into a single L2 net, or just extend an Ethernet beyond the limited extensions allowable with simple repeaters. So the MAC addresses of these bridges didn't play a role in basic frame forwarding at all. (Never shows up in frames sent between hosts, for example.)

The special category of Layer 2 switches called "learning bridges," which describes most L2 switches these days, do use the MAC DA of an incoming frame, to determine to which port that frame should be "routed." I think that's what you are describing as "transverse." This is a special case.

Routers use the MAC layer just as any host does. The MAC address is only used to find that router's interface in the L2 net, that's all. What the router does afterwards, to forward the frame, is independent of MAC address considerations.

In short, I think it's safe to say that NORMALLY, a MAC address is only used to identify a host's interface in the L2 network. As such, repeaters and bridges, in their most basic forms, don't use MAC addresses at all in forwarding frames.

If you need to manage a bridge, then yes, the MAC address is used, but that's only because the managed bridge is behaving like a host in this case. And learning bridges use MAC addresses for their special trick. And link aggregation uses MAC addresses to bundle together a group of switch interfaces. But I think it helps to consider that these are all special cases.

Albert

Reply to
Albert Manfredi

Bonsoir Albert,

Thanks for your development and extension of my questionning. At 2.00 am, don't you sleep in your country?

It was my philosophic investigation, becoming aware of the different use of the MAC layer.

As you said, for the strict forwarding function, the switch interface doesn't need to be identified by a MAC address, although it uses the MAC layer.

This is described in 802.1D, in the figure 7-3.

In the MAC layer, we have (1) the MAC Entity and (2) the MAC Relay Entity.

(1) For each bridge port, the MAC Entity handles the MAC protocol and exchange "MAC Services" with the higher layer (for management, STP, LACP...). The "MAC services" use a MAC adress that identies the port.

(2) The MAC Relay Entity handles functions of relaying frames between ports, filtering, learning. It uses "Internal Sublayer Services" provided by the separate MAC Entities of each port. It is what I called the "transverse" sense. And this sense doesn't refer to a specific MAC address of a port.

So there are effectively 2 kinds to consider the MAC layer. And, certainly, we can find for a router an IP Relay Entity, with "IP internal Sublayer Services".

Best regards, Michelot

Reply to
Michelot

(1) A hub is a repeater so forwards frames below the MAC layer (using half duplex-communication with collisions) (2) A switch stores and forwards frames. This means a MAC is required on each port to to receive and transmit frames. Also full duplex communication can be used. (3) A router interconnects LAN's and so its ports need MAC addresses as they are end-points of their respective LANs.

Arthur.

Reply to
Marris

Bonsoir Arthur,

Thanks for your comments. Is it a try? in this case, let me write other comments. It's always difficult to define things in a few wors.

Correct for me.

It's ambiguous, because it existed cut-through switches. In a few words, I would say as Albert: "switches (basic L2 switches) do use the MAC DA of an incoming frame to determine to which port that frame should be switched".

And different rates in the case of the store-and-forward switch.

Ambiguous if you take the LAN definition in 802.3. A switch also interconnect LANs. I would say that a router is a layer 3 interconnection device.

Correct for me. A router is considered as a Ethernet end station, it terminates the Ethernet link, at the difference of a switch or a hub.

Best regards, Michelot

Reply to
Michelot

As far as I know cut-through isn't done anymore.

Yes a switch looks at the DA of a frame to determine where to send it and one or more addresses may be associated with a port. However these ports are not addressable in their own right. Therefore you cannot say a port has a MAC address. The MAC address associated with a port just tells the switch that if it sees a frame with that MAC address it should output it on that port and it will eventually find its way to an end-point with that address..

No. If you have an 802.3 switch it is not interconnecting LANs. For one thing a switch does not break a layer two broadcast domain. An 802.3 switch can be used to implement a single LAN. A single LAN may contain many swithces.

Reply to
Marris

You are referring specifically to a "bridged LAN," rather than just a LAN. When switches are involved, a single "LAN" becomes the Ethernet (or other LAN) that connectes to just one port of that switch. While I agree that this switch does not break the broadcast domain, it does break the CSMA/CD domain, or token-passing domain, or whatever MAC scheme is used to access the LAN in the LAN that connects to that individual switch port.

Here is a quote from 802.1D that might help in making thesee fine distinctions (which I acknowledge may sound pedantic):

----------------Quoting 802.1D-------------

6.2 Preservation of the MAC Service

The MAC Service provided by a Bridged Local Area Network is similar to that provided by a single LAN (6.3). In consequence,

a) A Bridge is not directly addressed by communicating end stations, except as an end station for management purposes--frames transmitted between end stations carry the MAC Address of the peer-end station in their Destination Address field, not a MAC Address of the Bridge.

b) All MAC Addresses need to be unique within the network.

c) MAC Addresses of end stations are not restricted by the topology and configuration of the network.

----------------End quote-----------------

You'll note the careful use of the generic term "network" when the entire L2 net is being discussed.

Bert

Reply to
Albert Manfredi

Bonjour Arthur,

Thanks for your comments that allow to go deeper.

Read again the reply, it was indicated like this: it existed cut- through switches.

Read again the reply, it was also indicated as you wrote.

Albert's reply is interesting. You can see also in 802.3, section

1.4.116 "a MAC Bridge, in its role of forwarding MAC frames from one LAN to another, is not an end station".

Best regards, Michelot

Reply to
Michelot

In the IEEE 802 model, each port on a switch (bridge) connects to a separate LAN; i.e., a switch does provide an interconnection among LANs at the MAC sublayer. A single LAN *cannot* contain many switches, under the IEEE model definition. I understand that the "lay" use of the term LAN may be looser, and many might say that their LAN comprises multiple links and switches, but this is (strictly speaking) incorrect.

-- Rich Seifert Networks and Communications Consulting 21885 Bear Creek Way (408) 395-5700 Los Gatos, CA 95033 (408) 228-0803 FAX

Send replies to: usenet at richseifert dot com

Reply to
Rich Seifert

Bonjour,

For closing correctly this thread, thanks to Albert, Anoop, Maris and Rich.

Whether we agree or not, the most important thing is to be able to discuss it, whatever our culture.

Best regards, Michelot

Reply to
Michelot

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.