On Mon, Nov 28, 2011 at 09:57:06PM -0500, Douglas Maus wrote:
> I could use some help understanding IPv6 autoconfiguration on OpenBSD5.0
>
> If an OpenBSD system is configured to be an IPv6 host and to use 'rtsol',
> and the network IPv6 router running rtadvd sends a prefix (like 2001:.../64)
> as part of the route advertisements,
> then isn't the host supposed to use the prefix to generate
> an IPv6 address with that 2001: prefix and fill the last 64 bits with
> bits from the ethernet ID / EUI?
>
>
> I'm trying to work my way through / debug this, and I'm stumped.
> I'll document what I have checked - please let me know any other
> configurations or responses I should check.
>
>
> /etc/hostname.re0 (setup during installation, with rtsol selected)
> inet 10.0.1.2 255.255.255.0
> up
> rtsol
>
>
> /etc/sysctl.conf
> net.inet6.icmp6.rediraccept=1
> net.inet6.ip6.forwarding=0
> net.inet6.ip6.accept_rtadv=1
> (although installation set rediraccept to 1, I needed to manually
> set ip6.forwarding=0 and ip6.accept_rtadv=1 - perhaps this should
> be fixed in the install script)
>
dmesg excerpt:
OpenBSD 5.0 (GENERIC.MP) #63: Wed Aug 17 10:14:30 MDT 2011
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
:
re0 at pci4 dev 0 function 0 "Realtek 8168" rev 0x06: RTL8168E/8111E
(0x2c00), apic 0 int 19, address de:ad:be:ef:ca:fe
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 4
For me it works just fine and my settings follows here...
/etc/rc.conf.local:
rtsold_flags=re0
/etc/hostname.re0:
dhcp
up
rtsol
/etc/sysctl.conf:
net.inet6.ip6.forwarding=0
net.inet6.ip6.accept_rtadv=1
net.inet6.icmp6.rediraccept=1
# ifconfig re0
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr de:ad:be:ef:ca:fe
priority: 0
groups: egress
media: Ethernet autoselect (1000baseT full-duplex,rxpause,txpause)
status: active
inet6 fe80::dcad:beff:feef:cafe%re0 prefixlen 64 scopeid 0x1
inet 192.168.0:123 netmask 0xffffff00 broadcast 192.168.0.255
inet6 fec0::dcad:beff:feef:cafe prefixlen 64 autoconf pltime 604761
vltime 2591961
Try (see rtsold(8)):
# pkill -USR1 rtsold
# cat /var/run/rtsold.dump
Interface re0
probe interval: infinity
no probe timer
interface status: active
other config: off
rtsold status: IDLE
carrier detection: available
probes: 0, dadcount = 0
no timer
number of valid RAs: 11940
>
> $ ifconfig re0 (sanitized of real EUI)
> re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> lladdr c1:a1:c1:a1:f1:e1
> priority: 0
> groups: egress
> media: Ethernet autoselect (1000baseT
> full-duplex,master,rxpause,txpause)
> status: active
> inet 10.0.1.2 netmask 0xffffff00 broadcast 10.0.1.255
> inet6 fe80::c1a1:c1ff:fea1:f1e1%re0 prefixlen 64 scopeid 0x1
> (note - only the link-local IPv6 address)
>
>
> tcpdump of the router advertisement (sanitized),
> the router is an Apple Airport ExtremeN
> which advertises the link-local address of the router,
> and also advertises the prefix for this LAN:
> $tcpdump -v -i re0
> 12:00:00.000000 fe80::c1a1:b1ff:fea1:b1e1 > ff02::1: icmp6: router
> advertisement(chlim=64, O router_ltime=1800, reachable_time=0,
> retrans_time=0)(src lladdr: c1:a1:b1:a1:b1:e1)(prefix info: LA
> valid_ltime=14400, preferred_ltime=3600, prefix=2001:470:dead:beef::/64)[ndp
> opt] (len 80, hlim 255)
>
>
> routing table (output of netstat -rn -f inet6, sanitized)
> Internet6:
> Destination Gateway Flags Refs
> Use Mtu Prio Iface
> ::/104 ::1 UGRS 0
> 0 - 8 lo0
> ::/96 ::1 UGRS 0
> 0 - 8 lo0
> default fe80::c1a1:b1ff:fea1:b1e1%re0 UG 0
> 214 - 4 re0
> ::1 ::1 UH 14
> 0 33196 4 lo0
> ::127.0.0.0/104 ::1 UGRS 0
> 0 - 8 lo0
> ::224.0.0.0/100 ::1 UGRS 0
> 0 - 8 lo0
> ::255.0.0.0/104 ::1 UGRS 0
> 0 - 8 lo0
> ::ffff:0.0.0.0/96 ::1 UGRS 0
> 0 - 8 lo0
> 2001:470:dead:beef::/64 link#1 UC 0
> 0 - 4 re0
> 2002::/24 ::1 UGRS 0
> 0 - 8 lo0
> 2002:7f00::/24 ::1 UGRS 0
> 0 - 8 lo0
> 2002:e000::/20 ::1 UGRS 0
> 0 - 8 lo0
> 2002:ff00::/24 ::1 UGRS 0
> 0 - 8 lo0
> fe80::/10 ::1 UGRS 0
> 0 - 8 lo0
> fe80::%re0/64 link#1 UC 1
> 0 - 4 re0
> fe80::c1a1:b1ff:fea1:b1e1%re0 c1:a1:b1:a1:b1:e1 UHLc 1
> 7 - 4 re0
> fe80::c1a1:c1ff:fea1:f1e1%re0 c1:a1:c1:a1:f1:e1 HL 1
> 0 - 4 lo0
> fe80::%lo0/64 fe80::1%lo0 U 0
> 0 - 4 lo0
> fe80::1%lo0 link#4 UHL 0
> 0 - 4 lo0
> fec0::/10 ::1 UGRS 0
> 0 - 8 lo0
> ff01::/16 ::1 UGRS 0
> 0 - 8 lo0
> ff01::%re0/32 link#1 UC 0
> 0 - 4 re0
> ff01::%lo0/32 fe80::1%lo0 UC 0
> 0 - 4 lo0
> ff02::/16 ::1 UGRS 0
> 0 - 8 lo0
> ff02::%re0/32 link#1 UC 0
> 0 - 4 re0
> ff02::%lo0/32 fe80::1%lo0 UC 0
> 0 - 4 lo0
>
> Isn't there supposed to be an IPv6 address like:
> 2001:470:dead:beef:c1a1:c1ff:fea1:f1e1
>
> I can ping6 my default router:
> ping6 -I re0 fe80::c1a1:b1ff:fea1:b1e1
> but I cannot ping6 any global addresses
> ping6 -I re0 2001:4860:800f::68 (ipv6.google.com)
> results in all packets lost
>
>
> I'm left wondering - is it
> (A) some configuration on the OpenBSD 5.0 machine that I'm missing?
> (B) OpenBSD 5.0 not handling the route advertisement prefix?
> (C) the Apple Airport-ExtremeN router sending a bad route advertisement and
> prefix?
>
> I'm trying to be realistic and not think I've discovered a bug.
>
> Thank you for any help.
--
/ Raimo Niskanen, Erlang/OTP, Ericsson AB