• 梦想还是要有的,万一实现了呢...
  • 区块链论坛整装待发...

Ubuntu18.04 配置分配多个公网IP

运维 Vetrue 2个月前 (10-11) 79次浏览 0个评论 二维码链接

文件位置:

cd /etc/netplan

后缀为.yaml 的就是配置文件

# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
  bonds: {}
  bridges: {}
  ethernets:
    ens3:
      addresses:
        - 10.0.0.6/24
        - 10.0.0.7/24
        - 10.0.0.8/24
        - 10.0.0.9/24
        - 10.0.0.10/24
        - 10.0.0.10/24
        - 10.0.0.12/24
        - 10.0.0.13/24
        - 10.0.0.14/24
        - 10.0.0.15/24
        - 10.0.0.16/24
        - 10.0.0.17/24
        - 10.0.0.18/24
        - 10.0.0.19/24
        - 10.0.0.20/24
        - 10.0.0.21/24
        - 10.0.0.22/24
        - 10.0.0.23/24
        - 10.0.0.24/24
        - 10.0.0.25/24
        - 10.0.0.26/24
      critical: true
      dhcp-identifier: mac
      dhcp4: true
      gateway4: 10.0.0.6
      match:
        macaddress: 12:00:17:00:d9:6e
      nameservers:
        addresses:
          - 169.254.169.254
        search:
          - vcn.oraclevcn.com
      set-name: ens3
    ens5:
      addresses:
        - 10.0.0.88/24
      dhcp4: false
      gateway4: 10.0.0.88
      match:
        macaddress: 12:00:17:00:1c:71
      optional: true

sudo netplan apply 应用更改


Vetrue , 版权所有丨如未注明 , 均为原创丨转载请注明原文链接
原文标题:Ubuntu18.04 配置分配多个公网 IP
原文链接:https://vetrue.com/article/317.html
喜欢 (0)
发表我的评论
取消评论
表情 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址