Ubuntu 20.04+22.04版本设置静态IP和多IP

编辑网卡文件
vim /etc/netplan/00-installer-config.yaml

修改为下面内容

network:
  ethernets:
    ens33:
      dhcp4: false
      dhcp6: false
      addresses:
        - 192.168.0.2/24
        - 192.168.0.3/24
        - 192.168.0.4/24
      nameservers:
        addresses: [8.8.8.8, 119.29.29.29]
      routes:
        - to: default
          via: 192.168.0.1
version: 2
renderer: networkd

重启网卡或者系统

netplan apply
sanradar
sanradar
文章: 104

2 评论

  1. This article is fantastic! The insights provided are very valuable. For those interested in exploring more, check out this link: LEARN MORE. Looking forward to the discussion!

留下评论

您的电子邮箱地址不会被公开。 必填项已用 * 标注