I have a dedicated server hosted in a local data center and VMware Esxi 7 is installed on it . I recently ordered an IPv6 range and as soon as they told me that the IPv6 range is activated , I noticed that all VMs within VMware Esxi have automatically received an IPv6 without me setting up anything in VMware Esxi or on the guest operating systems such as an Ubuntu 22 VM .
I noticed that my IPv6 connectivity is lost on Ubuntu 22 VM (or any other VMs) after exactly 30 minutes! After I reboot the VM , IPv6 starts working and stops working again at exactly 30 minutes.
This is the output of ip -6 route command in Ubuntu 22 VM when IPv6 is working :
root@testsocat:~# ip -6 route
::1 dev lo proto kernel metric 256 pref medium
2a05:1a18:0:12::/64 dev ens160 proto ra metric 1024 expires 2591592sec pref medium
fe80::/64 dev ens160 proto kernel metric 256 pref medium
default via fe80::82e0:1dff:fe6f:3e00 dev ens160 proto ra metric 1024 expires 1392sec mtu 1500 pref medium
This is the output of ip -6 route command in Ubuntu 22 VM when IPv6 is not working and has disappeared after 30 minutes :
root@testsocat:~# ip -6 route
::1 dev lo proto kernel metric 256 pref medium
2a05:1a18:0:12::/64 dev ens160 proto ra metric 1024 expires 2589957sec pref medium
fe80::/64 dev ens160 proto kernel metric 256 pref medium
As you can see this entry is removed after 30 minutes :
default via fe80::82e0:1dff:fe6f:3e00 dev ens160 proto ra metric 1024 expires 1392sec mtu 1500 pref medium
I then manually added the gateway route back with this command :
ip -6 route add default via fe80::82e0:1dff:fe6f:3e00 dev ens160
By doing this , the IPv6 starts working again and doesn't stop working even after 30 minutes !
The data center is insisting their IPv6 range configuration is OK and problem is on our side . However , I have tested this on multiple VMs ( Ubuntu , Centos and Windows ) . It happens on all of them . Also I don't see any settings on VMware that can cause IPv6 addresses to stop working after 30 minutes .
Can anyone help me understand what is wrong here ? Why does the automatically assigned IPv6 disappears from VMs at exactly 30 minutes? Why does it work again when I reboot the VM ? Why doesn't it stop working when I manually add the gateway route back in the guest OS ?
I have another dedicated server with the same setup in another datacenter that has an IPv6 range but doesn't have this issue . Have they messed up any parameters while configuring my IPv6 range?
I would be really thankful if you could help me understand what's wrong and fix it . I have been dealing with this for days now .
EDIT 1 : Using "rdisc6 ens160" , I was able to get the default route to show up again . Here is the output of the command in full :
root@testsocat:~# rdisc6 ens160
Soliciting ff02::2 (ff02::2) on ens160...
Hop limit : 64 ( 0x40)
Stateful address conf. : No
Stateful other conf. : No
Mobile home agent : No
Router preference : medium
Neighbor discovery proxy : No
Router lifetime : 1800 (0x00000708) seconds
Reachable time : unspecified (0x00000000)
Retransmit time : unspecified (0x00000000)
Source link-layer address: 80:E0:1D:6F:3E:00
MTU : 1500 bytes (valid)
Prefix : 2a05:1a18:0:12::/64
On-link : Yes
Autonomous address conf.: Yes
Valid time : 2592000 (0x00278d00) seconds
Pref. time : 604800 (0x00093a80) seconds
from fe80::82e0:1dff:fe6f:3e00
root@testsocat:~# ip -6 route
::1 dev lo proto kernel metric 256 pref medium
2a05:1a18:0:12::/64 dev ens160 proto ra metric 1024 expires 2591981sec pref medium
fe80::/64 dev ens160 proto kernel metric 256 pref medium
default via fe80::82e0:1dff:fe6f:3e00 dev ens160 proto ra metric 1024 expires 1781sec mtu 1500 pref medium
EDIT 2 : using "tshark -n -i ens160 -f icmp6 -Y "icmpv6.type == 134" -VO "frame,icmpv6" , This is what I got :
** (tshark:5007) 00:28:32.821551 [Main MESSAGE] -- Capture started.
** (tshark:5007) 00:28:32.822018 [Main MESSAGE] -- File: "/tmp/wireshark_ens160 7OI6P2.pcapng"
Frame 2: 118 bytes on wire (944 bits), 118 bytes captured (944 bits) on interfac e ens160, id 0
Interface id: 0 (ens160)
Interface name: ens160
Encapsulation type: Ethernet (1)
Arrival Time: Jul 10, 2024 00:29:25.087268913 UTC
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1720571365.087268913 seconds
[Time delta from previous captured frame: 0.002588177 seconds]
[Time delta from previous displayed frame: 0.000000000 seconds]
[Time since reference or first frame: 0.002588177 seconds]
Frame Number: 2
Frame Length: 118 bytes (944 bits)
Capture Length: 118 bytes (944 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ethertype:ipv6:icmpv6]
Ethernet II, Src: 80:e0:1d:6f:3e:00, Dst: 00:0c:29:ea:8d:6f
Internet Protocol Version 6, Src: fe80::82e0:1dff:fe6f:3e00, Dst: fe80::6f36:a5e 0:992f:72bd
Internet Control Message Protocol v6
Type: Router Advertisement (134)
Code: 0
Checksum: 0xff54 [correct]
[Checksum Status: Good]
Cur hop limit: 64
Flags: 0x00, Prf (Default Router Preference): Medium
0... .... = Managed address configuration: Not set
.0.. .... = Other configuration: Not set
..0. .... = Home Agent: Not set
...0 0... = Prf (Default Router Preference): Medium (0)
.... .0.. = Proxy: Not set
.... ..0. = Reserved: 0
Router lifetime (s): 1800
Reachable time (ms): 0
Retrans timer (ms): 0
ICMPv6 Option (Source link-layer address : 80:e0:1d:6f:3e:00)
Type: Source link-layer address (1)
Length: 1 (8 bytes)
Link-layer address: 80:e0:1d:6f:3e:00
ICMPv6 Option (MTU : 1500)
Type: MTU (5)
Length: 1 (8 bytes)
Reserved
MTU: 1500
ICMPv6 Option (Prefix information : 2a05:1a18:0:12::/64)
Type: Prefix information (3)
Length: 4 (32 bytes)
Prefix Length: 64
Flag: 0xc0, On-link flag(L), Autonomous address-configuration flag(A)
1... .... = On-link flag(L): Set
.1.. .... = Autonomous address-configuration flag(A): Set
..0. .... = Router address flag(R): Not set
...0 0000 = Reserved: 0
Valid Lifetime: 2592000
Preferred Lifetime: 604800
Reserved
Prefix: 2a05:1a18:0:12::
EDIT 3 : A second RA packet has arrived ! the timestamp is interesting . First one was sent at 00:29:25 , Second one is sent at 01:04:24 . There is a 35 minutes gap between them and router lifetime is 30 minutes !
Frame 45: 118 bytes on wire (944 bits), 118 bytes captured (944 bits) on interface ens160, id 0
Interface id: 0 (ens160)
Interface name: ens160
Encapsulation type: Ethernet (1)
Arrival Time: Jul 10, 2024 01:04:24.430745189 UTC
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1720573464.430745189 seconds
[Time delta from previous captured frame: 0.002469817 seconds]
[Time delta from previous displayed frame: 2099.343476276 seconds]
[Time since reference or first frame: 2099.346064453 seconds]
Frame Number: 45
Frame Length: 118 bytes (944 bits)
Capture Length: 118 bytes (944 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ethertype:ipv6:icmpv6]
Ethernet II, Src: 80:e0:1d:6f:3e:00, Dst: 00:0c:29:12:f4:07
Internet Protocol Version 6, Src: fe80::82e0:1dff:fe6f:3e00, Dst: fe80::905f:89e5:45e4:2838
Internet Control Message Protocol v6
Type: Router Advertisement (134)
Code: 0
Checksum: 0x97f7 [correct]
[Checksum Status: Good]
Cur hop limit: 64
Flags: 0x00, Prf (Default Router Preference): Medium
0... .... = Managed address configuration: Not set
.0.. .... = Other configuration: Not set
..0. .... = Home Agent: Not set
...0 0... = Prf (Default Router Preference): Medium (0)
.... .0.. = Proxy: Not set
.... ..0. = Reserved: 0
Router lifetime (s): 1800
Reachable time (ms): 0
Retrans timer (ms): 0
ICMPv6 Option (Source link-layer address : 80:e0:1d:6f:3e:00)
Type: Source link-layer address (1)
Length: 1 (8 bytes)
Link-layer address: 80:e0:1d:6f:3e:00
ICMPv6 Option (MTU : 1500)
Type: MTU (5)
Length: 1 (8 bytes)
Reserved
MTU: 1500
ICMPv6 Option (Prefix information : 2a05:1a18:0:12::/64)
Type: Prefix information (3)
Length: 4 (32 bytes)
Prefix Length: 64
Flag: 0xc0, On-link flag(L), Autonomous address-configuration flag(A)
1... .... = On-link flag(L): Set
.1.. .... = Autonomous address-configuration flag(A): Set
..0. .... = Router address flag(R): Not set
...0 0000 = Reserved: 0
Valid Lifetime: 2592000
Preferred Lifetime: 604800
Reserved
Prefix: 2a05:1a18:0:12::
EDIT 4 : OK , I'm now confused ! the RA packets 3 and 4 have arrived and they are sent sooner this time . third packet arrived at 01:26:15 ( 22 minutes gap between this one and previous one ) and the fourth packet arrived at 01:30:35 ( 4 minutes after the 3rd one ) .
Frame 50: 118 bytes on wire (944 bits), 118 bytes captured (944 bits) on interface ens160, id 0
Interface id: 0 (ens160)
Interface name: ens160
Encapsulation type: Ethernet (1)
Arrival Time: Jul 10, 2024 01:26:15.149204151 UTC
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1720574775.149204151 seconds
[Time delta from previous captured frame: 0.001792901 seconds]
[Time delta from previous displayed frame: 1310.718458962 seconds]
[Time since reference or first frame: 3410.064523415 seconds]
Frame Number: 50
Frame Length: 118 bytes (944 bits)
Capture Length: 118 bytes (944 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ethertype:ipv6:icmpv6]
Ethernet II, Src: 80:e0:1d:6f:3e:00, Dst: 00:0c:29:78:ad:1b
Internet Protocol Version 6, Src: fe80::82e0:1dff:fe6f:3e00, Dst: fe80::402b:9e4e:408f:3ae4
Internet Control Message Protocol v6
Type: Router Advertisement (134)
Code: 0
Checksum: 0xc66b [correct]
[Checksum Status: Good]
Cur hop limit: 64
Flags: 0x00, Prf (Default Router Preference): Medium
0... .... = Managed address configuration: Not set
.0.. .... = Other configuration: Not set
..0. .... = Home Agent: Not set
...0 0... = Prf (Default Router Preference): Medium (0)
.... .0.. = Proxy: Not set
.... ..0. = Reserved: 0
Router lifetime (s): 1800
Reachable time (ms): 0
Retrans timer (ms): 0
ICMPv6 Option (Source link-layer address : 80:e0:1d:6f:3e:00)
Type: Source link-layer address (1)
Length: 1 (8 bytes)
Link-layer address: 80:e0:1d:6f:3e:00
ICMPv6 Option (MTU : 1500)
Type: MTU (5)
Length: 1 (8 bytes)
Reserved
MTU: 1500
ICMPv6 Option (Prefix information : 2a05:1a18:0:12::/64)
Type: Prefix information (3)
Length: 4 (32 bytes)
Prefix Length: 64
Flag: 0xc0, On-link flag(L), Autonomous address-configuration flag(A)
1... .... = On-link flag(L): Set
.1.. .... = Autonomous address-configuration flag(A): Set
..0. .... = Router address flag(R): Not set
...0 0000 = Reserved: 0
Valid Lifetime: 2592000
Preferred Lifetime: 604800
Reserved
Prefix: 2a05:1a18:0:12::
Frame 55: 118 bytes on wire (944 bits), 118 bytes captured (944 bits) on interface ens160, id 0
Interface id: 0 (ens160)
Interface name: ens160
Encapsulation type: Ethernet (1)
Arrival Time: Jul 10, 2024 01:30:35.107428556 UTC
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1720575035.107428556 seconds
[Time delta from previous captured frame: 0.002612786 seconds]
[Time delta from previous displayed frame: 259.958224405 seconds]
[Time since reference or first frame: 3670.022747820 seconds]
Frame Number: 55
Frame Length: 118 bytes (944 bits)
Capture Length: 118 bytes (944 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ethertype:ipv6:icmpv6]
Ethernet II, Src: 80:e0:1d:6f:3e:00, Dst: 00:0c:29:ea:8d:6f
Internet Protocol Version 6, Src: fe80::82e0:1dff:fe6f:3e00, Dst: fe80::6f36:a5e0:992f:72bd
Internet Control Message Protocol v6
Type: Router Advertisement (134)
Code: 0
Checksum: 0xff54 [correct]
[Checksum Status: Good]
Cur hop limit: 64
Flags: 0x00, Prf (Default Router Preference): Medium
0... .... = Managed address configuration: Not set
.0.. .... = Other configuration: Not set
..0. .... = Home Agent: Not set
...0 0... = Prf (Default Router Preference): Medium (0)
.... .0.. = Proxy: Not set
.... ..0. = Reserved: 0
Router lifetime (s): 1800
Reachable time (ms): 0
Retrans timer (ms): 0
ICMPv6 Option (Source link-layer address : 80:e0:1d:6f:3e:00)
Type: Source link-layer address (1)
Length: 1 (8 bytes)
Link-layer address: 80:e0:1d:6f:3e:00
ICMPv6 Option (MTU : 1500)
Type: MTU (5)
Length: 1 (8 bytes)
Reserved
MTU: 1500
ICMPv6 Option (Prefix information : 2a05:1a18:0:12::/64)
Type: Prefix information (3)
Length: 4 (32 bytes)
Prefix Length: 64
Flag: 0xc0, On-link flag(L), Autonomous address-configuration flag(A)
1... .... = On-link flag(L): Set
.1.. .... = Autonomous address-configuration flag(A): Set
..0. .... = Router address flag(R): Not set
...0 0000 = Reserved: 0
Valid Lifetime: 2592000
Preferred Lifetime: 604800
Reserved
Prefix: 2a05:1a18:0:12::
tshark -n -i ens160 -f icmp6 -Y "icmpv6.type == 134" -VO "frame,icmpv6"
? (Yes the icmp6 and icmpv6 are spelled differently.) Leave it running for the half hour, and note down when the "Router Advertisement" packets arrive and what "Router Lifetime" they indicate – the datacenter needs to be sending them every 1/2~1/3 of that lifetime.rdisc6 ens160
causes the "default" route to show up automatically? (Basically, if the route doesn't show up even if RAs arrive and have a nonzero Lifetime, it's likely your server's config issue; whereas if RAs don't arrive on schedule but manually requesting one does cause the route to show up, that's likely a network issue.)