[Help] Route WAN and WWAN with differents SSID?

  • Again, yes, as long as they're all on the same channel.
  • Each SSID will be configured to the network for each specified purpose

Screenshot%20from%202019-02-17%2018-48-45

1 Like

If that doesn't work smoothly, other way to take the solution would be to get an external USB adapter fort your PC that you can connect with a USB cable and fix on your window to pick the other network.

By the way, you should consider updating your OpbWrt

1 Like

I think he is asking how to route it in OpenWrt so that
WAN---AP1
WWAN---AP2

I know, once WWAN is created, any other SSID is locked to the same channel, thing is both SSID will still provide internet from just one interface, either WWAN or either WAN whichever boot first it seems, as I tried it early.

^ That's correct. Also I guess there's no other update for this Router than 17 due the fact it's 4mb flash. Update to your first reply mhegab: That's actually why I'm using it as Client+Ap mode, distance it's too far to buy an usb adapter and an usb cable to fix it on the living room window

I understand that; but it wasn't what you asked. You would use policy-based routing:

config route                
        option interface 'wan2'
        option target '0.0.0.0'
        option netmask '0.0.0.0'      
        option gateway '192.168.x.x'
        option table '2'

config rule                          
        option in 'lan2'         
        option dest '0.0.0.0/0'       
        option priority '2'          
        option lookup '2'

Replace wan2 and lan2 with your correct Interface names.

More info: Use WireGuard interface for specific devices only

1 Like

I tried to explain it in the last part of the post, but basicly is what mhegab said, I want wan provide internet into AP1, and wwan provide internet into AP2, With routes policy should work or it have to have any other config in the interfaces or lan?

Again, I posted the answer above.

Are you having an issue understanding my post?

In the example above:

  • AP2 is lan2
  • WWAN is wan2

Simple.

I saw it, but as I said i'm new to this, where the routes policy goes? I have to do it manually throught ssh?

1 Like

Ahhh! My apologies. Yes, on command line.

Add to: /etc/config/network

You must also permit forward from LAN2 to WWAN.

Ok thanks i'll try it, quick question as reading the parameters for route, the gateway for "wan" will be a problem if my ISP is DHCHP? as I know for "wwan" I suppose the gateway will be my friend's router. But for "wan" what should I place?

I never gave you instructions for wan, only wan2 (WWAN).

Keep wan setup as normal.

1 Like

There are actually some long range USB WiFi adapters with power and antennas comparable to routers (though not very cheap, so if you don't get a good connection at the end it's not nice). Therefore if you get the configuration you were asking for to work smoothly then best.

Ok these are the interfaces done I guess, they have both different subnet, i'm going to place your route config. the "option target" and option "dest" are the subnet IP or is the device i'm going to connect? due the Lan1 and lan2 have dhcp server on.

Something like this?

route

No money for it, too expensive in this country.

1 Like

Subnet and destination are as I stated:

  • 0.0.0.0/0 (the Internet)

You only edit wan2 and lan2 for wwan and lan2 - and add the correct gateway. LAN and WAN should use the normal setting.

You may need to make 2 routes instead:

config route                
        option interface 'wwan'
        option target '0.0.0.0'
        option netmask '128.0.0.0'      
        option gateway '192.168.0.x'
        option table '2'

config route                
        option interface 'wwan'
        option target '128.0.0.0'
        option netmask '128.0.0.0'      
        option gateway '192.168.0.x'
        option table '2'

config rule                          
        option in 'lan2'         
        option dest '0.0.0.0/0'       
        option priority '2'          
        option lookup '2'

This is so you don't accidentally erase 0.0.0.0/0 on WAN.

0.0.0.0/1 + 128.0.0.0/1 == 0.0.0.0/0

  • Also if forwarding from LAN2 to WAN is turned on, REMOVE it.
  • If you can statically address WWAN and not use a gateway, this would help, as you're making the gateway on routing table No. 2

Yeah, I thought it would be so I edited my post, but it looks like did so after you have quoted me.

Ok thanks for the work just applied the config.

route

Where do I check this?

The wwan it was already static, it'll be a problem now?