在开始讲Neutron与Nova的网络关系前,先理解一下Openvswitch是两个模块组件中,特别重要的网络通讯模块了,而Openvswitch主要为管理Linux bridge及接口,了解Linux Bridge是学习Neutron很重要的一部份,下面我带着一个平台中的两个节点(Neutron和Nova)去理解Neutron和Nova的网络逻辑关系:
1.通过以下Vxlan的逻辑图,去理解每个节点中,到底存在些什么组件与接口
2.通过以上图,先从计算节点(Nova)入手,通过使用相关命令去查询一些信息,操作如下:
[[email protected] ~]# ip addr | grep q
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
4: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
5: br-int: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
13: br-tun: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
14: qbr7047c83a-64: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
15: qvo7047c83a-64: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP qlen 1000
16: qvb7047c83a-64: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master qbr7047c83a-64 state UP qlen 1000
108: qbrae27b327-c5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
109: qvoae27b327-c5: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP qlen 1000
110: qvbae27b327-c5: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master qbrae27b327-c5 state UP qlen 1000
111: tapae27b327-c5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master qbrae27b327-c5 state UNKNOWN qlen 500
112: qbr0945157b-02: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
113: qvo0945157b-02: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP qlen 1000
114: qvb0945157b-02: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master qbr0945157b-02 state UP qlen 1000
117: tap0945157b-02: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master qbr0945157b-02 state UNKNOWN qlen 500
从以上命令行中,我们可以看到,有两个Linux Bridge,还有大概11个接口,其中有一些接口可以跟逻辑图对上位。
3.继续使用命令查询OVS相关配置信息,如下操作命令
[[email protected] ~]# ovs-vsctl show
f6df2d7f-497e-4f62-a346-ab096811d737
Bridge br-int ----linux bridge
fail_mode: secure
Port patch-tun -----在br-int桥上的接口 ,与br-tun桥相连接的接口
Interface patch-tun
type: patch
options: {peer=patch-int} ----linux bridge 的接口名称
Port br-int
Interface br-int
type: internal
Port "qvoae27b327-c5" -----在br-int桥上的接口
tag: 21
Interface "qvoae27b327-c5"
Port "qvo0945157b-02" -----在br-int桥上的接口
tag: 1
Interface "qvo0945157b-02"
Bridge br-tun ----linux bridge
fail_mode: secure
Port br-tun -----在br-tun桥上的接口 ,与br-int桥相连接的接口
Interface br-tun
type: internal
Port "vxlan-0af80901"
Interface "vxlan-0af80901" -----在br-tun桥上的接口
type: vxlan
options: {df_default="true", in_key=flow, local_ip="10.248.9.3", out_key=flow, remote_ip="10.248.9.1"}
Port "vxlan-0af80905"
Interface "vxlan-0af80905" -----在br-tun桥上的接口
type: vxlan
options: {df_default="true", in_key=flow, local_ip="10.248.9.3", out_key=flow, remote_ip="10.248.9.5"}
Port patch-int
Interface patch-int
type: patch
options: {peer=patch-tun}
Port "vxlan-0af80902"
Interface "vxlan-0af80902" -----在br-tun桥上的接口
type: vxlan
options: {df_default="true", in_key=flow, local_ip="10.248.9.3", out_key=flow, remote_ip="10.248.9.2"}
以上命令中,先与逻辑图和Ip addr 进行对位,从中我们可以知道原来Nova还存在很多接口,其中Vxlan属于隧道技术了,也就是点对点技术,在Options的配置中可以了解到,还有现在看到接口都是Linux bridge的接口了,那么在ip addr | grep q的命令行中,我们也看到了tap的接口,这个属于什么接口呢?
4.继续使用命令,查询tap的接口信息,如下操作: