OpenWrt: Set policy routing

function put_route() {
    ip route del default dev pppoe-wanct proto static table 100
    ip route add default dev pppoe-wanct proto static table 100
    ip rule del pref 32760
    ip rule add pref 32760 from ${1} lookup 100
}

put_route ${ip}

Leave a Reply

Your email address will not be published. Required fields are marked *