0
I want to use two interfaces, one for packet reception, and the second for packet transmission.
Normally when a packet is received, the interface it is received on is the interface that packet will be replied to from the local machine.
However I want packets with a specific MAC address to be sent to a tap interface, which is used by an application to send the pack over a radio link.
In other words packets combine on a copper link, but packets replied via a radio link.
Think of a satellite downlink, but a terrestrial uplink.
I have used bridge iproute2 bridge application to attempt to force the association with the MAC address and the tap that is used by the radio link. with the following:
bridge fdb add 00:04:f9:02:01:00 dev tap0
Checking...
# bridge fdb| grep 2:01:00
00:04:f9:02:01:00 dev tap0 self permanent
However when I 'ping' from the system associated with that MAC address:
# bridge fdb| grep 2:01:00
00:04:f9:02:01:00 dev eth2 master br-radio0
00:04:f9:02:01:00 dev tap0 self permanent
The result seems to be that eth2 is used rather than tap0.
I've used eatables and marking the packets with the MAC address:
ebtables -A OUTPUT -d 00:04:f9:02:01:00 -j mark --set-mark 4
and using 'ip':
ip rule add fwmark 4 table 1
ip route add 10.15.84.218 dev tap0 table 1
To force the IP address of the system to use tap0 for routed packets.
I've thought about using interface bonding as well, but it doesn't seem that these are any more suited for splitting the pathway to separate in and out interface.
I've also run across multilink PPP which I dimly recall from the past to allow for multiple DSL lines to be bonded together, and perhaps that's where I recall this idea of split paths.
In the past I've written my own tunneling code and then split or combined as I needed. This round I'm trying to use standard tools and capabilities, so that I don't have to write/recompile my code, perhaps only making script adjustments based on OS/standard tool changes.
Linux version: 4.4.123. And iprouter/ebtables of similar recent vintage.
When using Linux beware of the ARP flux problem: Linux will treat the IP address as belonging to the host rather than a specific interface. Also try
– sawdust – 2019-08-01T00:33:29.647arping
instead ofping
.While I'm using ping to create a packet from the the unit that is on the other end of this split path network link, what I'm trying to work around, is the association of a MAC address with the arm of the bridge that the packet arrives at the target machine. The bridge code associates a MAC address with an interface of the bridge upon receiving the arp packet. I want to force those packets to a different interface under the same bridge. – user3542542 – 2019-08-01T02:15:31.447