Spoof MAC to bond?


Recommended Posts

I am running a custom CentOS distro and I have bonded three of my four NIC's in mode zero. I have eth0 as management and bond0 as data traffic. Now the reason I can't use all 4 NICs is due to software that I use. It is licensed to the specific hardware MAC address on eth0. So my question is: Can I bond all 4 ports and "spoof" the hardware address of eth0 onto the bond to trick my software?

If this is hard to understand I apologize but it is 2:30 in the morning and I have been in this building since 9am. Thanks in advance!

Link to comment
Share on other sites

Bring the bond0 interface down and set any MAC address you want:

ifconfig bond0 ha ether 00:11:22:33:44:55

You might also want to change the MAC address of your eth0 interface so it isn't duplicated (not sure about this one, it might not matter if eth0 is part of the bonding interface), and you'll have to change all the MAC addresses again every time you reboot (you can automate that with the network config scripts).

Link to comment
Share on other sites

I believe that what ichi said will work, use ifconfig to change bond0's MAC address to that of eth0 and change eth0's MAC address to something else. Once you verify that works, you definitely want to set it on boot, like ichi suggested.

You will need to modify your /etc/sysconfig/network-scripts/ifcfg-eth0 and /etc/sysconfig/network-scripts/ifcfg-bond0 to include these lines:


HWADDR="00:11:22:33:44:55"
ONBOOT="yes"
[/CODE]

Although I don't have exactly the same configuration as you, my ifcfg-eth0 with a spoofed MAC address and static IP address on my CentOS 6 machine looks like this:

[CODE]
DEVICE="eth0"
HWADDR="00:25:52:E6:6E:00"
NM_CONTROLLED="no"
ONBOOT="yes"
IPADDR="192.168.1.2"
NETMASK="255.255.255.0"
NETWORK="192.168.1.0"
BROADCAST="192.168.1.255"
GATEWAY="192.168.1.1"
[/CODE]

Link to comment
Share on other sites

This topic is now closed to further replies.