A script for dual WAN with the same gateway

Hello,

I’m trying to use PCC load balancing with dual WAN which both require DHCP-Client.

The problem is both have the same dynamic gateway and that won’t work with the PCC.

If the gateways were static, there’s a workaround by adding the interface name to the gateway IP address.

ex:

gateway=192.168.1.1%WAN1
gateway=192.168.1.1%WAN2

So, Is there a way to modify the script for DHCP-Client to add the interface name?

Here’s the current script I’m using:

{
    :local rmark "WAN1"
    :local count [/ip route print count-only where comment="WAN1"]
    :if ($bound=1) do={
        :if ($count = 0) do={
            /ip route add gateway=$"gateway-address" routing-table=to_WAN1 check-gateway=ping comment=WAN1
			/ip route add distance=1 gateway=$"gateway-address" check-gateway=ping comment=WAN1
        } else={
            :if ($count = 1) do={
                :local test [/ip route find where comment="WAN1"]
                :if ([/ip route get $test gateway] != $"gateway-address") do={
                    /ip route set $test gateway=$"gateway-address"
                }
            } else={
                :error "Multiple routes found"
            }
        }
    } else={
        /ip route remove [find comment="WAN1"]
    }
}