Is there a way to find out if the IPv6 network cable is disconnected from the server through the terminal? Pinging google won't work as it could be an intranet.
Any help would be appreciated!
To determine if IPv6 connectivity works we need to verify 3 things as follows:
Step 1: verify OS supports IPv6:
# Show system IPv6 enablement status
sudo sysctl net.ipv6.conf.all.disable_ipv6
If the output of the command above is net.ipv6.conf.all.disable_ipv6 = 0 then IPv6 is enabled, if it's 1 then it's disabled.
If it's 1 then you need to enable it so that the change persists reboots as follows:
sudo nano /etc/sysctl.conf
# Uncomment or add the following line and set it to 0:
net.ipv6.conf.all.disable_ipv6=0
# Apply changes (procps gathers information about processes via the /proc directory)
sudo systemctl restart procps
# Read values from /etc/sysctl.conf
sudo sysctl -p
Step 1: verify NAT router supports IPv6:
For this to test run the following command against another computer on your local subnet, ex. your phone or laptop that is known to have IPv6 enabled
# Replace address to target system
ping6 <IPv6 address here> # Your other computer known to have enabled IPv6
If the other computer does not have enabled IPv6 follow previous step to enable ti there as well (almost all mobile phones do have IPv6 address assigned if your router is IPv6 capable)
If you get response from ping6 command this means your router does handle IPv6 on local subnet only but not to\from WAN
Steps 2: verify OS NIC is configured for IPv6:
ip -6 addr show
From the output identify your NIC has IPv6 address assigned.
If it doesn't you'll need to make sure your NAT router has DHCPv6 configured to obtain IPv6 link local address.
Step 2: verify NAT router is configured with IPv6:
Login to your router and under status page or similar verify your NAT router has public IPv6 address, DHCPv6 and DNSv6 configured.
If it doesn't then you'll need to contact your ISP and ask them to set IPv6 public address to your router.
Whether they'll be able to do this depends on if your router is IPv6 capable and whether they'll be willing to do it.
Step 3. A test should be performed
ping6 ipv6.google.com
If you get response IPv6 connectivity works.
An alternative is to visit the following site to check IPv6 connectivity:
NOTE: You will also need to check your firewall such as nftables to ensure IPv6 traffic is handled and that packets are not dropped
NOTE: These steps are not specific to debian but it's specific to systems using systemd, sudo command is used to perform the tasks as root, your Linux system might have other means to do this as root user.
sysctl predates systemd, right? And actually, I think it's also a BSD thing so this might be even more portable than "Linux". I don't know though.
sysctl predates systemd, I think it does. so you're right, my answer might not be universal but shouldn't be hard to convert to other Linux flavors.
ip -6 neighbor show, which was also useful
as said in serverfault, to show the localy listed ipv6 address one can use
ip -6 addr