Hi Ezpeer,
Could you please share all your steps for stx2.0 including creating datanetwork, binding interface to datanetwork and so on.
The following commands will create an internal flat network for VMs:
openstack network create --project ${ADMINID} --provider-network-type=flat --provider-physical-network=phy-flat netflat
Typically you should not create VMs on external network. You should create an internal network and create VMs on internal network. The external network
and internal network should be connected by router. Then you can ping external network in VM. The below commands can be referred:
ADMINID=`openstack project list | grep admin | awk '{print $2}'`
PHYSNET0='flat_external'
PHYSNET1='flat_internal'
PUBLICNET='public-net0'
EXTERNALNET='external-net0'
PUBLICSUBNET='public-subnet0'
EXTERNALSUBNET='external-subnet0'
PUBLICROUTER='public-router0'
openstack network create --project ${ADMINID} --provider-network-type=flat --provider-physical-network=${PHYSNET0} --share
--external ${EXTERNALNET}
openstack network create --project ${ADMINID} --provider-network-type=flat --provider-physical-network=${PHYSNET1} ${PUBLICNET}
PUBLICNETID=`openstack network list | grep ${PUBLICNET} | awk '{print $2}'`
EXTERNALNETID=`openstack network list | grep ${EXTERNALNET} | awk '{print $2}'`
openstack subnet create --project ${ADMINID} ${PUBLICSUBNET} --network ${PUBLICNET} --subnet-range 192.168.101.0/24
openstack subnet create --project ${ADMINID} ${EXTERNALSUBNET} --gateway 192.168.100.1 --no-dhcp --network ${EXTERNALNET}
--subnet-range 192.168.100.0/24 --ip-version 4
openstack router create ${PUBLICROUTER}
PUBLICROUTERID=`openstack router list | grep ${PUBLICROUTER} | awk '{print $2}'`
openstack router set ${PUBLICROUTER} --external-gateway ${EXTERNALNETID} --disable-snat
openstack router add subnet ${PUBLICROUTER} ${PUBLICSUBNET}
Best Regards,
Xu, Chenjie
From: Ezpeer Chen [mailto:ezpeerchen@gmail.com]
Sent: Tuesday, September 17, 2019 3:45 PM
To: starlingx-discuss@lists.starlingx.io
Subject: [Starlingx-discuss] Flat Network not working on STX R2.0
Dear all,
Please help check if this is my misunderstanding.
Issue:
Flat Network not working on STX R2.0 but it's working on STX R1.0. VM instance can't ping to public network with static IP configuration.
Create Flat network on STX R1.0:
=============================================================
#ADMINID=`openstack project list | grep admin | awk '{print $2}'`
#openstack network create --project ${ADMINID} --provider-network-type=flat --provider-physical-network=phy-flat netflat
#openstack subnet create --project ${ADMINID} netflat-subnet --network netflat --subnet-range
192.168.100.0/24
#openstack server create --image cirros --flavor m1.tiny --network netflat vm1
=============================================================
Interface setting on STXR2.0:
[sysadmin@controller-0 ~(keystone_admin)]$ system host-if-list controller-0
+--------------------------------------+-----------+-----------+----------+------+----------------+------+---------+---------------------------+
| uuid | name | class | type | vlan | ports | uses | used by | attributes |
| | | | | id | | i/f | i/f | |
+--------------------------------------+-----------+-----------+----------+------+----------------+------+---------+---------------------------+
| e0b545f0-dc0d-4c6c-9327-0008191cf3e6 | enp3s0 | data | ethernet | None | [u'enp3s0'] | [] | [] | MTU=1500,accelerated=True |
[sysadmin@controller-0 ~(keystone_admin)]$ system datanetwork-list
+--------------------------------------+----------+--------------+------+
| uuid | name | network_type | mtu |
+--------------------------------------+----------+--------------+------+
| b42f45d1-a474-47cc-b603-8c3b4e50189b | phy-flat | flat | 1500 |
[sysadmin@controller-0 ~(keystone_admin)]$ system interface-datanetwork-list controller-0
+--------------+--------------------------------------+-----------+------------------+
| hostname | uuid | ifname | datanetwork_name |
+--------------+--------------------------------------+-----------+------------------+
| controller-0 | 88dd6d9c-fd66-4034-98d5-c6a2155a5085 | enp3s0 | phy-flat |
+--------------+--------------------------------------+-----------+------------------+
Create Flat network on STX R2.0:
=============================================================
#export OS_CLOUD=openstack_helm
#ADMINID=`openstack project list | grep admin | awk '{print $2}'`
#openstack network create --project ${ADMINID} --provider-network-type=flat --provider-physical-network=phy-flat netflat
#openstack subnet create --project ${ADMINID} netflat-subnet --network netflat --subnet-range
192.168.100.0/24
#openstack server create --project ${ADMINID} --image cirros --flavor m1.tiny --network netflat vm1
=============================================================
The same procedure to create flat network on STX R1.0 and R2.0.
But the vm instance can't get ip and can't ping to public network with static IP configuration on STX R2.0.
Please help check this issue.
Thanks