Heya , I got 2 individual pppoe wan interfaces on my tplink 940n running openwrt v18.06.
Was wondering how can I create 2 seperate wifi AP and map each to a WAN ?
Wifi LAN1 traffic going through WAN1
Wifi LAN2 traffic going through WAN2
Both pairs seperate from each other
mwan3 package is a no go cause of space limitation , tried building a custom image too but no luck
Thnx
and 18.06 is long since obsolete and unsupported and probably has security vulnerabilities that will not be patched.
mwan3: I think this is a requirement for what you want to do. I'm not even sure that it is possible to get multiple WANs to function in general without this package.
Reading above I think above could do the magic but I lack enough knowledge on ip tables
Even routing a traffic from 192.168.1.100-150 thought WAN1 and 192.168.1.151-200 through WAN2 where DHCP only assigns address till 150 would be ideal for me
Use these commands to check if the ip rule and route are created.
ip rule
ip route list table 10
Some comments on your previous posts:
The metric should be set for wan, not lan interfaces.
It is enough to set metric 10 on WAN1.
Check that both pppoe interfaces are up and the default gateways are set.
ip -4 route list 0/0
The result should be something like this:
default via ... dev pppoe-wan ...
default via ... dev pppoe-WAN1 ... metric 10
As mentioned above, you use ifname eth1.1 in the lan and LAN1 interface sections. Remove it from LAN1.
When you get LAN1 working (clients obtain IP settings via DHCP), run the following commands:
ip rule add from 192.168.2.0/24 table 100 prio 1
ip route add default dev pppoe-WAN1 table 100
Check if LAN1 clients access the Internet only through WAN1.
If it works, you can try the uci syntax.
Where can I get the gateway address from ?
Both wan are pppoe , I disabled default gateway option of each wan assuming I need to do so to avoid lan1 traffic possibly going through wan0
The gateway is set dynamically via DHCP. Even if you retrieve it, it may change after the next pppoe negotiation.
So don't disable the gateways, set metric 10 for wan1 and make both pppoe interfaces active.
By default the lan clients will use wan, because it will have higher priority.
To make them use wan1, for testing purposes create these rules manually:
ip rule add from 192.168.1.0/24 table 100 prio 1
ip route add default dev pppoe-WAN1 table 100
Pay attention to the interface name - lowercase or uppercase as defined in /etc/config/network.
The uci syntax should look like this, but I can't test it with this old version:
uci add network rule
uci set network.@rule[-1].src='192.168.1.0/24'
uci set network.@rule[-1].lookup='100'
uci add network route
uci set network.@route[-1].target='0.0.0.0'
uci set network.@route[-1].netmask='0.0.0.0'
uci set network.@route[-1].interface='WAN1'
uci set network.@route[-1].table='100'
uci commit network
/etc/init.d/network restart