You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

DE10 Nano开发板(Debian系统)以太网联网异常:路由表为空无法获取默认网关

DE10 Nano开发板(Debian系统)以太网联网异常:路由表为空无法获取默认网关

Hey there, let's dig into why your route table is coming up empty and you can't get a default gateway on your DE10 Nano running Debian. Looking at the info you shared, here's what's going on and how to fix it:

First, let's spot the key clue from your ifconfig output: your eth0 interface only has an IPv6 link-local address (fe80::4c0:3fff:fe00:d85f) but no IPv4 address at all. Without an IPv4 address assigned, your system can't get a default gateway (since gateways are tied to your IP's network segment), which explains the empty route table from route -ne.

Now let's go through possible fixes based on your setup (direct Ethernet cable to host PC):

  • Check if your host PC's Ethernet sharing is enabled
    Since you're connecting directly to your host, your PC needs to act as a DHCP server and share its internet connection with the DE10 Nano. On Windows, this is under "Network Connections" > right-click your active internet adapter (like WiFi) > "Properties" > "Sharing" tab, then enable sharing for the Ethernet adapter connected to the board. On Linux, you can use tools like dnsmasq to set up a DHCP server on your host's Ethernet interface, or use NetworkManager's connection sharing feature.

  • Verify DHCP is working on the DE10 Nano
    Your /etc/network/interfaces is set to use DHCP for eth0, but maybe the DHCP client isn't running or failed to get an address. Try these steps:

    1. Manually trigger a DHCP request with:
      dhclient eth0
      
      Check if this gives you an IPv4 address (run ifconfig again to verify). If you get errors here, it means the board can't reach a DHCP server (most likely your host PC isn't set up to provide one).
    2. Check if the DHCP client service is running:
      systemctl status dhcpcd
      
      If it's inactive, start it and enable auto-start on boot:
      systemctl start dhcpcd
      systemctl enable dhcpcd
      
  • Fallback to static IP configuration
    If setting up DHCP sharing on your host is tricky, you can manually assign static IPs to both your host's Ethernet interface and the DE10 Nano:

    1. On your host PC, set its Ethernet interface to a static IP like 192.168.1.1 with subnet mask 255.255.255.0.
    2. Edit /etc/network/interfaces on the DE10 Nano to replace the DHCP line with static config:
      iface eth0 inet static
          address 192.168.1.2
          netmask 255.255.255.0
          gateway 192.168.1.1
          dns-nameservers 8.8.8.8 8.8.4.4
      
    3. Restart the network service to apply changes:
      systemctl restart networking
      

    After this, run route -ne again and you should see your default gateway (192.168.1.1) listed.

  • Double-check physical connections
    Even though ifconfig shows eth0 is UP, it's worth swapping the Ethernet cable or re-seating both ends to rule out a faulty cable or loose connection.


备注:内容来源于stack exchange,提问作者programmer25

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.22 08:45:31