armbian网卡设置静态地址的方法

  1. 创建/etc/network/interfaces.d/eth0 文件,内容如下:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
auto eth0
# 设置静态IP地址
iface eth0 inet static
# 自动开启网卡混杂模式
up ip link set $IFACE promisc on
# 给eth0设置固定的mac地址,自己编一个
hwaddress ether 01:02:03:04:05:06
# armbian的ip地址
address 192.168.3.10
broadcast 192.168.3.255
netmask 255.255.255.0
# 主路由的ip地址
gateway 192.168.3.1
dns-nameservers 192.168.3.1
dns-nameservers 114.114.114.114
  1. 文件建好后,重启N1即可, 重启命令:
    systemctl reboot

armbian网卡设置静态地址的方法
https://hexo.psorai.eu.org/2023/06/06/armbian网卡设置静态地址的方法/
Author
Sora
Posted on
June 6, 2023
Licensed under