首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >net.ipv6.conf.all.forwarding=1是否等同于为所有单独的接口启用转发?

net.ipv6.conf.all.forwarding=1是否等同于为所有单独的接口启用转发?
EN

Unix & Linux用户
提问于 2017-03-02 01:47:55
回答 1查看 27.4K关注 0票数 7

或者它是启用IPv6转发的唯一方法?

代码语言:javascript
复制
/proc/sys/net/ipv6/conf# grep '' */forwarding
all/forwarding:0
default/forwarding:1
eth0/forwarding:1
lo/forwarding:1
nat64/forwarding:1
tunl0/forwarding:1
veth_cm/forwarding:1
wifi0/forwarding:1
wlan0/forwarding:1

不走路线。我在Wireshark上看到了数据包,但它们没有到达ip6tables。

代码语言:javascript
复制
/proc/sys/net/ipv6/conf# grep '' */forwarding
all/forwarding:1
default/forwarding:1
eth0/forwarding:1
lo/forwarding:1
nat64/forwarding:1
tunl0/forwarding:1
veth_cm/forwarding:1
wifi0/forwarding:1
wlan0/forwarding:1

现在网络开始运作了。

代码语言:javascript
复制
/proc/sys/net/ipv6/conf# grep '' */forwarding
all/forwarding:1
default/forwarding:0
eth0/forwarding:0
lo/forwarding:0
nat64/forwarding:0
tunl0/forwarding:0
veth_cm/forwarding:0
wifi0/forwarding:0
wlan0/forwarding:0

网络还能用。那些单独的每个接口开关都被使用了吗?它是否是Linux内核错误(现在正在运行4.9.5版本)。

EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2017-03-02 01:55:17

实际上,它的设计与IPv4 4‘S、*/forwardingall/forwarding不同:

来自https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt

代码语言:javascript
复制
conf/all/forwarding - BOOLEAN
    Enable global IPv6 forwarding between all interfaces.

    IPv4 and IPv6 work differently here; e.g. netfilter must be used
    to control which interfaces may forward packets and which not.

    This also sets all interfaces' Host/Router setting
    'forwarding' to the specified value.  See below for details.

    This referred to as global forwarding.

forwarding - INTEGER
    Configure interface-specific Host/Router behaviour.

    Note: It is recommended to have the same setting on all
    interfaces; mixed router/host scenarios are rather uncommon.

    Possible values are:
        0 Forwarding disabled
        1 Forwarding enabled

    FALSE (0):

    By default, Host behaviour is assumed.  This means:

    1. IsRouter flag is not set in Neighbour Advertisements.
    2. If accept_ra is TRUE (default), transmit Router
       Solicitations.
    3. If accept_ra is TRUE (default), accept Router
       Advertisements (and do autoconfiguration).
    4. If accept_redirects is TRUE (default), accept Redirects.

    TRUE (1):

    If local forwarding is enabled, Router behaviour is assumed.
    This means exactly the reverse from the above:

    1. IsRouter flag is set in Neighbour Advertisements.
    2. Router Solicitations are not sent unless accept_ra is 2.
    3. Router Advertisements are ignored unless accept_ra is 2.
    4. Redirects are ignored.

    Default: 0 (disabled) if global forwarding is disabled (default),
         otherwise 1 (enabled).

因此,每个接口forwarding仅用于辅助事物,如各种标志和特殊数据包行为,而不是用于决定是否重新传输数据包。

票数 11
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/348533

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档