首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用带有netplan的Ubuntu18.04的Rocky发行版

使用带有netplan的Ubuntu18.04的Rocky发行版
EN

Ask Ubuntu用户
提问于 2018-12-14 16:01:13
回答 1查看 1.7K关注 0票数 0

我目前使用牛顿与ubuntu 16.04,并希望迁移到洛基通过Ubuntu 18.04。但是我发现Ubuntu18.04正在使用netplan而不是ifupdown来管理网络资源。我意识到这更多的是一个Openstack问题,但是由于Openstack在网络中需要相当多的复杂性,所以我认为在这里发布这个问题更合适。

我有以下的ubuntu16.04接口文件,并查看如何将该设置转换为netplan的文档?

有人能帮忙吗?谢谢

这是我当前的ifupdown配置

代码语言:javascript
复制
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*.cfg

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eno1
iface eno1 inet manual

auto eno2
iface eno2 inet manual

auto eno3
iface eno3 inet manual
    mtu 9000

auto eno4
iface eno4 inet manual

# Container/Host management bridge
auto br-mgmt
iface br-mgmt inet static
    bridge_stp off
    bridge_waitport 0
    bridge_fd 0
    bridge_ports eno2
    address 10.10.10.10
    netmask 255.255.255.0

# OpenStack Networking VXLAN (tunnel/overlay) bridge
auto br-vxlan
iface br-vxlan inet static
    bridge_stp off
    bridge_waitport 0
    bridge_fd 0
    bridge_ports eno3
    address 10.10.11.10
    netmask 255.255.255.0
    mtu 9000

# OpenStack Networking VLAN bridge
auto br-vlan
iface br-vlan inet static
    bridge_stp off
    bridge_waitport 0
    bridge_fd 0
    bridge_ports eno1
    address x.x.14.50
    netmask 255.255.240.0
    network x.x.0.0
    broadcast x.x.15.255
    gateway x.x.10.15
    # dns-* options are implemented by the resolvconf package, if installed
    dns-nameservers x.x.0.254 x.x.0.250
    dns-search domlinast.loc
    pre-up ip link add br-vlan-veth type veth peer name eth12 || true
    pre-up ip link set br-vlan-veth up
    pre-up ip link set eth12 up
    post-down ip link del br-vlan-veth || true
    bridge_ports eno1 br-vlan-veth

# Storage bridge
auto br-storage
iface br-storage inet static
    bridge_stp off
    bridge_waitport 0
    bridge_fd 0
    bridge_ports eno4
    address 10.10.12.10
    netmask 255.255.255.0
EN

回答 1

Ask Ubuntu用户

发布于 2019-01-06 03:29:59

下面是我正在使用的一个netplan配置示例:

代码语言:javascript
复制
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    eno1:
      dhcp4: no
      dhcp6: no
# When using bridging move this block to the bridge definition or it wont work... dont really kno why
#      addresses: [192.168.2.22/24]
#      gateway4: 192.168.2.1
#      nameservers:
#              addresses: [8.8.8.8,8.8.4.4]
  bridges:
    br0:
      addresses: [192.168.2.22/24]
      gateway4: 192.168.2.1
      nameservers:
              addresses: [8.8.8.8,8.8.4.4]
      parameters:
              stp: false
              forward-delay: 0
      interfaces: [eno1]

一旦设置了文件,就需要应用它:

代码语言:javascript
复制
# netplan apply
票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1100911

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档