Re: [OpenWrt-Devel] Ethernet switch on Ralink

2013-09-23 Thread jonsm...@gmail.com
I took a good VLAN packet and a bad non-VLAN packet and put then into
Wireshark. The IP header checksums are both correct.  Plus the rest of
the packet looks to be in acceptable form. Only the TCP checksums are
wrong.

Maybe when the VLAN hardware gets turned off there is a bug in the
code that is also turning off the TCP checksum hardware. So we are
just getting junk for that checksum which causes the packets to be
discarded.

-- 
Jon Smirl
jonsm...@gmail.com
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Ethernet switch on Ralink

2013-09-23 Thread Diego Lopez Recas
Try disabling transmission offloading and do a tcpdump again.

ethtool -K eth0 tx off



On Mon, Sep 23, 2013 at 8:11 PM, jonsm...@gmail.com wrote:

> I pasted that twice by accident
>
> root@OpenWrt:/# ethtool --show-offload  eth0
> Features for eth0:
> rx-checksumming: on [fixed]
> tx-checksumming: on
> tx-checksum-ipv4: on [fixed]
> tx-checksum-ip-generic: off [fixed]
> tx-checksum-ipv6: off [fixed]
> tx-checksum-fcoe-crc: off [fixed]
> tx-checksum-sctp: off [fixed]
> scatter-gather: off
> tx-scatter-gather: off [fixed]
> tx-scatter-gather-fraglist: off [fixed]
> tcp-segmentation-offload: off
> tx-tcp-segmentation: off [fixed]
> tx-tcp-ecn-segmentation: off [fixed]
> tx-tcp6-segmentation: off [fixed]
> udp-fragmentation-offload: off [fixed]
> generic-segmentation-offload: off [requested on]
> generic-receive-offload: on
> large-receive-offload: off [fixed]
> rx-vlan-offload: off [fixed]
> tx-vlan-offload: off [fixed]
> ntuple-filters: off [fixed]
> receive-hashing: off [fixed]
> highdma: off [fixed]
> rx-vlan-filter: off [fixed]
> vlan-challenged: off [fixed]
> tx-lockless: off [fixed]
> netns-local: off [fixed]
> tx-gso-robust: off [fixed]
> tx-fcoe-segmentation: off [fixed]
> tx-gre-segmentation: off [fixed]
> tx-udp_tnl-segmentation: off [fixed]
> fcoe-mtu: off [fixed]
> tx-nocache-copy: on
> loopback: off [fixed]
> rx-fcs: off [fixed]
> rx-all: off [fixed]
> tx-vlan-stag-hw-insert: off [fixed]
> rx-vlan-stag-hw-parse: off [fixed]
> rx-vlan-stag-filter: off [fixed]
> root@OpenWrt:/#
>
>
>
> --
> Jon Smirl
> jonsm...@gmail.com
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Ethernet switch on Ralink

2013-09-23 Thread jonsm...@gmail.com
On Mon, Sep 23, 2013 at 2:27 PM, Diego Lopez Recas  wrote:
> Try disabling transmission offloading and do a tcpdump again.
>
> ethtool -K eth0 tx off

root@OpenWrt:/# ethtool -K eth0 tx off
Cannot change tx-checksumming
Could not change any device features
root@OpenWrt:/#



>
>
>
> On Mon, Sep 23, 2013 at 8:11 PM, jonsm...@gmail.com 
> wrote:
>>
>> I pasted that twice by accident
>>
>> root@OpenWrt:/# ethtool --show-offload  eth0
>> Features for eth0:
>> rx-checksumming: on [fixed]
>> tx-checksumming: on
>> tx-checksum-ipv4: on [fixed]
>> tx-checksum-ip-generic: off [fixed]
>> tx-checksum-ipv6: off [fixed]
>> tx-checksum-fcoe-crc: off [fixed]
>> tx-checksum-sctp: off [fixed]
>> scatter-gather: off
>> tx-scatter-gather: off [fixed]
>> tx-scatter-gather-fraglist: off [fixed]
>> tcp-segmentation-offload: off
>> tx-tcp-segmentation: off [fixed]
>> tx-tcp-ecn-segmentation: off [fixed]
>> tx-tcp6-segmentation: off [fixed]
>> udp-fragmentation-offload: off [fixed]
>> generic-segmentation-offload: off [requested on]
>> generic-receive-offload: on
>> large-receive-offload: off [fixed]
>> rx-vlan-offload: off [fixed]
>> tx-vlan-offload: off [fixed]
>> ntuple-filters: off [fixed]
>> receive-hashing: off [fixed]
>> highdma: off [fixed]
>> rx-vlan-filter: off [fixed]
>> vlan-challenged: off [fixed]
>> tx-lockless: off [fixed]
>> netns-local: off [fixed]
>> tx-gso-robust: off [fixed]
>> tx-fcoe-segmentation: off [fixed]
>> tx-gre-segmentation: off [fixed]
>> tx-udp_tnl-segmentation: off [fixed]
>> fcoe-mtu: off [fixed]
>> tx-nocache-copy: on
>> loopback: off [fixed]
>> rx-fcs: off [fixed]
>> rx-all: off [fixed]
>> tx-vlan-stag-hw-insert: off [fixed]
>> rx-vlan-stag-hw-parse: off [fixed]
>> rx-vlan-stag-filter: off [fixed]
>> root@OpenWrt:/#
>>
>>
>>
>> --
>> Jon Smirl
>> jonsm...@gmail.com
>>
>> ___
>> openwrt-devel mailing list
>> openwrt-devel@lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
>
>
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>



-- 
Jon Smirl
jonsm...@gmail.com
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Ethernet switch on Ralink

2013-09-23 Thread Diego Lopez Recas
I don't know, do you see bad checksums with wireshark or tcpdump on your
desktop? If the NIC does the final checksum computing, this error might
just mean that tcpdump is not capturing the final value of this header
field.


On Mon, Sep 23, 2013 at 8:37 PM, jonsm...@gmail.com wrote:

> Somehow this failure is intertwined with the VLAN code since
> everything works once I turn VLANs on.
>
> --
> Jon Smirl
> jonsm...@gmail.com
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Ethernet switch on Ralink

2013-09-23 Thread jonsm...@gmail.com
Somehow this failure is intertwined with the VLAN code since
everything works once I turn VLANs on.

-- 
Jon Smirl
jonsm...@gmail.com
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Ethernet switch on Ralink

2013-09-23 Thread jonsm...@gmail.com
Turn on the VLAN and all the errors go away...

root@OpenWrt:/etc/config# tcpdump -n -v -x -e -i eth0
tcpdump: WARNING: eth0: no IPv4 address assigned
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size
65535 bytes
02:28:09.258040 70:71:bc:b8:9b:ee > 00:0a:52:00:00:02, ethertype
802.1Q (0x8100), length 78: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl
64, id 57708, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.40.57784 > 192.168.1.85.80: Flags [S], cksum 0xacee
(correct), seq 3716480608, win 14600, options [mss 1460,sackOK,TS val
21045004 ecr 0,nop,wscale 7], length 0
0x:  0001 0800 4500 003c e16c 4000 4006 d581
0x0010:  c0a8 0128 c0a8 0155 e1b8 0050 dd84 fe60
0x0020:    a002 3908 acee  0204 05b4
0x0030:  0402 080a 0141 1f0c   0103 0307
02:28:09.258580 00:0a:52:00:00:02 > 70:71:bc:b8:9b:ee, ethertype
802.1Q (0x8100), length 78: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl
64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.85.80 > 192.168.1.40.57784: Flags [S.], cksum 0x6496
(correct), seq 2796728135, ack 3716480609, win 14480, options [mss
1460,sackOK,TS val 4294963913 ecr 21045004,nop,wscale 2], length 0
0x:  0001 0800 4500 003c  4000 4006 b6ee
0x0010:  c0a8 0155 c0a8 0128 0050 e1b8 a6b2 af47
0x0020:  dd84 fe61 a012 3890 6496  0204 05b4
0x0030:  0402 080a  f2c9 0141 1f0c 0103 0302
02:28:09.258820 70:71:bc:b8:9b:ee > 00:0a:52:00:00:02, ethertype
802.1Q (0x8100), length 70: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl
64, id 57709, offset 0, flags [DF], proto TCP (6), length 52)
192.168.1.40.57784 > 192.168.1.85.80: Flags [.], cksum 0xcb7a
(correct), ack 1, win 115, options [nop,nop,TS val 21045004 ecr
4294963913], length 0
0x:  0001 0800 4500 0034 e16d 4000 4006 d588
0x0010:  c0a8 0128 c0a8 0155 e1b8 0050 dd84 fe61
0x0020:  a6b2 af48 8010 0073 cb7a  0101 080a
0x0030:  0141 1f0c  f2c9
02:28:09.259200 70:71:bc:b8:9b:ee > 00:0a:52:00:00:02, ethertype
802.1Q (0x8100), length 511: vlan 1, p 0, ethertype IPv4, (tos 0x0,
ttl 64, id 57710, offset 0, flags [DF], proto TCP (6), length 493)
192.168.1.40.57784 > 192.168.1.85.80: Flags [P.], cksum 0x9344
(correct), seq 1:442, ack 1, win 115, options [nop,nop,TS val 21045004
ecr 4294963913], length 441
0x:  0001 0800 4500 01ed e16e 4000 4006 d3ce
0x0010:  c0a8 0128 c0a8 0155 e1b8 0050 dd84 fe61
0x0020:  a6b2 af48 8018 0073 9344  0101 080a
0x0030:  0141 1f0c  f2c9 4745 5420 2f63 6769
0x0040:  2d62 696e 2f6c 7563 6920 4854 5450 2f31
0x0050:  2e31 0d0a 486f 7374 3a20 3139 322e 3136
0x0060:  382e 312e 3835 0d0a 436f 6e6e 6563 7469
0x0070:  6f6e 3a20 6b65 6570 2d61 6c69 7665 0d0a
0x0080:  4361 6368 652d 436f 6e74 726f 6c3a 206d
0x0090:  6178 2d61 6765 3d30 0d0a 4163 6365 7074
0x00a0:  3a20 7465 7874 2f68 746d 6c2c 6170 706c
0x00b0:  6963 6174 696f 6e2f 7868 746d 6c2b 786d
0x00c0:  6c2c 6170 706c 6963 6174 696f 6e2f 786d
0x00d0:  6c3b 713d 302e 392c 2a2f 2a3b 713d 302e
0x00e0:  380d 0a55 7365 722d 4167 656e 743a 204d
0x00f0:  6f7a 696c 6c61 2f35 2e30 2028 5831 313b
0x0100:  204c 696e 7578 2078 3836 5f36 3429 2041
0x0110:  7070 6c65 5765 624b 6974 2f35 3337 2e33
0x0120:  3620 284b 4854 4d4c 2c20 6c69 6b65 2047
0x0130:  6563 6b6f 2920 4368 726f 6d65 2f32 392e
0x0140:  302e 3135 3437 2e37 3620 5361 6661 7269
0x0150:  2f35 3337 2e33 360d 0a52 6566 6572 6572
0x0160:  3a20 6874 7470 3a2f 2f31 3932 2e31 3638
0x0170:  2e31 2e38 352f 0d0a 4163 6365 7074 2d45
0x0180:  6e63 6f64 696e 673a 2067 7a69 702c 6465
0x0190:  666c 6174 652c 7364 6368 0d0a 4163 6365
0x01a0:  7074 2d4c 616e 6775 6167 653a 2065 6e2d
0x01b0:  5553 2c65 6e3b 713d 302e 380d 0a43 6f6f
0x01c0:  6b69 653a 2073 7973 6175 7468 3d38 6536
0x01d0:  6130 3935 6335 3963 6338 6461 3232 3235
0x01e0:  3035 3437 3335 3837 6165 3935 300d 0a0d
0x01f0:  0a
02:28:09.259520 00:0a:52:00:00:02 > 70:71:bc:b8:9b:ee, ethertype
802.1Q (0x8100), length 70: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl
64, id 23937, offset 0, flags [DF], proto TCP (6), length 52)
192.168.1.85.80 > 192.168.1.40.57784: Flags [.], cksum 0xbb04
(correct), ack 442, win 3888, options [nop,nop,TS val 4294963913 ecr
21045004], length 0
0x:  0001 0800 4500 0034 5d81 4000 4006 5975
0x0010:  c0a8 0155 c0a8 0128 0050 e1b8 a6b2 af48
0x0020:  dd85 001a 8010 0f30 bb04  0101 080a
0x0030:   f2c9 0141 1f0c
02:28:09.547120 00:0a:52:00:00:02 > 70:71:bc:b8:9b:ee, ethertype
802.1Q (0x8100), length 139: vlan 1, p 0, ethertype IPv4, (tos 0x0,
ttl 64, id 23938, offset 0, flags [DF], proto TCP (6), length 121)
192.168.1.85.80 > 192.168.1.40.57784: Flags [P.], cksum 0xaffe
(correct), seq 1:70, ack 442, win 3888, options [nop,nop,TS val
4294963941 ecr 21045004], length 69
0x:  0001 0800 4500 0079 5d82 4000 4006 592f
0x0010:  c0a8 0155 c0a8 0128 0050 e1b8 a6b2 af48
0x0020:  dd85 001a 8018 0f30 affe  0101 080a
0x0030:   f2e5 0141 1f0c 4854 5450 2f31 2e31
0x0040:  2032 3030 204f 4b0d 0a43 6f6e 6e65 6374
0x0050:  696f 6e3a 204b 6565 702d 416c 697

Re: [OpenWrt-Devel] Ethernet switch on Ralink

2013-09-23 Thread Diego Lopez Recas
Yes, I meant you checked it on the rt5350.


On Mon, Sep 23, 2013 at 7:38 PM, jonsm...@gmail.com wrote:

