admin管理员组文章数量:1642338
How does the bonding driver change MAC addresses?
https://access.redhat/solutions/876193
SOLUTION 已验证 - 已更新 2015年一月14日10:54 -
English
环境
- Red Hat Enterprise Linux
- Network link aggregation for load balancing and failover using the
bonding
driver
问题
- How does the bonding driver change MAC addresses?
- When running
bonding
, all slaves have the same MAC address, or different MAC addresses. - How can I see the real true MAC address of a bonded slave interface?
决议
The bonding interface starts with all-zeros MAC address and changes to be the same as the first interface enslaved.
After enslaving the interface, its original MAC address is stored and can be checked at /proc/net/bonding/<bond interface name>
file.
Look for Permanent HW addr
:
Raw
# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: p1p1
MII Status: down
Speed: Unknown
Duplex: Unknown
Link Failure Count: 0
Permanent HW addr: 00:10:18:38:0d:dc
Slave queue ID: 0
Slave Interface: p1p2
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:10:18:38:0d:de
Slave queue ID: 0
The original interface's MAC address is restored upon release from bonding interface. If you release the first slave, its MAC address is restored and likely will be equal to the one used by the bond interface. That causes the following warning to show up:
Raw
bonding: bond0: Warning: the permanent HWaddr of p1p1 - 00:10:18:38:0d:dc - is still in use by bond0. Set the HWaddr of p1p1 to a different address to avoid conflicts.
Behaviour in each bonding modes
balance-rr or 0
All slaves use the master's MAC address. No changes happens while it is being used.
active-backup or 1
It depends on the fail_over_mac
parameter. By default, all slaves are set to use the same MAC address at the enslavement.
Raw
fail_over_mac
none or 0 - default behavior, all slaves use the same MAC address. The MAC
address is configured at the enslavement.
active or 1 - Each slave keeps its own MAC address. The master interface MAC
address changes during the failover to be the address of current
active slave.
follow or 2 - The master interface uses the first enslavement interface MAC
address to start, but subsequent enslavements keeps the original
MAC address, so all backup interfaces remains unchanged. When a
failover happens and the interface changes to active, its MAC
address is changed to be the master MAC address.
balance-xor or 2
Works the same as in mode balance-rr/0
broadcast or 3
Works the same as in mode balance-rr/0
802.3ad or 4
Works the same as in mode balance-rr/0
balance-tlb or 5
Each slave keeps its own MAC address. The master interfaces uses the address of the current active slave (first enslaved).
If the receiving slave fails, another slave takes over the MAC address of the failed receiving slave.
balance-alb or 6
Each slave keeps its own MAC address. The master interfaces uses the address of the current active slave (first enslaved).
If the receiving slave fails, another slave takes over the MAC address of the failed receiving slave.
Notice that, in this mode, the receiving is also balanced and it is done by sending updates (ARP replies) to all remote peers with their individually assigned hardware address such that the traffic is redistributed. When a slave fails, join or leaves the bond, the traffic is redistributed sending those updates again.
本文标签: driverbondingChangeAddressesMac
版权声明:本文标题:How does the bonding driver change MAC addresses? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dongtai/1729335920a1196980.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论