If two NICs on the same network segment are added to a BMS, communication between the primary NIC and extension NIC is abnormal because the BMS gateway strictly verifies the source MAC addresses. For example, in Figure 1, the primary NIC and extension NIC are both on the 172.22.9.X network segment. A policy-based route needs to be configured to enable communication between the NICs.
vi /etc/iproute2/rt_tables
252 net1 251 net2
vi /etc/rc.local
For example, the IP address of the primary NIC is 172.22.9.7, that of the extension NIC is 172.22.9.206, and that of the BMS gateway is 172.22.9.1, add the following routes:
ip route add 172.22.9.0/24 dev bond0 src 172.22.9.7 table net1 ip route add default via 172.22.9.1 dev bond0 table net1 ip route add 172.22.9.0/24 dev bond0.3935 src 172.22.9.206 table net2 ip route add default via 172.22.9.1 dev bond0.3935 table net2 ip rule add from 172.22.9.7/32 table net1 ip rule add from 172.22.9.206/32 table net2