如何创建非nat lxd网桥?
我已经尝试了下面的网络信任,然后运行sudo service networking reload、lxc stop和lxc start来处理所涉及的容器。我无法使用非NAT桥使主机和容器都在10.1.1.1/24子网上。在NAT中使用默认的lxdbr0时,一切都很好。
我已经尝试了以下的配置。首先,不分配子网:
config:
ipv4.nat: "false"
ipv6.address: none
description: ""
name: testbr0
type: bridge
used_by:
- /1.0/containers/test
managed: true与分配子网:
config:
ipv4.address: 10.1.1.1/24
ipv4.nat: "false"
ipv6.address: none
description: ""
name: testbr0
type: bridge
used_by:
- /1.0/containers/test
managed: true当使用上述配置时,主机就失去了网络连接。
如何创建非nat lxd网桥(使用lxd网络)?
发布于 2018-05-25 06:20:52
如果不使用NAT,则必须在桥中包含外部接口。如果您要在Ubuntu中创建一个桥,那么您将像在Ubuntu中一样这样做,但LXD3.0有一个配置选项。是bridge.external_interfaces。在桥接口上,我还将I 4. also设置为none。这将防止LXD主机在网桥接口上获得IP,如果这是您要寻找的行为。
config:
bridge.driver: native
bridge.external_interfaces: eth5
ipv4.address: none
ipv4.firewall: "true"
ipv4.nat: "false"
ipv6.address: none
ipv6.nat: "false"有关您可以在配置中包含哪些内容的更多细节,请参见LXD3.0网络API。
以下是添加此配置后brctl命令的输出:
root@lxd01:~# brctl show rtmp
bridge name bridge id STP enabled interfaces
rtmp 8000.ba657ffc1473 no eth5https://serverfault.com/questions/907146
复制相似问题