【问题标题】:How to use ipv6 flow label如何使用 ipv6 流标签
【发布时间】:2020-08-26 13:38:27
【问题描述】:

我正在通过 ipv6,遇到了流标签。 我的问题是。 如何使用 IPv6 流标签? 是否有任何我们需要启用/配置以启用流标签的配置? 有没有办法为 IPv6 标头中的流标签字段配置默认值? 是否有可配置的策略如何处理接收到的数据包中的流标签字段?

【问题讨论】:

  • Flow Label 的目的是让中间设备,例如路由器,请确保在给定路径选择时单个流使用相同的路径。网络堆栈应自动为您处理流标签。

标签: networking linux-kernel ipv6


【解决方案1】:

检查 sysctl 的; https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt

flowlabel_consistency - BOOLEAN
    Protect the consistency (and unicity) of flow label.
    You have to disable it to use IPV6_FL_F_REFLECT flag on the
    flow label manager.
    TRUE: enabled
    FALSE: disabled
    Default: TRUE

auto_flowlabels - INTEGER
    Automatically generate flow labels based on a flow hash of the
    packet. This allows intermediate devices, such as routers, to
    identify packet flows for mechanisms like Equal Cost Multipath
    Routing (see RFC 6438).
    0: automatic flow labels are completely disabled
    1: automatic flow labels are enabled by default, they can be
       disabled on a per socket basis using the IPV6_AUTOFLOWLABEL
       socket option
    2: automatic flow labels are allowed, they may be enabled on a
       per socket basis using the IPV6_AUTOFLOWLABEL socket option
    3: automatic flow labels are enabled and enforced, they cannot
       be disabled by the socket option
    Default: 1

flowlabel_state_ranges - BOOLEAN
    Split the flow label number space into two ranges. 0-0x7FFFF is
    reserved for the IPv6 flow manager facility, 0x80000-0xFFFFF
    is reserved for stateless flow labels as described in RFC6437.
    TRUE: enabled
    FALSE: disabled
    Default: true

flowlabel_reflect - INTEGER
    Control flow label reflection. Needed for Path MTU
    Discovery to work with Equal Cost Multipath Routing in anycast
    environments. See RFC 7690 and:
    https://tools.ietf.org/html/draft-wang-6man-flow-label-reflection-01

    This is a bitmask.
    1: enabled for established flows

    Note that this prevents automatic flowlabel changes, as done
    in "tcp: change IPv6 flow-label upon receiving spurious retransmission"
    and "tcp: Change txhash on every SYN and RTO retransmit"

    2: enabled for TCP RESET packets (no active listener)
    If set, a RST packet sent in response to a SYN packet on a closed
    port will reflect the incoming flow label.

    4: enabled for ICMPv6 echo reply messages.

    Default: 0

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-01-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-01
    • 1970-01-01
    • 2015-07-02
    相关资源
    最近更新 更多