OVN Northbound DB简介及其相关命令示例
来源:互联网 发布:pg数据库如何导入数据 编辑:程序博客网 时间:2024/06/01 13:11
Northbound DB 是 OVN 和 CMS 之间的接口,Northbound DB 里面的几乎所有的内容都是由 CMS 产生的,ovn-northd 监听这个数据库的内容变化,然后翻译,保存到 Southbound DB 里面。
Northbound DB 里面主要有如下几张表:
- Logical_Switch:每一行代表一个逻辑交换机,逻辑交换机有两种,一种是 overlay logical switches,对应于 neutron network,每创建一个 neutron network,networking-ovn 会在这张表里增加一行;另一种是 bridged logical switch,连接物理网络和逻辑网络,被 VTEP gateway 使用。Logical_Switch 里面保存了它包含的 logical port(指向 Logical_Port table)和应用在它上面的 ACL(指向 ACL table)。
- Logical_Port:每一行代表一个逻辑端口,每创建一个 neutron port,networking-ovn 会在这张表里增加一行,每行保存的信息有端口的类型,比如 patch port,localnet port,端口的 IP 和 MAC 地址,端口的状态 UP/Down。
- ACL:每一行代表一个应用到逻辑交换机上的 ACL 规则,如果逻辑交换机上面的所有端口都没有配置 security group,那么这个逻辑交换机上不应用 ACL。每条 ACL 规则包含匹配的内容,方向,还有动作。
- Logical_Router:每一行代表一个逻辑路由器,每创建一个 neutron router,networking-ovn 会在这张表里增加一行,每行保存了它包含的逻辑的路由器端口。
- Logical_Router_Port:每一行代表一个逻辑路由器端口,每创建一个 router interface,networking-ovn 会在这张表里加一行,它主要保存了路由器端口的 IP 和 MAC。
[root@controller ~]# ovn-nbctl list NB_Global _uuid : ca862cbd-1dbd-40ad-9d58-a5b9b1e48d57connections : [0de31edd-7c5c-449e-8c38-aee2e334b27c]external_ids : {}hv_cfg : 0nb_cfg : 0sb_cfg : 0ssl : []---------------------——————————————————————[root@controller ~]# ovn-nbctl list Logical_Switch_uuid : 97f6a204-0e7f-4cc2-ae96-9249f29a232bacls : []external_ids : {"neutron:network_name"=public}load_balancer : []name : "neutron-03268213-b908-4122-9f86-b207882cbc78"other_config : {}ports : [2cad61a8-5758-4143-bbcb-17fef176f334, 8f98a049-1720-4a4d-b688-51bbdf6cc737, 93cf7aad-b0f0-4f49-a96c-e325e9bf365d, d857c800-181d-4cf8-8dcb-93edc2e96567]qos_rules : []_uuid : e7347be1-3ebc-4a42-928e-4a6fb0474ec6acls : [0220e827-848f-43fe-82f3-1261034cf1d2, 2bcfcd33-c3e2-4c5f-80db-35a88efc55ff, 35ce7158-22bf-444b-b15f-adbc7c4314a8, 3bead700-ce34-4ac1-890b-f7a6143cc4e6, 3d353de4-5c38-459b-ac6b-f12d7ed90a53, 4140e1d8-e8a5-4891-b47d-3a85ec9b0be5, 414bd248-310c-4cec-ac86-e6a6d03816a7, 477e7013-997c-494f-82a0-60ea993c139b, 5002db39-6417-47c3-9945-33b74e8f2057, 62c01c55-69b0-4bef-99e3-650ac8a848bd, 9264e0c0-e689-46f7-8274-cd6c2f3ea149, a2ffad3d-e8b9-4a15-835d-0884b94d352e, ce74fc4d-c7c1-49b6-ac2a-0787234d1970, febbd2f3-1958-4c18-8730-8244dbed4846]external_ids : {"neutron:network_name"=private}load_balancer : []name : "neutron-ae165671-c2f0-41f2-a6ad-617d062b86be"other_config : {}ports : [8014370c-e8d1-4045-b57f-3f91e34efb5b, 9a748e64-b5ad-405a-a564-767192d60041, a0fa17ef-da38-43f5-8de3-79c8cc009cb9]qos_rules : []-------------------------------------------------------------------------------------------[root@controller ~]# ovn-nbctl list Logical_Switch_Port_uuid : 9a748e64-b5ad-405a-a564-767192d60041addresses : ["fa:16:3e:cb:75:9d 11.0.0.1"]dhcpv4_options : []dhcpv6_options : []dynamic_addresses : []enabled : trueexternal_ids : {"neutron:port_name"=""}name : "23b099a8-5949-40ce-a1bc-c2675a4eaf4c"options : {}parent_name : []port_security : []tag : []tag_request : []type : ""up : true_uuid : 8014370c-e8d1-4045-b57f-3f91e34efb5baddresses : ["fa:16:3e:7a:c5:16 11.0.0.5"]dhcpv4_options : 5e170c47-70a6-4816-a082-87e7ec22ac5adhcpv6_options : []dynamic_addresses : []enabled : trueexternal_ids : {"neutron:port_name"=""}name : "e97d6b05-987d-4e62-a590-7accc480cf97"options : {}parent_name : []port_security : ["fa:16:3e:7a:c5:16 11.0.0.5"]tag : []tag_request : []type : ""up : true_uuid : d857c800-181d-4cf8-8dcb-93edc2e96567addresses : [unknown]dhcpv4_options : []dhcpv6_options : []dynamic_addresses : []enabled : []external_ids : {}name : "provnet-03268213-b908-4122-9f86-b207882cbc78"options : {network_name=public}parent_name : []port_security : []tag : []tag_request : []type : localnetup : false_uuid : 2cad61a8-5758-4143-bbcb-17fef176f334addresses : ["fa:16:3e:e6:68:b0 192.168.200.140"]dhcpv4_options : []dhcpv6_options : []dynamic_addresses : []enabled : trueexternal_ids : {"neutron:port_name"=""}name : "0c80bccb-84ee-4aae-a87d-5aacf1d49df5"options : {}parent_name : []port_security : []tag : []tag_request : []type : ""up : false_uuid : 93cf7aad-b0f0-4f49-a96c-e325e9bf365daddresses : ["fa:16:3e:a4:14:5d 192.168.200.135"]dhcpv4_options : []dhcpv6_options : []dynamic_addresses : []enabled : trueexternal_ids : {"neutron:port_name"=""}name : "9c2c1945-0d3d-48a5-b2d9-987427d003fe"options : {}parent_name : []port_security : []tag : []tag_request : []type : ""up : true_uuid : 8f98a049-1720-4a4d-b688-51bbdf6cc737addresses : ["fa:16:3e:d9:85:46 192.168.200.136"]dhcpv4_options : []dhcpv6_options : []dynamic_addresses : []enabled : trueexternal_ids : {"neutron:port_name"=""}name : "7b4a2a12-618b-4e56-958e-6cf90ae78623"options : {}parent_name : []port_security : []tag : []tag_request : []type : ""up : false_uuid : a0fa17ef-da38-43f5-8de3-79c8cc009cb9addresses : ["fa:16:3e:14:ba:56 11.0.0.3"]dhcpv4_options : 5e170c47-70a6-4816-a082-87e7ec22ac5adhcpv6_options : []dynamic_addresses : []enabled : trueexternal_ids : {"neutron:port_name"=""}name : "607fa0b2-244c-46d6-b515-5ebe73ebbc4c"options : {}parent_name : []port_security : ["fa:16:3e:14:ba:56 11.0.0.3"]tag : []tag_request : []type : ""up : true————————————————————————————————————[root@controller ~]# ovn-nbctl list ACL_uuid : 9264e0c0-e689-46f7-8274-cd6c2f3ea149action : allow-relateddirection : to-lportexternal_ids : {"neutron:lport"="607fa0b2-244c-46d6-b515-5ebe73ebbc4c"}log : falsematch : "outport == \"607fa0b2-244c-46d6-b515-5ebe73ebbc4c\" && ip6 && ip6.src == $as_ip6_8cb690a4_472a_4cd7_8394_edf0e8926df6"priority : 1002_uuid : 35ce7158-22bf-444b-b15f-adbc7c4314a8action : allow-relateddirection : to-lportexternal_ids : {"neutron:lport"="607fa0b2-244c-46d6-b515-5ebe73ebbc4c"}log : falsematch : "outport == \"607fa0b2-244c-46d6-b515-5ebe73ebbc4c\" && ip4 && ip4.src == 0.0.0.0/0"priority : 1002_uuid : 3bead700-ce34-4ac1-890b-f7a6143cc4e6action : dropdirection : to-lportexternal_ids : {"neutron:lport"="607fa0b2-244c-46d6-b515-5ebe73ebbc4c"}log : falsematch : "outport == \"607fa0b2-244c-46d6-b515-5ebe73ebbc4c\" && ip"priority : 1001_uuid : 4140e1d8-e8a5-4891-b47d-3a85ec9b0be5action : allow-relateddirection : from-lportexternal_ids : {"neutron:lport"="607fa0b2-244c-46d6-b515-5ebe73ebbc4c"}log : falsematch : "inport == \"607fa0b2-244c-46d6-b515-5ebe73ebbc4c\" && ip6"priority : 1002_uuid : 414bd248-310c-4cec-ac86-e6a6d03816a7action : dropdirection : from-lportexternal_ids : {"neutron:lport"="607fa0b2-244c-46d6-b515-5ebe73ebbc4c"}log : falsematch : "inport == \"607fa0b2-244c-46d6-b515-5ebe73ebbc4c\" && ip"priority : 1001_uuid : 5002db39-6417-47c3-9945-33b74e8f2057action : allow-relateddirection : from-lportexternal_ids : {"neutron:lport"="607fa0b2-244c-46d6-b515-5ebe73ebbc4c"}log : falsematch : "inport == \"607fa0b2-244c-46d6-b515-5ebe73ebbc4c\" && ip4"priority : 1002_uuid : febbd2f3-1958-4c18-8730-8244dbed4846action : allow-relateddirection : from-lportexternal_ids : {"neutron:lport"="e97d6b05-987d-4e62-a590-7accc480cf97"}log : falsematch : "inport == \"e97d6b05-987d-4e62-a590-7accc480cf97\" && ip4"priority : 1002_uuid : 2bcfcd33-c3e2-4c5f-80db-35a88efc55ffaction : allow-relateddirection : to-lportexternal_ids : {"neutron:lport"="e97d6b05-987d-4e62-a590-7accc480cf97"}log : falsematch : "outport == \"e97d6b05-987d-4e62-a590-7accc480cf97\" && ip4 && ip4.src == $as_ip4_8cb690a4_472a_4cd7_8394_edf0e8926df6"priority : 1002_uuid : 477e7013-997c-494f-82a0-60ea993c139baction : allow-relateddirection : to-lportexternal_ids : {"neutron:lport"="e97d6b05-987d-4e62-a590-7accc480cf97"}log : falsematch : "outport == \"e97d6b05-987d-4e62-a590-7accc480cf97\" && ip4 && ip4.src == 0.0.0.0/0"priority : 1002_uuid : 3d353de4-5c38-459b-ac6b-f12d7ed90a53action : allow-relateddirection : to-lportexternal_ids : {"neutron:lport"="e97d6b05-987d-4e62-a590-7accc480cf97"}log : falsematch : "outport == \"e97d6b05-987d-4e62-a590-7accc480cf97\" && ip6 && ip6.src == $as_ip6_8cb690a4_472a_4cd7_8394_edf0e8926df6"priority : 1002_uuid : ce74fc4d-c7c1-49b6-ac2a-0787234d1970action : allow-relateddirection : from-lportexternal_ids : {"neutron:lport"="e97d6b05-987d-4e62-a590-7accc480cf97"}log : falsematch : "inport == \"e97d6b05-987d-4e62-a590-7accc480cf97\" && ip6"priority : 1002_uuid : a2ffad3d-e8b9-4a15-835d-0884b94d352eaction : dropdirection : to-lportexternal_ids : {"neutron:lport"="e97d6b05-987d-4e62-a590-7accc480cf97"}log : falsematch : "outport == \"e97d6b05-987d-4e62-a590-7accc480cf97\" && ip"priority : 1001_uuid : 62c01c55-69b0-4bef-99e3-650ac8a848bdaction : allow-relateddirection : to-lportexternal_ids : {"neutron:lport"="607fa0b2-244c-46d6-b515-5ebe73ebbc4c"}log : falsematch : "outport == \"607fa0b2-244c-46d6-b515-5ebe73ebbc4c\" && ip4 && ip4.src == $as_ip4_8cb690a4_472a_4cd7_8394_edf0e8926df6"priority : 1002_uuid : 0220e827-848f-43fe-82f3-1261034cf1d2action : dropdirection : from-lportexternal_ids : {"neutron:lport"="e97d6b05-987d-4e62-a590-7accc480cf97"}log : falsematch : "inport == \"e97d6b05-987d-4e62-a590-7accc480cf97\" && ip"priority : 1001_____________________________________________________________________________[root@controller ~]# ovn-nbctl list Address_Set_uuid : e259afc4-3bc8-494a-b611-6ac20142af0eaddresses : []external_ids : {"neutron:security_group_name"=default}name : "as_ip6_cb9182b1_96bf_4ae9_bcd9_a2a9347ea0da"_uuid : b4674b35-a8bf-4d00-97be-608c8e53537faddresses : []external_ids : {"neutron:security_group_name"=default}name : "as_ip6_8cb690a4_472a_4cd7_8394_edf0e8926df6"_uuid : 370cb8db-610a-4a62-916d-a32d4cedfe52addresses : []external_ids : {"neutron:security_group_name"=default}name : "as_ip4_cb9182b1_96bf_4ae9_bcd9_a2a9347ea0da"_uuid : 210a1c63-b28d-47c5-9295-5d1408f79a8aaddresses : ["11.0.0.3", "11.0.0.5"]external_ids : {"neutron:security_group_name"=default}name : "as_ip4_8cb690a4_472a_4cd7_8394_edf0e8926df6"_____________________________________________________________________________[root@controller ~]# ovn-nbctl list Connection 配置数据库连接到ovsdb客户端_uuid : 0de31edd-7c5c-449e-8c38-aee2e334b27cexternal_ids : {}inactivity_probe : []is_connected : truemax_backoff : []other_config : {}status : {bound_port="6641", n_connections="11", sec_since_connect="0", sec_since_disconnect="0"}target : "ptcp:6641:192.168.200.68"_____________________________________________________________________________[root@controller ~]# ovn-nbctl list DHCP_Options_uuid : e6e2df66-b6ec-4f02-aa31-5843c7931331cidr : "192.168.200.0/24"external_ids : {subnet_id="b7696073-d34b-4137-a19d-d3f261c7d716"}options : {lease_time="43200", mtu="1500", router="192.168.200.1", server_id="192.168.200.1", server_mac="fa:16:3e:f9:80:31"}
阅读全文
0 0
- OVN Northbound DB简介及其相关命令示例
- OVN Southbound DB简介及其相关命令示例
- rake db相关命令
- Git分支及其相关概念和命令简介
- svn 命令及其示例
- GDI+简介及其应用示例
- rails学习笔记: rake db 相关命令
- rails学习笔记: rake db 相关命令
- skyeye相关命令简介
- skyeye相关命令简介
- Windows命令及其功能简介
- 展示C代码覆盖率的gcovr工具简介及相关命令使用示例
- EM配置及其相关命令
- SaltStack简介及其故障排除示例
- makefile简介及其简单编写示例
- 数据可视化简介及其相关应用
- NIO作用简介及其相关知识
- windwos sockets实现及其相关函数简介
- 如何接入极光推送
- 后台长时间定时定位-Location实践经验
- Jsonp的使用
- HDU 4089 Activation【概率DP】
- 剑指Offer面试题7[用两个栈实现队列]
- OVN Northbound DB简介及其相关命令示例
- 广度优先搜索
- linux /hadoop 运行java 程序
- dumpsys介绍
- Ubuntu 16.04 CUDA8.0 Caffe搭建
- C++之令operator=返回一个reference to *this(10)---《Effective C++》
- svg英文字母动画代码
- iOS中Navbar设置渐变色效果
- 学习python