[Starlingx-discuss] Flat Network not working on STX R2.0

Xu, Chenjie chenjie.xu at intel.com
Wed Sep 18 03:23:39 UTC 2019


Hi Ezpeer,
If OVS-DPDK is used, you need to add below property to your flavor:
openstack flavor set $i --property hw:mem_page_size=large

The VM created with above flavor will use hugepage. OVS-DPDK also uses hugepage and OVS-DPDK communicates with VM through shared memory. That’s why VM needs to use hugepage. You can check the flavor in stx1.0, the above property is set by default.

Best Regards,
Xu, Chenjie

From: Ezpeer Chen [mailto:ezpeerchen at gmail.com]
Sent: Wednesday, September 18, 2019 11:05 AM
To: Xu, Chenjie <chenjie.xu at intel.com>
Cc: starlingx-discuss at lists.starlingx.io
Subject: Re: [Starlingx-discuss] Flat Network not working on STX R2.0

Dear Chenjie,

OVS-DPDK environment  ( vswitch_type = ovs-dpdk)


data network(VM instance 192.168.100.3/24<http://192.168.100.3/24>, nova:dhcp 192.168.100.2/24<http://192.168.100.2/24>)  <=====> L2 switch  <====> PC/NB 192.168.100.x/24

PC/NB  ping  192.168.100.2  (nova:dhcp)  =====> ok
PC/NB  ping  192.168.100.3  (VM instance)   =====> Fail       (VM instance can't get ip , manual configure static IP)





Thanks

Xu, Chenjie <chenjie.xu at intel.com<mailto:chenjie.xu at 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 at gmail.com<mailto:ezpeerchen at gmail.com>]
Sent: Wednesday, September 18, 2019 10:34 AM
To: Xu, Chenjie <chenjie.xu at intel.com<mailto:chenjie.xu at intel.com>>
Cc: starlingx-discuss at lists.starlingx.io<mailto:starlingx-discuss at 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 at gmail.com<mailto:ezpeerchen at gmail.com>> 於 2019年9月17日 週二 下午4:30寫道:
Dear Chenjie,

I follow this document:
https://wiki.openstack.org/wiki/StarlingX/Networking

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 at intel.com<mailto:chenjie.xu at 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<http://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<http://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 at gmail.com<mailto:ezpeerchen at gmail.com>]
Sent: Tuesday, September 17, 2019 3:45 PM
To: starlingx-discuss at lists.starlingx.io<mailto:starlingx-discuss at 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<http://192.168.100.0/24>
#openstack server create --image cirros --flavor m1.tiny --network netflat vm1

=============================================================

Interface setting on STXR2.0:


[sysadmin at 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 at controller-0 ~(keystone_admin)]$ system datanetwork-list
+--------------------------------------+----------+--------------+------+
| uuid                                 | name     | network_type | mtu  |
+--------------------------------------+----------+--------------+------+
| b42f45d1-a474-47cc-b603-8c3b4e50189b | phy-flat | flat         | 1500 |


[sysadmin at 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<http://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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.starlingx.io/pipermail/starlingx-discuss/attachments/20190918/80c5056b/attachment-0001.html>


More information about the Starlingx-discuss mailing list