OpenWrt Dual Router DHCPv6-PD Prefix Delegation Configuration Tutorial

Core Solution: Configuring OpenWRT_B to Obtain a Subprefix via DHCPv6-PD The core key is to assign a suitable prefix length to the corresponding interface and ensure that DHCPv6 and RA services are correctly enabled. A minimum of /63 is required to allocate a /64 subnet to the next-level router. Step 1: Configure OpenWRT_B’s WAN Port (Connected to OpenWRT_A) Go to the OpenWRT_B management interface → Network → Interfaces Edit the WAN Interface (The physical interface corresponding to the port connected to OpenWRT_A) Protocol: Select “DHCPv6 Client” (If it was previously static or disabled) Switch to the “Advanced Settings” tab: “Request IPv6 Prefix”: Check ✓ “Requested IPv6 Prefix Length”: Select “Automatic” or manually enter 60 Switch to the “Physical Settings” tab: Confirm the interface binding is correct (e.g., eth0.2 or LAN port) Save Step 2: Configure OpenWRT_B’s LAN Port (Connected to Your PC) Still in Network → Interfaces → Edit LAN Interface ...

November 7, 2025 · 2 min · xgDebug

OpenWRT IPv6 Relay Configuration

To keep up with the times and experience the freshness of IPv6, I plan to enable IPv6 on my secondary internal network. Since my home network has two levels, the first level is the main router. It can obtain IPv6 and IPv6-PD (Prefix Delegation) from the carrier and can assign a public IPv6 address to the devices connected to it. The second level is in my study, and it can only obtain a public IPv6 address for itself, but only an internal IPv6 address for the devices connected to it. ...

October 26, 2025 · 2 min · xgDebug

Automatically deploy a Hugo blog to GitHub using a Deploy Key

1: Generate SSH Keys Generate a new SSH key pair in your local terminal: ssh-keygen -t rsa -b 4096 -C "[email protected]" After execution, it will prompt you to specify a filename. Press Enter to use the default path (~/.ssh/id_rsa), and you will receive two files: id_rsa (Private Key) id_rsa.pub (Public Key) 2: Add Deploy Key to the GitHub Pages Repository Open your GitHub Pages repository xgDebug/xgdebug.github.io. Go to Settings -> Deploy keys. Click Add deploy key. Title = Choose a descriptive title (e.g., “Hugo Blog Deployment Key”). Key: Copy and paste the content of the public key id_rsa.pub generated in the previous step. Check Allow write access, as write permissions are required. Click Add key. ...

September 29, 2024 · 2 min · xgDebug

Deploying PyTorch Models to Android using ncnn

Deploying PyTorch Models to Android Phones using NCNN When compiling NCNN, enable Vulkan support for GPU usage by setting -DNCNN_VULKAN=ON. MobileNetV3 Enabling CMAKE 0091 Feature when Compiling to MT cmake_minimum_required(VERSION 3.20.0) cmake_policy(SET CMP0091 NEW) set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") project("client-project") Training YOLO \Envs\torch\Scripts\activate.ps1 python train.py --batch 6 --workers 2 --imgsz 960 --epochs 300 --data "\Core\yaml\data.yaml" --cfg "\Core\yaml\cfg.yaml" --weights \Core\weights\best.pt --device 0 Model Conversion from torch import nn import torch.utils.model_zoo as model_zoo import torch.onnx from libs import define from libs.net import Net from libs.dataset import ImageDataset import os test_data = ImageDataset(define.testPath,False) test_loader = torch.utils.data.DataLoader( test_data, batch_size=1, shuffle=True) device = torch.device("cuda" if torch.cuda.is_available() else "cpu") model = Net(out_dim=19).to(device) model.load_state_dict(torch.load( "./widget/last.pt" )) model.eval() def saveOnnx(): for data, target in test_loader: data, target = data.to(device), target.to(device) label = target.long() y = model(data) # Export the model torch.onnx.export(model, # model being run data, # model input (or a tuple for multiple inputs) "./widget/best.onnx", # where to save the model (can be a file or file-like object) export_params=True, # store the trained parameter weights inside the model file opset_version=10, # the ONNX version to export the model to do_constant_folding=True, # whether to execute constant folding for optimization input_names = ['input'], # the model's input names output_names = ['output'], # the model's output names dynamic_axes={'input' : {0 : 'batch_size'}, # variable lenght axes 'output' : {0 : 'batch_size'}}) traced_script_module = torch.jit.trace(model, data) return saveOnnx() # Conversion os.system("python -m onnxsim ./widget/best.onnx ./widgetbest-sim.onnx") os.system("./bin/onnx2ncnn.exe ./widget/best-sim.onnx ./widget/best.param ./widget/best.bin") os.system("./bin/ncnnoptimize.exe ./widget/best.param ./widget/best.bin ./widget/best-opt.param ./widget/best-opt.bin 65536") python .\export.py --weights weights/best.pt --img 960 --batch 1 --train python -m onnxsim best.onnx best-sim.onnx .\onnx2ncnn.exe best-sim.onnx best.param best.bin ncnnoptimize best.param best.bin best-opt.param best-opt.bin 65536 Git clone ncnn repo with submodule $ git clone https://github.com/Tencent/ncnn.git $ cd ncnn $ git submodule update --init Build for Linux / NVIDIA Jetson / Raspberry Pi Build for Windows x64 using VS2017 Build for macOS Build for ARM Cortex-A family with cross-compiling Build for Hisilicon platform with cross-compiling Build for Android Build for iOS on macOS with xcode Build for WebAssembly Build for AllWinner D1 Build for Loongson 2K1000 Build for Termux on Android Build for Linux Install required build dependencies: ...

September 28, 2024 · 12 min · xgDebug

Pitfalls encountered when installing Stable Diffusion WebUI on Arch

Use Alibaba’s mirror/source instead of Tsinghua’s, as Tsinghua’s source is incomplete. Use python launch.py to install some Git libraries. Install the versioned pip libraries listed in requirements_versions.txt. You can use python webui.py --port=7860 --server=0.0.0.0 --medvram to save VRAM (GPU memory).

September 12, 2023 · 1 min · xgDebug