[OpenWrt-Devel] AR9344 Openwrt - LAN and WAN interface link issue

Afkar Rafique afkar.ec at gmail.com
Wed Oct 28 11:24:22 EDT 2015


Hi Jow,

Thank you so much for the reply. Below is my /etc/config/network file

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 eth1'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'

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

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 5'

config switch_vlan
option device 'eth0'
option vlan '2'
option ports '0t 1'

config switch
option name 'eth1'
option reset '1'
option enable_vlan '1'

config switch_vlan
option device 'eth1'
option vlan '1'
option ports '0 1 2 3 4 5'

Could you please tell how i can use command to check WAN and LAN link
separately using switch command.

Regards,


On Wed, Oct 28, 2015 at 6:51 PM, Jo-Philipp Wich <jow at openwrt.org> wrote:

> Hi Afkar,
>
> > The same thing if we connect only WAN cable and check "cat
> > /sys/class/net/eth0.1/carrier" and "cat /sys/class/net/eth0.2/carrier"
> > both returns "1" . But it should not be like this.
>
> This is expected since both eth0.1 and eth0.2 are actually SoC
> connection to the external switch ICs CPU port, those PCB traces are
> always connected.
>
> In order to get the link state for single ports on the external switch,
> use the swconfig command.
>
> ~ Jow
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20151028/abc8677b/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list