
Figure 40. ACL test
1. Drop all frames from source IP 192.168.2.1.
tc qdisc add dev swp0 ingress
tc filter add dev swp0 parent ffff: protocol ip flower skip_sw src_ip 192.168.2.1 action drop
Set source IP as 192.168.2.1 and send ip package from testcenter, package will be dropped on swp0.
2. Limit bandwidth of HTTP streams to 10Mbps.
tc filter add dev eth3 parent ffff: protocol ip flower skip_sw ip_proto tcp dst_port 80 action
police rate 10Mbit burst 10000
Send TCP package and set destination port as 80 on testcenter, set the stream bandwidth to 1Gbps, we can get a 10Mbps
stream rate.
3. Filter frames which have a specific vlan tag(VID=1 and PCP=1), then modify the vlan tag(VID=2, PCP=2) and classified
to Qos traffic class 2.
ip link set switch type bridge vlan_filtering 1
tc qdisc add dev swp0 ingress
tc filter add dev swp0 parent ffff: protocol 802.1Q flower skip_sw vlan_id 1 vlan_prio 1 action
vlan modify id 2 priority 2
bridge vlan add dev swp0 vid 2
bridge vlan add dev swp1 vid 2
Set vid=1 and pcp=1 in vlan tag, then send ip package from testcenter, we can get a package with vid=2, pcp=2 from swp1
on TestCenter.
NXP Semiconductors
TSN
Open Industrial User Guide, Rev. 1.8, 05/2020
User's Guide
129 / 199