> On Mon, Sep 23, 2013 at 1:34 PM, Diego Lopez Recas 
> wrote:
> > That is interesting. Can you check whether you are using hardware
> checksum
> > offloading?
> >
> > Install 'ethtool' and run:
> >
> > ethtool --show-offload  eth0
>
> My desktop has tcp offload but those tcpdumps were done on the rt5350.
>
>
> >
> >
> > On Mon, Sep 23, 2013 at 5:37 PM, jonsm...@gmail.com 
> > wrote:
> >>
> >> I used
> >>  tcpdump -n -v -e -i eth0
> >>
> >> So what is causing those incorrect checksums?
> >>
> >> 192.168.1.40 > 224.0.0.22: igmp v3 report, 3 group record(s)
> >> [gaddr 224.0.0.251 is_ex { }] [gaddr 239.192.83.80 is_ex { }] [gaddr
> >> 239.255.255.250 is_ex { }]
> >> 02:35:41.227580 00:1f:90:7e:af:3d > 01:80:c2:00:00:00, 802.3, length
> >> 60: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl
> >> 0x03: STP 802.1d, Config, Flags [none], bridge-id
> >> 8000.00:18:01:f9:89:66.8004, length 43
> >> message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay
> >> 15.00s
> >> root-id 8000.00:18:01:f9:89:66, root-pathcost 0
> >> 02:35:41.238900 70:71:bc:b8:9b:ee > ff:ff:ff:ff:ff:ff, ethertype ARP
> >> (0x0806), length 60: Ethernet (len 6), IPv4 (len 4), Request who-has
> >> 192.168.1.85 tell 192.168.1.40, length 46
> >> 02:35:41.239060 00:0a:52:00:00:02 > 70:71:bc:b8:9b:ee, ethertype ARP
> >> (0x0806), length 42: Ethernet (len 6), IPv4 (len 4), Reply
> >> 192.168.1.85 is-at 00:0a:52:00:00:02, length 28
> >> 02:35:41.239260 70:71:bc:b8:9b:ee > 00:0a:52:00:00:02, ethertype IPv4
> >> (0x0800), length 74: (tos 0x0, ttl 64, id 24793, offset 0, flags [DF],
> >> proto TCP (6), length 60)
> >> 192.168.1.40.55361 > 192.168.1.85.80: Flags [S], cksum 0xd005
> >> (correct), seq 1922975579, win 14600, options [mss 1460,sackOK,TS val
> >> 18294658 ecr 0,nop,wscale 7], length 0
> >> 02:35:41.239800 00:0a:52:00:00:02 > 70:71:bc:b8:9b:ee, ethertype IPv4
> >> (0x0800), length 74: (tos 0x0, ttl 64, id 0, offset 0, flags [DF],
> >> proto TCP (6), length 60)
> >> 192.168.1.85.80 > 192.168.1.40.55361: Flags [S.], cksum 0x83fc
> >> (incorrect -> 0x488a), seq 2923783498, ack 1922975580, win 14480,
> >> options [mss 1460,sackOK,TS val 29783 ecr 18294658,nop,wscale 2],
> >> length 0
> >> 02:35:41.490020 70:71:bc:b8:9b:ee > 00:0a:52:00:00:02, ethertype IPv4
> >> (0x0800), length 74: (tos 0x0, ttl 64, id 62082, offset 0, flags [DF],
> >> proto TCP (6), length 60)
> >> 192.168.1.40.55362 > 192.168.1.85.80: Flags [S], cksum 0x0b17
> >> (correct), seq 2841957699, win 14600, options [mss 1460,sackOK,TS val
> >> 18294721 ecr 0,nop,wscale 7], length 0
> >> 02:35:41.490540 00:0a:52:00:00:02 > 70:71:bc:b8:9b:ee, ethertype IPv4
> >> (0x0800), length 74: (tos 0x0, ttl 64, id 0, offset 0, flags [DF],
> >> proto TCP (6), length 60)
> >> 192.168.1.85.80 > 192.168.1.40.55362: Flags [S.], cksum 0x83fc
> >> (incorrect -> 0x7202), seq 3561640133, ack 2841957700, win 14480,
> >> options [mss 1460,sackOK,TS val 29808 ecr 18294721,nop,wscale 2],
> >> length 0
> >> 02:35:42.237600 70:71:bc:b8:9b:ee > 00:0a:52:00:00:02, ethertype IPv4
> >> (0x0800), length 74: (tos 0x0, ttl 64, id 24794, offset 0, flags [DF],
> >> proto TCP (6), length 60)
> >> 192.168.1.40.55361 > 192.168.1.85.80: Flags [S], cksum 0xcf0b
> >> (correct), seq 1922975579, win 14600, options [mss 1460,sackOK,TS val
> >> 18294908 ecr 0,nop,wscale 7], length 0
> >> 02:35:42.237980 00:0a:52:00:00:02 > 70:71:bc:b8:9b:ee, ethertype IPv4
> >> (0x0800), length 74: (tos 0x0, ttl 64, id 0, offset 0, flags [DF],
> >> proto TCP (6), length 60)
> >> 192.168.1.85.80 > 192.168.1.40.55361: Flags [S.], cksum 0x83fc
> >> (incorrect -> 0x4843), seq 2923783498, ack 1922975580, win 14480,
> >> options [mss 1460,sackOK,TS val 29854 ecr 18294658,nop,wscale 2],
> >> length 0
> >> 02:35:42.489760 70:71:bc:b8:9b:ee > 00:0a:52:00:00:02, ethertype IPv4
> >> (0x0800), length 74: (tos 0x0, ttl 64, id 62083, offset 0, flags [DF],
> >> proto TCP (6), length 60)
> >> 192.168.1.40.55362 > 192.168.1.85.80: Flags [S], cksum 0x0a1d
> >> (correct), seq 2841957699, win 14600, options [mss 1460,sackOK,TS val
> >> 18294971 ecr 0,nop,wscale 7], length 0
> >> 02:35:42.490140 00:0a:52:00:00:02 > 70:71:bc:b8:9b:ee, ethertype IPv4
> >> (0x0800), length 74: (tos 0x0, ttl 64, id 0, offset 0, flags [DF],
> >> proto TCP (6), length 60)
> >> 192.168.1.85.80 > 192.168.1.40.55362: Flags [S.], cksum 0x83fc
> >> (incorrect -> 0x719e), seq 3561640133, ack 2841957700, win 14480,
> >> options [mss 1460,sackOK,TS val 29908 ecr 18294721,nop,wscale 2],
> >> length 0
> >> 02:35:42.943020 00:18:dd:31:3b:41 > 01:00:5e:00:00:01, ethertype IPv4
> >> (0x0800), length 60: (tos 0x0, ttl 1, id 0, offset 0, flags [none],
> >> proto IGMP (2), length 28)
> >> 192.168.1.64 > 224.0.0.1: igmp v2 report 224.0.0.1
> >> 02:35:42.943240 00:18:dd:31:3b:41 > 01:00:5e:00:00:01, ethertype IPv4
> >> (0x0800), length 60

Re: [OpenWrt-Devel] Ethernet switch on Ralink

2013-09-23 Thread jonsm...@gmail.com
I pasted that twice by accident

root@OpenWrt:/# ethtool --show-offload  eth0
Features for eth0:
rx-checksumming: on [fixed]
tx-checksumming: on
tx-checksum-ipv4: on [fixed]
tx-checksum-ip-generic: off [fixed]
tx-checksum-ipv6: off [fixed]
tx-checksum-fcoe-crc: off [fixed]
tx-checksum-sctp: off [fixed]
scatter-gather: off
tx-scatter-gather: off [fixed]
tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: off
tx-tcp-segmentation: off [fixed]
tx-tcp-ecn-segmentation: off [fixed]
tx-tcp6-segmentation: off [fixed]
udp-fragmentation-offload: off [fixed]
generic-segmentation-offload: off [requested on]
generic-receive-offload: on
large-receive-offload: off [fixed]
rx-vlan-offload: off [fixed]
tx-vlan-offload: off [fixed]
ntuple-filters: off [fixed]
receive-hashing: off [fixed]
highdma: off [fixed]
rx-vlan-filter: off [fixed]
vlan-challenged: off [fixed]
tx-lockless: off [fixed]
netns-local: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
fcoe-mtu: off [fixed]
tx-nocache-copy: on
loopback: off [fixed]
rx-fcs: off [fixed]
rx-all: off [fixed]
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
root@OpenWrt:/#



-- 
Jon Smirl
jonsm...@gmail.com
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Ethernet switch on Ralink

2013-09-23 Thread jonsm...@gmail.com
Run on the rt5350

root@OpenWrt:/# ethtool --show-offload  eth0
Features for eth0:
rx-checksumming: on [fixed]
tx-checksumming: on
tx-checksum-ipv4: on [fixed]
tx-checksum-ip-generic: off [fixed]
tx-checksum-ipv6: off [fixed]
tx-checksum-fcoe-crc: off [fixed]
tx-checksum-sctp: off [fixed]
scatter-gather: off
tx-scatter-gather: off [fixed]
tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: off
tx-tcp-segmentation: off [fixed]
tx-tcp-ecn-segmentation: off [fixed]
tx-tcp6-segmentation: off [fixed]
udp-fragmentation-offload: off [root@OpenWrt:/# ethtool --show-offload  eth0
Features for eth0:
rx-checksumming: on [fixed]
tx-checksumming: on
tx-checksum-ipv4: on [fixed]
tx-checksum-ip-generic: off [fixed]
tx-checksum-ipv6: off [fixed]
tx-checksum-fcoe-crc: off [fixed]
tx-checksum-sctp: off [fixed]
scatter-gather: off
tx-scatter-gather: off [fixed]
tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: off
tx-tcp-segmentation: off [fixed]
tx-tcp-ecn-segmentation: off [fixed]
tx-tcp6-segmentation: off [fixed]
udp-fragmentation-offload: off [fixed]
generic-segmentation-offload: off [requested on]
generic-receive-offload: on
large-receive-offload: off [fixed]
rx-vlan-offload: off [fixed]
tx-vlan-offload: off [fixed]
ntuple-filters: off [fixed]
receive-hashing: off [fixed]
highdma: off [fixed]
rx-vlan-filter: off [fixed]
vlan-challenged: off [fixed]
tx-lockless: off [fixed]
netns-local: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
fcoe-mtu: off [fixed]
tx-nocache-copy: on
loopback: off [fixed]
rx-fcs: off [fixed]
rx-all: off [fixed]
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
root@OpenWrt:/#
fixed]
generic-segmentation-offload: off [requested on]
generic-receive-offload: on
large-receive-offload: off [fixed]
rx-vlan-offload: off [fixed]
tx-vlan-offload: off [fixed]
ntuple-filters: off [fixed]
receive-hashing: off [fixed]
highdma: off [fixed]
rx-vlan-filter: off [fixed]
vlan-challenged: off [fixed]
tx-lockless: off [fixed]
netns-local: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
fcoe-mtu: off [fixed]
tx-nocache-copy: on
loopback: off [fixed]
rx-fcs: off [fixed]
rx-all: off [fixed]
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
root@OpenWrt:/#

On Mon, Sep 23, 2013 at 1:43 PM, Diego Lopez Recas  wrote:
> Yes, I meant you checked it on the rt5350.
>
>
> On Mon, Sep 23, 2013 at 7:38 PM, jonsm...@gmail.com 
> wrote:
>>
>> On Mon, Sep 23, 2013 at 1:34 PM, Diego Lopez Recas 
>> wrote:
>> > That is interesting. Can you check whether you are using hardware
>> > checksum
>> > offloading?
>> >
>> > Install 'ethtool' and run:
>> >
>> > ethtool --show-offload  eth0
>>
>> My desktop has tcp offload but those tcpdumps were done on the rt5350.
>>
>>
>> >
>> >
>> > On Mon, Sep 23, 2013 at 5:37 PM, jonsm...@gmail.com 
>> > wrote:
>> >>
>> >> I used
>> >>  tcpdump -n -v -e -i eth0
>> >>
>> >> So what is causing those incorrect checksums?
>> >>
>> >> 192.168.1.40 > 224.0.0.22: igmp v3 report, 3 group record(s)
>> >> [gaddr 224.0.0.251 is_ex { }] [gaddr 239.192.83.80 is_ex { }] [gaddr
>> >> 239.255.255.250 is_ex { }]
>> >> 02:35:41.227580 00:1f:90:7e:af:3d > 01:80:c2:00:00:00, 802.3, length
>> >> 60: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl
>> >> 0x03: STP 802.1d, Config, Flags [none], bridge-id
>> >> 8000.00:18:01:f9:89:66.8004, length 43
>> >> message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay
>> >> 15.00s
>> >> root-id 8000.00:18:01:f9:89:66, root-pathcost 0
>> >> 02:35:41.238900 70:71:bc:b8:9b:ee > ff:ff:ff:ff:ff:ff, ethertype ARP
>> >> (0x0806), length 60: Ethernet (len 6), IPv4 (len 4), Request who-has
>> >> 192.168.1.85 tell 192.168.1.40, length 46
>> >> 02:35:41.239060 00:0a:52:00:00:02 > 70:71:bc:b8:9b:ee, ethertype ARP
>> >> (0x0806), length 42: Ethernet (len 6), IPv4 (len 4), Reply
>> >> 192.168.1.85 is-at 00:0a:52:00:00:02, length 28
>> >> 02:35:41.239260 70:71:bc:b8:9b:ee > 00:0a:52:00:00:02, ethertype IPv4
>> >> (0x0800), length 74: (tos 0x0, ttl 64, id 24793, offset 0, flags [DF],
>> >> proto TCP (6), length 60)
>> >> 192.168.1.40.55361 > 192.168.1.85.80: Flags [S], cksum 0xd005
>> >> (correct), seq 1922975579, win 14600, options [mss 1460,sackOK,TS val
>> >> 18294658 ecr 0,nop,wscale 7], length 0
>> >> 02:35:41.239800 00:0a:52:00:00:02 > 70:71:bc:b8:9b:ee, ethertype IPv4
>> >> (0x0800), length 74: (tos 0x0, ttl 64, id 0, offset 0, flags [DF],
>> >> proto TCP (6), length 60)
>> >> 192.168.1.85.80 > 192.168.1.40.55361: Flags [S.], cksum 0x83fc
>> >> (incorrect -> 0x488a), seq 2923783498, ack 1922975580, win 14480,
>> >> options [mss 1460,sackOK,TS val 29783 ecr 18294658,nop,wscale 2],
>> >> length 0
>> >> 02:35:41.490020 70:71:bc:b8:9

