$ openstack network create net1 +---------------------------+------------------------------------- | Field | Value +---------------------------+------------------------------------- | id | 2caecd1e-bda7-4a4e-baec-3d192f52aa3b | provider:network_type | vxlan | provider:segmentation_id | 15 +---------------------------+------------------------------------- $ openstack subnet create --network net1 --subnet-range 200.0.0.0/24 sub1 +-------------------+------------------------------------- | Field | Value +-------------------+------------------------------------- | allocation_pools | 200.0.0.2-200.0.0.254 | cidr | 200.0.0.0/24 | gateway_ip | 200.0.0.1 | id | 5875f007-7b0f-45af-b78f-82527e5d9a90 | network_id | 2caecd1e-bda7-4a4e-baec-3d192f52aa3b +-------------------+-------------------------------------
发生了什么?
1. openstack
net1的id为2caecd1e-bda7-4a4e-baec-3d192f52aa3b
sub1的id为5875f007-7b0f-45af-b78f-82527e5d9a90
1 2 3 4 5 6
$ openstack port list +--------------------------------------+------+-------------------+--------------------------------------------------------------------------+--------+ | ID | Name | MAC Address | Fixed IP Addresses | Status | +--------------------------------------+------+-------------------+--------------------------------------------------------------------------+--------+ | 17a89323-fd0a-44cc-a525-fcf8d2efb836 | | fa:16:3e:f6:db:c9 | ip_address='200.0.0.2', subnet_id='5875f007-7b0f-45af-b78f-82527e5d9a90' | ACTIVE | +--------------------------------------+------+-------------------+--------------------------------------------------------------------------+--------+
在sub1下创建了一个port
ID:17a89323-fd0a-44cc-a525-fcf8d2efb836
IP:200.0.0.2
2. ovs
1 2 3 4 5 6 7 8 9
$ ovs-vsctl show ... Bridge br-int ... Port "tap17a89323-fd" tag: 1 Interface "tap17a89323-fd" type: internal ...