'Why uses scapy wrong source mac-adress with 'sendp()'

I use the function sendp() in scapy to send some messages at layer2. My pc has 6 LAN interfaces and I specify one interface (enp2s0f0) in sendp().

When I observe the sent packets with wireshark, I can see that the source address is not from my specified interface. Instead it is from another interface of the pc.

 packet = Ether(dst='ff:ff:ff:ff:ff:ff' ,  type = 0x8011 )
 packet = packet / msg
 sendp(packet, iface='enp2s0f0')

The MAC-address from enp2s0f0 is \**:\**:\**:4b:3c:00. Wireshark shows the source address from the sent packet \*\*:\**:\**:4b:3c:01. This is also a valid mac-address from an interface of my pc, but at this port is nothing connected.

How can I force scapy, to use the correct source-address?



Solution 1:[1]

From reading the documentation, you could try:

Conf(iface='enp2s0f0')

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Freddy Mcloughlan