Hi list,

i have a difficult time reaching my default IPv6 default gateway in a
different subnet. Asking Google brought up some threads from early 2011.
Most of the solutions where switching the prefixlen to reach the gateway
but this didn't work out for me. The mentioned route commands didn't
work out for me, too. The support said, as they don't provide OpenBSD on
their machines, they don't support it. They told me, to set up one IP
from my network and add a host route to the gateway.

My network is 2001:4ba0:ffff:00ab::0 /64

The gateway is 2001:4ba0:ffff:1:beef::1


The provided example for FreeBSD (not verfied):

route add -inet6 [ipv6-gateway] -iface [interface]
ndp -s [ipv6-gateway] [mac-gateway]
route add -inet6 default [ipv6-gateway]

The provided example for Linux (verfied with provided rescue console):

~ # ip -6 route add 2001:4ba0:ffff:1:beef::1 dev eth0
~ # ip -6 route add default via 2001:4ba0:ffff:1:beef::1
~ # ip -6 route show
2001:4ba0:ffff:1:beef::1 dev eth0  metric 1024
2001:4ba0:ffff:ab::/64 dev eth0  proto kernel  metric 256
fe80::/64 dev eth0  proto kernel  metric 256
default via 2001:4ba0:ffff:1:beef::1 dev eth0  metric 1024
~ # ping6 ipv6.google.com
PING ipv6.google.com(la-in-x6a.1e100.net) 56 data bytes
64 bytes from la-in-x6a.1e100.net: icmp_seq=1 ttl=54 time=39.5 ms
64 bytes from la-in-x6a.1e100.net: icmp_seq=2 ttl=54 time=39.3 ms
64 bytes from la-in-x6a.1e100.net: icmp_seq=3 ttl=54 time=38.8 ms
64 bytes from la-in-x6a.1e100.net: icmp_seq=4 ttl=54 time=39.1 ms
^C

That's what i did on OpenBSD:

~ # ifconfig em0 inet6 2001:4ba0:ffff:ab::1 prefixlen 64
~ # ifconfig em0
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:25:90:e0:20:c6
        priority: 0
        groups: egress
        media: Ethernet autoselect (1000baseT full-duplex,rxpause,txpause)
        status: active
        inet 217.79.184.47 netmask 0xffffff80 broadcast 217.79.184.127
        inet6 fe80::225:90ff:fee0:20c6%em0 prefixlen 64 scopeid 0x1
        inet6 2001:4ba0:ffff:ab::1 prefixlen 64
~ # route add -inet6 -iface -ifp em0 -host 2001:4ba0:ffff:1:beef::1 \
-prefixlen 64 2001:4ba0:ffff:ab::1
add host 2001:4ba0:ffff:1:beef::1: gateway 2001:4ba0:ffff:ab::1
~ # route add -inet6 default 2001:4ba0:ffff:1:beef::1
add net default: gateway 2001:4ba0:ffff:1:beef::1
~ # route -n show -inet6
Routing tables

Internet6:
Destination                        Gateway                        Flags
  Refs      Use   Mtu  Prio Iface
::/104                             ::1                            UGRS
     0        0     -     8 lo0
::/96                              ::1                            UGRS
     0        0     -     8 lo0
default                            2001:4ba0:ffff:1:beef::1        UGS
      0        0     -     8 em0
::1                                ::1                            UH
    14        0 33144     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:4ba0:ffff:1:beef::1            2001:4ba0:ffff:ab::1            UHS
       1        0     -     8 em0
2001:4ba0:ffff:ab::/64             link#1                         UC
     0        0     -     4 em0
2001:4ba0:ffff:ab::1               00:25:90:e0:20:c6              HL
     0        0     -     4 lo0
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::%em0/64                      link#1                         UC
     0        0     -     4 em0
fe80::225:90ff:fee0:20c6%em0       00:25:90:e0:20:c6              HL
     0        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::%em0/32                      link#1                         UC
     0        0     -     4 em0
ff01::%lo0/32                      fe80::1%lo0                    UC
     0        0     -     4 lo0
ff02::/16                          ::1                            UGRS
     0        0     -     8 lo0
ff02::%em0/32                      link#1                         UC
     0        0     -     4 em0
ff02::%lo0/32                      fe80::1%lo0                    UC
     0        0     -     4 lo0

