This morning I configured a FreeBSD host on my network with a simple bridge:
igb0 is connected to my network, while igb1 is currently not connected to anything.
For the last couple of hours, I've been banging my head against a wall trying to work out why I can't get any reliable connectivity to 192.168.0.2. Trying to ping it was extremely intermittent, with only 1-3 replies coming in each minute, and attempting to ssh to it took forever, then if it succeeded, the connection stalled right away.
I've just discovered what the problem is. Another FreeBSD host on my network also has a bridge configured, and the "randomly chosen" MAC address on the bridge has turned out to be identical: 58:9c:fc:10:e7:3f.
The if_bridge(4) does say:
I note the point about two bridges on different machines theoretically getting the same link address, but if it is randomly chosen, then this should seem extremely unlikely to happen. It happened first time for me! Is this claim of "random" choice false?
Also, it mentions choosing an address in the range reserved for locally administered addresses, but according to MAC Address - Wikipedia, this means the second digit of the address should be 2, 6, A or E. 8 means universally administered.
Is the man page inaccurate, or am I misunderstanding something?
(I know that I can fix this issue by manually assigning a MAC to the bridge, or setting the sysctl to use the MAC of the first member interface.)
Code:
cloned_interfaces="bridge0"
ifconfig_bridge0="inet 192.168.0.2/24 addm igb0 addm igb1"
ifconfig_igb0="up"
ifconfig_igb1="up"
igb0 is connected to my network, while igb1 is currently not connected to anything.
For the last couple of hours, I've been banging my head against a wall trying to work out why I can't get any reliable connectivity to 192.168.0.2. Trying to ping it was extremely intermittent, with only 1-3 replies coming in each minute, and attempting to ssh to it took forever, then if it succeeded, the connection stalled right away.
I've just discovered what the problem is. Another FreeBSD host on my network also has a bridge configured, and the "randomly chosen" MAC address on the bridge has turned out to be identical: 58:9c:fc:10:e7:3f.
The if_bridge(4) does say:
The if_bridge interface randomly chooses a link (MAC) address in the
range reserved for locally administered addresses when it is created.
This address is guaranteed to be unique only across all if_bridge
interfaces on the local machine. Thus you can theoretically have two
bridges on different machines with the same link addresses. The address
can be changed by assigning the desired link address using ifconfig(8).
I note the point about two bridges on different machines theoretically getting the same link address, but if it is randomly chosen, then this should seem extremely unlikely to happen. It happened first time for me! Is this claim of "random" choice false?
Also, it mentions choosing an address in the range reserved for locally administered addresses, but according to MAC Address - Wikipedia, this means the second digit of the address should be 2, 6, A or E. 8 means universally administered.
Is the man page inaccurate, or am I misunderstanding something?
(I know that I can fix this issue by manually assigning a MAC to the bridge, or setting the sysctl to use the MAC of the first member interface.)