Re: [OpenWrt-Devel] Ethernet switch on Ralink

2013-09-23 Thread Diego Lopez Recas
That is interesting. Can you check whether you are using hardware checksum
offloading?

Install 'ethtool' and run:

ethtool --show-offload  eth0


On Mon, Sep 23, 2013 at 5:37 PM, jonsm...@gmail.com wrote:

> I used
>  tcpdump -n -v -e -i eth0
>
> So what is causing those incorrect checksums?
>
> 192.168.1.40 > 224.0.0.22: igmp v3 report, 3 group record(s)
> [gaddr 224.0.0.251 is_ex { }] [gaddr 239.192.83.80 is_ex { }] [gaddr
> 239.255.255.250 is_ex { }]
> 02:35:41.227580 00:1f:90:7e:af:3d > 01:80:c2:00:00:00, 802.3, length
> 60: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl
> 0x03: STP 802.1d, Config, Flags [none], bridge-id
> 8000.00:18:01:f9:89:66.8004, length 43
> message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay
> 15.00s
> root-id 8000.00:18:01:f9:89:66, root-pathcost 0
> 02:35:41.238900 70:71:bc:b8:9b:ee > ff:ff:ff:ff:ff:ff, ethertype ARP
> (0x0806), length 60: Ethernet (len 6), IPv4 (len 4), Request who-has
> 192.168.1.85 tell 192.168.1.40, length 46
> 02:35:41.239060 00:0a:52:00:00:02 > 70:71:bc:b8:9b:ee, ethertype ARP
> (0x0806), length 42: Ethernet (len 6), IPv4 (len 4), Reply
> 192.168.1.85 is-at 00:0a:52:00:00:02, length 28
> 02:35:41.239260 70:71:bc:b8:9b:ee > 00:0a:52:00:00:02, ethertype IPv4
> (0x0800), length 74: (tos 0x0, ttl 64, id 24793, offset 0, flags [DF],
> proto TCP (6), length 60)
> 192.168.1.40.55361 > 192.168.1.85.80: Flags [S], cksum 0xd005
> (correct), seq 1922975579, win 14600, options [mss 1460,sackOK,TS val
> 18294658 ecr 0,nop,wscale 7], length 0
> 02:35:41.239800 00:0a:52:00:00:02 > 70:71:bc:b8:9b:ee, ethertype IPv4
> (0x0800), length 74: (tos 0x0, ttl 64, id 0, offset 0, flags [DF],
> proto TCP (6), length 60)
> 192.168.1.85.80 > 192.168.1.40.55361: Flags [S.], cksum 0x83fc
> (incorrect -> 0x488a), seq 2923783498, ack 1922975580, win 14480,
> options [mss 1460,sackOK,TS val 29783 ecr 18294658,nop,wscale 2],
> length 0
> 02:35:41.490020 70:71:bc:b8:9b:ee > 00:0a:52:00:00:02, ethertype IPv4
> (0x0800), length 74: (tos 0x0, ttl 64, id 62082, offset 0, flags [DF],
> proto TCP (6), length 60)
> 192.168.1.40.55362 > 192.168.1.85.80: Flags [S], cksum 0x0b17
> (correct), seq 2841957699, win 14600, options [mss 1460,sackOK,TS val
> 18294721 ecr 0,nop,wscale 7], length 0
> 02:35:41.490540 00:0a:52:00:00:02 > 70:71:bc:b8:9b:ee, ethertype IPv4
> (0x0800), length 74: (tos 0x0, ttl 64, id 0, offset 0, flags [DF],
> proto TCP (6), length 60)
> 192.168.1.85.80 > 192.168.1.40.55362: Flags [S.], cksum 0x83fc
> (incorrect -> 0x7202), seq 3561640133, ack 2841957700, win 14480,
> options [mss 1460,sackOK,TS val 29808 ecr 18294721,nop,wscale 2],
> length 0
> 02:35:42.237600 70:71:bc:b8:9b:ee > 00:0a:52:00:00:02, ethertype IPv4
> (0x0800), length 74: (tos 0x0, ttl 64, id 24794, offset 0, flags [DF],
> proto TCP (6), length 60)
> 192.168.1.40.55361 > 192.168.1.85.80: Flags [S], cksum 0xcf0b
> (correct), seq 1922975579, win 14600, options [mss 1460,sackOK,TS val
> 18294908 ecr 0,nop,wscale 7], length 0
> 02:35:42.237980 00:0a:52:00:00:02 > 70:71:bc:b8:9b:ee, ethertype IPv4
> (0x0800), length 74: (tos 0x0, ttl 64, id 0, offset 0, flags [DF],
> proto TCP (6), length 60)
> 192.168.1.85.80 > 192.168.1.40.55361: Flags [S.], cksum 0x83fc
> (incorrect -> 0x4843), seq 2923783498, ack 1922975580, win 14480,
> options [mss 1460,sackOK,TS val 29854 ecr 18294658,nop,wscale 2],
> length 0
> 02:35:42.489760 70:71:bc:b8:9b:ee > 00:0a:52:00:00:02, ethertype IPv4
> (0x0800), length 74: (tos 0x0, ttl 64, id 62083, offset 0, flags [DF],
> proto TCP (6), length 60)
> 192.168.1.40.55362 > 192.168.1.85.80: Flags [S], cksum 0x0a1d
> (correct), seq 2841957699, win 14600, options [mss 1460,sackOK,TS val
> 18294971 ecr 0,nop,wscale 7], length 0
> 02:35:42.490140 00:0a:52:00:00:02 > 70:71:bc:b8:9b:ee, ethertype IPv4
> (0x0800), length 74: (tos 0x0, ttl 64, id 0, offset 0, flags [DF],
> proto TCP (6), length 60)
> 192.168.1.85.80 > 192.168.1.40.55362: Flags [S.], cksum 0x83fc
> (incorrect -> 0x719e), seq 3561640133, ack 2841957700, win 14480,
> options [mss 1460,sackOK,TS val 29908 ecr 18294721,nop,wscale 2],
> length 0
> 02:35:42.943020 00:18:dd:31:3b:41 > 01:00:5e:00:00:01, ethertype IPv4
> (0x0800), length 60: (tos 0x0, ttl 1, id 0, offset 0, flags [none],
> proto IGMP (2), length 28)
> 192.168.1.64 > 224.0.0.1: igmp v2 report 224.0.0.1
> 02:35:42.943240 00:18:dd:31:3b:41 > 01:00:5e:00:00:01, ethertype IPv4
> (0x0800), length 60: (tos 0x0, ttl 1, id 0, offset 0, flags [none],
> proto IGMP (2), length 28)
> 169.254.91.114 > 224.0.0.1: igmp v2 report 224.0.0.1
> 02:35:43.228180 00:1f:90:7e:af:3d > 01:80:c2:00:00:00, 802.3, length
> 60: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl
> 0x03: STP 802.1d, Config, Flags [none], bridge-id
> 8000.00:18:01:f9:89:66.8004, length 43
> message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay
> 15.00s
> root-id 8000.00:18:01:f9:89:66, root-pathcost 0
> 02:35:43.567260 00:23:ee

Re: [OpenWrt-Devel] Ethernet switch on Ralink

2013-09-23 Thread jonsm...@gmail.com
On Mon, Sep 23, 2013 at 1:34 PM, Diego Lopez Recas  wrote:
> That is interesting. Can you check whether you are using hardware checksum
> offloading?
>
> Install 'ethtool' and run:
>
> ethtool --show-offload  eth0

My desktop has tcp offload but those tcpdumps were done on the rt5350.


>
>
> On Mon, Sep 23, 2013 at 5:37 PM, jonsm...@gmail.com 
> wrote:
>>
>> I used
>>  tcpdump -n -v -e -i eth0
>>
>> So what is causing those incorrect checksums?
>>
>> 192.168.1.40 > 224.0.0.22: igmp v3 report, 3 group record(s)
>> [gaddr 224.0.0.251 is_ex { }] [gaddr 239.192.83.80 is_ex { }] [gaddr
>> 239.255.255.250 is_ex { }]
>> 02:35:41.227580 00:1f:90:7e:af:3d > 01:80:c2:00:00:00, 802.3, length
>> 60: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl
>> 0x03: STP 802.1d, Config, Flags [none], bridge-id
>> 8000.00:18:01:f9:89:66.8004, length 43
>> message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay
>> 15.00s
>> root-id 8000.00:18:01:f9:89:66, root-pathcost 0
>> 02:35:41.238900 70:71:bc:b8:9b:ee > ff:ff:ff:ff:ff:ff, ethertype ARP
>> (0x0806), length 60: Ethernet (len 6), IPv4 (len 4), Request who-has
>> 192.168.1.85 tell 192.168.1.40, length 46
>> 02:35:41.239060 00:0a:52:00:00:02 > 70:71:bc:b8:9b:ee, ethertype ARP
>> (0x0806), length 42: Ethernet (len 6), IPv4 (len 4), Reply
>> 192.168.1.85 is-at 00:0a:52:00:00:02, length 28
>> 02:35:41.239260 70:71:bc:b8:9b:ee > 00:0a:52:00:00:02, ethertype IPv4
>> (0x0800), length 74: (tos 0x0, ttl 64, id 24793, offset 0, flags [DF],
>> proto TCP (6), length 60)
>> 192.168.1.40.55361 > 192.168.1.85.80: Flags [S], cksum 0xd005
>> (correct), seq 1922975579, win 14600, options [mss 1460,sackOK,TS val
>> 18294658 ecr 0,nop,wscale 7], length 0
>> 02:35:41.239800 00:0a:52:00:00:02 > 70:71:bc:b8:9b:ee, ethertype IPv4
>> (0x0800), length 74: (tos 0x0, ttl 64, id 0, offset 0, flags [DF],
>> proto TCP (6), length 60)
>> 192.168.1.85.80 > 192.168.1.40.55361: Flags [S.], cksum 0x83fc
>> (incorrect -> 0x488a), seq 2923783498, ack 1922975580, win 14480,
>> options [mss 1460,sackOK,TS val 29783 ecr 18294658,nop,wscale 2],
>> length 0
>> 02:35:41.490020 70:71:bc:b8:9b:ee > 00:0a:52:00:00:02, ethertype IPv4
>> (0x0800), length 74: (tos 0x0, ttl 64, id 62082, offset 0, flags [DF],
>> proto TCP (6), length 60)
>> 192.168.1.40.55362 > 192.168.1.85.80: Flags [S], cksum 0x0b17
>> (correct), seq 2841957699, win 14600, options [mss 1460,sackOK,TS val
>> 18294721 ecr 0,nop,wscale 7], length 0
>> 02:35:41.490540 00:0a:52:00:00:02 > 70:71:bc:b8:9b:ee, ethertype IPv4
>> (0x0800), length 74: (tos 0x0, ttl 64, id 0, offset 0, flags [DF],
>> proto TCP (6), length 60)
>> 192.168.1.85.80 > 192.168.1.40.55362: Flags [S.], cksum 0x83fc
>> (incorrect -> 0x7202), seq 3561640133, ack 2841957700, win 14480,
>> options [mss 1460,sackOK,TS val 29808 ecr 18294721,nop,wscale 2],
>> length 0
>> 02:35:42.237600 70:71:bc:b8:9b:ee > 00:0a:52:00:00:02, ethertype IPv4
>> (0x0800), length 74: (tos 0x0, ttl 64, id 24794, offset 0, flags [DF],
>> proto TCP (6), length 60)
>> 192.168.1.40.55361 > 192.168.1.85.80: Flags [S], cksum 0xcf0b
>> (correct), seq 1922975579, win 14600, options [mss 1460,sackOK,TS val
>> 18294908 ecr 0,nop,wscale 7], length 0
>> 02:35:42.237980 00:0a:52:00:00:02 > 70:71:bc:b8:9b:ee, ethertype IPv4
>> (0x0800), length 74: (tos 0x0, ttl 64, id 0, offset 0, flags [DF],
>> proto TCP (6), length 60)
>> 192.168.1.85.80 > 192.168.1.40.55361: Flags [S.], cksum 0x83fc
>> (incorrect -> 0x4843), seq 2923783498, ack 1922975580, win 14480,
>> options [mss 1460,sackOK,TS val 29854 ecr 18294658,nop,wscale 2],
>> length 0
>> 02:35:42.489760 70:71:bc:b8:9b:ee > 00:0a:52:00:00:02, ethertype IPv4
>> (0x0800), length 74: (tos 0x0, ttl 64, id 62083, offset 0, flags [DF],
>> proto TCP (6), length 60)
>> 192.168.1.40.55362 > 192.168.1.85.80: Flags [S], cksum 0x0a1d
>> (correct), seq 2841957699, win 14600, options [mss 1460,sackOK,TS val
>> 18294971 ecr 0,nop,wscale 7], length 0
>> 02:35:42.490140 00:0a:52:00:00:02 > 70:71:bc:b8:9b:ee, ethertype IPv4
>> (0x0800), length 74: (tos 0x0, ttl 64, id 0, offset 0, flags [DF],
>> proto TCP (6), length 60)
>> 192.168.1.85.80 > 192.168.1.40.55362: Flags [S.], cksum 0x83fc
>> (incorrect -> 0x719e), seq 3561640133, ack 2841957700, win 14480,
>> options [mss 1460,sackOK,TS val 29908 ecr 18294721,nop,wscale 2],
>> length 0
>> 02:35:42.943020 00:18:dd:31:3b:41 > 01:00:5e:00:00:01, ethertype IPv4
>> (0x0800), length 60: (tos 0x0, ttl 1, id 0, offset 0, flags [none],
>> proto IGMP (2), length 28)
>> 192.168.1.64 > 224.0.0.1: igmp v2 report 224.0.0.1
>> 02:35:42.943240 00:18:dd:31:3b:41 > 01:00:5e:00:00:01, ethertype IPv4
>> (0x0800), length 60: (tos 0x0, ttl 1, id 0, offset 0, flags [none],
>> proto IGMP (2), length 28)
>> 169.254.91.114 > 224.0.0.1: igmp v2 report 224.0.0.1
>> 02:35:43.228180 00:1f:90:7e:af:3d > 01:80:c2:00:00:00, 802.3, length
>> 60: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl
>> 0x03: STP 80

Re: [OpenWrt-Devel] Ethernet switch on Ralink

2013-09-23 Thread jonsm...@gmail.com
I used
 tcpdump -n -v -e -i eth0

So what is causing those incorrect checksums?

192.168.1.40 > 224.0.0.22: igmp v3 report, 3 group record(s)
[gaddr 224.0.0.251 is_ex { }] [gaddr 239.192.83.80 is_ex { }] [gaddr
239.255.255.250 is_ex { }]
02:35:41.227580 00:1f:90:7e:af:3d > 01:80:c2:00:00:00, 802.3, length
60: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl
0x03: STP 802.1d, Config, Flags [none], bridge-id
8000.00:18:01:f9:89:66.8004, length 43
message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay 15.00s
root-id 8000.00:18:01:f9:89:66, root-pathcost 0
02:35:41.238900 70:71:bc:b8:9b:ee > ff:ff:ff:ff:ff:ff, ethertype ARP
(0x0806), length 60: Ethernet (len 6), IPv4 (len 4), Request who-has
192.168.1.85 tell 192.168.1.40, length 46
02:35:41.239060 00:0a:52:00:00:02 > 70:71:bc:b8:9b:ee, ethertype ARP
(0x0806), length 42: Ethernet (len 6), IPv4 (len 4), Reply
192.168.1.85 is-at 00:0a:52:00:00:02, length 28
02:35:41.239260 70:71:bc:b8:9b:ee > 00:0a:52:00:00:02, ethertype IPv4
(0x0800), length 74: (tos 0x0, ttl 64, id 24793, offset 0, flags [DF],
proto TCP (6), length 60)
192.168.1.40.55361 > 192.168.1.85.80: Flags [S], cksum 0xd005
(correct), seq 1922975579, win 14600, options [mss 1460,sackOK,TS val
18294658 ecr 0,nop,wscale 7], length 0
02:35:41.239800 00:0a:52:00:00:02 > 70:71:bc:b8:9b:ee, ethertype IPv4
(0x0800), length 74: (tos 0x0, ttl 64, id 0, offset 0, flags [DF],
proto TCP (6), length 60)
192.168.1.85.80 > 192.168.1.40.55361: Flags [S.], cksum 0x83fc
(incorrect -> 0x488a), seq 2923783498, ack 1922975580, win 14480,
options [mss 1460,sackOK,TS val 29783 ecr 18294658,nop,wscale 2],
length 0
02:35:41.490020 70:71:bc:b8:9b:ee > 00:0a:52:00:00:02, ethertype IPv4
(0x0800), length 74: (tos 0x0, ttl 64, id 62082, offset 0, flags [DF],
proto TCP (6), length 60)
192.168.1.40.55362 > 192.168.1.85.80: Flags [S], cksum 0x0b17
(correct), seq 2841957699, win 14600, options [mss 1460,sackOK,TS val
18294721 ecr 0,nop,wscale 7], length 0
02:35:41.490540 00:0a:52:00:00:02 > 70:71:bc:b8:9b:ee, ethertype IPv4
(0x0800), length 74: (tos 0x0, ttl 64, id 0, offset 0, flags [DF],
proto TCP (6), length 60)
192.168.1.85.80 > 192.168.1.40.55362: Flags [S.], cksum 0x83fc
(incorrect -> 0x7202), seq 3561640133, ack 2841957700, win 14480,
options [mss 1460,sackOK,TS val 29808 ecr 18294721,nop,wscale 2],
length 0
02:35:42.237600 70:71:bc:b8:9b:ee > 00:0a:52:00:00:02, ethertype IPv4
(0x0800), length 74: (tos 0x0, ttl 64, id 24794, offset 0, flags [DF],
proto TCP (6), length 60)
192.168.1.40.55361 > 192.168.1.85.80: Flags [S], cksum 0xcf0b
(correct), seq 1922975579, win 14600, options [mss 1460,sackOK,TS val
18294908 ecr 0,nop,wscale 7], length 0
02:35:42.237980 00:0a:52:00:00:02 > 70:71:bc:b8:9b:ee, ethertype IPv4
(0x0800), length 74: (tos 0x0, ttl 64, id 0, offset 0, flags [DF],
proto TCP (6), length 60)
192.168.1.85.80 > 192.168.1.40.55361: Flags [S.], cksum 0x83fc
(incorrect -> 0x4843), seq 2923783498, ack 1922975580, win 14480,
options [mss 1460,sackOK,TS val 29854 ecr 18294658,nop,wscale 2],
length 0
02:35:42.489760 70:71:bc:b8:9b:ee > 00:0a:52:00:00:02, ethertype IPv4
(0x0800), length 74: (tos 0x0, ttl 64, id 62083, offset 0, flags [DF],
proto TCP (6), length 60)
192.168.1.40.55362 > 192.168.1.85.80: Flags [S], cksum 0x0a1d
(correct), seq 2841957699, win 14600, options [mss 1460,sackOK,TS val
18294971 ecr 0,nop,wscale 7], length 0
02:35:42.490140 00:0a:52:00:00:02 > 70:71:bc:b8:9b:ee, ethertype IPv4
(0x0800), length 74: (tos 0x0, ttl 64, id 0, offset 0, flags [DF],
proto TCP (6), length 60)
192.168.1.85.80 > 192.168.1.40.55362: Flags [S.], cksum 0x83fc
(incorrect -> 0x719e), seq 3561640133, ack 2841957700, win 14480,
options [mss 1460,sackOK,TS val 29908 ecr 18294721,nop,wscale 2],
length 0
02:35:42.943020 00:18:dd:31:3b:41 > 01:00:5e:00:00:01, ethertype IPv4
(0x0800), length 60: (tos 0x0, ttl 1, id 0, offset 0, flags [none],
proto IGMP (2), length 28)
192.168.1.64 > 224.0.0.1: igmp v2 report 224.0.0.1
02:35:42.943240 00:18:dd:31:3b:41 > 01:00:5e:00:00:01, ethertype IPv4
(0x0800), length 60: (tos 0x0, ttl 1, id 0, offset 0, flags [none],
proto IGMP (2), length 28)
169.254.91.114 > 224.0.0.1: igmp v2 report 224.0.0.1
02:35:43.228180 00:1f:90:7e:af:3d > 01:80:c2:00:00:00, 802.3, length
60: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl
0x03: STP 802.1d, Config, Flags [none], bridge-id
8000.00:18:01:f9:89:66.8004, length 43
message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay 15.00s
root-id 8000.00:18:01:f9:89:66, root-pathcost 0
02:35:43.567260 00:23:ee:3d:84:e3 > ff:ff:ff:ff:ff:ff, ethertype IPv4
(0x0800), length 60: (tos 0x0, ttl 64, id 18534, offset 0, flags
[none], proto UDP (17), length 40)
169.254.1.250.53586 > 169.254.1.255.5000: [udp sum ok] UDP, length 12
02:35:43.580920 00:0a:52:00:00:02 > 70:71:bc:b8:9b:ee, ethertype IPv4
(0x0800), length 74: (tos 0x0, ttl 64, id 0, offset 0, flags [DF],
proto TCP (6), length 60)

Re: [OpenWrt-Devel] Ethernet switch on Ralink

2013-09-23 Thread Diego Lopez Recas
Try using:

tcpdump -n -e -i eth0 tcp port 80


You'll see ethernet headers including vlan tags.


On Sat, Sep 21, 2013 at 1:54 AM, jonsm...@gmail.com wrote:

> tcpdump of tcp sessions failing to open
> 192.168.1.85 openwrt
> 192.168.1.40 desktop
>
> root@OpenWrt:/# tcpdump
> tcpdump: WARNING: eth0: no IPv4 address assigned
> tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
> listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
> 02:33:37.170160 ARP, Request who-has 169.254.1.139 (Broadcast) tell
> 169.254.91.114, length 46
> 02:33:37.174800 ARP, Reply 169.254.1.139 is-at 00:24:a0:0d:07:8d (oui
> Unknown), length 46
> 02:33:37.512300 IP6 fe80::6a7f:74ff:fe0a:fbec > ff02::1: ICMP6, router
> advertisement, length 64
> 02:33:38.712300 STP 802.1d, Config, Flags [none], bridge-id
> 8000.00:18:01:f9:89:66.8004, length 43
> 02:33:39.656460 IP 192.168.1.40.33758 > OpenWrt.lan.www: Flags [S],
> seq 3529223513, win 14600, options [mss 1460,sackOK,TS val 1075935 ecr
> 0,nop,wscale 7], length 0
> 02:33:39.656980 IP OpenWrt.lan.www > 192.168.1.40.33758: Flags [S.],
> seq 3048410101, ack 3529223514, win 14480, options [mss 1460,sackOK,TS
> val 4294948910 ecr 1075935,nop,wscale 2], length 0
> 02:33:39.907740 IP 192.168.1.40.33759 > OpenWrt.lan.www: Flags [S],
> seq 3238155935, win 14600, options [mss 1460,sackOK,TS val 1075998 ecr
> 0,nop,wscale 7], length 0
> 02:33:39.908260 IP OpenWrt.lan.www > 192.168.1.40.33759: Flags [S.],
> seq 260559917, ack 3238155936, win 14480, options [mss 1460,sackOK,TS
> val 4294948916 ecr 1075998,nop,wscale 2], length 0
> 02:33:39.926440 IP 169.254.1.250.21302 > 255.255.255.255.21302: UDP,
> length 1626
> 02:33:39.926560 IP 169.254.1.250 > 255.255.255.255: udp
> 02:33:40.653640 IP 192.168.1.40.33758 > OpenWrt.lan.www: Flags [S],
> seq 3529223513, win 14600, options [mss 1460,sackOK,TS val 1076185 ecr
> 0,nop,wscale 7], length 0
> 02:33:40.654020 IP OpenWrt.lan.www > 192.168.1.40.33758: Flags [S.],
> seq 3048410101, ack 3529223514, win 14480, options [mss 1460,sackOK,TS
> val 4294949009 ecr 1075935,nop,wscale 2], length 0
> 02:33:40.712900 STP 802.1d, Config, Flags [none], bridge-id
> 8000.00:18:01:f9:89:66.8004, length 43
> 02:33:40.905740 IP 192.168.1.40.33759 > OpenWrt.lan.www: Flags [S],
> seq 3238155935, win 14600, options [mss 1460,sackOK,TS val 1076248 ecr
> 0,nop,wscale 7], length 0
> 02:33:40.906120 IP OpenWrt.lan.www > 192.168.1.40.33759: Flags [S.],
> seq 260559917, ack 3238155936, win 14480, options [mss 1460,sackOK,TS
> val 4294949035 ecr 1075998,nop,wscale 2], length 0
> 02:33:41.745840 IP OpenWrt.lan.www > 192.168.1.40.33758: Flags [S.],
> seq 3048410101, ack 3529223514, win 14480, options [mss 1460,sackOK,TS
> val 4294949119 ecr 1075935,nop,wscale 2], length 0
> 02:33:42.355400 IP 169.254.1.250.7500 > 169.254.1.255.7500: isakmp:
> 02:33:42.656620 IP OpenWrt.lan.www > 192.168.1.40.33759: Flags [S.],
> seq 260559917, ack 3238155936, win 14480, options [mss 1460,sackOK,TS
> val 4294949210 ecr 1075998,nop,wscale 2], length 0
> 02:33:42.658200 IP 192.168.1.40.33758 > OpenWrt.lan.www: Flags [S],
> seq 3529223513, win 14600, options [mss 1460,sackOK,TS val 1076686 ecr
> 0,nop,wscale 7], length 0
> 02:33:42.658580 IP OpenWrt.lan.www > 192.168.1.40.33758: Flags [S.],
> seq 3048410101, ack 3529223514, win 14480, options [mss 1460,sackOK,TS
> val 4294949210 ecr 1075935,nop,wscale 2], length 0
> 02:33:42.713500 STP 802.1d, Config, Flags [none], bridge-id
> 8000.00:18:01:f9:89:66.8004, length 43
> 02:33:42.910280 IP 192.168.1.40.33759 > OpenWrt.lan.www: Flags [S],
> seq 3238155935, win 14600, options [mss 1460,sackOK,TS val 1076749 ecr
> 0,nop,wscale 7], length 0
> 02:33:42.910660 IP OpenWrt.lan.www > 192.168.1.40.33759: Flags [S.],
> seq 260559917, ack 3238155936, win 14480, options [mss 1460,sackOK,TS
> val 4294949235 ecr 1075998,nop,wscale 2], length 0
> 02:33:43.996600 IP 169.254.1.159.59527 > 169.254.1.255.5000: UDP, length 12
> 02:33:44.664300 ARP, Request who-has 192.168.1.40 tell OpenWrt.lan, length
> 28
> 02:33:44.664500 ARP, Reply 192.168.1.40 is-at 70:71:bc:b8:9b:ee (oui
> Unknown), length 46
> 02:33:44.714080 STP 802.1d, Config, Flags [none], bridge-id
> 8000.00:18:01:f9:89:66.8004, length 43
> 02:33:45.275160 IP OpenWrt.lan.www > 192.168.1.40.33758: Flags [S.],
> seq 3048410101, ack 3529223514, win 14480, options [mss 1460,sackOK,TS
> val 4294949472 ecr 1075935,nop,wscale 2], length 0
> 02:33:45.275380 IP OpenWrt.lan.www > 192.168.1.40.33759: Flags [S.],
> seq 260559917, ack 3238155936, win 14480, options [mss 1460,sackOK,TS
> val 4294949472 ecr 1075998,nop,wscale 2], length 0
> 02:33:45.334480 IP6 fe80::6a7f:74ff:fe0a:fbec > ff02::1: ICMP6, router
> advertisement, length 64
> 02:33:45.977580 IP 169.254.1.250.53586 > 169.254.1.255.5000: UDP, length 12
> 02:33:46.311320 IP 192.168.1.190.1025 > 239.255.255.250.1900: UDP, length
> 221
> 02:33:46.312220 IP 192.168.1.190.1025 > 239.255.255.250.1900: UDP, length
> 221
> 02:33:46.323200 

Re: [OpenWrt-Devel] Ethernet switch on Ralink

2013-09-20 Thread jonsm...@gmail.com
tcpdump of tcp sessions failing to open
192.168.1.85 openwrt
192.168.1.40 desktop

root@OpenWrt:/# tcpdump
tcpdump: WARNING: eth0: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
02:33:37.170160 ARP, Request who-has 169.254.1.139 (Broadcast) tell
169.254.91.114, length 46
02:33:37.174800 ARP, Reply 169.254.1.139 is-at 00:24:a0:0d:07:8d (oui
Unknown), length 46
02:33:37.512300 IP6 fe80::6a7f:74ff:fe0a:fbec > ff02::1: ICMP6, router
advertisement, length 64
02:33:38.712300 STP 802.1d, Config, Flags [none], bridge-id
8000.00:18:01:f9:89:66.8004, length 43
02:33:39.656460 IP 192.168.1.40.33758 > OpenWrt.lan.www: Flags [S],
seq 3529223513, win 14600, options [mss 1460,sackOK,TS val 1075935 ecr
0,nop,wscale 7], length 0
02:33:39.656980 IP OpenWrt.lan.www > 192.168.1.40.33758: Flags [S.],
seq 3048410101, ack 3529223514, win 14480, options [mss 1460,sackOK,TS
val 4294948910 ecr 1075935,nop,wscale 2], length 0
02:33:39.907740 IP 192.168.1.40.33759 > OpenWrt.lan.www: Flags [S],
seq 3238155935, win 14600, options [mss 1460,sackOK,TS val 1075998 ecr
0,nop,wscale 7], length 0
02:33:39.908260 IP OpenWrt.lan.www > 192.168.1.40.33759: Flags [S.],
seq 260559917, ack 3238155936, win 14480, options [mss 1460,sackOK,TS
val 4294948916 ecr 1075998,nop,wscale 2], length 0
02:33:39.926440 IP 169.254.1.250.21302 > 255.255.255.255.21302: UDP, length 1626
02:33:39.926560 IP 169.254.1.250 > 255.255.255.255: udp
02:33:40.653640 IP 192.168.1.40.33758 > OpenWrt.lan.www: Flags [S],
seq 3529223513, win 14600, options [mss 1460,sackOK,TS val 1076185 ecr
0,nop,wscale 7], length 0
02:33:40.654020 IP OpenWrt.lan.www > 192.168.1.40.33758: Flags [S.],
seq 3048410101, ack 3529223514, win 14480, options [mss 1460,sackOK,TS
val 4294949009 ecr 1075935,nop,wscale 2], length 0
02:33:40.712900 STP 802.1d, Config, Flags [none], bridge-id
8000.00:18:01:f9:89:66.8004, length 43
02:33:40.905740 IP 192.168.1.40.33759 > OpenWrt.lan.www: Flags [S],
seq 3238155935, win 14600, options [mss 1460,sackOK,TS val 1076248 ecr
0,nop,wscale 7], length 0
02:33:40.906120 IP OpenWrt.lan.www > 192.168.1.40.33759: Flags [S.],
seq 260559917, ack 3238155936, win 14480, options [mss 1460,sackOK,TS
val 4294949035 ecr 1075998,nop,wscale 2], length 0
02:33:41.745840 IP OpenWrt.lan.www > 192.168.1.40.33758: Flags [S.],
seq 3048410101, ack 3529223514, win 14480, options [mss 1460,sackOK,TS
val 4294949119 ecr 1075935,nop,wscale 2], length 0
02:33:42.355400 IP 169.254.1.250.7500 > 169.254.1.255.7500: isakmp:
02:33:42.656620 IP OpenWrt.lan.www > 192.168.1.40.33759: Flags [S.],
seq 260559917, ack 3238155936, win 14480, options [mss 1460,sackOK,TS
val 4294949210 ecr 1075998,nop,wscale 2], length 0
02:33:42.658200 IP 192.168.1.40.33758 > OpenWrt.lan.www: Flags [S],
seq 3529223513, win 14600, options [mss 1460,sackOK,TS val 1076686 ecr
0,nop,wscale 7], length 0
02:33:42.658580 IP OpenWrt.lan.www > 192.168.1.40.33758: Flags [S.],
seq 3048410101, ack 3529223514, win 14480, options [mss 1460,sackOK,TS
val 4294949210 ecr 1075935,nop,wscale 2], length 0
02:33:42.713500 STP 802.1d, Config, Flags [none], bridge-id
8000.00:18:01:f9:89:66.8004, length 43
02:33:42.910280 IP 192.168.1.40.33759 > OpenWrt.lan.www: Flags [S],
seq 3238155935, win 14600, options [mss 1460,sackOK,TS val 1076749 ecr
0,nop,wscale 7], length 0
02:33:42.910660 IP OpenWrt.lan.www > 192.168.1.40.33759: Flags [S.],
seq 260559917, ack 3238155936, win 14480, options [mss 1460,sackOK,TS
val 4294949235 ecr 1075998,nop,wscale 2], length 0
02:33:43.996600 IP 169.254.1.159.59527 > 169.254.1.255.5000: UDP, length 12
02:33:44.664300 ARP, Request who-has 192.168.1.40 tell OpenWrt.lan, length 28
02:33:44.664500 ARP, Reply 192.168.1.40 is-at 70:71:bc:b8:9b:ee (oui
Unknown), length 46
02:33:44.714080 STP 802.1d, Config, Flags [none], bridge-id
8000.00:18:01:f9:89:66.8004, length 43
02:33:45.275160 IP OpenWrt.lan.www > 192.168.1.40.33758: Flags [S.],
seq 3048410101, ack 3529223514, win 14480, options [mss 1460,sackOK,TS
val 4294949472 ecr 1075935,nop,wscale 2], length 0
02:33:45.275380 IP OpenWrt.lan.www > 192.168.1.40.33759: Flags [S.],
seq 260559917, ack 3238155936, win 14480, options [mss 1460,sackOK,TS
val 4294949472 ecr 1075998,nop,wscale 2], length 0
02:33:45.334480 IP6 fe80::6a7f:74ff:fe0a:fbec > ff02::1: ICMP6, router
advertisement, length 64
02:33:45.977580 IP 169.254.1.250.53586 > 169.254.1.255.5000: UDP, length 12
02:33:46.311320 IP 192.168.1.190.1025 > 239.255.255.250.1900: UDP, length 221
02:33:46.312220 IP 192.168.1.190.1025 > 239.255.255.250.1900: UDP, length 221
02:33:46.323200 IP 192.168.1.190.1025 > 239.255.255.250.1900: UDP, length 288
02:33:46.323620 IP 192.168.1.190.1025 > 239.255.255.250.1900: UDP, length 288
02:33:46.327100 IP 192.168.1.190.1025 > 239.255.255.250.1900: UDP, length 297
02:33:46.334800 IP 192.168.1.190.1025 > 239.255.255.250.1900: UDP, length 297
02:33:46.335280 IP 192.168.1.190.102

Re: [OpenWrt-Devel] Ethernet switch on Ralink

2013-09-20 Thread jonsm...@gmail.com
ps on working system with vlan enabled.

root@OpenWrt:/# ps
  PID USER   VSZ STAT COMMAND
1 root  1368 S/sbin/procd
2 root 0 SW   [kthreadd]
3 root 0 SW   [ksoftirqd/0]
4 root 0 SW   [kworker/0:0]
5 root 0 SW<  [kworker/0:0H]
6 root 0 SW   [kworker/u2:0]
7 root 0 SW<  [khelper]
8 root 0 SW   [kworker/u2:1]
   63 root 0 SW<  [writeback]
   65 root 0 SW<  [bioset]
   67 root 0 SW<  [kblockd]
   90 root 0 SW   [kworker/0:1]
   96 root 0 SW   [kswapd0]
  141 root 0 SW   [fsnotify_mark]
  165 root 0 SW   [spi32766]
  205 root 0 SW<  [deferwq]
  216 root 0 SW   [khubd]
  359 root   876 S <  ubusd
  393 root 0 SW<  [rpciod]
  397 root 0 SW<  [nfsiod]
  466 root 0 SW<  [cfg80211]
  595 nobody1024 S/usr/sbin/portmap
  604 root  1480 S/sbin/netifd
  657 root  1484 S/usr/sbin/telnetd -F -l /bin/login.sh
  769 root  1156 S/usr/sbin/uhttpd -f -h /www -r OpenWrt -x /cgi-bin -
  865 root   816 S/usr/sbin/6relayd -l/tmp/hosts/6relayd /usr/sbin/6re
  915 nobody 956 S/usr/sbin/dnsmasq -C /var/etc/dnsmasq.conf -k
  939 root  1648 Shostapd -P /var/run/wifi-phy0.pid -B /var/run/hostap
  959 root  1068 S/usr/sbin/rpc.statd -p 32778 -o 32779
  974 root 0 SW   [lockd]
  976 root 0 SW   [nfsd]
  977 root 0 SW   [nfsd]
  978 root 0 SW   [nfsd]
  979 root 0 SW   [nfsd]
  980 root 0 SW   [nfsd]
  981 root 0 SW   [nfsd]
  982 root 0 SW   [nfsd]
  983 root 0 SW   [nfsd]
  986 root  1684 S/usr/sbin/rpc.mountd -p 32780 -F
 1084 root 0 SWN  [jffs2_gcd_mtd5]
 1115 root  1152 S/usr/sbin/dropbear -F -P /var/run/dropbear.1.pid -p
 1119 root  1492 S/usr/sbin/ntpd -n -p 0.openwrt.pool.ntp.org -p 1.ope
 1132 root  1492 S/bin/ash --login
 1141 root  1488 Rps

root@OpenWrt:/# dmesg | grep eth
[0.58] eth0: done loading
[   24.84] device eth0.1 entered promiscuous mode
[   24.86] device eth0 entered promiscuous mode
[   24.89] br-lan: port 1(eth0.1) entered forwarding state
[   24.90] br-lan: port 1(eth0.1) entered forwarding state
[   24.96] device eth0.2 entered promiscuous mode
[   25.06] br-wan: port 1(eth0.2) entered forwarding state
[   25.06] br-wan: port 1(eth0.2) entered forwarding state
[   26.08] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[   26.16] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.2: link becomes ready
[   26.90] br-lan: port 1(eth0.1) entered forwarding state
[   27.06] br-wan: port 1(eth0.2) entered forwarding state


ps of non working image.  All I did was move /files/ out of the
tree and rebuild.

root@OpenWrt:/# ps
  PID USER   VSZ STAT COMMAND
1 root  1372 S/sbin/procd
2 root 0 SW   [kthreadd]
3 root 0 SW   [ksoftirqd/0]
4 root 0 SW   [kworker/0:0]
5 root 0 SW<  [kworker/0:0H]
6 root 0 SW   [kworker/u2:0]
7 root 0 SW<  [khelper]
8 root 0 SW   [kworker/u2:1]
   63 root 0 SW<  [writeback]
   65 root 0 SW<  [bioset]
   67 root 0 SW<  [kblockd]
   90 root 0 SW   [kworker/0:1]
   96 root 0 SW   [kswapd0]
  141 root 0 SW   [fsnotify_mark]
  165 root 0 SW   [spi32766]
  205 root 0 SW<  [deferwq]
  216 root 0 SW   [khubd]
  243 root 0 SW   [kworker/u2:2]
  360 root   876 S <  ubusd
  361 root  1492 S/bin/ash --login
  394 root 0 SW<  [rpciod]
  398 root 0 SW<  [nfsiod]
  469 root 0 SW<  [cfg80211]
  470 root 0 SW   [kworker/0:2]
  622 nobody1024 S/usr/sbin/portmap
  631 root  1468 S/sbin/netifd
  694 root  1484 S/usr/sbin/telnetd -F -l /bin/login.sh
  838 root  1140 S/usr/sbin/uhttpd -f -h /www -r OpenWrt -x /cgi-bin -
  903 nobody 956 S/usr/sbin/dnsmasq -C /var/etc/dnsmasq.conf -k
  914 root  1068 S/usr/sbin/rpc.statd -p 32778 -o 32779
  918 root 0 SW   [lockd]
  919 root 0 SW   [nfsd]
  920 root 0 SW   [nfsd]
  921 root 0 SW   [nfsd]
  922 root 0 SW   [nfsd]
  923 root 0 SW   [nfsd]
  924 root 0 SW   [nfsd]
  925 root 0 SW   [nfsd]
  926 root 0 SW   [nfsd]
  928 root  1684 S/usr/sbin/rpc.mountd -p 32780 -F
  938 root   816 S/usr/sbin/6relayd -l/tmp/hosts/6relayd /usr/sbin/6re
  948 root 0 SWN  [jffs2_gcd_mtd5]
  975 root  1152 S/usr/sbin/dropbear -F -P /var/run/dropbear.1.pid -p
  983 root  1492 S/usr/sbin/ntpd -n -p 0.openwrt.pool.ntp.org -p 1.ope
  990 root  1488 Rps
root@OpenWrt:/#