Pinging any ipv6 host is gives me "No route to host":
~ # ping6 ipv6.google.com
PING6(56=40+8+8 bytes) 2001:4ba0:ffff:ab::1 --> 2a00:1450:4005:808::1011
ping6: sendmsg: No route to host
ping6: wrote ipv6.l.google.com 16 chars, ret=-1
ping6: sendmsg: No route to host
ping6: wrote ipv6.l.google.com 16 chars, ret=-1
ping6: sendmsg: No route to host
ping6: wrote ipv6.l.google.com 16 chars, ret=-1
ping6: sendmsg: No route to host
ping6: wrote ipv6.l.google.com 16 chars, ret=-1

I can't even reach the gateway:
~ # ping6 2001:4ba0:ffff:1:beef::1
PING6(56=40+8+8 bytes) 2001:4ba0:ffff:ab::1 --> 2001:4ba0:ffff:1:beef::1
^C
--- 2001:4ba0:ffff:1:beef::1 ping6 statistics ---
34 packets transmitted, 0 packets received, 100.0% packet loss

Pinging the interface is working:
~ # ping6 2001:4ba0:ffff:ab::1
PING6(56=40+8+8 bytes) 2001:4ba0:ffff:ab::1 --> 2001:4ba0:ffff:ab::1
16 bytes from 2001:4ba0:ffff:ab::1, icmp_seq=0 hlim=64 time=0.052 ms
16 bytes from 2001:4ba0:ffff:ab::1, icmp_seq=1 hlim=64 time=0.031 ms
^C
--- 2001:4ba0:ffff:ab::1 ping6 statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 0.031/0.041/0.052/0.011 ms

Trying to set the route just as default isn't working:
~ # route add -inet6 default 2001:4ba0:ffff:1:beef::1
route: writing to routing socket: Network is unreachable
add net default: gateway 2001:4ba0:ffff:1:beef::1: Network is unreachable

Anyone has any idea how i can reach the gateway?

Cheers,
Marc

dmesg:

