Date: Thu, 12 Feb 2009 13:09:34 -0500 From: Steve Bertrand <steve@ibctech.ca> To: ipfreak@yahoo.com Cc: freebsd general questions <freebsd-questions@freebsd.org> Subject: Re: ipv6 and freebsd Message-ID: <499465DE.4050604@ibctech.ca> In-Reply-To: <461864.28779.qm@web52109.mail.re2.yahoo.com> References: <461864.28779.qm@web52109.mail.re2.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
gahn wrote: > What shall I do to accomplish this on FreeBSD? For clarification and completeness, here is exactly what I did: First, config the router (Cisco): interface FastEthernet0/0 ip address 192.168.3.2 255.255.255.0 duplex auto speed auto ipv6 address 2607:F118:A::1/64 ipv6 address FEC0:10::1/64 ipv6 nd ra-lifetime 210 ipv6 nd prefix 2607:F118:A::/64 ipv6 nd prefix FEC0:10::/64 Next, on the host, ensure we are properly prepared: # sysctl -a net.inet6.ip6.accept_rtadv net.inet6.ip6.accept_rtadv: 1 # ndp -i fxp0 linkmtu=1500, maxmtu=1500, curhlim=64, basereachable=30s0ms, reachable=39s, retrans=1s0ms Flags: nud accept_rtadv Ensure there is not a blanket ICMP filter on the host, by pinging the link local address from the router (even if you can ping, it is still possible that ICMP type 9 are being blocked): # ping fe80::20d:60ff:fe4c:81ca Output Interface: FastEthernet0/0 Packet sent with a source address of FE80::20A:F4FF:FE0B:B109 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/0 ms Ensure we see RAs on the wire: # tcpdump -n -i fxp0 ip6 listening on fxp0, link-type EN10MB (Ethernet), capture size 96 bytes 09:30:50.820717 IP6 fe80::20a:f4ff:fe0b:b109 > ff02::1: ICMP6, router advertisement, length 96 Capture the entire packet with the RA information to make sure that the router is actually sending the prefixes we want to autoconf. Dump this info into a file, so we can scp it to our workstation to read it into Wireshark: # tcpdump -n -i fxp0 -s 0 -w /var/log/test.pcap ip6 What does Wireshark tell us about the advertisement: ICMPv6 Option (Prefix information) Type: Prefix information (3) Length: 32 Prefix length: 64 Flags: 0xc0 1... .... = Onlink .1.. .... = Auto ..0. .... = Not router address ...0 .... = Not site prefix Valid lifetime: 2592000 Preferred lifetime: 604800 Prefix: 2607:f118:a:: <----------------*** ICMPv6 Option (Prefix information) Type: Prefix information (3) Length: 32 Prefix length: 64 Flags: 0xc0 1... .... = Onlink .1.. .... = Auto ..0. .... = Not router address ...0 .... = Not site prefix Valid lifetime: 2592000 Preferred lifetime: 604800 Prefix: fec0:10:: <----------------*** So by this point, we've confirmed that everything is in order. I don't know if FreeBSD will autoconf if the 'L' bit (Onlink) flag is set to 0, so check that too. Let's see our ifconfig output: # ifconfig fxp0 inet6 fe80::20d:60ff:fe4c:81ca%fxp0 prefixlen 64 scopeid 0x1 inet 192.168.3.1 netmask 0xffffff00 broadcast 192.168.3.255 inet6 2607:f118:a:0:20d:60ff:fe4c:81ca prefixlen 64 autoconf inet6 fec0:10::20d:60ff:fe4c:81ca prefixlen 64 autoconf The last thing to try, is to ping6 the known IPv6 address of the router from the host. Perhaps ifconfig is not displaying the learnt addressing information until it is used. (This situation did come up for me, but it may have been a coincidence in timing. I haven't been able to reproduce it). Steve
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?499465DE.4050604>