OpenWrt Forum Archive

Topic: wrong default route

The content of this topic has been archived on 29 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

I installed a Openwrt Kamikaze in my WTR54G. But I have a problem with default gateway on all wifi clients connected to AP.
On all clients (connected with dhcp), default gateway is 192.168.0.100 (IP of AP) instead of 192.168.0.254.
When I change manually this route (192.168.0.100) by 192.168.0.254, I access to Internet.

/etc/config/network :

config 'switch' 'eth0'
    option 'vlan0' '0 1 2 3 5*'
    option 'vlan1' '4 5'

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 'type' 'bridge'
    option 'ifname' 'eth0.0'
    option 'proto' 'static'
    option 'netmask' '255.255.255.0'
    option 'ipaddr' '192.168.0.100'
    option 'defaultroute' '0'
    option 'peerdns' '0'
    option 'gateway' '192.168.0.254'
    option 'dns' '80.10.246.2'

config 'interface' 'wan'
    option 'ifname' 'eth0.1'
    option 'proto' 'none'
    option 'defaultroute' '0'
    option 'peerdns' '0'

Somebody can help me ?

Regards,

Aurélien

Hi.

The wlan clients will use the ap address as default gateway since this is what is advertised by dhcp in the default configuration.
Follow the howto below to change this behaviour.

  https://forum.openwrt.org/viewtopic.php?id=17316

Regards,
JoW

(Last edited by jow on 11 Sep 2009, 20:52)

Thanks joe, it works fine !

Bye

The discussion might have continued from here.