OpenBSD 5.4-current (GENERIC.MP) #0: Wed Nov 20 12:27:18 CET 2013
    [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 17144807424 (16350MB)
avail mem = 16680275968 (15907MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0x9ac00 (26 entries)
bios0: vendor American Megatrends Inc. version "1.0a" date 05/22/2013
bios0: Supermicro AS -3012MA-H12TRF-MM001
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP APIC MCFG OEMB HPET SSDT EINJ BERT ERST HEST
acpi0: wakeup devices PC02(S4) PC03(S4) SBAZ(S4) PSKE(S4) PSMS(S4)
ECIR(S4) P0PC(S4) UHC1(S4) UHC2(S4) UHC3(S4) USB4(S4) UHC5(S4) UHC6(S4)
UHC7(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 16 (boot processor)
cpu0: AMD Opteron(tm) Processor 3365 , 2300.30 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,NODEID,TBM,TOPEXT,ITSC,BMI1
cpu0: 64KB 64b/line 2-way I-cache, 16KB 64b/line 4-way D-cache, 2MB
64b/line 16-way L2 cache, 8MB 64b/line 64-way L3 cache
cpu0: ITLB 48 4KB entries fully associative, 24 4MB entries fully
associative
cpu0: DTLB 64 4KB entries fully associative, 64 4MB entries fully
associative
cpu0: smt 0, core 0, package 0
cpu0: apic clock running at 200MHz
cpu0: mwait min=64, max=64, C-substates=0.0.0.0.0, IBE
cpu1 at mainbus0: apid 17 (application processor)
cpu1: AMD Opteron(tm) Processor 3365 , 220.68 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,NODEID,TBM,TOPEXT,ITSC,BMI1
cpu1: 64KB 64b/line 2-way I-cache, 16KB 64b/line 4-way D-cache, 2MB
64b/line 16-way L2 cache, 8MB 64b/line 64-way L3 cache
cpu1: ITLB 48 4KB entries fully associative, 24 4MB entries fully
associative
cpu1: DTLB 64 4KB entries fully associative, 64 4MB entries fully
associative
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 18 (application processor)
cpu2: AMD Opteron(tm) Processor 3365 , 220.66 MHz
cpu2:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,NODEID,TBM,TOPEXT,ITSC,BMI1
cpu2: 64KB 64b/line 2-way I-cache, 16KB 64b/line 4-way D-cache, 2MB
64b/line 16-way L2 cache, 8MB 64b/line 64-way L3 cache
cpu2: ITLB 48 4KB entries fully associative, 24 4MB entries fully
associative
cpu2: DTLB 64 4KB entries fully associative, 64 4MB entries fully
associative
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 19 (application processor)
cpu3: AMD Opteron(tm) Processor 3365 , 220.67 MHz
cpu3:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,NODEID,TBM,TOPEXT,ITSC,BMI1
cpu3: 64KB 64b/line 2-way I-cache, 16KB 64b/line 4-way D-cache, 2MB
64b/line 16-way L2 cache, 8MB 64b/line 64-way L3 cache
cpu3: ITLB 48 4KB entries fully associative, 24 4MB entries fully
associative
cpu3: DTLB 64 4KB entries fully associative, 64 4MB entries fully
associative
cpu3: smt 0, core 3, package 0
cpu4 at mainbus0: apid 20 (application processor)
cpu4: AMD Opteron(tm) Processor 3365 , 220.64 MHz
cpu4:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,NODEID,TBM,TOPEXT,ITSC,BMI1
cpu4: 64KB 64b/line 2-way I-cache, 16KB 64b/line 4-way D-cache, 2MB
64b/line 16-way L2 cache, 8MB 64b/line 64-way L3 cache
cpu4: ITLB 48 4KB entries fully associative, 24 4MB entries fully
associative
cpu4: DTLB 64 4KB entries fully associative, 64 4MB entries fully
associative
cpu4: smt 0, core 4, package 0
cpu5 at mainbus0: apid 21 (application processor)
cpu5: AMD Opteron(tm) Processor 3365 , 220.68 MHz
cpu5:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,NODEID,TBM,TOPEXT,ITSC,BMI1
cpu5: 64KB 64b/line 2-way I-cache, 16KB 64b/line 4-way D-cache, 2MB
64b/line 16-way L2 cache, 8MB 64b/line 64-way L3 cache
cpu5: ITLB 48 4KB entries fully associative, 24 4MB entries fully
associative
cpu5: DTLB 64 4KB entries fully associative, 64 4MB entries fully
associative
cpu5: smt 0, core 5, package 0
cpu6 at mainbus0: apid 22 (application processor)
cpu6: AMD Opteron(tm) Processor 3365 , 220.65 MHz
cpu6:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,NODEID,TBM,TOPEXT,ITSC,BMI1
cpu6: 64KB 64b/line 2-way I-cache, 16KB 64b/line 4-way D-cache, 2MB
64b/line 16-way L2 cache, 8MB 64b/line 64-way L3 cache
cpu6: ITLB 48 4KB entries fully associative, 24 4MB entries fully
associative
cpu6: DTLB 64 4KB entries fully associative, 64 4MB entries fully
associative
cpu6: smt 0, core 6, package 0
cpu7 at mainbus0: apid 23 (application processor)
cpu7: AMD Opteron(tm) Processor 3365 , 220.67 MHz
cpu7:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBSisa0
at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
wbsio0 at isa0 port 0x2e/2: W83627DHG-P rev 0x73
wbsio0 port 0xa10/2 not configured
usb6 at ohci4: USB revision 1.0
uhub6 at usb6 "ATI OHCI root hub" rev 1.00/1.00 addr 1
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
uhidev0 at uhub5 port 2 configuration 1 interface 0 "Winbond Electronics
Corp Hermon USB hidmouse Device" rev 1.10/0.01 addr 2
uhidev0: iclass 3/1
ums0 at uhidev0: 3 buttons, Z dir
wsmouse0 at ums0 mux 0
uhidev1 at uhub5 port 2 configuration 1 interface 1 "Winbond Electronics
Corp Hermon USB hidmouse Device" rev 1.10/0.01 addr 2
uhidev1: iclass 3/1
ukbd0 at uhidev1: 8 variable keys, 6 key codes
wskbd1 at ukbd0 mux 1
wskbd1: connecting to wsdisplay0
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
sd2 at scsibus2 targ 1 lun 0: <OPENBSD, SR RAID 1, 005> SCSI2 0/direct fixed
sd2: 952839MB, 512 bytes/sector, 1951415025 sectors
root on sd2a (ce89b172120320c2.a) swap on sd2b dump on sd2b

Reply via email to