mirror of
https://github.com/Telecominfraproject/wlan-ucentral-schema.git
synced 2026-03-20 03:41:53 +00:00
22 lines
699 B
Ucode
22 lines
699 B
Ucode
{% if (state.switch.port_mirror && state.switch.port_mirror.monitor_ports && state.switch.port_mirror.analysis_port): %}
|
|
|
|
{%
|
|
let analysis = ethernet.lookup_by_select_ports([state.switch.port_mirror.analysis_port]);
|
|
ethernet.reserve_port(state.switch.port_mirror.analysis_port);
|
|
let mirrors = ethernet.lookup_by_select_ports(state.switch.port_mirror.monitor_ports);
|
|
%}
|
|
|
|
# Switch port-mirror configuration
|
|
|
|
set switch.mirror=port-mirror
|
|
{% for (let mirror in mirrors): %}
|
|
add_list switch.mirror.monitor={{ s(mirror) }}
|
|
{% endfor %}
|
|
set switch.mirror.analysis={{ s(analysis[0]) }}
|
|
|
|
{% endif %}
|
|
|
|
set network.mirror=interface
|
|
set network.mirror.ifname=eth1
|
|
set network.mirror.proto=none
|