network-diagnostics

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Network-diagnostics

网络诊断

Instructions

操作指南

网络故障排查步骤:

For network troubleshooting:
  1. MTU Issues (common in WSL)
    • Check current MTU: ip link show
    • Test different MTU: sudo ip link set dev eth0 mtu 1350
    • Common WSL MTU: 1300-1400
  2. DNS Resolution
    • Check /etc/resolv.conf
    • Test with: dig google.com, nslookup google.com
    • Try different DNS: 8.8.8.8, 1.1.1.1
  3. Connectivity Tests
    • Ping gateway: ip route | grep default
    • Traceroute to destination
    • Test ports: nc -zv host port, telnet host port
  4. Firewall/Routing
    • Check iptables: sudo iptables -L
    • Review routes: ip route show
    • WSL: Check Windows Firewall
  5. Service Status
    • Verify service is running
    • Check listening ports: ss -tlnp, netstat -tlnp
  • Generate scripts to persist fixes
  • Include checks for WSL vs native Linux
  • Add rollback mechanisms
  1. MTU问题(WSL中常见)
    • 检查当前MTU:ip link show
    • 测试不同MTU值:sudo ip link set dev eth0 mtu 1350
    • WSL常用MTU范围:1300-1400
  2. DNS解析
    • 查看/etc/resolv.conf文件
    • 使用以下命令测试:dig google.com、nslookup google.com
    • 尝试更换DNS服务器:8.8.8.8、1.1.1.1
  3. 连通性测试
    • ping网关:ip route | grep default
    • 追踪到目标地址的路由:traceroute
    • 测试端口:nc -zv host port、telnet host port
  4. 防火墙/路由配置
    • 查看iptables规则:sudo iptables -L
    • 查看路由表:ip route show
    • WSL环境:检查Windows防火墙设置
  5. 服务状态检查
    • 验证服务是否运行
    • 查看监听端口:ss -tlnp、netstat -tlnp
  • 生成用于持久化修复的脚本
  • 包含WSL与原生Linux环境的差异检查
  • 添加回滚机制

Examples

示例

Add examples of how to use this skill here.
在此添加该技能的使用示例。

Notes

说明

  • This skill was auto-generated
  • Edit this file to customize behavior
  • 本技能为自动生成
  • 编辑此文件可自定义其行为