ipv6 netstream srv6-aware inner-header

Function

The ipv6 netstream srv6-aware inner-header command enables sampling for inner packets in SRv6 packets.

The undo ipv6 netstream srv6-aware inner-header command disables sampling for inner packets in SRv6 packets.

By default, inner packets in SRv6 packets are not sampled.

Format

ipv6 netstream srv6-aware inner-header

undo ipv6 netstream srv6-aware inner-header

Parameters

None

Views

System view

Default Level

3: Management level

Task Name and Operations

Task Name Operations
netstream write

Usage Guidelines

Usage Scenario

On an SRv6 network, if this command is run, inner information is collected. If this command is not run, outer IPv6 information is collected.

Precautions

If the SRv6 packets carrying inner information are in the IPv4 format. To collect IPv4 flow statistics, you need to configure IPv4 sampling.

  • To configure flow packet output:
  • Run the ip netstream export source {ip-address | ipv6 ipv6-address} [port] command in the system or slot view to configure the source IP address and source port number of the output packets carrying flow statistics.
  • Run the ip netstream export host {ip-address | ipv6 ipv6-address} port [vpn-instance vpn-instance-name] [dscp dscp-value] command in the system or slot view to configure the destination IP address and the UDP port number of the peer NSC.
  • To collect statistics on aggregation flows:
  • Run the ip netstream aggregation {as | as-tos | bgp-nexthop-tos | destination-prefix | destination-prefix-tos | index-tos | mpls-label | prefix | prefix-tos | protocol-port | protocol-port-tos | source-prefix | source-prefix-tos | source-index-tos | vlan-id | bgp-community | vni-sip-dip} command in the system view to create an aggregation mode view.
  • Run the enable command in the aggregation view to enable aggregation flow statistics collection in the preceding aggregation mode.
  • Run the ip netstream {inbound | outbound} command in the interface view to enable NetStream on the interface.
  • To collect statistics on flexible flows:
  • Run the ip netstream export version 9 [origin-as | peer-as] [bgp-nexthop] command in the system view to configure the version number and AS option of the output packets.
  • Run the ip netstream record record-name command in the system view to create an IPv4 flexible flow statistics template and enter the record view.
  • Run the match {{source | destination} {vlan | as | port | address | mask} | mpls top-label ip-address | mpls label position | {protocol | tos | direction | tcp-flag} | {input | output} interface | next-hop [bgp]} command in the record view to configure aggregation keywords in the flexible flow statistics template.
  • Run the ip netstream apply record record-name command in the system view to apply to flexible flows.
  • Run the ip netstream {inbound | outbound} command in the interface view to enable NetStream on the interface.
  • To deploy monitoring services:
  • Run the ip netstream monitor monitor-name {inbound | outbound} command in the interface view to enable NetStream on the interface.

    Other configurations, such as the output packet format and template refresh interval, are optional.

    The sampling ratio and sampling mode are subject to the IPv6 configuration.

    The routing information collected using NetStream is determined by the packet forwarding mode and is independent of the command.

Example

# Enable sampling for inner packets in SRv6 packets.
<HUAWEI> system-view
[~HUAWEI] ipv6 netstream srv6-aware inner-header
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >