switch * | enum | 匹配规则将应用的交换机分组。 |
ports | multi { array-id, port: enum } | 匹配规则将对入站流量应用的交换机接口。可选择多个端口和硬件卸载绑定接口。请注意不能选择 switch1-cpu 端口。如果 ports 属性留空,规则将应用于所有交换机接口。 |
src-mac-address | super { address: macAddr , [mask] /macAddr } | 匹配源 MAC 地址和掩码。 |
dst-mac-address | super { address: macAddr , [mask] /macAddr } | 匹配目标 MAC 地址和掩码。 |
mac-protocol | alt { protocol-name: enum () , protocol-number: num [ .. 65535] } | 匹配由协议名称或编号指定的特定 MAC 协议(跳过 VLAN 标签,如果有)。 |
vlan-header | enum (not-present | present) | 匹配 VLAN 头,无论 VLAN 头是否存在。需要 vlan-filtering=yes。 |
vlan-id | num | 匹配 VLAN ID。需要 vlan-filtering=yes。 |
vlan-priority | num | 匹配 VLAN 优先级(优先级代码点)。 |
src-address | super { address: ipAddr , [mask] /alt { bitmask: ipAddr , netmask: num [ .. 32] } } | 匹配源 IPv4 地址和掩码。如果指定了 mac-protocol=arp,则匹配 ARP 数据包中的源 IP。未指定 mac-protocol 时,仅匹配 IPv4 数据包。 |
dst-address | super { address: ipAddr , [mask] /alt { bitmask: ipAddr , netmask: num [ .. 32] } } | 匹配目标 IPv4 地址和掩码。如果指定了 mac-protocol=arp,则匹配 ARP 数据包中的目标 IP。未指定 mac-protocol 时,仅匹配 IPv4 数据包。 |
protocol | alt { protocol-name: enum () , protocol-number: num [ .. 255] } | 匹配由协议名称或编号指定的特定 IP 协议。未指定 mac-protocol 时仅适用于 IPv4 数据包。要匹配某些 IPv6 协议,请使用 mac-protocol=ipv6 设置。 |
src-port | range | 匹配源协议端口号(未指定 mac-protocol 时适用于 IPv4 和 IPv6 数据包)。 |
dst-port | range | 匹配目标协议端口号或范围(未指定 mac-protocol 时适用于 IPv4 和 IPv6 数据包)。 |
dscp | num | 匹配数据包的 DSCP 字段(仅适用于 IPv4 数据包)。 |
src-address6 | super { address: ip6Addr , [mask] /alt { bitmask: ip6Addr , netmask: num } } | 匹配源 IPv6 地址和掩码。 |
dst-address6 | super { address: ip6Addr , [mask] /alt { bitmask: ip6Addr , netmask: num } } | 匹配目标 IPv6 地址和掩码。 |
traffic-class | num | 匹配 IPv6 流量类别。 |
flow-label | num | 匹配 IPv6 流标签。 |
copy-to-cpu | bool | 克隆匹配的数据包并将其发送到 CPU。 |
redirect-to-cpu | bool | 将匹配数据包的目标端口更改为交换机 CPU。 |
mirror | bool | 克隆匹配的数据包并将其发送到 mirror-target 端口。 |
new-dst-ports | multi { array-id, port: alt { port: enum , bond: iface_enum } } | 按指定方式更改目标端口,允许多个端口,包括交换机 CPU 端口。 - 如果该设置留空(例如 new-dst-ports=""),数据包将被丢弃; - 如果指定了端口或硬件卸载绑定接口,数据包将被重定向到该端口。仅支持单个端口或绑定接口; - 如果使用 all 参数,数据包将被允许通过并进入出口处理,而不会被丢弃; - 如果未使用此参数,数据包将按原样接受。 |
mirror-ports | multi { array-id, port: enum } | 选择多个镜像目标端口,仅在 88E6393X 交换机芯片上可用。ACL 规则中匹配的数据包将被复制并发送到所选端口。 |
new-qos-profile | enum | 要分配给匹配数据包的 QoS 配置文件名称。 |
keep-qos-fields | bool | QoS 字段(PCP、DSCP)的原始值应保留(yes),还是替换为分配的 QoS 配置文件中的值(no)?仅在设置了 new-qos-profile 时相关。 |
new-vlan-id | num | 将 VLAN ID 更改为指定值。需要 vlan-filtering=yes。 |
new-vlan-priority | num | 更改 VLAN 优先级(优先级代码点)。需要 vlan-filtering=yes。 |
new-vrf | enum | 将入站流量分配到指定的 VRF。需要交换机芯片支持硬件卸载 VRF。在不支持 VRF 的交换机(98DX3xxx 和 98DX2xxx 系列)上,将 new-vrf 设置为 main 以外的任何值都将被视为 redirect-to-cpu=yes。 |
rate | num | 为匹配的流量设置入站流量限制(比特每秒)。 |