1

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!

2 Answers 2

2

To determine if IPv6 connectivity works we need to verify 3 things as follows:

  1. OS and NAT router must handle IPv6 traffic (software is ready?)
  2. OS NIC and NAT router must be "configured" for IPv6 (ex. being assigned an address)
  3. A test should be performed after previous 2 steps are handled

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:

https://ipv6test.google.com/

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.

4
  • @terdon Thank you, I have edited my post with steps to configure IPv6 networking if any of the steps fails. This is not debian specific btw. will work on any Linux system. Commented Apr 10, 2024 at 18:01
  • Thanks! Any system with systemd or any Linux? 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. Commented Apr 10, 2024 at 18:12
  • @terdon Any system with systemd yes, but I'm not sure if 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. Commented Apr 10, 2024 at 18:14
  • 1
    Thanks, the pinging another computer gave me an idea to check if there are IPv6 neighbors with ip -6 neighbor show, which was also useful Commented Apr 11, 2024 at 9:22
0

as said in serverfault, to show the localy listed ipv6 address one can use

ip -6 addr
1
  • That would only show if the machine I'm working on has an IPv6 address right? Would it be helpful if IPv6 is not available in the network? Commented Apr 10, 2024 at 16:56

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.