neutron vlan模式配置(一): 解读vlan模式里两幅重要的图

来源:互联网 发布:basic编程语言 编辑:程序博客网 时间:2024/04/30 22:06

在network node上,创建了br-eth1,br-ex, br-int

 

访问publicnetwork,核心是 br-ex 和 br-int

[root@network-nodexiaoy]# ovs-vsctl show

06ee24f3-1226-4fd2-95c1-eed3954368a4

    Bridge br-int  

        fail_mode: secure

        Port br-int

            Interface br-int

                type: internal

        Port "int-br-eth1"

            Interface "int-br-eth1"

        Port "qr-711d96ad-9f"

            tag: 1

            Interface"qr-711d96ad-9f"

                type: internal

   Bridge "br-eth1"   这里对应 to private netwrok那部分

        Port"phy-br-eth1"

           Interface "phy-br-eth1"

        Port"br-eth1"

           Interface "br-eth1"

               type: internal

       Port "eth1" 这里我们采用的eth1,与图中一样

           Interface "eth1"

   Bridge br-ex    这里对应 to public netwrok那部分

       Port br-ex

           Interface br-ex

               type: internal

       Port "eth2"    这里我们采用的eth2,不是图中的eth0

           Interface "eth2"

        Port"qg-8ed85561-62"

           Interface "qg-8ed85561-62"

               type: internal

    ovs_version: "2.1.3"

 

中间Configured byL3 Agent这个框内的是virtual router的部分

我们配置过程中,创建了virtualrouter后,给它添加了router-interface, router gateway,分别相当于图中的qr-***,qg-***。

neutron router-interface-add $Router_ID $Int_Subnet_ID

neutron router-gateway-set $Router_ID $Ext_Net_ID

这里$Ext_Net_ID 应该和br-ex的port eth2在同一个网段

 

图中的dnsmasq所在的一个框是virtual machine 的一个子网。它要访问外部网络的路径是:

 qr-YYY -->qg-VVV -->  br-ex -->  eth2 --> public  network


访问internalnetwork,核心是br-int 和 br-eth1

我们一般在computenode上起大量虚拟机,图中有起了虚拟机vm01,vm02,vm03,有虚拟网络vnet0,vnet1,vnet2,vnet3并对应4个路由器。

 

vm01要访问私有网络的路径是:

 qrXXX -->qvbXXX- -->  qvoXXX -->  br-int --> br-eth1 --> private network

实验环境中各个节点的IP情况:

[root@controller-node xiaoy]# hostname -I
192.168.122.166 (eth0)

192.168.123.210 (eth1)

192.168.124.144 (eth2)

192.168.125.38 (eth3)

192.168.126.78(eth4)

[root@network-node xiaoy]# hostname -I
192.168.122.117 (eth0)

192.168.125.103 (eth3)

192.168.126.218 (eth4)

[root@compute-node xiaoy]# hostname -I
192.168.122.118 (eth0)

192.168.125.42 (eth3)

192.168.126.242 (eth4)

为什么network-node 和 compute-node没有eth1 eth2的IP地址呢?

 因为他们要被占有,需要修改他们的配置文件如下:

在network-node节点上, 创建了网桥br-int , br-eth1 , br-ex; 后面两个分别 add-port为eth1 , eth2。

此时,不要给eth1,eth2分配IP。

 需要将更改各自的配置文件,

  650  vim /etc/sysconfig/network-scripts/ifcfg-eth1其内容为:

DEVICE=eth1

BOOTPROTO=static

ONBOOT=yes

 

  651  vim /etc/sysconfig/network-scripts/ifcfg-eth2 其内容为:

DEVICE=eth2

BOOTPROTO=static

ONBOOT=yes

 

改完以后,运行 service network restart

重启网络后。


0 0
原创粉丝点击