linux – 使用radvd发布子网路由
发布时间:2020-12-13 17:09:54 所属栏目:Linux 来源:网络整理
导读:我们建立了一个小型的IPv6测试网络.设置如下所示: ::/0+----------+| Firewall | Router to the public net+----------+ | 2001:...::/106 | +----------+ +-------| SIT GW | sit Tunnel gatway to the some test users | +----------+ |+----------+| Tes
我们建立了一个小型的IPv6测试网络.设置如下所示:
::/0 +----------+ | Firewall | Router to the public net +----------+ | 2001:...::/106 | +----------+ +-------| SIT GW | sit Tunnel gatway to the some test users | +----------+ | +----------+ | Test Sys | Testsystem +----------+ 我们的想法是从防火墙发布默认路由,并从sit网关发布SIT子网的路由. radvd的配置是: # Firewall interface eth0 { AdvSendAdvert on; route ::/0 { }; }; # SIT Gatway interface eth0 { AdvSendAdvert on; route 2001:...::/106 { }; }; 我们抓住了副词.使用tcpdump的包和包看起来不错.我们看到来自fw的默认路由,以及来自SIT gatway的子网路由. 但是,如果我们查看测试系统,则两个网关上都有两条默认路由.没有子网路由.路由当然不起作用.在这里我们得到的路线: 2001:.....::/64 dev eth0 proto kernel metric 256 mtu 1500 advmss 1440 hoplimit 4294967295 fe80::/64 dev eth0 proto kernel metric 256 mtu 1500 advmss 1440 hoplimit 4294967295 default via fe80::baac:6fff:fe8e:XXXX dev eth0 proto kernel metric 1024 expires 0sec mtu 1500 advmss 1440 hoplimit 64 default via fe80::e415:aeff:fe12:XXXX dev eth0 proto kernel metric 1024 expires 0sec mtu 1500 advmss 1440 hoplimit 64 任何的想法? 解决方法
我发现了这个问题.
默认情况下,Linux内核仅通过icmpv6中的路由器通告选项接受默认路由. 要解决此问题,必须设置正确的内核参数: net.ipv6.conf.all.accept_ra_rt_info_max_plen = 128 来自内核文档:
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |