tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

ipv6 gateway on different subnet



Hello,

I cannot get ipv6 working on a vps server. The gateway is on a /48 and
my ip block is on a /64.
Gateway: 2602:fed2:7116::1
My block: 2602:fed2:7116:d82c::/64

I can get it to work temporarily, but after a few minutes it stops
working and I cannot ping outside the gateway. After I ping the
gateway, it works for a few minutes and then dies.

Sort-of working configuration.

/etc/rc.conf
defaultroute="23.173.152.1"

ifconfig_vioif0="
    inet 23.173.152.249 netmask 255.255.255.0
    inet6 2602:fed2:7116:d82c::1 prefixlen 64 alias
"
dns_nameservers="9.9.9.9 2620:fe::fe"


/etc/hosts
2602:fed2:7116::1    ggate


#route add -inet6 -interface 2602:fed2:7116::/48 2602:fed2:7116:d82c::
#route add -inet6 default 2602:fed2:7116::1
#ndp -s ggate d8:67:d9:58:3d:1b   (mac address of 7116::1 gateway)

I can replace the first 2 commands with this, but it works the same. I
found this in an older thread below, which seemed to work for them.
#route add -inet6 -net 2602:fed2:7116::1/48 -link -cloning -iface vioif0
#route add -inet6 default -ifa 2602:fed2:7116:d82c::1 2602:fed2:7116::1

https://mail-index.netbsd.org/tech-net/2015/02/27/msg004987.html
From that thread it sounds like this is a terrible setup, but this
suggestion was made.

"
If I were faced by such a thing, I'd either (a) add an address to my
interface that's on-subnet for the gateway, or (b) do that once and ARP
to get the MAC, then hardwire an ARP entry for a fictitions address
that _is_ on my subnet and configure that as my gateway.
"

So I tried those suggestions, but don't really know what I'm doing
here, and they didn't work.
a) used the mac of the real gateway, and assigned it an address on my block
#ifconfig vioif0 inet6 2602:fed2:7116:d82c::f prefixlen 64 alias
(tried with and without doing this first)
/etc/hosts
2602:fed2:7116:d82c::f        ggate
#ndp -s ggate d8:67:d9:58:3d:1b
#route add -inet6 default 2602:fed2:7116:d82c::f

b) made a linklocal address and assigned it to the mac of real gateway
/etc/hosts
fd08:64af:75da::1        ggate
#route add -inet6 default fd08:64af:75da::1
#ndp -s ggate d8:67:d9:58:3d:1b

There's a lot more info posted below, but it's mostly just trial and
error until I got the sort-of working solution at the top.
https://www.unitedbsd.com/d/1491-ipv6-address-and-subnet-configuration

Same problem, same provider on a different server with Freebsd.
https://forums.freebsd.org/threads/ipv6-gateway-and-subnet-issue-on-vps-server.93750/#post-661665

Thanks for reading.
-- 
Peter


Home | Main Index | Thread Index | Old Index