<div dir="ltr"><div><div><div>Hi Jow,<br><br></div>Thank you so much for the reply. Below is my /etc/config/network file<br><br>config interface 'loopback'
<br> option ifname 'lo'
<br> option proto 'static'
<br> option ipaddr '127.0.0.1'
<br> option netmask '255.0.0.0'
<br>
<br>config interface 'lan'
<br> option ifname 'eth0.1 eth1'
<br> option type 'bridge'
<br> option proto 'static'
<br> option ipaddr '192.168.1.1'
<br> option netmask '255.255.255.0'
<br>
<br>config interface 'wan'
<br> option ifname 'eth0.2'
<br> option proto 'dhcp'
<br>
<br>config switch
<br> option name 'eth0'
<br> option reset '1'
<br> option enable_vlan '1'
<br>
<br>config switch_vlan
<br> option device 'eth0'
<br> option vlan '1'
<br> option ports '0t 2 3 4 5'
<br>
<br>config switch_vlan
<br> option device 'eth0'
<br> option vlan '2'
<br> option ports '0t 1'
<br>
<br>config switch
<br> option name 'eth1'
<br> option reset '1'
<br> option enable_vlan '1'
<br>
<br>config switch_vlan
<br> option device 'eth1'
<br> option vlan '1'
<br> option ports '0 1 2 3 4 5'<br><br></div>Could you please tell how i can use command to check WAN and LAN link separately using switch command.<br><br></div>Regards,<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 28, 2015 at 6:51 PM, Jo-Philipp Wich <span dir="ltr"><<a href="mailto:jow@openwrt.org" target="_blank">jow@openwrt.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Afkar,<br>
<span class=""><br>
> The same thing if we connect only WAN cable and check "cat<br>
> /sys/class/net/eth0.1/carrier" and "cat /sys/class/net/eth0.2/carrier"<br>
> both returns "1" . But it should not be like this.<br>
<br>
</span>This is expected since both eth0.1 and eth0.2 are actually SoC<br>
connection to the external switch ICs CPU port, those PCB traces are<br>
always connected.<br>
<br>
In order to get the link state for single ports on the external switch,<br>
use the swconfig command.<br>
<br>
~ Jow<br>
_______________________________________________<br>
openwrt-devel mailing list<br>
<a href="mailto:openwrt-devel@lists.openwrt.org">openwrt-devel@lists.openwrt.org</a><br>
<a href="https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel" rel="noreferrer" target="_blank">https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel</a><br>
</blockquote></div><br></div>