1

host1(tap0) <--OpenVPN--> (tap0)host2(eth0) <---> host2 LAN

I need to make a L2 bridge to a remote network without touching eth0 device on host2

I'm trying to do that by creating macvlan interface and putting it to a bridge instead

@host2:

ip link add link eth0 type macvlan mode passthru
ip link set dev macvlan0 up
brctl addbr br0
brctl addif br0 macvlan0
brctl addif br0 tap0
ip link set dev br0 up

@host1:

dhcpcd -T tap0

I'm expecting to get IP address or be able to ping devices in host2 LAN, but it wouldn't. tcpdump shows broadcast traffic on both ends, arp requests/replies, etc. I've discovered that macvlan interface won't go promisc mode, even if i specify it, so dhcp request goes via macvlan0, server sends response, but response is dropped. I can see it on eth0, but not on macvlan.

How to make such bridge while keeping eth0@host2 intact? Any software solution, like some relaying daemon would be fine also.

Thanks.

1 Answer 1

0

While enslaving (to use the Linux kernel terminology) a MACVLAN netdev to a virtual bridge netdev succeeds, it doesn't work as expected. In particular, the bridge doesn't see the traffic to be forwarded. Conflicts and Limitations of Bridge and Macvlan Devices digs into the Linux kernel source to find out what is and what-not.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .