|
发表于 2013-4-2 11:34:41
|
显示全部楼层
chmjiong 发表于 2012-8-2 12:31 4 M+ o- J% }7 M- y7 B2 Y+ Z
指定了PVID后,仍然无法避免0t 1被改为0t 1t8 d( d1 }9 {, T2 h
现在基本可以肯定是这个原因导致wan罢工,另外,vlan51如何 ...
8 J+ m* }* ^0 }/ ^, a8 ]/ m9 ^和你的MR4530类似,最近掉到WNDR4300的ar8327和nand flash的坑里了,所以翻出来这个账号,重新开始折腾。因为openwrt还不支持这个型号上的nand,所以刷了dd-wrt。$ l, d% C3 i; {0 @8 S6 j1 d q
看过ar8327的data sheet,vlan支持是很全面的:
( f% R! \3 v( f WThe AR8327 switch supports many VLAN options including IEEE 802.1Q and port-based VLANs. The
2 V# F" A# L4 z7 |9 aAR8327 supports 4096 IEEE 802.1Q VLAN groups and 4K VLAN table entries, and the AR8327 device
8 V1 ~6 J) w3 Y, Lchecks VLAN port membership from the VLAN ID, extracted from the tag header of the frame. Table / A8 y* [9 ~( ]9 `7 c; V2 l
2-18 shows the AR8327-supported 802.1Q modes. The port-based VLAN is enabled according to the
8 C: v4 o* O" ^- H: }user-defined PORT VID value. The AR8327 supports optional discards of tagged, untagged frames, % p* {( _7 x3 q4 v
and priority tagged frames. The AR8327 also supports untagging of the VLAN ID for packets going , d; }0 f4 E2 |2 {
out on untagged ports on a per-port basis. * q9 r0 W! x$ u1 D9 w
: d4 `9 M) m( w( `
不过还在看3.8 trunk里的ar8216.c的switch source code,毕竟不太会编程,还没搞清楚。不过看到ar8xxx_sw_set_ports(struct switch_dev *dev, struct switch_val *val)有一个函数有个注释:/ B) S/ p4 k% A/ x
1379 /* make sure that an untagged port does not* e- c$ I' T+ E" z5 w; |0 L
1380 * appear in other vlans */
% s, L8 p" X, M" I1381 for (j = 0; j < AR8X16_MAX_VLANS; j++) {) y2 t; C" _5 h: z- S
1382 if (j == val->port_vlan), p9 G' }6 |1 X& S! c1 b& i* O
1383 continue;1 s. E" W6 Q" X2 e+ S
1384 priv->vlan_table[j] &= ~(1 << p->id);
: w- ?+ B# q2 W9 G8 e" M
. A8 C1 I8 ^- S& Y9 t5 ]这句话大概可以解释为什么0t 1会被改成0t 1t。 |
|