root@OpenWrt:/# dmesg | grep eth
[0.58] eth0: done loading
[   25.48] device eth0 entered promiscuous mode
[

Re: [OpenWrt-Devel] Ethernet switch on Ralink

2013-09-20 Thread Diego Lopez Recas
I don't think that makes any sense. TCP doesn't care about anything in the
ethernet header and its implementation is platform independent. The problem
must be elsewhere. Can you post the contents of all your config files and
the output of 'ps' command?

BTW, I'm not positive about this, but you might be able to run tcpdump in
your openwrt and even see ethernet headers and vlan tags of frames
sent/received.
El 20/09/2013 16:26, "jonsm...@gmail.com"  escribió:

> On Fri, Sep 20, 2013 at 9:36 AM, Diego Lopez Recas 
> wrote:
> > I don't see how the problem is with the switch if you can ping to the
> > device. To my understanding, the switch is unaware of the protocol above
> > link layer and arp.
>
> The RT5350 can send packets fine when it is messed up, it just can't
> receive them. My suspicion is that tags are somehow getting added to
> the received packets even though vlan=0.  Those tags don't bother ARP
> but they cause TCP not to function. When I use wireshark the TCP
> connections don't get past the SYN phase.   Turn on the VLAN and
> everything works.
>
> >
> >
> > On Fri, Sep 20, 2013 at 2:48 PM, jonsm...@gmail.com 
> > wrote:
> >>
> >> Seems to me like the vlan=0 case is broken on the RT5350.
> >>
> >> So for testing...
> >>
> >> First I removed everything from file/etc... and rebuild
> >> This configuration got generated, I edited it to change the IP.
> >>
> >> config interface 'loopback'
> >> option ifname 'lo'
> >> option proto 'static'
> >> option ipaddr '127.0.0.1'
> >> option netmask '255.0.0.0'
> >>
> >> config globals 'globals'
> >> option ula_prefix 'fd5e:5ebe:13ed::/48'
> >>
> >> config switch
> >> option name 'switch0'
> >> option reset '1'
> >> option enable_vlan '0'
> >>
> >> config interface 'lan'
> >> option ifname 'eth0'
> >> option type 'bridge'
> >> option proto 'static'
> >> option ipaddr '192.168.1.85'
> >> option netmask '255.255.255.0'
> >> option ip6assign '60'
> >>
> >> This configuration does not work for http but I can ping to it.
> >>
> >> root@OpenWrt:/etc/config# swconfig dev switch0 show
> >> Global attributes:
> >> enable_vlan: 0
> >> alternate_vlan_disable: 0
> >> bc_storm_protect: 0
> >> led_frequency: 0
> >> Port 0:
> >> disable: 0
> >> doubletag: 1
> >> untag: 1
> >> led: 5
> >> lan: 1
> >> recv_bad: 0
> >> recv_good: 0
> >> tr_bad: 0
> >> tr_good: 0
> >> pvid: 0
> >> link: port:0 link:down
> >> Port 1:
> >> disable: 0
> >> doubletag: 1
> >> untag: 1
> >> led: 5
> >> lan: 1
> >> recv_bad: 0
> >> recv_good: 693
> >> tr_bad: 0
> >> tr_good: 60
> >> disable: 0
> >> doubletag: 1
> >> untag: 1
> >> led: 5
> >> lan: 1
> >> recv_bad: 0
> >> recv_good: 0
> >> tr_bad: 0
> >> tr_good: 0
> >> pvid: 0
> >> link: port:2 link:down
> >> Port 3:
> >> disable: 0
> >> doubletag: 1
> >> untag: 1
> >> led: 5
> >> lan: 1
> >> recv_bad: 0
> >> recv_good: 0
> >> tr_bad: 0
> >> tr_good: 0
> >> pvid: 0
> >> link: port:3 link:down
> >> Port 4:
> >> disable: 0
> >> doubletag: 1
> >> untag: 1
> >> led: 5
> >> lan: 1
> >> recv_bad: 0
> >> recv_good: 0
> >> tr_bad: 0
> >> tr_good: 0
> >> pvid: 0
> >> link: port:4 link:down
> >> Port 5:
> >> disable: 1
> >> doubletag: 1
> >> untag: 1
> >> led: ???
> >> lan: 1
> >> recv_bad: 0
> >> recv_good: 0
> >> tr_bad: 0
> >> tr_good: 0
> >> pvid: 0
> >> link: port:5 link:down
> >> Port 6:
> >> disable: 0
> >> doubletag: 1
> >> untag: 1
> >> led: ???
> >> lan: ???
> >> recv_bad: ???
> >> recv_good: ???
> >> tr_bad: ???
> >> tr_good: ???
> >> pvid: 0
> >> link: port:6 link:up speed:1000baseT full-duplex
> >> VLAN 0:
> >> ports: 0 1 2 3 4 5 6
> >> root@OpenWrt:/etc/config#
> >>
> >> Next I restored files/etc/ which will enable the VLAN
> >> and everything works as expected
> >>
> >> root@OpenWrt:/etc/config# cat network
> >> config interface 'loopback'
> >> option ifname 'lo'
> >> option proto 'static'
> >> option ipaddr '127.0.0.1'
> >> option netmask '255.0.0.0'
> >>
> >> config globals 'globals'
> >> option ula_prefix 'fd59:3f8d:cb3a::/48'
> >>
> >> config interface 'lan'
> >> option ifname 'eth0.1 wlan'
> >> option type 'bridge'
> >> option proto 'static'
> >> option ipaddr '192.168.1.85'
> >> option netmask '255.255.255.0'
> >> option ip6assign '60'
> >>
> >> config interface 'wan'
> >> option ifname 'eth0.2'
> >> option type 'bridge'
> >> option proto 'static'
> >> option ipaddr '192.168.1.86'
> >> option netmask '255.255.255.0'
> >>
> >> config interface 'wan6'
> >> option ifname '@eth0.2'
> >> option proto 'dhcpv6'
> >>
> >> 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'
> >>
> >> root@OpenWrt:/etc/config# swconfig dev switch0 show
> >> Global attributes:
> >> enable_vlan: 1
> >> alternate_vlan_disable: 0
> >> bc_storm_protect: 0
> >> led_frequency: 0
> >> Port 0:
> >> disable: 0
> >> doubletag: 0

Re: [OpenWrt-Devel] Ethernet switch on Ralink

2013-09-20 Thread jonsm...@gmail.com
On Fri, Sep 20, 2013 at 9:36 AM, Diego Lopez Recas  wrote:
> I don't see how the problem is with the switch if you can ping to the
> device. To my understanding, the switch is unaware of the protocol above
> link layer and arp.

The RT5350 can send packets fine when it is messed up, it just can't
receive them. My suspicion is that tags are somehow getting added to
the received packets even though vlan=0.  Those tags don't bother ARP
but they cause TCP not to function. When I use wireshark the TCP
connections don't get past the SYN phase.   Turn on the VLAN and
everything works.

>
>
> On Fri, Sep 20, 2013 at 2:48 PM, jonsm...@gmail.com 
> wrote:
>>
>> Seems to me like the vlan=0 case is broken on the RT5350.
>>
>> So for testing...
>>
>> First I removed everything from file/etc... and rebuild
>> This configuration got generated, I edited it to change the IP.
>>
>> config interface 'loopback'
>> option ifname 'lo'
>> option proto 'static'
>> option ipaddr '127.0.0.1'
>> option netmask '255.0.0.0'
>>
>> config globals 'globals'
>> option ula_prefix 'fd5e:5ebe:13ed::/48'
>>
>> config switch
>> option name 'switch0'
>> option reset '1'
>> option enable_vlan '0'
>>
>> config interface 'lan'
>> option ifname 'eth0'
>> option type 'bridge'
>> option proto 'static'
>> option ipaddr '192.168.1.85'
>> option netmask '255.255.255.0'
>> option ip6assign '60'
>>
>> This configuration does not work for http but I can ping to it.
>>
>> root@OpenWrt:/etc/config# swconfig dev switch0 show
>> Global attributes:
>> enable_vlan: 0
>> alternate_vlan_disable: 0
>> bc_storm_protect: 0
>> led_frequency: 0
>> Port 0:
>> disable: 0
>> doubletag: 1
>> untag: 1
>> led: 5
>> lan: 1
>> recv_bad: 0
>> recv_good: 0
>> tr_bad: 0
>> tr_good: 0
>> pvid: 0
>> link: port:0 link:down
>> Port 1:
>> disable: 0
>> doubletag: 1
>> untag: 1
>> led: 5
>> lan: 1
>> recv_bad: 0
>> recv_good: 693
>> tr_bad: 0
>> tr_good: 60
>> disable: 0
>> doubletag: 1
>> untag: 1
>> led: 5
>> lan: 1
>> recv_bad: 0
>> recv_good: 0
>> tr_bad: 0
>> tr_good: 0
>> pvid: 0
>> link: port:2 link:down
>> Port 3:
>> disable: 0
>> doubletag: 1
>> untag: 1
>> led: 5
>> lan: 1
>> recv_bad: 0
>> recv_good: 0
>> tr_bad: 0
>> tr_good: 0
>> pvid: 0
>> link: port:3 link:down
>> Port 4:
>> disable: 0
>> doubletag: 1
>> untag: 1
>> led: 5
>> lan: 1
>> recv_bad: 0
>> recv_good: 0
>> tr_bad: 0
>> tr_good: 0
>> pvid: 0
>> link: port:4 link:down
>> Port 5:
>> disable: 1
>> doubletag: 1
>> untag: 1
>> led: ???
>> lan: 1
>> recv_bad: 0
>> recv_good: 0
>> tr_bad: 0
>> tr_good: 0
>> pvid: 0
>> link: port:5 link:down
>> Port 6:
>> disable: 0
>> doubletag: 1
>> untag: 1
>> led: ???
>> lan: ???
>> recv_bad: ???
>> recv_good: ???
>> tr_bad: ???
>> tr_good: ???
>> pvid: 0
>> link: port:6 link:up speed:1000baseT full-duplex
>> VLAN 0:
>> ports: 0 1 2 3 4 5 6
>> root@OpenWrt:/etc/config#
>>
>> Next I restored files/etc/ which will enable the VLAN
>> and everything works as expected
>>
>> root@OpenWrt:/etc/config# cat network
>> config interface 'loopback'
>> option ifname 'lo'
>> option proto 'static'
>> option ipaddr '127.0.0.1'
>> option netmask '255.0.0.0'
>>
>> config globals 'globals'
>> option ula_prefix 'fd59:3f8d:cb3a::/48'
>>
>> config interface 'lan'
>> option ifname 'eth0.1 wlan'
>> option type 'bridge'
>> option proto 'static'
>> option ipaddr '192.168.1.85'
>> option netmask '255.255.255.0'
>> option ip6assign '60'
>>
>> config interface 'wan'
>> option ifname 'eth0.2'
>> option type 'bridge'
>> option proto 'static'
>> option ipaddr '192.168.1.86'
>> option netmask '255.255.255.0'
>>
>> config interface 'wan6'
>> option ifname '@eth0.2'
>> option proto 'dhcpv6'
>>
>> 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'
>>
>> root@OpenWrt:/etc/config# swconfig dev switch0 show
>> Global attributes:
>> enable_vlan: 1
>> alternate_vlan_disable: 0
>> bc_storm_protect: 0
>> led_frequency: 0
>> Port 0:
>> disable: 0
>> doubletag: 0
>> untag: 1
>> led: 5
>> lan: 1
>> recv_bad: 0
>> recv_good: 0
>> tr_bad: 0
>> tr_good: 0
>> pvid: 2
>> link: port:0 link:down
>> Port 1:
>> disable: 0
>> doubletag: 0
>> untag: 1
>> led: 5
>> lan: 1
>> recv_bad: 0
>> recv_good: 463
>> tr_bad: 0
>> tr_good: 162
>> pvid: 1
>> link: port:1 link:up speed:100baseT full-duplex
>> untag: 1
>> led: 5
>> lan: 1
>> recv_bad: 0
>> recv_good: 0
>> tr_bad: 0
>> tr_good: 0
>> pvid: 1
>> link: port:2 link:down
>> Port 3:
>> disable: 0
>> doubletag: 0
>> untag: 1
>> led: 5
>> lan: 1
>> recv_bad: 0
>> recv_good: 0
>> tr_bad: 0
>> tr_good: 0
>> pvid: 1
>> link: port:3 link:down
>> Port 4:
>> disable: 0
>> doubletag: 0
>> untag: 1
>> led: 5
>> lan: 1
>> recv_bad: 0
>> recv_good: 0
>> tr_bad: 0
>> tr_good: 0
>> pvid: 1
>> link: port:4 link:down
>> Port 5:
>> disable: 1
>> doubletag: 0
>> untag: 0
>> led: ???
>>

Re: [OpenWrt-Devel] Ethernet switch on Ralink

2013-09-20 Thread Diego Lopez Recas
I don't see how the problem is with the switch if you can ping to the
device. To my understanding, the switch is unaware of the protocol above
link layer and arp.


On Fri, Sep 20, 2013 at 2:48 PM, jonsm...@gmail.com wrote:

> Seems to me like the vlan=0 case is broken on the RT5350.
>
> So for testing...
>
> First I removed everything from file/etc... and rebuild
> This configuration got generated, I edited it to change the IP.
>
> config interface 'loopback'
> option ifname 'lo'
> option proto 'static'
> option ipaddr '127.0.0.1'
> option netmask '255.0.0.0'
>
> config globals 'globals'
> option ula_prefix 'fd5e:5ebe:13ed::/48'
>
> config switch
> option name 'switch0'
> option reset '1'
> option enable_vlan '0'
>
> config interface 'lan'
> option ifname 'eth0'
> option type 'bridge'
> option proto 'static'
> option ipaddr '192.168.1.85'
> option netmask '255.255.255.0'
> option ip6assign '60'
>
> This configuration does not work for http but I can ping to it.
>
> root@OpenWrt:/etc/config# swconfig dev switch0 show
> Global attributes:
> enable_vlan: 0
> alternate_vlan_disable: 0
> bc_storm_protect: 0
> led_frequency: 0
> Port 0:
> disable: 0
> doubletag: 1
> untag: 1
> led: 5
> lan: 1
> recv_bad: 0
> recv_good: 0
> tr_bad: 0
> tr_good: 0
> pvid: 0
> link: port:0 link:down
> Port 1:
> disable: 0
> doubletag: 1
> untag: 1
> led: 5
> lan: 1
> recv_bad: 0
> recv_good: 693
> tr_bad: 0
> tr_good: 60
> disable: 0
> doubletag: 1
> untag: 1
> led: 5
> lan: 1
> recv_bad: 0
> recv_good: 0
> tr_bad: 0
> tr_good: 0
> pvid: 0
> link: port:2 link:down
> Port 3:
> disable: 0
> doubletag: 1
> untag: 1
> led: 5
> lan: 1
> recv_bad: 0
> recv_good: 0
> tr_bad: 0
> tr_good: 0
> pvid: 0
> link: port:3 link:down
> Port 4:
> disable: 0
> doubletag: 1
> untag: 1
> led: 5
> lan: 1
> recv_bad: 0
> recv_good: 0
> tr_bad: 0
> tr_good: 0
> pvid: 0
> link: port:4 link:down
> Port 5:
> disable: 1
> doubletag: 1
> untag: 1
> led: ???
> lan: 1
> recv_bad: 0
> recv_good: 0
> tr_bad: 0
> tr_good: 0
> pvid: 0
> link: port:5 link:down
> Port 6:
> disable: 0
> doubletag: 1
> untag: 1
> led: ???
> lan: ???
> recv_bad: ???
> recv_good: ???
> tr_bad: ???
> tr_good: ???
> pvid: 0
> link: port:6 link:up speed:1000baseT full-duplex
> VLAN 0:
> ports: 0 1 2 3 4 5 6
> root@OpenWrt:/etc/config#
>
> Next I restored files/etc/ which will enable the VLAN
> and everything works as expected
>
> root@OpenWrt:/etc/config# cat network
> config interface 'loopback'
> option ifname 'lo'
> option proto 'static'
> option ipaddr '127.0.0.1'
> option netmask '255.0.0.0'
>
> config globals 'globals'
> option ula_prefix 'fd59:3f8d:cb3a::/48'
>
> config interface 'lan'
> option ifname 'eth0.1 wlan'
> option type 'bridge'
> option proto 'static'
> option ipaddr '192.168.1.85'
> option netmask '255.255.255.0'
> option ip6assign '60'
>
> config interface 'wan'
> option ifname 'eth0.2'
> option type 'bridge'
> option proto 'static'
> option ipaddr '192.168.1.86'
> option netmask '255.255.255.0'
>
> config interface 'wan6'
> option ifname '@eth0.2'
> option proto 'dhcpv6'
>
> 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'
>
> root@OpenWrt:/etc/config# swconfig dev switch0 show
> Global attributes:
> enable_vlan: 1
> alternate_vlan_disable: 0
> bc_storm_protect: 0
> led_frequency: 0
> Port 0:
> disable: 0
> doubletag: 0
> untag: 1
> led: 5
> lan: 1
> recv_bad: 0
> recv_good: 0
> tr_bad: 0
> tr_good: 0
> pvid: 2
> link: port:0 link:down
> Port 1:
> disable: 0
> doubletag: 0
> untag: 1
> led: 5
> lan: 1
> recv_bad: 0
> recv_good: 463
> tr_bad: 0
> tr_good: 162
> pvid: 1
> link: port:1 link:up speed:100baseT full-duplex
> untag: 1
> led: 5
> lan: 1
> recv_bad: 0
> recv_good: 0
> tr_bad: 0
> tr_good: 0
> pvid: 1
> link: port:2 link:down
> Port 3:
> disable: 0
> doubletag: 0
> untag: 1
> led: 5
> lan: 1
> recv_bad: 0
> recv_good: 0
> tr_bad: 0
> tr_good: 0
> pvid: 1
> link: port:3 link:down
> Port 4:
> disable: 0
> doubletag: 0
> untag: 1
> led: 5
> lan: 1
> recv_bad: 0
> recv_good: 0
> tr_bad: 0
> tr_good: 0
> pvid: 1
> link: port:4 link:down
> Port 5:
> disable: 1
> doubletag: 0
> untag: 0
> led: ???
> lan: 1
> recv_bad: 0
> recv_good: 0
> tr_bad: 0
> tr_good: 0
> pvid: 0
> link: port:5 link:down
> Port 6:
> disable: 0
> doubletag: 0
> untag: 0
> led: ???
> lan: ???
> recv_bad: ???
> recv_good: ???
> tr_bad: ???
> tr_good: ???
> pvid: 0
> link: port:6 link:up speed:1000baseT full-duplex
> VLAN 1:
> ports: 1 2 3 4 6t
> VLAN 2:
> ports: 0 6t
>
>
>
> --
> Jon Smirl
> jonsm...@gmail.com
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
___
openwrt-devel mailing list
openwrt-devel@lists.open

Re: [OpenWrt-Devel] Ethernet switch on Ralink

2013-09-20 Thread jonsm...@gmail.com
Seems to me like the vlan=0 case is broken on the RT5350.

So for testing...

First I removed everything from file/etc... and rebuild
This configuration got generated, I edited it to change the IP.

config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'

config globals 'globals'
option ula_prefix 'fd5e:5ebe:13ed::/48'

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

config interface 'lan'
option ifname 'eth0'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.85'
option netmask '255.255.255.0'
option ip6assign '60'

This configuration does not work for http but I can ping to it.

root@OpenWrt:/etc/config# swconfig dev switch0 show
Global attributes:
enable_vlan: 0
alternate_vlan_disable: 0
bc_storm_protect: 0
led_frequency: 0
Port 0:
disable: 0
doubletag: 1
untag: 1
led: 5
lan: 1
recv_bad: 0
recv_good: 0
tr_bad: 0
tr_good: 0
pvid: 0
link: port:0 link:down
Port 1:
disable: 0
doubletag: 1
untag: 1
led: 5
lan: 1
recv_bad: 0
recv_good: 693
tr_bad: 0
tr_good: 60
disable: 0
doubletag: 1
untag: 1
led: 5
lan: 1
recv_bad: 0
recv_good: 0
tr_bad: 0
tr_good: 0
pvid: 0
link: port:2 link:down
Port 3:
disable: 0
doubletag: 1
untag: 1
led: 5
lan: 1
recv_bad: 0
recv_good: 0
tr_bad: 0
tr_good: 0
pvid: 0
link: port:3 link:down
Port 4:
disable: 0
doubletag: 1
untag: 1
led: 5
lan: 1
recv_bad: 0
recv_good: 0
tr_bad: 0
tr_good: 0
pvid: 0
link: port:4 link:down
Port 5:
disable: 1
doubletag: 1
untag: 1
led: ???
lan: 1
recv_bad: 0
recv_good: 0
tr_bad: 0
tr_good: 0
pvid: 0
link: port:5 link:down
Port 6:
disable: 0
doubletag: 1
untag: 1
led: ???
lan: ???
recv_bad: ???
recv_good: ???
tr_bad: ???
tr_good: ???
pvid: 0
link: port:6 link:up speed:1000baseT full-duplex
VLAN 0:
ports: 0 1 2 3 4 5 6
root@OpenWrt:/etc/config#

Next I restored files/etc/ which will enable the VLAN
and everything works as expected

root@OpenWrt:/etc/config# cat network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'

config globals 'globals'
option ula_prefix 'fd59:3f8d:cb3a::/48'

config interface 'lan'
option ifname 'eth0.1 wlan'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.85'
option netmask '255.255.255.0'
option ip6assign '60'

config interface 'wan'
option ifname 'eth0.2'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.86'
option netmask '255.255.255.0'

config interface 'wan6'
option ifname '@eth0.2'
option proto 'dhcpv6'

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'

root@OpenWrt:/etc/config# swconfig dev switch0 show
Global attributes:
enable_vlan: 1
alternate_vlan_disable: 0
bc_storm_protect: 0
led_frequency: 0
Port 0:
disable: 0
doubletag: 0
untag: 1
led: 5
lan: 1
recv_bad: 0
recv_good: 0
tr_bad: 0
tr_good: 0
pvid: 2
link: port:0 link:down
Port 1:
disable: 0
doubletag: 0
untag: 1
led: 5
lan: 1
recv_bad: 0
recv_good: 463
tr_bad: 0
tr_good: 162
pvid: 1
link: port:1 link:up speed:100baseT full-duplex
untag: 1
led: 5
lan: 1
recv_bad: 0
recv_good: 0
tr_bad: 0
tr_good: 0
pvid: 1
link: port:2 link:down
Port 3:
disable: 0
doubletag: 0
untag: 1
led: 5
lan: 1
recv_bad: 0
recv_good: 0
tr_bad: 0
tr_good: 0
pvid: 1
link: port:3 link:down
Port 4:
disable: 0
doubletag: 0
untag: 1
led: 5
lan: 1
recv_bad: 0
recv_good: 0
tr_bad: 0
tr_good: 0
pvid: 1
link: port:4 link:down
Port 5:
disable: 1
doubletag: 0
untag: 0
led: ???
lan: 1
recv_bad: 0
recv_good: 0
tr_bad: 0
tr_good: 0
pvid: 0
link: port:5 link:down
Port 6:
disable: 0
doubletag: 0
untag: 0
led: ???
lan: ???
recv_bad: ???
recv_good: ???
tr_bad: ???
tr_good: ???
pvid: 0
link: port:6 link:up speed:1000baseT full-duplex
VLAN 1:
ports: 1 2 3 4 6t
VLAN 2:
ports: 0 6t



-- 
Jon Smirl
jonsm...@gmail.com
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Ethernet switch on Ralink

2013-09-20 Thread Diego Lopez Recas
I don't have this problem. My switch seems to work normally. This is my
configuration:

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
 option type bridge
option proto static
 option ipaddr 192.168.1.1
option netmask 255.255.255.0
 option ip6assign 60
 config globals globals
option ula_prefix auto

config switch
option name 'rt305x'
option reset '1'
 option enable_vlan '0'

Are you using 'eth0' or something like 'eth0.1' as 'ifname'?

Regards,
Diego


On Thu, Sep 19, 2013 at 8:51 PM, jonsm...@gmail.com wrote:

> On Thu, Sep 19, 2013 at 12:42 PM, Diego Lopez Recas 
> wrote:
> > Hi Jon,
> >
> > I don't know what you mean with "default 'off' state", but I'm using an
> > RT3052F SoC and I have to explicitly specify the the pvid for the port in
> > vlan 2 to make it work properly. I think this is usual. From
> > http://wiki.openwrt.org/doc/uci/network/switch :
> >
> > "Tagged packets received on a port will be directed to the VLAN
> indicated by
> > the VID contained in the packet. Untagged packets received on a port
> will be
> > directed to the default port VLAN (usually called the PVID). A separate
> > config switch_port section is required to set the default port VLAN."
>
> This may be where the bug came from. How is the default routing
> getting set up when vlan=0?
>
> Maybe this default routing used to get set up automatically when
> vlan=0 and now that isn't happening any more.
>
>
> >
> >
> > So you should add this to your config:
> >
> > config 'switch_port'
> > option 'port'  '0'
> > option 'pvid'  '2'
> >
> > I hope it helps.
> >
> > Regards,
> > Diego
> >
> >
> > On Thu, Sep 19, 2013 at 4:21 PM, jonsm...@gmail.com 
> > wrote:
> >>
> >> Has anyone tried using the Ethernet switch on Ralink lately? I don't
> >> believe it is working correctly in the default 'off' state.  The
> >> failure is that the Ralink CPU can't receive any packets from Ethernet
> >> (or those packet are corrupted by the VLAN tag).
> >>
> >> If I enable the switch it works properly. I'm seeing this on the
> >> RT5350 but the code is generic to all Ralink
> >>
> >> diff --git a/files/etc/config/network b/files/etc/config/network
> >> new file mode 100644
> >> index 000..c608d0e
> >> --- /dev/null
> >> +++ b/files/etc/config/network
> >> @@ -0,0 +1,39 @@
> >> +config interface 'loopback'
> >> + option ifname 'lo'
> >> + option proto 'static'
> >> + option ipaddr '127.0.0.1'
> >> + option netmask '255.0.0.0'
> >> +
> >> +config globals 'globals'
> >> + option ula_prefix 'fd59:3f8d:cb3a::/48'
> >> +
> >> +config interface 'lan'
> >> + option ifname 'eth0.1'
> >> + option type 'bridge'
> >> + option proto 'static'
> >> + option ipaddr '192.168.1.85'
> >> + option netmask '255.255.255.0'
> >> + option ip6assign '60'
> >> +
> >> +config interface 'wan'
> >> + option ifname 'eth0.2'
> >> + option proto 'dhcp'
> >> +
> >> +config interface 'wan6'
> >> + option ifname '@wan'
> >> + option proto 'dhcpv6'
> >> +
> >> +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'
> >>
> >> --
> >> Jon Smirl
> >> jonsm...@gmail.com
> >> ___
> >> openwrt-devel mailing list
> >> openwrt-devel@lists.openwrt.org
> >> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> >
> >
> >
> > ___
> > openwrt-devel mailing list
> > openwrt-devel@lists.openwrt.org
> > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> >
>
>
>
> --
> Jon Smirl
> jonsm...@gmail.com
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Ethernet switch on Ralink

2013-09-19 Thread jonsm...@gmail.com
On Thu, Sep 19, 2013 at 12:42 PM, Diego Lopez Recas  wrote:
> Hi Jon,
>
> I don't know what you mean with "default 'off' state", but I'm using an
> RT3052F SoC and I have to explicitly specify the the pvid for the port in
> vlan 2 to make it work properly. I think this is usual. From
> http://wiki.openwrt.org/doc/uci/network/switch :
>
> "Tagged packets received on a port will be directed to the VLAN indicated by
> the VID contained in the packet. Untagged packets received on a port will be
> directed to the default port VLAN (usually called the PVID). A separate
> config switch_port section is required to set the default port VLAN."

This may be where the bug came from. How is the default routing
getting set up when vlan=0?

Maybe this default routing used to get set up automatically when
vlan=0 and now that isn't happening any more.


>
>
> So you should add this to your config:
>
> config 'switch_port'
> option 'port'  '0'
> option 'pvid'  '2'
>
> I hope it helps.
>
> Regards,
> Diego
>
>
> On Thu, Sep 19, 2013 at 4:21 PM, jonsm...@gmail.com 
> wrote:
>>
>> Has anyone tried using the Ethernet switch on Ralink lately? I don't
>> believe it is working correctly in the default 'off' state.  The
>> failure is that the Ralink CPU can't receive any packets from Ethernet
>> (or those packet are corrupted by the VLAN tag).
>>
>> If I enable the switch it works properly. I'm seeing this on the
>> RT5350 but the code is generic to all Ralink
>>
>> diff --git a/files/etc/config/network b/files/etc/config/network
>> new file mode 100644
>> index 000..c608d0e
>> --- /dev/null
>> +++ b/files/etc/config/network
>> @@ -0,0 +1,39 @@
>> +config interface 'loopback'
>> + option ifname 'lo'
>> + option proto 'static'
>> + option ipaddr '127.0.0.1'
>> + option netmask '255.0.0.0'
>> +
>> +config globals 'globals'
>> + option ula_prefix 'fd59:3f8d:cb3a::/48'
>> +
>> +config interface 'lan'
>> + option ifname 'eth0.1'
>> + option type 'bridge'
>> + option proto 'static'
>> + option ipaddr '192.168.1.85'
>> + option netmask '255.255.255.0'
>> + option ip6assign '60'
>> +
>> +config interface 'wan'
>> + option ifname 'eth0.2'
>> + option proto 'dhcp'
>> +
>> +config interface 'wan6'
>> + option ifname '@wan'
>> + option proto 'dhcpv6'
>> +
>> +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'
>>
>> --
>> Jon Smirl
>> jonsm...@gmail.com
>> ___
>> openwrt-devel mailing list
>> openwrt-devel@lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
>
>
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>



-- 
Jon Smirl
jonsm...@gmail.com
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Ethernet switch on Ralink

2013-09-19 Thread jonsm...@gmail.com
For example do a clean openwrt build with nothing in /files/etc. It
will generate a network file with the VLAN support turned off.  RT5350
is not functioning with VLAN turned off.  If used to work that way
about six months ago.

config switch
 option name 'rt305x'
 option reset '1'
 option enable_vlan '0'

I updated a router from about 6 months ago to current git. When I did
this Ethernet wouldn't work (default is vlan off). I then had to mess
around until I discovered the solution was to turn VLAN support on.

On Thu, Sep 19, 2013 at 12:42 PM, Diego Lopez Recas  wrote:
> Hi Jon,
>
> I don't know what you mean with "default 'off' state", but I'm using an
> RT3052F SoC and I have to explicitly specify the the pvid for the port in
> vlan 2 to make it work properly. I think this is usual. From
> http://wiki.openwrt.org/doc/uci/network/switch :
>
> "Tagged packets received on a port will be directed to the VLAN indicated by
> the VID contained in the packet. Untagged packets received on a port will be
> directed to the default port VLAN (usually called the PVID). A separate
> config switch_port section is required to set the default port VLAN."
>
>
> So you should add this to your config:
>
> config 'switch_port'
> option 'port'  '0'
> option 'pvid'  '2'
>
> I hope it helps.
>
> Regards,
> Diego
>
>
> On Thu, Sep 19, 2013 at 4:21 PM, jonsm...@gmail.com 
> wrote:
>>
>> Has anyone tried using the Ethernet switch on Ralink lately? I don't
>> believe it is working correctly in the default 'off' state.  The
>> failure is that the Ralink CPU can't receive any packets from Ethernet
>> (or those packet are corrupted by the VLAN tag).
>>
>> If I enable the switch it works properly. I'm seeing this on the
>> RT5350 but the code is generic to all Ralink
>>
>> diff --git a/files/etc/config/network b/files/etc/config/network
>> new file mode 100644
>> index 000..c608d0e
>> --- /dev/null
>> +++ b/files/etc/config/network
>> @@ -0,0 +1,39 @@
>> +config interface 'loopback'
>> + option ifname 'lo'
>> + option proto 'static'
>> + option ipaddr '127.0.0.1'
>> + option netmask '255.0.0.0'
>> +
>> +config globals 'globals'
>> + option ula_prefix 'fd59:3f8d:cb3a::/48'
>> +
>> +config interface 'lan'
>> + option ifname 'eth0.1'
>> + option type 'bridge'
>> + option proto 'static'
>> + option ipaddr '192.168.1.85'
>> + option netmask '255.255.255.0'
>> + option ip6assign '60'
>> +
>> +config interface 'wan'
>> + option ifname 'eth0.2'
>> + option proto 'dhcp'
>> +
>> +config interface 'wan6'
>> + option ifname '@wan'
>> + option proto 'dhcpv6'
>> +
>> +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'
>>
>> --
>> Jon Smirl
>> jonsm...@gmail.com
>> ___
>> openwrt-devel mailing list
>> openwrt-devel@lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
>
>
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>



-- 
Jon Smirl
jonsm...@gmail.com
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Ethernet switch on Ralink

2013-09-19 Thread jonsm...@gmail.com
On Thu, Sep 19, 2013 at 2:43 PM, jonsm...@gmail.com  wrote:
> On Thu, Sep 19, 2013 at 2:41 PM, jonsm...@gmail.com  
> wrote:
>> For example do a clean openwrt build with nothing in /files/etc. It
>> will generate a network file with the VLAN support turned off.  RT5350
>> is not functioning with VLAN turned off.  If used to work that way
>> about six months ago.

I don't care about VLAN support since I am using the devices as APs
not routers.  I would prefer to just turn it off.


>>
>> config switch
>>  option name 'rt305x'
>>  option reset '1'
>>  option enable_vlan '0'
>>
>> I updated a router from about 6 months ago to current git. When I did
>> this Ethernet wouldn't work (default is vlan off). I then had to mess
>
> When the Ethernet doesn't work it can send packets without problem but
> it can't receive them. Internally I don't know if it can't hear the
> packets or it can't decode the packets (maybe there is an unexpected
> VLAN tag in them which shouldn't be there since vlan=0?).
>
>
>> around until I discovered the solution was to turn VLAN support on.
>>
>> On Thu, Sep 19, 2013 at 12:42 PM, Diego Lopez Recas  
>> wrote:
>>> Hi Jon,
>>>
>>> I don't know what you mean with "default 'off' state", but I'm using an
>>> RT3052F SoC and I have to explicitly specify the the pvid for the port in
>>> vlan 2 to make it work properly. I think this is usual. From
>>> http://wiki.openwrt.org/doc/uci/network/switch :
>>>
>>> "Tagged packets received on a port will be directed to the VLAN indicated by
>>> the VID contained in the packet. Untagged packets received on a port will be
>>> directed to the default port VLAN (usually called the PVID). A separate
>>> config switch_port section is required to set the default port VLAN."
>>>
>>>
>>> So you should add this to your config:
>>>
>>> config 'switch_port'
>>> option 'port'  '0'
>>> option 'pvid'  '2'
>>>
>>> I hope it helps.
>>>
>>> Regards,
>>> Diego
>>>
>>>
>>> On Thu, Sep 19, 2013 at 4:21 PM, jonsm...@gmail.com 
>>> wrote:

 Has anyone tried using the Ethernet switch on Ralink lately? I don't
 believe it is working correctly in the default 'off' state.  The
 failure is that the Ralink CPU can't receive any packets from Ethernet
 (or those packet are corrupted by the VLAN tag).

 If I enable the switch it works properly. I'm seeing this on the
 RT5350 but the code is generic to all Ralink

 diff --git a/files/etc/config/network b/files/etc/config/network
 new file mode 100644
 index 000..c608d0e
 --- /dev/null
 +++ b/files/etc/config/network
 @@ -0,0 +1,39 @@
 +config interface 'loopback'
 + option ifname 'lo'
 + option proto 'static'
 + option ipaddr '127.0.0.1'
 + option netmask '255.0.0.0'
 +
 +config globals 'globals'
 + option ula_prefix 'fd59:3f8d:cb3a::/48'
 +
 +config interface 'lan'
 + option ifname 'eth0.1'
 + option type 'bridge'
 + option proto 'static'
 + option ipaddr '192.168.1.85'
 + option netmask '255.255.255.0'
 + option ip6assign '60'
 +
 +config interface 'wan'
 + option ifname 'eth0.2'
 + option proto 'dhcp'
 +
 +config interface 'wan6'
 + option ifname '@wan'
 + option proto 'dhcpv6'
 +
 +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'

 --
 Jon Smirl
 jonsm...@gmail.com
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>>
>>>
>>>
>>> ___
>>> openwrt-devel mailing list
>>> openwrt-devel@lists.openwrt.org
>>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>>
>>
>>
>>
>> --
>> Jon Smirl
>> jonsm...@gmail.com
>
>
>
> --
> Jon Smirl
> jonsm...@gmail.com



-- 
Jon Smirl
jonsm...@gmail.com
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Ethernet switch on Ralink

2013-09-19 Thread jonsm...@gmail.com
On Thu, Sep 19, 2013 at 2:41 PM, jonsm...@gmail.com  wrote:
> For example do a clean openwrt build with nothing in /files/etc. It
> will generate a network file with the VLAN support turned off.  RT5350
> is not functioning with VLAN turned off.  If used to work that way
> about six months ago.
>
> config switch
>  option name 'rt305x'
>  option reset '1'
>  option enable_vlan '0'
>
> I updated a router from about 6 months ago to current git. When I did
> this Ethernet wouldn't work (default is vlan off). I then had to mess

When the Ethernet doesn't work it can send packets without problem but
it can't receive them. Internally I don't know if it can't hear the
packets or it can't decode the packets (maybe there is an unexpected
VLAN tag in them which shouldn't be there since vlan=0?).


> around until I discovered the solution was to turn VLAN support on.
>
> On Thu, Sep 19, 2013 at 12:42 PM, Diego Lopez Recas  
> wrote:
>> Hi Jon,
>>
>> I don't know what you mean with "default 'off' state", but I'm using an
>> RT3052F SoC and I have to explicitly specify the the pvid for the port in
>> vlan 2 to make it work properly. I think this is usual. From
>> http://wiki.openwrt.org/doc/uci/network/switch :
>>
>> "Tagged packets received on a port will be directed to the VLAN indicated by
>> the VID contained in the packet. Untagged packets received on a port will be
>> directed to the default port VLAN (usually called the PVID). A separate
>> config switch_port section is required to set the default port VLAN."
>>
>>
>> So you should add this to your config:
>>
>> config 'switch_port'
>> option 'port'  '0'
>> option 'pvid'  '2'
>>
>> I hope it helps.
>>
>> Regards,
>> Diego
>>
>>
>> On Thu, Sep 19, 2013 at 4:21 PM, jonsm...@gmail.com 
>> wrote:
>>>
>>> Has anyone tried using the Ethernet switch on Ralink lately? I don't
>>> believe it is working correctly in the default 'off' state.  The
>>> failure is that the Ralink CPU can't receive any packets from Ethernet
>>> (or those packet are corrupted by the VLAN tag).
>>>
>>> If I enable the switch it works properly. I'm seeing this on the
>>> RT5350 but the code is generic to all Ralink
>>>
>>> diff --git a/files/etc/config/network b/files/etc/config/network
>>> new file mode 100644
>>> index 000..c608d0e
>>> --- /dev/null
>>> +++ b/files/etc/config/network
>>> @@ -0,0 +1,39 @@
>>> +config interface 'loopback'
>>> + option ifname 'lo'
>>> + option proto 'static'
>>> + option ipaddr '127.0.0.1'
>>> + option netmask '255.0.0.0'
>>> +
>>> +config globals 'globals'
>>> + option ula_prefix 'fd59:3f8d:cb3a::/48'
>>> +
>>> +config interface 'lan'
>>> + option ifname 'eth0.1'
>>> + option type 'bridge'
>>> + option proto 'static'
>>> + option ipaddr '192.168.1.85'
>>> + option netmask '255.255.255.0'
>>> + option ip6assign '60'
>>> +
>>> +config interface 'wan'
>>> + option ifname 'eth0.2'
>>> + option proto 'dhcp'
>>> +
>>> +config interface 'wan6'
>>> + option ifname '@wan'
>>> + option proto 'dhcpv6'
>>> +
>>> +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'
>>>
>>> --
>>> Jon Smirl
>>> jonsm...@gmail.com
>>> ___
>>> openwrt-devel mailing list
>>> openwrt-devel@lists.openwrt.org
>>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>
>>
>>
>> ___
>> openwrt-devel mailing list
>> openwrt-devel@lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>
>
>
>
> --
> Jon Smirl
> jonsm...@gmail.com



-- 
Jon Smirl
jonsm...@gmail.com
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Ethernet switch on Ralink

2013-09-19 Thread Diego Lopez Recas
Hi Jon,

I don't know what you mean with "default 'off' state", but I'm using an
RT3052F SoC and I have to explicitly specify the the pvid for the port in
vlan 2 to make it work properly. I think this is usual. From
http://wiki.openwrt.org/doc/uci/network/switch :

"Tagged packets received on a port will be directed to the VLAN indicated
by the VID contained in the packet. Untagged packets received on a port
will be directed to the default port VLAN (usually called the PVID). A
separate config switch_port section is required to set the default port
VLAN."


So you should add this to your config:

config 'switch_port'
option 'port'  '0'
option 'pvid'  '2'

I hope it helps.

Regards,
Diego


On Thu, Sep 19, 2013 at 4:21 PM, jonsm...@gmail.com wrote:

> Has anyone tried using the Ethernet switch on Ralink lately? I don't
> believe it is working correctly in the default 'off' state.  The
> failure is that the Ralink CPU can't receive any packets from Ethernet
> (or those packet are corrupted by the VLAN tag).
>
> If I enable the switch it works properly. I'm seeing this on the
> RT5350 but the code is generic to all Ralink
>
> diff --git a/files/etc/config/network b/files/etc/config/network
> new file mode 100644
> index 000..c608d0e
> --- /dev/null
> +++ b/files/etc/config/network
> @@ -0,0 +1,39 @@
> +config interface 'loopback'
> + option ifname 'lo'
> + option proto 'static'
> + option ipaddr '127.0.0.1'
> + option netmask '255.0.0.0'
> +
> +config globals 'globals'
> + option ula_prefix 'fd59:3f8d:cb3a::/48'
> +
> +config interface 'lan'
> + option ifname 'eth0.1'
> + option type 'bridge'
> + option proto 'static'
> + option ipaddr '192.168.1.85'
> + option netmask '255.255.255.0'
> + option ip6assign '60'
> +
> +config interface 'wan'
> + option ifname 'eth0.2'
> + option proto 'dhcp'
> +
> +config interface 'wan6'
> + option ifname '@wan'
> + option proto 'dhcpv6'
> +
> +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'
>
> --
> Jon Smirl
> jonsm...@gmail.com
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel