1. ifconfig  //查看网络相关信息

2. ifconfig eth0 192.168.1.103 netmask 255.255.255.0  //配置eth0的IP地址

3. route -n  //查询路由信息

4. route add default gw 192.168.1.1

 

使用 ifconfig eth0 192.168.1.103 netmask 255.255.255.0 配置IP后开发板重启,IP地址丢失需要重新配置。

vim /etc/network/interfaces

auto eth0
iface eth0 inet static
        address 192.168.1.41
        gateway 192.168.1.1
        netmask 255.255.255.0
        dns-nameserver 114.114.114.114
重启网卡
  ifdown eth0
  ifup eth0
eth0的IP地址则固定。

相关文章:

  • 2021-11-29
  • 2021-09-03
  • 2022-01-03
  • 2022-03-09
  • 2021-05-17
猜你喜欢
  • 2021-07-05
  • 2022-01-22
  • 2021-12-13
  • 2022-12-23
  • 2022-12-23
  • 2021-05-27
相关资源
相似解决方案