is it OK to use load balance to send udp stream via 2WAN?
I try NTH and PCC, both fail.
I already saw the splited traffic statictis in Wan1 intf and wan2 intf, but why the target IP can not get all packet? (it receive half only)
any help are welcome!
I don’t like to guess. post your PCC config
anyway, if it’s a single stream, you cannot NAT it to two different addresses of WAN…
Thanks for the reply!
I post here:
mangle pr
Flags: X - disabled, I - invalid, D - dynamic
0 chain=input action=mark-connection new-connection-mark=wan1_conn
passthrough=yes in-interface=ether2
1 chain=input action=mark-connection new-connection-mark=wan2_conn
passthrough=yes in-interface=ether3
2 chain=output action=mark-routing new-routing-mark=to_wan1 passthrough=yes
connection-mark=wan1_conn
3 chain=output action=mark-routing new-routing-mark=to_wan2 passthrough=yes
connection-mark=wan2_conn
4 chain=prerouting action=mark-connection new-connection-mark=wan1_conn
passthrough=yes dst-address-type=!local in-interface=ether1-casper-test
per-connection-classifier=src-address:2/0
5 chain=prerouting action=mark-connection new-connection-mark=wan2_conn
passthrough=yes dst-address-type=!local in-interface=ether1-casper-test
per-connection-classifier=src-address:2/1
6 chain=prerouting action=mark-routing new-routing-mark=to_wan1
passthrough=yes in-interface=ether1-casper-test
Nat pr
[admin@MikroTik] /ip firewall nat> pr
Flags: X - disabled, I - invalid, D - dynamic
0 chain=srcnat action=masquerade out-interface=ether2
1 chain=srcnat action=masquerade out-interface=ether3
[admin@MikroTik] /ip firewall nat>
“anyway, if it’s a single stream, you cannot NAT it to two different addresses of WAN…”
BTW, do u mean it is no-way to do this?(it is one udp stream via 2WAN)
PC-A with udp stream generator—ether1-----Mikrotik RB433-----WAN1 and WAN2—PC-B with udp stream receiver
WAN1 = USB port1
WAN2 = USB port2
or WAN1 = ether2
WAN2 = ether3
UDP unlike TCP doesn’t have the concept of connections on the layer 4 protocol level but UDP traffic like TFTP can have multiple packets belonging to the same “conversation” between two end points. All packets in that conversation must go through the same WAN link. Different connections can go through different links.
The only reliable way to ensure that with PCC is to use both-addresses, src-address or dst-address as the PCC qualifier.
It can be tricky for the router to determine what constitutes a connection with UDP so you are probably better off marking packets directly instead of setting routing marks based on connection marks. If the router misses a packet as belonging to a connection it could go out the default fallback route which might be a different one, and that packet would be discarded by the other endpoint. That will be more expensive on the CPU.