Trouble isolating switch ports on GL.iNet GL-B1300 [Solved]

So I just got my B1300 in today and I started playing around with it. My usual process for isolating switch ports is to create a simple vlan definition for each and then place my lan/applications on eth0.vlan_id this has worked perfectly on every LEDE device I've tried in the past.

But not to much on the B1300, digging in with swconfig this device has one switch for all of it's ports and wifi interfaces, with port 0 as the cpu port. It's in the default netwok config that things get unusual.

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

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '3 4 0'

Where's the tagged cpu port? swconfig displays '0t' so at first I assumed this was an omission. Likewise there's no definition for port 5 (the wan port).

When I try and isolate any port (3 4 or 5) on any vlan and use eth0.x or eth1.x no traffic seems to leave the switch. I'm not even sure why we have two 'ports' if there's only one real cpu port.

Here's the full swconfig dump if it helps

root@OpenWrt:~# swconfig dev switch0 show
Global attributes:
        enable_vlan: 1
        enable_mirror_rx: 0
        enable_mirror_tx: 0
        mirror_monitor_port: 15
        mirror_source_port: 0
        linkdown: ???
Port 0:
        mib: Port 0 MIB counters
RxBroad     : 321
RxPause     : 0
RxMulti     : 454
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 219
Rx128Byte   : 608
Rx256Byte   : 3848
Rx512Byte   : 512
Rx1024Byte  : 141
Rx1518Byte  : 71
RxMaxByte   : 1
RxTooLong   : 0
RxGoodByte  : 1084890
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 113
TxBroad     : 18157
TxPause     : 0
TxMulti     : 6653
TxUnderRun  : 0
Tx64Byte    : 1217
Tx128Byte   : 22663
Tx256Byte   : 6339
Tx512Byte   : 2270
Tx1024Byte  : 398
Tx1518Byte  : 6
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 3802060
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        pvid: 0
        link: port:0 link:up speed:1000baseT full-duplex txflow rxflow
Port 1:
        mib: Port 1 MIB counters
RxBroad     : 0
RxPause     : 0
RxMulti     : 0
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 0
Rx128Byte   : 0
Rx256Byte   : 0
Rx512Byte   : 0
Rx1024Byte  : 0
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 0
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 0
TxPause     : 0
TxMulti     : 0
TxUnderRun  : 0
Tx64Byte    : 0
Tx128Byte   : 0
Tx256Byte   : 0
Tx512Byte   : 0
Tx1024Byte  : 0
Tx1518Byte  : 0
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 0
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        pvid: 0
        link: port:1 link:down
Port 2:
        mib: Port 2 MIB counters
RxBroad     : 0
RxPause     : 0
RxMulti     : 0
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 0
Rx128Byte   : 0
Rx256Byte   : 0
Rx512Byte   : 0
Rx1024Byte  : 0
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 0
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 0
TxPause     : 0
TxMulti     : 0
TxUnderRun  : 0
Tx64Byte    : 0
Tx128Byte   : 0
Tx256Byte   : 0
Tx512Byte   : 0
Tx1024Byte  : 0
Tx1518Byte  : 0
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 0
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        pvid: 0
        link: port:2 link:down
Port 3:
        mib: Port 3 MIB counters
RxBroad     : 6528
RxPause     : 0
RxMulti     : 2336
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 6352
Rx128Byte   : 2692
Rx256Byte   : 2726
Rx512Byte   : 810
Rx1024Byte  : 113
Rx1518Byte  : 5
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 1394826
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 23
TxPause     : 0
TxMulti     : 124
TxUnderRun  : 0
Tx64Byte    : 52
Tx128Byte   : 230
Tx256Byte   : 2123
Tx512Byte   : 124
Tx1024Byte  : 91
Tx1518Byte  : 43
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 528384
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        pvid: 1
        link: port:3 link:down
Port 4:
        mib: Port 4 MIB counters
RxBroad     : 3725
RxPause     : 0
RxMulti     : 1500
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 3567
Rx128Byte   : 1890
Rx256Byte   : 2051
Rx512Byte   : 568
Rx1024Byte  : 88
Rx1518Byte  : 1
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 939648
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 9
TxPause     : 0
TxMulti     : 87
TxUnderRun  : 0
Tx64Byte    : 39
Tx128Byte   : 138
Tx256Byte   : 1546
Tx512Byte   : 179
Tx1024Byte  : 53
Tx1518Byte  : 29
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 404155
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        pvid: 1
        link: port:4 link:up speed:1000baseT full-duplex txflow rxflow auto
Port 5:
        mib: Port 5 MIB counters
RxBroad     : 7904
RxPause     : 0
RxMulti     : 2817
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 7742
Rx128Byte   : 1642
Rx256Byte   : 1574
Rx512Byte   : 880
Rx1024Byte  : 197
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 1346272
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 196
TxPause     : 0
TxMulti     : 233
TxUnderRun  : 0
Tx64Byte    : 36
Tx128Byte   : 231
Tx256Byte   : 169
Tx512Byte   : 209
Tx1024Byte  : 0
Tx1518Byte  : 0
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 126035
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        pvid: 2
        link: port:5 link:up speed:1000baseT full-duplex txflow rxflow auto
VLAN 1:
        vid: 1
        ports: 0t 3 4
VLAN 2:
        vid: 2
        ports: 0t 5

Debugging advice would be appreciated. Thanks!

Nowhere, as it doesn't look like you've created it.

It appears you only have a LAN configured. This is why you don't see the WAN port declared in the config. You must configure your WAN; in the process you will tag the CPU and apply the settings. Be sure to thoroughly confirm your config before applying it!

You don't show your network config in order to further troubleshoot something like that. You wouldn't use eth1 unless there's a second NIC card. And if you had a second NIC, you wouldn't be trying to VLAN. You may need to review how to properly number VLANs.

I actually solved this issue. It turns out that by default the device is quite finicky about it's vlan selection.

vlans 1 and 2 if used will always fail to operate as expected. It seems like eth0 and eth1 are mapped to them by default.

By using vlans 3 and 4 I was able to isolate all three ports without trouble. See my working example here.

2 Likes

If your problem is solved, please consider marking this topic as [Solved]. (Click the pencil behind the topic...)

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.