Skip to content

Enhance opx-config-mirror to accept the list of source interfaces #13

@atanu-mandal

Description

@atanu-mandal

opx-config-mirror utility needs to be enhanced to accept the list of source interfaces, currently it accepts only one.

As a workaround, we can follow the below command to configure the list of source interfaces.

# cps_set_oid.py -qua target -oper create base-mirror/entry dst-intf=26 intf,0,src=27 intf,0,direction=1 intf,1,src=32 intf,1,direction=1 type=1

Here dst-intf and src-intf are denoted as “ifindex” instead of interface name.
We can find the ifindex for any interfaces from “ip link show” command (I’ve provided the capture below).

src interfaces : e101-022-0,e101-027-0
dest interface: e101-021-0
type=1 : Span
direction=1 (for ingress)/2(egress)/3(ingress and egress)

  • Command output:

Output
Success
Key: 1.27.1769488.1769473.
base-mirror/entry/opaque-data = 01000000000000002c000000000000000100000000000000040000000000000000000000020000000000000008000000000000000000003c00000e00
cps/object-group/return-code = 0
base-mirror/entry/id = 2
base-mirror/entry/type = 1
base-mirror/entry/intf/src = 32
base-mirror/entry/intf/direction = 1
base-mirror/entry/intf/src = 27
base-mirror/entry/intf/direction = 1
base-mirror/entry/dst-intf = 26

  • ip link show to find the ifindex :

ip link show e101-021-0
26: e101-021-0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether e4:f0:04:9b:ff:a1 brd ff:ff:ff:ff:ff:ff
alias NAS## 0 81
ip link show e101-022-0
27: e101-022-0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether e4:f0:04:9b:ff:a5 brd ff:ff:ff:ff:ff:ff
alias NAS## 0 85
ip link show e101-027-0
32: e101-027-0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether e4:f0:04:9b:ff:b9 brd ff:ff:ff:ff:ff:ff
alias NAS## 0 105

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions