部署完openstack後的網路配置(一)

2021-07-05 11:59:39 字數 4377 閱讀 1098

需求分析: 部署完成後openstack,建立出虛擬機器以後發現,不能和外網相通,比如rdo預設裝完,public網路預設的public網路是vxlan,並且不能建立別的型別

建立自定義public時,讓openstack支援所有網路型別

vi  /etc/neutron/plugins/ml2/ml2_conf.ini(編輯此檔案)

type_drivers =

local,flat,vlan,gre,vxlan

openstack-service restart neutron

新開的虛擬機器不能訪問外網,通過以下順序進行排查

ovs-vsctl show

17ce5502-

609e-4024

-8ede-

96dafcb63fa4

bridge br-ex

port br-ex

inte***ce br-ex

type: internal

bridge br-tun

fail_mode: secure

port patch-int

inte***ce patch-int

type: patch

options:

port br-tun

inte***ce br-tun

type: internal

bridge br-int

fail_mode: secure

port br-int

inte***ce br-int

type: internal

port patch-tun

inte***ce patch-tun

type: patch

options:

ovs_version: "2.3.1"

cd /etc/sysconfig/network-scripts

/cp -rp ifcfg-eno1 ifcfg-br

-excat > ifcfg-br

-ex<< off

> device=

"br-ex"

> onboot=yes

> ipaddr=

192.168

.11.105

> prefix=

24> gateway=

192.168

.11.1

> off

cp -rp ifcfg-eno2 ifcfg-eno2

.bak

cat ifcfg-eno1

type

=ethernet

bootproto=

none

name=eno2

uuid=fe424bda-

50eb-

4861

-aa6f

-d0ebe40250e1

device=eno2

onboot=yes

ovs-vsctl add-br br-ex
把bridge和網絡卡繫結

ovs-vsctl add-port br-ex eno2

service network restart

openstack-service restart neutron

檢視

ovs-vsctl show

17ce5502-609e-4024-8ede-96dafcb63fa4

bridge br-ex

port "eno2"

inte***ce "eno2"

port br-ex

inte***ce br-ex

type: internal

bridge br-int

fail_mode: secure

port br-int

inte***ce br-int

type: internal

port patch-tun

inte***ce patch-tun

type: patch

options:

bridge br-tun

fail_mode: secure

port br-tun

inte***ce br-tun

type: internal

port patch-int

inte***ce patch-int

type: patch

options:

ovs_version: "2.3.1"

ifconfig

br-ex: flags=4163

mtu 1500

inet 192.168

.11.105 netmask 255.255

.255

.0 broadcast 192.168

.11.255

inet6 fe80::cc5c:b4ff:fe06:ec4c prefixlen 64 scopeid 0x20

ether 00:22:19:59:7f:b8 txqueuelen 0 (ethernet)

rx packets 267 bytes 24637 (24.0 kib)

rx errors 0 dropped 0 overruns 0 frame 0

tx packets 143 bytes 19623 (19.1 kib)

tx errors 0 dropped 0 overruns 0 carrier 0 collisions 0

eno1: flags=4163

mtu 1500

inet 192.168

.10.105 netmask 255.255

.255

.0 broadcast 192.168

.10.255

inet6 fe80::222:19ff:fe59:7fb6 prefixlen 64 scopeid 0x20

ether 00:22:19:59:7f:b6 txqueuelen 1000 (ethernet)

rx packets 5280 bytes 6470921 (6.1 mib)

rx errors 0 dropped 0 overruns 0 frame 0

tx packets 2491 bytes 176145 (172.0 kib)

tx errors 0 dropped 0 overruns 0 carrier 0 collisions 0

eno2: flags=4163

mtu 1500

inet 192.168

.11.105 netmask 255.255

.255

.0 broadcast 192.168

.11.255

inet6 fe80::222:19ff:fe59:7fb8 prefixlen 64 scopeid 0x20

ether 00:22:19:59:7f:b8 txqueuelen 1000 (ethernet)

rx packets 296566 bytes 417062174 (397.7 mib)

rx errors 0 dropped 0 overruns 0 frame 0

tx packets 178659 bytes 15328783 (14.6 mib)

tx errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73

mtu 65536

inet 127.0

.0.1 netmask 255.0

.0.0

inet6 ::1 prefixlen 128 scopeid 0x10

loop txqueuelen 0 (local loopback)

rx packets 393058 bytes 46812073 (44.6 mib)

rx errors 0 dropped 0 overruns 0 frame 0

tx packets 393058 bytes 46812073 (44.6 mib)

tx errors 0 dropped 0 overruns 0 carrier 0 collisions 0

用kolla部署openstack遇到的問題總結

1.用kolla安裝openstack的n版,如果多節點部署,而且lbaas enble,則出現neutron server一直是restarting的狀態,看日誌的報錯是 importerror plugin neutron lbaas.services.loadbalancer.plugin.l...

openstack部署中的錯誤總結

在安裝到glance上傳鏡象時出錯,折騰不出來,先記在這兒 1 glance index failed to show index.got error you are not authenticated.解決方法 keystone配置出錯,解決keystone問題 1 刪除以前mysql生成的key...

學完靜態後的複習總結

複習總結 張倫琦 首先我來回顧一下腦海中所有這兩天的知識點 物件導向 private關鍵字 this關鍵字 靜態變數 成員變數 區域性變數 靜態 塊 構造 塊 區域性 塊 靜態方法 構造方法 成員方法 總結一下就是 乙個思想,兩個關鍵字,三個變數,三個 塊,三個方法。最先看下物件導向的思想,核心我感...