{"id":8,"date":"2006-11-13T14:45:19","date_gmt":"2006-11-13T12:45:19","guid":{"rendered":"http:\/\/www.melen.org\/~jmgm\/wp\/?p=8"},"modified":"2006-11-13T14:47:02","modified_gmt":"2006-11-13T12:47:02","slug":"on-link-routes-not-configured-when-using-both-ipv6-autoconfiguration-and-manual-configuration","status":"publish","type":"post","link":"https:\/\/www.melen.org\/u\/jan\/wp\/?p=8","title":{"rendered":"On link routes not configured when using both IPv6 autoconfiguration and manual configuration"},"content":{"rendered":"<p>a problem with routes in 6.1 when configuring IPv6 address using both<br \/>\nautoconfigured addresses at the same time with statically configured<br \/>\naddresses from different prefixes.<\/p>\n<p>If the host is not accepting router advertisements everything seems to work<br \/>\nfine:<br \/>\n# sysctl -a | grep rtad<br \/>\nnet.inet6.ip6.accept_rtadv: 0<br \/>\n# ifconfig fxp0 inet6 3ffe:101::1 prefixlen 64<\/p>\n<p># netstat -rn -f inet6 | grep 3ffe:101<br \/>\n3ffe:101::\/64 link#1 UC<br \/>\nfxp0<br \/>\n3ffe:101::1 00:12:3f:71:3e:ef UHL<br \/>\nlo0<br \/>\n#<\/p>\n<p>As you can see I have two routes one for the loopback and one for the prefix<br \/>\nas it should GREAT!<\/p>\n<p>Now if I&#8217;ll set the host to accept router advertisements then the route for<br \/>\nthe 3ffe:101:: prefix will be deleted as the first router advertisement is<br \/>\nreceived. The router advertises prefix 3ffe:14b8:400:101::\/64.<\/p>\n<p># sysctl net.inet6.ip6.accept_rtadv=1<br \/>\nnet.inet6.ip6.accept_rtadv: 0 -> 1<br \/>\n# rtsol -a<br \/>\n# netstat -rn -f inet6 | grep 3ffe:101<br \/>\n3ffe:101::1 00:12:3f:71:3e:ef UHL<br \/>\nlo0<br \/>\n#<\/p>\n<p>It seems that the route is deleted because in function pfxlist_onlink_check()<br \/>\nthere is a check that if the state has changed to DETACHED the<br \/>\nnd6_prefix_offlink will be called which then removes the route:<br \/>\nif ((pr->ndpr_stateflags &#038; NDPRF_DETACHED) != 0 &#038;&#038;<br \/>\n(pr->ndpr_stateflags &#038; NDPRF_ONLINK) != 0) {<br \/>\nif ((e = nd6_prefix_offlink(pr)) != 0) {<br \/>\nnd6log((LOG_ERR,<br \/>\n&#8220;pfxlist_onlink_check: failed to &#8221;<br \/>\n&#8220;make %s\/%d offlink, errno=%d\\n&#8221;,<br \/>\nip6_sprintf(&#038;pr->ndpr_prefix.sin6_addr),<br \/>\npr->ndpr_plen, e));<br \/>\n}<br \/>\n}<\/p>\n<p>Result is the same if I first do the autoconfiguration part and then after<br \/>\nI have the autoconfigured address add the manually configured address the<br \/>\nresult is that there wont be any route for the manually configured prefix<br \/>\n(3ffe:101::\/64).<\/p>\n<p><a href=\"http:\/\/www.freebsd.org\/cgi\/query-pr.cgi?pr=104851\">http:\/\/www.freebsd.org\/cgi\/query-pr.cgi?pr=104851<br \/>\n<\/a><\/p>\n<p>>Category:       kern<br \/>\n>Responsible:    freebsd-bugs<br \/>\n>Synopsis:       On link routes not configured when using both IPv6 autoconfiguration and manual configuration<br \/>\n>Arrival-Date:   Fri Oct 27 05:20:17 GMT 2006<\/p>\n","protected":false},"excerpt":{"rendered":"<p>a problem with routes in 6.1 when configuring IPv6 address using both autoconfigured addresses at the same time with statically configured addresses from different prefixes. If the host is not accepting router advertisements everything seems to work fine: # sysctl -a | grep rtad net.inet6.ip6.accept_rtadv: 0 # ifconfig fxp0 inet6 3ffe:101::1 prefixlen 64 # netstat [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=\/wp\/v2\/posts\/8"}],"collection":[{"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8"}],"version-history":[{"count":0,"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=\/wp\/v2\/posts\/8\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}