Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#211 - TP-Link WD8970 Ethernet switch cannot receive #5264

Closed
openwrt-bot opened this issue Oct 7, 2016 · 0 comments
Closed

FS#211 - TP-Link WD8970 Ethernet switch cannot receive #5264

openwrt-bot opened this issue Oct 7, 2016 · 0 comments
Labels

Comments

@openwrt-bot
Copy link

dwmw2:

I was running OpenWRT, then upgraded to LEDE with a snapshot on 2016-10-06, with the following config:

config interface 'lan' option type 'bridge' option ifname 'eth0.1' option _orig_ifname 'eth0.1 wlan0' option _orig_bridge 'true' option proto 'dhcp' option hostname 'td8970'

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

config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0 2 4 5 6t'
option vid '1'

I've no idea where the switch config came from, but it was working.

I built my own trunk image today, and it no longer works. There is... strangeness with the VLAN header on RX, and nothing is ever recognised. TX is fine.

This is what happens on the wire:

11:40:03.629245 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from e8:94:f6:ed:e1:f4, length 300
0x0000: ffff ffff ffff e894 f6ed e1f4 0800 4500 ..............E.
0x0010: 0148 0000 0000 4011 79a6 0000 0000 ffff .H....@.y.......
0x0020: ffff 0044 0043 0134 9f8a 0101 0600 6a45 ...D.C.4......jE
...c
0x0130: 7020 312e 3235 2e30 0c06 7464 3839 3730 p.1.25.0..td8970
0x0140: ff00 0000 0000 0000 0000 0000 0000 0000 ................
0x0150: 0000 0000 0000 ......
11:40:03.630049 IP 90.155.92.193.67 > 90.155.92.252.68: BOOTP/DHCP, Reply, length 317
0x0000: e894 f6ed e1f4 000a fa22 0096 0800 4500 ........."....E.
0x0010: 0159 c706 0000 4011 439a 5a9b 5cc1 5a9b .Y....@.C.Z..Z.
0x0020: 5cfc 0043 0044 0145 704a 0201 0600 6a45 ..C.D.EpJ....jE
0x0030: 9773 274d 0000 0000 0000 5a9b 5cfc 5a9b .s'M......Z..Z.
0x0040: 5cc1 0000 0000 e894 f6ed e1f4 0000 0000 ...............
0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0080: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0090: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0100: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0110: 0000 0000 0000 6382 5363 3501 0236 045a ......c.Sc5..6.Z
0x0120: 9b5c c133 0400 00a8 c03a 0400 0054 603b ..3.....:...T`;
0x0130: 0400 0093 a801 04ff ffff c01c 045a 9b5c .............Z.
0x0140: ff03 045a 9b5c c10f 0d69 6e66 7261 6465 ...Z....infrade
0x0150: 6164 2e6f 7267 0608 5a9b 5cd1 5a9b 5cc1 ad.org..Z..Z..
0x0160: 2a04 5a9b 5cc1 ff *.Z...

This is what I get from tcpdump on the eth0 interface:

11:40:03.602400 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from e8:94:f6:ed:e1:f4, length 300
0x0000: ffff ffff ffff e894 f6ed e1f4 8100 0001 ................
0x0010: 0800 4500 0148 0000 0000 4011 79a6 0000 ..E..H....@.y...
0x0020: 0000 ffff ffff 0044 0043 0134 9f8a 0101 .......D.C.4....
...
0x0130: 7564 6863 7020 312e 3235 2e30 0c06 7464 udhcp.1.25.0..td
0x0140: 3839 3730 ff00 0000 0000 0000 0000 0000 8970............
0x0150: 0000 0000 0000 0000 0000 ..........
11:40:03.603441 IP truncated-ip - 44 bytes missing! 90.155.92.252 > 0.67.0.68: ip-proto-155
0x0000: e1f4 000a fa22 0096 8100 0001 0800 4500 ....."........E.
0x0010: 0159 c706 439a 5a9b 5cc1 5a9b 5cfc 0043 .Y..C.Z..Z...C
0x0020: 0044 0145 98c6 0201 0600 6a45 9773 274d .D.E......jE.s'M
0x0030: 0000 5a9b 5cfc 5a9b 5cc1 0000 0000 e894 ..Z..Z........
0x0040: f6ed e1f4 0000 0000 0000 0000 0000 0000 ................
0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0080: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0090: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00f0: 0000 0000 5363 3501 0236 045a 9b5c c133 ....Sc5..6.Z..3
0x0100: 0400 00a8 c03a 0400 0054 603b 0400 0093 .....:...T`;....
0x0110: ffff c01c 045a 9b5c ff03 045a 9b5c c10f .....Z....Z...
0x0120: 0d69 6e66 7261 6465 6164 2e6f 5a9b 5cd1 .infradead.oZ..
0x0130: 5a9b 5cc1 2a04 5a9b 5cc1 ff Z..*.Z...

@openwrt-bot
Copy link
Author

dwmw2:

Aha, this goes away when I set 'enable_vlan' in the switch config.

@openwrt-bot
Copy link
Author

dwmw2:

Arguably that configuration problem was actually a sysupgrade problem. This used to work and then went away in an upgrade. If we intend upgrades from OpenWRT to work, that should be considered a bug.

Why did we gain a new explicit enable_vlan option anyway? It seems to be redundant — why can't it be inferred from whether there are any vlans configured on the switch? And if you are going to have a redundant 'enable_vlan' option... can we make it ignore the vlan config on the switch in that case? I think there's a second bug there, too.

@openwrt-bot
Copy link
Author

mkresin:

Because this config was either added or changed by you. If it worked this way, it worked more or less accidentally.

The default switch config for the W8970 was added with [[https://git.lede-project.org/f16f3103064a25bf20f19b5c5dafe95e0cd04454|f16f3103064a25bf20f19b5c5dafe95e0cd04454]]. And the [[https://git.lede-project.org/?p=source.git;a=blob;f=package/base-files/files/lib/functions/uci-defaults.sh;h=2658d439ac04c7ecd45bc28112fb88b1c6dd38b5;hb=161179f40bd7899516518f3844fea28c6dd86efc#l312|ucidef_add_switch function at this time]] has already added the "enable_vlan=1" line.

Hence, configuration issue and not a bug.

@openwrt-bot
Copy link
Author

dwmw2:

Hm, OK. I have no idea why I would have touched that, unless it broke it some way when switch support was added. But OK, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant