Reason for asking: I need to generate a random password. It doesn’t have to be particularly secure, just different from most of the others
There seems to be a few methods of generating random passwords on here but most are lengthy and complicated bits of code. However it looks to me like if a bridge is created with no port members it is given a random MAC address. For example:
If this is really ‘random’ (or at least random enough that it is unlikely another router will pick the same MAC) this seems like a very simple way of generating a string of characters to use as a password. Just remove the ‘:’, perhaps covert to lower case, and you are good to go.
Anyone care to comment on the suitability this solution?
Generally one can not just randomly pick up a MAC address
If you look at MAC addresses in your screenshot, you’ll notice that they are not entirely random: every listed MAC address has 7th bit (counting from most significant bit, i.e. from left) in first (most significant) octet set to 1. Which denotes a locally administered MAC address. Those are free to pick, but still have to be unique inside ARP domain (i.e. IP broadcast domain, i.e. same subnet).
My observation (which may be wrong though) is that (at least recent versions of) ROS picks a “random” MAC address by taking a real MAC address present on the device and changing the first octet so that it becomes locally administered. E.g. when a virtual AP is constructed on top of real wifi device, MAC for VAP will be similar to MAC of real device, but from locally administered MAC address range.