Switches apparently have a base MAC and self-generate MAC value for each port from that base. If a company that makes both switches and processor boards builds a switch and assigns it MAC "N" and then builds a processor board and assigns it the next MAC value "N+1", we should observe MAC address conflicts in the field if this processor is ever connected to port "+1" on the switch. However we don't hear of that problem, nor hear of it generally. Why doesn't this problem happen? -Andy

  • 1
    "Switches apparently have a base MAC and self-generate MAC value for each port from that base." I don't see that on any of the switches we use. Do you have an example? For instance, Cisco assigns 1024 MAC addresses to a switch supervisor for things like VLANs and layer-3 virtual interfaces. Each switch interface also has a MAC address. – Ron Maupin Aug 21 '18 at 20:20
  • Searching for mac address assignment on switches earlier found some posts on other sites describing this behaviour, having just one base MAC assigned. Perhaps that is wrong and switches are always given a sufficient block of MACs either explicitly or by a gap to the base MAC value assigned to the next switch manufactured? – Andy-1 Aug 21 '18 at 20:37
  • 1
    Switches are typically transparent devices as far as the end-stations are concerned. MAC addresses are used on the interfaces for things like STP, which are link-only protocols (not sent beyond the next interface), but the end-stations do not normally send/receive frames to/from the switch MAC addresses. The exceptions would be link-only protocols, the switch management, and a gateway address for layer-3 switches. – Ron Maupin Aug 21 '18 at 20:42
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer. – Ron Maupin Dec 25 '18 at 9:21

Each manufacturer is responsible for not letting conflicts happen. When a device is assigned a pool of addresses these addresses aren't used elsewhere. Obviously, they cannot be assigned consecutively in an overlaping fashion.

Many manufacturers do recycle MAC addresses but only in ways that are carefully designed to not conflict with previous assignments.

Not that a basic layer-2 switch doesn't use any MAC address for itself. It examines each ingress frame for its source address, updates that to its MAC address table and then forwards the frame based on its destination address and the associated port from the MAC table.

Management functions and layer-3 functionality do require a MAC address on the switch.

  • Agreed, the manufacturer has to ensure no duplication of MACs either by values issued or algorithms used to calculate them. If it did happen at least it would only affect two (or more) of their own products, not others! – Andy-1 Aug 21 '18 at 21:27
  • Other products cannot be affected as the manufacturer can only use MACs within their OUIs. – Zac67 Aug 22 '18 at 4:54

From earlier replies and other research: Switches require MAC address for ports when using some higher protocols, and these are synthesized by the switch when needed using the "base MAC" assigned, the value is typically the switch base MAC plus the port number.

Since the capabilities of the switch and the number of the ports on the switch are known, the manufacturer can therefore know the maximum number of MACs the switch might need if configured in the "most complex" configuration. It is up to the switch manufacturer to have a method that safely assigns MACs to each switch when built, and the value of the "base MAC" assigned to the next switch off the assembly line might be the preceding switch's base MAC plus that maximum number of MACs the switch might have to synthesize, if it ever needed. Alternatively that max number might be rounded up to a binary sized block such as 1024, so the base MAC has a more logical stepping between each switch.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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