I have an old openwrt router (12.09 , 192.168.0.252 , 192.168.20.254)
I'm trying to replace this old router to new one(19.07 , 192.168.0.250)
the new router has already establish a wireguard VPN tunnel to new 192.168.20.x network
there are some static route in the old one.
network configuration
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
#config interface 'lan'
# option ifname 'eth0.1'
# option type 'bridge'
# option proto 'static'
# option ipaddr '192.168.20.254'
# option netmask '255.255.255.0'
config interface 'wan'
option ifname 'eth1'
option proto 'static'
option ipaddr '219.84.111.111'
option netmask '255.255.255.0'
config switch
option name 'eth0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'eth0'
option vlan '1'
option ports '0t 2 3 4'
config switch_vlan
option device 'eth0'
option vlan '2'
option ports '0t 1'
config interface 'backbone'
option ifname 'eth0.2'
option proto 'static'
option ipaddr 192.168.0.252
option netmask '255.255.255.0'
as you can see , I disable to interface eth0.1 (192.168.20.254)
then I add a new static route , traffic go to 192.168.20.x network goes to 192.168.0.250 (the new one with wireguard VPN)
ip r
192.168.0.0/24 dev eth0.2 proto kernel scope link src 192.168.0.252
192.168.1.0/24 via 192.168.0.1 dev eth0.2 proto static
192.168.11.0/24 via 192.168.0.1 dev eth0.2 proto static
192.168.20.0/24 via 192.168.0.250 dev eth0.2
192.168.22.0/24 dev ipsec0 scope link
I can ping the new router ( 192.168.0.250 ) in old one.
root@OpenWrt:~# ping 192.168.0.250
PING 192.168.0.250 (192.168.0.250): 56 data bytes
64 bytes from 192.168.0.250: seq=0 ttl=64 time=1.014 ms
64 bytes from 192.168.0.250: seq=1 ttl=64 time=0.637 ms
64 bytes from 192.168.0.250: seq=2 ttl=64 time=0.625 ms
64 bytes from 192.168.0.250: seq=3 ttl=64 time=0.727 ms
--- 192.168.0.250 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 0.625/0.750/1.014 ms
and I also can ping the remote gateway
root@OpenWrt:~# ping -c 2 192.168.20.254
PING 192.168.20.254 (192.168.20.254): 56 data bytes
64 bytes from 192.168.20.254: seq=0 ttl=63 time=8.465 ms
64 bytes from 192.168.20.254: seq=1 ttl=63 time=7.536 ms
--- 192.168.20.254 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 7.536/8.000/8.465 ms
so route from old router to new router via wireguard is working.
but I can not ping the remote gateway on my client
2021-09-15 21:05:45 [mini@s006 ~]$ traceroute 192.168.20.254
traceroute to 192.168.20.254 (192.168.20.254), 30 hops max, 60 byte packets
1 192.168.1.254 (192.168.1.254) 5.289 ms 5.499 ms 5.756 ms
2 bbs252.abc.com (192.168.0.252) 0.264 ms 0.270 ms 0.258 ms
3 * * *
4 * * *
5 * * *
6 * * *
7 * * *
8 * * *
9 * * *
10 * * *
11 * * *
12 * * *
13 * * *
14 * * *
15 * * *
16 * * *
the route is correct , goes to default gw first , the default tw route to old router (192.168.0.252), then the routing is missing .
I already disable the firewall in old router for testing , so should not be a firewall issue.
But I don't see what's wrong with the routing .
Any suggestions would be appreciated!
I will try to draw a illustraion on bussiness time and upload it !