Hello community,
I've been struggling with the default route on my WRT3200ACM.
I installed OpenWrt on my Linksys WRT3200ACM, configured extroot (using https://openwrt.org/docs/guide-user/additional-software/extroot_configuration?s[]=extroot as reference) and changed the IP address of it (using [Solved] How to correctly change router LAN's IP address? as reference).
As far as I remember I did the exakt same procedure on my other two WRT3200ACM, but with this WRT3200ACM I have a problem with the default route - there is none.
Problematic WRT3200ACM (route):
root@OpenWrt:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.1.1.0 * 255.255.255.0 U 0 0 0 br-lan
10.10.20.0 10.10.40.1 255.255.255.0 UG 0 0 0 eth1.2 (static route)
10.10.40.0 10.10.40.1 255.255.255.0 UG 0 0 0 eth1.2 (static route)
root@OpenWrt:~#
Working WRT3200ACM (route):
root@OpenWrt:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.255.255.1 0.0.0.0 UG 0 0 0 eth1.2
10.10.10.0 10.255.255.2 255.255.255.0 UG 0 0 0 eth1.2 (static route)
10.10.20.0 10.255.255.2 255.255.255.0 UG 0 0 0 eth1.2 (static route)
10.10.30.0 10.255.255.2 255.255.255.0 UG 0 0 0 eth1.2 (static route)
10.10.40.0 * 255.255.255.0 U 0 0 0 br-lan
10.255.255.0 * 255.255.255.0 U 0 0 0 eth1.2
root@OpenWrt:~#
How can I set a default route to take? Trying to set the default route manually did not work:
root@OpenWrt:~# route add default gw 10.10.40.1
route: SIOCADDRT: Network unreachable
root@OpenWrt:~#
root@OpenWrt:~# ip route add default via 10.10.40.1
ip: RTNETLINK answers: Network unreachable
root@OpenWrt:~#
My /etc/config/network:
root@OpenWrt:~# cat /etc/config/network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fdaf:a159:a8fd::/48'
config interface 'lan'
option type 'bridge'
option ifname 'eth0.1'
option proto 'static'
option ipaddr '10.1.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
config interface 'wan'
option ifname 'eth1.2'
option proto 'static'
option ipaddr '10.10.40.147'
option netmask '255.255.255.0'
option gateway '10.10.40.1'
option broadcast '10.10.40.255'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0 1 2 3 5t'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '4 6t'
config route
option target '10.10.20.0'
option netmask '255.255.255.0'
option gateway '10.10.40.1'
option interface 'wan'
config route
option interface 'wan'
option target '10.10.40.0'
option netmask '255.255.255.0'
option gateway '10.10.40.1'
root@OpenWrt:~#
On the working WRT3200ACM it looks basically the same:
root@OpenWrt:~# cat /etc/config/network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd89:d980:8713::/48'
config interface 'lan'
option type 'bridge'
option ifname 'eth0.1'
option proto 'static'
option ipaddr '10.10.40.1'
option netmask '255.255.255.0'
config interface 'wan'
option ifname 'eth1.2'
option proto 'static'
option delegate '0'
option netmask '255.255.255.0'
option dns '10.10.20.6'
option ipaddr '10.255.255.3'
option broadcast '10.255.255.255'
option gateway '10.255.255.1'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0 1 2 3 5t'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '4 6t'
config route
option interface 'wan'
option target '10.10.10.0'
option netmask '255.255.255.0'
option gateway '10.255.255.2'
config route
option interface 'wan'
option target '10.10.20.0'
option netmask '255.255.255.0'
option gateway '10.255.255.2'
config route
option interface 'wan'
option target '10.10.30.0'
option netmask '255.255.255.0'
option gateway '10.255.255.2'
root@OpenWrt:~#
Has anybody any clue?
Cheers,
Steffen