# IPv6 Setup Guide for PCDN Nodes

### 🚀 1. Why IPv6 is Important

In some regions of Vietnam, the PCDN network relies on IPv6 for stable data routing.\
If IPv6 is not enabled, your node may:

* Fail to connect or stay offline
* Experience upload/download issues
* Miss out on earning rewards

✅ **Enabling IPv6 = better connection, faster transfer, and higher reliability**

### 🧩 2. Quick IPv6 Check

#### ✅ Option 1: Test via Browser

Visit <https://test-ipv6.com/>

* If it shows **“Your IPv6 connection appears to work”** → IPv6 is enabled
* If only IPv4 appears → follow the setup steps below

#### ✅ Option 2: Command Line Test

```bash
ping -6 google.com
```

If you get a response → IPv6 is working\
If you see “Network unreachable” → IPv6 is disabled

### ⚙️ 3. Enable IPv6

#### 💻 On Linux (Ubuntu / Debian / CentOS)

1️⃣ Check IPv6 status

```bash
cat /proc/sys/net/ipv6/conf/all/disable_ipv6
```

If the result is `1`, IPv6 is disabled.

2️⃣ Enable IPv6

```bash
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=0
```

3️⃣ Make it permanent\
Edit `/etc/sysctl.conf` and add:

```
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
```

Then reload:

```bash
sudo sysctl -p
```

4️⃣ Verify

```bash
ip -6 addr show
```

If you see an address starting with `240x:` (e.g., `2405:` or `2401:`), IPv6 is active ✅

***

#### 🪟 On Windows 10 / 11

1️⃣ Go to **Control Panel → Network and Internet → Network Connections**\
2️⃣ Right-click your current connection → **Properties**\
3️⃣ Check **“Internet Protocol Version 6 (TCP/IPv6)”**\
4️⃣ Click OK and restart your computer

💡 Alternatively, via PowerShell (Admin):

```powershell
Enable-NetAdapterBinding -Name "Ethernet" -ComponentID ms_tcpip6
```

***

### 🌐 4. Enable IPv6 on Your Router / VPS

Most Vietnam ISPs (Viettel, VNPT, FPT) support IPv6, but it’s often disabled by default.

#### Home Router Setup

1. Log in to router: `192.168.1.1` or `192.168.0.1`
2. Go to **IPv6 Settings** or **Advanced → IPv6**
3. Enable IPv6
4. Set connection type to **DHCPv6** or **SLAAC**
5. Save and restart router

#### Recommended ISP Settings

| ISP     | Recommended Mode         |
| ------- | ------------------------ |
| Viettel | Auto / DHCPv6            |
| VNPT    | Native IPv6              |
| FPT     | Dual Stack (IPv4 + IPv6) |

#### VPS Users

Before configuring in your OS, ensure IPv6 is **enabled in your VPS dashboard** and that an address has been assigned.

### 🔍 5. Verify IPv6 Connectivity

Run:

```bash
ping6 google.com
```

Or visit: <https://ipv6-test.com/\\>
If it shows **“IPv6 Supported ✅”**, you’re all set!

***

### 🔄 6. Restart Your PCDN Node

Once IPv6 is working, restart your node service:

```bash
sudo systemctl restart pcdn
```

Or use the “Restart Node” option in your dashboard.

***

### ✅ 7. Final Checklist

| Item                             | Status |
| -------------------------------- | ------ |
| IPv6 enabled on OS               | ✅      |
| IPv6 assigned by router/VPS      | ✅      |
| `ping6` test successful          | ✅      |
| Node shows “Online” in dashboard | ✅      |

***

### 💬 Tips & Notes

* For mobile networks (4G/5G), ensure your APN mode is set to **Dual Stack (IPv4 + IPv6)**.
* Some ISPs require enabling DHCPv6 before IPv6 becomes active.
* If you still can’t connect, share a screenshot of your `ip -6 addr show` and test results in the community — our team will help you troubleshoot.

Thank you for helping build a faster, more stable PCDN network! 💪🌍
