From PicOS 2.8.0, Pica8 switch support ingress-mirror-group and egress-mirror-group.
- Ingress-mirror-group: Packets can modify corresponding fields and send out from one port, at the same time the packets also can keep original and send out from other ports.
- Egress-mirror-group: Packets can modify corresponding fields send out from one port, also can send out from another port at same time.
Using configure type=all group to create ingress-mirror-group or egress-mirror-group.
- Ingress-mirror-group: Only support 2 buckets, the first bucket process packets as normal, use the second bucket to mirror original packets at ingress and send out from one physical port or lag interface.
- Egress-mirror-group: Only support 2 buckets, the first bucket process packets as normal, use the second bucket to mirror modified packets at egress and send out from one physical port or lag interface.
We said the output in second bucket as monitor port.
1. ingress/Egress mirror group only support configure 2 buckets; Monitor port can be physical port/lag port/lag-select-group.
2. lag-select-group can include multiple ports, but if lag-select-group as monitor port only first eight ports can work.
3. only support add 4 monitor port (include ingress+egress) at most.
4. ingress/egress mirror group only can configure in table=0 flow entry.
5. ingress/egress mirror group cannot configure dec_tll in bucket.
6.do not support any other actions except ingress/egress mirror group in a flow's action.All actions you want to use must be added to the first bucket of the ingress/egress mirror-group.
In default, ingress/egress-mirror-groups is disabled, user need use command to configure them. 'ingress-mirror-groups=0-0' means the group ID range is 0-0, that is disable ingress-mirror-groups.
The command to show the ranges of ingress-mirror-groups and egress-mirror-groups.
The command to configure ingress-mirror-group and egress-mirror-group ID range:
ovs-vsctl set-group-ranges ingress-mirror-groups=<min_value>-<max_value>
ovs-vsctl set-group-ranges egress-mirror-groups=<min_value>-<max_value>
ovs-vsctl set-group-ranges ingress-mirror-groups=<min_value1>-<max_value1>,egress-mirror-groups=<min_value2>-<max_value2>
The group IDs may be divided into different areas: ingress-mirror-groups, egress-mirror-group and the original groups. The max range of group is 1-4294967039, and if configure different group the group range cannot conflict.
After configure the command, user need reboot switch.
Use command 'ovs-vsctl set-group-ranges' to back default group ranges.
And ingress-mirror-group, first bucket modify packet's fields dl_vlan and dl_dst.
And egress-mirror-group, first bucket modify packet's fields dl_src and dl_dst, second bucket is lag interface.
Close all Group-ranges
If user want close the group-ranges, please use command as below.