Here are my simple setup:
Main Router ⇄ Access Point ⇄ Neighbor Access Point
My Access Point is configured as a wireless station on Neighbor Access Point. The purpose is to relay that network back to the Main Router, so I can have a backup Internet connection directly attached to it. I do not want my Access Point to be a router because it is weak. Here are its configurations:
/etc/config/network
config interface 'lan'
option ifname 'eth0.2649' # the Main Router has access to this VLAN to be present on Neighbor network
option proto 'static'
option ipaddr '192.168.22.1'
option netmask '255.255.255.0'
option ip6assign '60'
config interface 'wl0_sta'
option proto 'static'
option ipaddr '192.168.1.240'
option netmask '255.255.255.0'
option gateway '192.168.1.1'
list dns '8.8.4.4'
list dns '8.8.8.8'
option ip6assign '60'
option metric '200'
config interface 'wl0_relay'
option proto 'relay'
list network 'wl0_sta'
list network 'lan'
option ipaddr '192.168.1.240'
config interface 'management'
option ifname 'eth0.2651'
option proto 'static'
option ipaddr '172.26.91.70'
option netmask '255.255.255.0'
option gateway '172.26.91.1'
list dns '172.26.91.1'
list dns '8.8.4.4'
list dns '8.8.8.8'
option metric '100'
/etc/config/wireless
config wifi-iface 'radio0_sta'
option ifname 'wl0-sta'
option device 'radio0'
option network 'wl0_sta'
option mode 'sta'
option wds '0'
option ssid '<neighbor_ssid>
option encryption 'psk2'
option key '<neighbor_key>'
option ieee80211k '1'
option ieee80211r '1'
option ieee80211w '1'
option disabled '0'
The issue I have is weird: once the sta
interface connects to Neighbor Access Point successfully, I am not able to access it via management interface 172.26.91.70
anymore. Then I had no choice but to access it via 192.168.1.240
. After ssh into it, its routing table looked normal:
root@accesspoint:~# ip route show
default via 172.26.91.1 dev eth0.2651 proto static metric 100
default via 192.168.1.1 dev wl0-sta proto static metric 200
172.26.91.0/24 dev eth0.2651 proto static scope link metric 100
192.168.1.0/24 dev wl0-sta proto static scope link metric 200
192.168.22.0/24 dev eth0.2649 proto kernel scope link src 192.168.22.1
But when I tried to traceroute back to my Main Router, it was strange:
root@accesspoint:~# traceroute 172.26.91.1
traceroute to 172.26.91.1 (172.26.91.1), 30 hops max, 38 byte packets
1 192.168.1.1 (192.168.1.1) 6.497 ms 2.067 ms 2.064 ms
2 10.137.0.2 (10.137.0.2) 9.737 ms 6.618 ms 8.697 ms
3 10.255.220.73 (10.255.220.73) 9.452 ms 172.16.1.89 (172.16.1.89) 6.505 ms 172.16.1.65 (172.16.1.65) 6.605 ms
4 localhost (27.68.194.93) 8.362 ms localhost (27.68.192.9) 9.336 ms 8.422 ms
5 172.16.146.49 (172.16.146.49) 6.534 ms 6.910 ms 9.157 ms
6 10.255.10.126 (10.255.10.126) 7.597 ms 6.963 ms 7.013 ms
7 * * *
8 localhost (27.68.240.166) 36.628 ms localhost (117.1.220.234) 25.635 ms localhost (27.68.240.166) 27.523 ms
9 localhost (27.68.228.126) 57.733 ms 49.733 ms 60.083 ms
10 localhost (27.68.240.8) 53.181 ms 45.433 ms 56.583 ms
[...]
It ignored the 172.26.91.0/24
network being directly attached. It also ignored the default route via my Main Router with lower metric. It just sent everything via the Neighbor Access Point at 192.168.1.1
. Then a lot of strange routing hops came out of nowhere. Can someone explain what is going on? And how can I access my Access Point internally on my network instead of via my neighbor 192.168.1.0/24
network?