Try to setup my OpenWrt router with 2 WANs, one is eth0 and 2nd is wlan0. Ifconfig can see both have ip addresses:
eth0: 192.168.4.100
wlan0: 192.168.137.83
ping -I eth0 www.google.com works
but ping -I wlan0 www.google.com doesn't work.
route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.4.1 0.0.0.0 UG 0 0 0 eth0
192.168.2.0 * 255.255.255.0 U 0 0 0 eth1
192.168.4.0 * 255.255.255.0 U 0 0 0 eth0
192.168.137.0 * 255.255.255.0 U 20 0 0 wlan0
/etc/config/network
config interface 'wan'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '192.168.4.100'
option device 'eth0'
option gateway '192.168.4.1'
config interface 'lan'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '192.168.2.1'
option device 'eth1'
config interface 'wwan'
option proto 'dhcp'
option metric '20'
/etc/config/wireless
config wifi-device 'radio0'
option type 'mac80211'
option channel '36'
option hwmode '11a'
option path 'pci0000:00/0000:00:1c.1/0000:02:00.0/bcma0:1'
option country 'US'
option cell_density '0'
config wifi-iface 'wifinet1'
option device 'radio0'
option mode 'sta'
option network 'wwan'
option key 'XXXX'
option bssid 'xx:xx:xx:xx:xx:xx'
option encryption 'psk2'
option ssid 'XXXXXXX'
Update: I added 192.168.137.1 as wlan0's gateway but still doesn't work. I can't even ping 192.168.137.1. Not sure if the wifi is really up or not.
Where I did wrong? Newbie for the network here. Wonder where I can debug further?