Forum Replies Created

Viewing 1 of 1 posts
  • Flo

    Member
    July 25, 2024 at 9:04 am

    It is the other way around if you put a device on the Internet (behind a router) the MAC address doesn’t matter. In a local switched network every device should have a unique MAC address.

    I have accidentally assigned two PLCs the same MAC Address. It is very important to have an unique MAC Address. If you put the PLC online it doesn’t matter at all. MAC Addresses are for Layer 2 in the OSI Model. The Layer 2 only matters for switches in you local Network. A router takes the Ethernet frame takes out the packet (that is inside one or multiple frames) and puts in a new Ethernet Frame (with its own MAC as a source address in the frame) This Networking stuff is like an onion. Sometimes a router can even split a packet in multiple frames. Home routers also modify the IP addresses before sending it out to the internet. But usually routers in the Internet and you local network don’t touch the IPs from packets. Only when you use non unique IPs (like private ones in the IPv4 world) you have to mess with the IP Header of a packet before sending it out to the internet. In the IPv6 world you don’t need that anymore at all.

    Switching is a technique to reduce the traffic on each network cable back in the day (before switches where so cheap) every computer got all the Ethernet frames (which results in a slower network with more and more devices). Now days a switch reads the MAC from the the ethernet frame. it has a list of mac addresses on which port is which mac connected and sends out the frame only on that specific physical port (connector). That list is called ARP Table. If you want to intercept the traffic of others in the network you have to attack the switch first. ARP Spoofing, or flooding the switches table memory for example. If you have multiple devices with the same MAC the switch behaves weird. Maybe it sends out the frame to both links or just one. In my case the PLC had to communicate with each other which didn’t work. The switch sent the frame only out one link.

    <div>Also important is that when you connect two switches don’t build loops without any link aggregation protocol and/or STP (Spanning Tree Protocol). It can happen that a frame is send round and round between switches. Especially if you have a redundant and robust network with mutiple connections between switches.
    </div>

    x2:xx:xx:xx:xx:xx
    x6:xx:xx:xx:xx:xx
    xA:xx:xx:xx:xx:xx
    xE:xx:xx:xx:xx:xx

    Are reserved and not used by any vendor. Like public and private IPs there are reserved ranges of MAC addresses. These can be used in virtual machines or linux containers or custom stuff you build, like PLCs, electronic devices …

Viewing 1 of 1 posts