• 确博日记
  • 工作时间:09:30 pm-06:24 pm

Debian 11/12单网卡配置或绑定多个IP的方法

vim编辑网卡配置文件
vim /etc/network/interfaces
然后新增一行写入将要绑定的IP地址,如下:
up ip addr add 192.168.1.2/24 dev eth0
其中192.168.1.20是需要添加的IP地址,eth0是网络接口名称。
保存后重启网络,使配置生效。
sudo systemctl restart networking
  • 在线列表
    1589813