L2 switch's behavior

Hello

I wonder is it a normal switch's behavior, when it, being connected to a LAN, but not transmitting/receiving any traffic, starts learning process and fills its MAC address table. I understand that the switch is in promiscious mode upon reset, but I though it would learn MACs only for a traffic travelling through it.

Please clarify my doubts. Thanks.

Reply to
Mark
Loading thread data ...

The switch inspects the MAC source address of frames going through each port, yes. If it sees a frame with a MAC destination address it hasn't yet learned, it floods it to all ports. That should be the default behavior. Of course, you can modify that behavior in a managed switch. For example, allow only certain MAC addresses at a given port, block ports, etc.

Bert

Reply to
Albert Manfredi

A switch will learn the MAC_address-to-port mapping for all frames it hears, not just those traversing the switch.

-- 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

Hello

Id this is a standard behavior, is there any rationale for it? For the first sight it looks not very reasonable, as a switch can't be sure the addresses it has heard and learned, will be ever used in actual transmission across the switch, and these addresses will only occupy precious MAC address table :-) Od course aging procedure will clean them out, but anyway it's sort of waste of resources, isn't it?

-- Mark

Reply to
Mark

Other than the case of both source and destination connected to the same switch port are then any cases where a switch will hear a frame that does not traverse the switch?

Reply to
Noah Davids

Of course. When a switch hears a frame that is destined for a station that is reachable through the same port on which the frame is heard (e.g., the destination is on a shared LAN connected to that port), that frame does *not* traverse the switch.

If a switch forwarded every frame it heard (i.e., every heard frame traverses the switch), it would be a repeater.

-- 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

See my earlier post regarding frames not traversing the switch.

By definition, every address the switch hears was used in an actual transmission; the addresses are gleaned from ordinary frames. It is the switch's job to determine the relative location of every SA it hears, i.e., through which port that station is reachable, and then to forward or discard subsequent frames sent to that station as a DA, so that traffic is isolated to only those portions of the Spanning Tree needed to communicate between SA and DA.

These days, MAC address table storage is not considered "precious".

Not at all. This is precisely the job of the switch. If it didn't filter frames via the address table, it would be a repeater.

-- 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

Yes, but this is not a very common situation any longer. What you describe is what a bridge would see, when there are repeaters (hubs) connected to one of its LANs. These days, each LAN tends to have only one host connected to it, and the other end of the line is the switch port. I don't see a lot of opportunity for a switch to detect non- traversing frames. (?)

Bert

Reply to
Albert Manfredi

It may not be common but it still exists. So switches still need to deal with it.

Incidentally, while the meaning of the term "LAN" can be debated it's not normally correct to say that the ports on a switch connect to different LANs.

James

Reply to
James Harris

Modulo half-duplex/CSMA-CD hardly ever being there now, I guess you could say collision domain.

rick jones

Reply to
Rick Jones

According to the IEEE standard, this usage *is* correct. A bridge/switch interconnects distinct LANs into an "extended LAN", or catenet.

-- 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

Nevertheless, I stand by the comment as made. :-)

James

Reply to
James Harris

I think that is what I was trying to say

Reply to
Noah Davids

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.