outime/ipv6-dhclient-script

Debian 8 support (Proxmox VE 4.x)

albertdb opened this issue · 22 comments

I'm having troubles to configure a Debian 8 dedibox with Proxmox VE 4.1.

Interface vmbr0 gets configured (correct IPv6), but every time I try to go out of the box, I receive a Network is unreachable error. I've checked and no routes are defined.

Any help would be appreciated.

Have you checked this issue?

Yes, and the only sysctl directives that I was still missing were:

net.ipv6.conf.default.forwarding = 1
net.ipv6.conf.default.proxy_ndp = 1

I'll tell you in a minute if it works.

DHCPv6 leases work, but routes are not added automatically. I had to find the router IPv6 address running dhclient -cf /etc/dhcp/dhclient6.conf -6 -P -v vmbr0 and manually add route ip -6 route add default via ROUTERIPv6 dev vmbr0 in order to be able to reach Internet.

Something is broken, all this should be automatic.

Solved. See #3

Oh well, I didn't have a chance to find the problem so I really appreciate the effort - merging this now! :)

Well, this is very strange, after half an hour, IPv6 address disappears. I'm going to reboot once again and check if it happens for third time, but I'm not expecting a miracle.

If you enabled the ProxMox firewall, try adding the "NeighborDiscovery" macro.

@albertdb do you have any update?

@outime Not really. I'll try when I have some time with Ubuntu 16.04. I'm dropping the idea of using Proxmox in favour of LXD.

I didn't enable any firewall, BTW.

elgs commented

@albertdb how did you find ROUTERIPv6?

@elgs If you run dhclient -cf /etc/dhcp/dhclient6.conf -6 -P -v vmbr0 you will see it.

elgs commented

When I ran this command, I got something like this. Which is the gateway information? I deliberate changed some bits of the ID's.

Bound to *:546
Listening on Socket/vmbr0
Sending on Socket/vmbr0
PRC: Confirming active lease (INIT-REBOOT).
XMT: Forming Rebind, 0 ms elapsed.
XMT: X-- IA_PD cb:03:d7:31
XMT: | X-- Requested renew +3600
XMT: | X-- Requested rebind +5400
XMT: | | X-- IAPREFIX 2001:bc8🔢100::/56
XMT: | | | X-- Preferred lifetime +7200
XMT: | | | X-- Max lifetime +7500
XMT: V IA_PD appended.
XMT: Rebind on vmbr0, interval 910ms.
XMT: Forming Rebind, 910 ms elapsed.
XMT: X-- IA_PD cb:03:dd:11
XMT: | X-- Requested renew +3600
XMT: | X-- Requested rebind +5400
XMT: | | X-- IAPREFIX 2001:bc8🔢100::/56
XMT: | | | X-- Preferred lifetime +7200
XMT: | | | X-- Max lifetime +7500
XMT: V IA_PD appended.
XMT: Rebind on vmbr0, interval 1750ms.
XMT: Forming Rebind, 2660 ms elapsed.
XMT: X-- IA_PD cb:03:dd:11
XMT: | X-- Requested renew +3600
XMT: | X-- Requested rebind +5400
XMT: | | X-- IAPREFIX 2001:bc8🔢100::/56
XMT: | | | X-- Preferred lifetime +7200
XMT: | | | X-- Max lifetime +7500
XMT: V IA_PD appended.
XMT: Rebind on vmbr0, interval 3530ms.
RCV: Reply message on vmbr0 from 2001:bc8:2::2:111:2.
RCV: X-- Preference 255.
RCV: X-- IA_PD cb:03:dd:11
RCV: | X-- starts 1469249612
RCV: | X-- t1 - renew +43200
RCV: | X-- t2 - rebind +172800
RCV: | X-- [Options]
RCV: | | X-- IAPREFIX 2001:bc8🔢100::/56
RCV: | | | X-- Preferred lifetime 7200.
RCV: | | | X-- Max lifetime 43200.
RCV: X-- Server ID: 00:01:00:01:1b:ac:bc:2d:10:60:12:34:12:34
PRC: Bound to lease 00:01:00:01:1b:ac:bc:2d:10:60:12:34:12:34.

RCV: Reply message on vmbr0 from: [THIS IP]

elgs commented

@albertdb I had two observations:

1: I cannot ping6 the gateway, it says:
ping6 2001:bc8:2::2:111:2 (I deliberate changed the actually value here)
connect: Network is unreachable

2: Each time I ran dhclient -cf /etc/dhcp/dhclient6.conf -6 -P -v vmbr0, I lost the IPv6 address. I have to run service networking restart to get it back.

Do the same things happen in your server? Thanks.

@elgs I cannot confirm because I reinstalled the server and I haven't configured IPv6.

elgs commented

Thanks @albertdb.

I suffered with online.net's support. Probably I didn't pay for their paid services.

Sorry to bump, but did anybody ever find out the reason why ipv6 connectivity is lost after multiple hours?

Im having the same problem. Everything works, until a few hours later, it doesnt...

Edit: It was the fact that the online.net documentation has the dhclient binary in a different place than proxmox per default.... Hence the renew failed when it couldnt find the dhclient.

@p-rintz so what did you do about the host losing the IP address?

For me adding the ip manually would bring everything up again, like:

ip -6 a a 2001:bc8:50ca:101::1/64 dev vmbr0

I have also written a gist about the full configuration steps, here:

https://gist.github.com/DonMcCoy/03623c2b8270fd05a76a436c55b95c50

@DonMcCoy as I wrote in my edit, the online.net documentation simply had the dhclient binary in the wrong place, hence the renew would fail. Changing the config to actually point to where ever your dhclient binary is should be enough if nothing changed. But I havent kept up to date with what online.net is doing.

@p-rintz I understood you fully, but how did you reach to the place where proxmox is expecting dhclient to be, I digged in every possible place, i never found any thing leading that proxmox is trying to start dhclient, I analyzed all logs nothing about proxmox with dhclient to do.
If you just remember where should the dhclient config be, i would be so thankful

Its not about where proxmox expects it to be. Its about where it is and you should change the script to point to. Of course proxmox wont start the dhclient if your script points to the wrong location.

Something like
find / -name "dhclient" 2>/dev/null

Would tell you where the dhclient file is.

Closing this issue due to inactivity. If you're able to reproduce it still, please provide a full report and if possible a machine where I can play around to figure out how to solve it.