8devices Community
https://www.8devices.com/community/

carambola - wlan0 takes priority of eth0.2 ( wan interface )
https://www.8devices.com/community/viewtopic.php?f=1&t=470
Page 1 of 1

Author:  shroukkhan [ 01 Aug 2013, 02:58 ]
Post subject:  carambola - wlan0 takes priority of eth0.2 ( wan interface )

hi,
in carambola , both eth0.2 ( wan interface ) and wlan0 interface are on dhcp. but for some reason the wlan0 shows up as default route..where eth0.2 should actually be the default route.

is there any way to set priority in the network configuration?

my /etc/config/network looks like this:

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.2.1"
option netmask "255.255.255.0"
#option macaddr "c4:93:00:11:11:12"


config interface "wan"
option ifname "eth0.2"
option proto "dhcp"

config switch
option name "rt305x"
option reset "1"
option enable_vlan "1"

config switch_vlan
option device "rt305x"
option vlan "1"
option ports "1 2 3 4 6t"

config switch_vlan
option device "rt305x"
option vlan "2"
option ports "0 6t"

config interface wwan
option proto "dhcp"


and my route-ing table :

Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0.2
192.168.1.0 * 255.255.255.0 U 0 0 0 wlan0
192.168.2.0 * 255.255.255.0 U 0 0 0 br-lan


any idea what might be happening here?

regards,
khan

Author:  hutorny [ 01 Aug 2013, 03:58 ]
Post subject:  Re: carambola - wlan0 takes priority of eth0.2 ( wan interfa

AFAIK, you should specify metrics for the interfaces.
http://wiki.openwrt.org/doc/uci/network#protocol.static
Lower metrics wins.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/