Dear Chenjie,OVS-DPDK environment ( vswitch_type = ovs-dpdk)data network(VM instance 192.168.100.3/24, nova:dhcp 192.168.100.2/24) <=====> L2 switch <====> PC/NB 192.168.100.x/24PC/NB ping 192.168.100.2 (nova:dhcp) =====> okPC/NB ping 192.168.100.3 (VM instance) =====> Fail (VM instance can't get ip , manual configure static IP)ThanksXu, Chenjie <chenjie.xu@intel.com> 於 2019年9月18日 週三 上午10:56寫道:Hi Ezpeer,
Are you using OVS or OVS-DPDK? You mean you can ping external network through dhcp namespace like following?
ip netns
sudo ip netns exec $NAMESPACE bash
ifconfig
ping $external_ip
If so, can you ping the DHCP ip from the VM with static IP configured.
Best Regards,
Xu, Chenjie
From: Ezpeer Chen [mailto:ezpeerchen@gmail.com]
Sent: Wednesday, September 18, 2019 10:34 AM
To: Xu, Chenjie <chenjie.xu@intel.com>
Cc: starlingx-discuss@lists.starlingx.io
Subject: Re: [Starlingx-discuss] Flat Network not working on STX R2.0
Dear all,
add additional information:
The nova:dhcp 's ip could ping to PC/NB.
Thanks
Ezpeer Chen <ezpeerchen@gmail.com> 於 2019年9月17日 週二 下午4:30寫道:
Dear Chenjie,
I follow this document:
Section:
· Configure the flat network.
My procedure on STX R1.0 is working, but not working on STX R2.0.
data network(VM instance 192.168.100.X/24) <=====> L2 switch <====> PC/NB 192.168.100.x/24
VM instance ping to PC/NB fail on STX R2.0.
Thanks
Xu, Chenjie <chenjie.xu@intel.com> 於 2019年9月17日 週二 下午4:23寫道:
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