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

Ezpeer Chen ezpeerchen at gmail.com
Tue Sep 17 08:30:35 UTC 2019


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> 於 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 at gmail.com]
> *Sent:* Tuesday, September 17, 2019 3:45 PM
> *To:* 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
> #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
> #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/20190917/677ba587/attachment.html>


More information about the Starlingx-discuss mailing list