Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Host to VM ping with openstack juno with SR-IOV port having VLAN networking

I have configured single box system with openstack JUNO and SRIOV feature by following https://wiki.openstack.org/wiki/SR-IOV-Passthrough-For-Networking.
In this setup there are SR-IOV port and assign to two VM (one port each). All things are up and running. 
These two VM are also able to communicate each other (PING test). But i am not able to access the VM from HOST and vice-versa.


[root@openstackJuno ~]# nova list
+--------------------------------------+----------+--------+------------+-------------+------------------------------+
| ID                                   | Name     | Status | Task State | Power State | Networks                     |
+--------------------------------------+----------+--------+------------+-------------+------------------------------+
| 8949c0c2-06ad-4746-9179-64632a06113a | sriovVm1 | ACTIVE | -          | Running     | sriovTestNetwork=192.168.1.8 |
| 74ddde11-7fee-49c0-9d62-2ee80d8f3752 | sriovVm2 | ACTIVE | -          | Running     | sriovTestNetwork=192.168.1.9 |
+--------------------------------------+----------+--------+------------+-------------+------------------------------+


[root@openstackJuno ~]# neutron net-show 1aed54f9-5ae0-4bc4-a688-dab654c67b4d
+---------------------------+--------------------------------------+
| Field                     | Value                                |
+---------------------------+--------------------------------------+
| admin_state_up            | True                                 |
| id                        | 1aed54f9-5ae0-4bc4-a688-dab654c67b4d |
| name                      | sriovTestNetwork                     |
| provider:network_type     | vlan                                 |
| provider:physical_network | physnet1                             |
| provider:segmentation_id  | 3                                    |
| router:external           | False                                |
| shared                    | False                                |
| status                    | ACTIVE                               |
| subnets                   | d0e8be77-5e5d-4d29-ab02-c507068461e6 |
| tenant_id                 | fd987a8fb1b845fbb04b28e8f680d040     |
+---------------------------+--------------------------------------+

[root@openstackJuno ~]# neutron port-show 8d9831e0-0076-4b28-8358-c24e505e7b71
+-----------------------+----------------------------------------------------------------------------------------------+
| Field                 | Value                                                                                        |
+-----------------------+----------------------------------------------------------------------------------------------+
| admin_state_up        | True                                                                                         |
| allowed_address_pairs |                                                                                              |
| binding:host_id       | openstackJuno                                                                                |
| binding:profile       | {"pci_slot": "0000:04:10.5", "physical_network": "physnet1", "pci_vendor_info": "8086:1515"} |
| binding:vif_details   | {"port_filter": false, "vlan": "3"}                                                          |
| binding:vif_type      | hw_veb                                                                                       |
| binding:vnic_type     | direct                                                                                       |
| device_id             | 74ddde11-7fee-49c0-9d62-2ee80d8f3752                                                         |
| device_owner          | compute:None                                                                                 |
| extra_dhcp_opts       |                                                                                              |
| fixed_ips             | {"subnet_id": "d0e8be77-5e5d-4d29-ab02-c507068461e6", "ip_address": "192.168.1.9"}           |
| id                    | 8d9831e0-0076-4b28-8358-c24e505e7b71                                                         |
| mac_address           | fa:16:3e:79:55:a1                                                                            |
| name                  | sriovPort2                                                                                   |
| network_id            | 1aed54f9-5ae0-4bc4-a688-dab654c67b4d                                                         |
| security_groups       | e236afa5-f322-4add-8c86-bbb25debc826                                                         |
| status                | ACTIVE                                                                                       |
| tenant_id             | fd987a8fb1b845fbb04b28e8f680d040                                                             |
+-----------------------+----------------------------------------------------------------------------------------------+

[root@openstackJuno ~]# neutron port-show d4ec34d5-9493-43a5-8694-60476f22dd7c
+-----------------------+----------------------------------------------------------------------------------------------+
| Field                 | Value                                                                                        |
+-----------------------+----------------------------------------------------------------------------------------------+
| admin_state_up        | True                                                                                         |
| allowed_address_pairs |                                                                                              |
| binding:host_id       | openstackJuno                                                                                |
| binding:profile       | {"pci_slot": "0000:04:10.7", "physical_network": "physnet1", "pci_vendor_info": "8086:1515"} |
| binding:vif_details   | {"port_filter": false, "vlan": "3"}                                                          |
| binding:vif_type      | hw_veb                                                                                       |
| binding:vnic_type     | direct                                                                                       |
| device_id             | 8949c0c2-06ad-4746-9179-64632a06113a                                                         |
| device_owner          | compute:None                                                                                 |
| extra_dhcp_opts       |                                                                                              |
| fixed_ips             | {"subnet_id": "d0e8be77-5e5d-4d29-ab02-c507068461e6", "ip_address": "192.168.1.8"}           |
| id                    | d4ec34d5-9493-43a5-8694-60476f22dd7c                                                         |
| mac_address           | fa:16:3e:08:15:2e                                                                            |
| name                  | sriovPort1                                                                                   |
| network_id            | 1aed54f9-5ae0-4bc4-a688-dab654c67b4d                                                         |
| security_groups       | e236afa5-f322-4add-8c86-bbb25debc826                                                         |
| status                | ACTIVE                                                                                       |
| tenant_id             | fd987a8fb1b845fbb04b28e8f680d040                                                             |
+-----------------------+----------------------------------------------------------------------------------------------+

[root@openstackJuno ~]# ping -c 4 192.168.1.9
PING 192.168.1.9 (192.168.1.9) 56(84) bytes of data.
From 192.168.1.120 icmp_seq=1 Destination Host Unreachable
From 192.168.1.120 icmp_seq=2 Destination Host Unreachable
From 192.168.1.120 icmp_seq=3 Destination Host Unreachable
From 192.168.1.120 icmp_seq=4 Destination Host Unreachable

--- 192.168.1.9 ping statistics ---
4 packets transmitted, 0 received, +4 errors, 100% packet loss, time 2999ms
pipe 4
[root@openstackJuno ~]


[root@openstackJuno ~]# ip link show enp4s0f1
50: enp4s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000
    link/ether a0:36:9f:0b:fb:fa brd ff:ff:ff:ff:ff:ff
    vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
    vf 1 MAC fa:16:3e:f9:b1:c5, spoof checking on, link-state auto
    vf 2 MAC fa:16:3e:79:55:a1, vlan 3, spoof checking on, link-state auto
    vf 3 MAC fa:16:3e:08:15:2e, vlan 3, spoof checking on, link-state auto


After seeing the VF's configuration's assinged to VM, it looks like all VF's are forming VLAN having the same ID assigned to network.
And due to this packets from HOST are dropped.

Just for checking , i have manaly clear the vlan settings from all VF's

[root@openstackJuno ~]# ip link set enp4s0f1 vf 2 vlan 0
[root@openstackJuno ~]# ip link set enp4s0f1 vf 3 vlan 0
[root@openstackJuno ~]# ip link show enp4s0f1
50: enp4s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000
    link/ether a0:36:9f:0b:fb:fa brd ff:ff:ff:ff:ff:ff
    vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
    vf 1 MAC fa:16:3e:f9:b1:c5, spoof checking on, link-state auto
    vf 2 MAC fa:16:3e:79:55:a1, spoof checking on, link-state auto
    vf 3 MAC fa:16:3e:08:15:2e, spoof checking on, link-state auto

[root@openstackJuno ~]# ping -c 4 192.168.1.9
PING 192.168.1.9 (192.168.1.9) 56(84) bytes of data.
64 bytes from 192.168.1.9: icmp_seq=1 ttl=64 time=0.802 ms
64 bytes from 192.168.1.9: icmp_seq=2 ttl=64 time=0.320 ms
64 bytes from 192.168.1.9: icmp_seq=3 ttl=64 time=0.395 ms
64 bytes from 192.168.1.9: icmp_seq=4 ttl=64 time=0.282 ms

--- 192.168.1.9 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3000ms
rtt min/avg/max/mdev = 0.282/0.449/0.802/0.209 ms
[root@openstackJuno ~]#


So my question is from openstack, is it possible to create network and VM with SR-IOV port without VLAN tag so that we can access from HOST?
Or Is there any other way we can access VM without clearing VLAN?
click to hide/show revision 2
No.2 Revision

Host to VM ping with openstack juno with SR-IOV port having VLAN networking

I have configured single box system with openstack JUNO and SRIOV feature by following https://wiki.openstack.org/wiki/SR-IOV-Passthrough-For-Networking. In this setup there are SR-IOV port and assign to two VM (one port each). All things are up and running. These two VM are also able to communicate each other (PING test). But i am not able to access the VM from HOST and vice-versa. vice-versa.

[root@openstackJuno ~]# nova list
+--------------------------------------+----------+--------+------------+-------------+------------------------------+
| ID                                   | Name     | Status | Task State | Power State | Networks                     |
+--------------------------------------+----------+--------+------------+-------------+------------------------------+
| 8949c0c2-06ad-4746-9179-64632a06113a | sriovVm1 | ACTIVE | -          | Running     | sriovTestNetwork=192.168.1.8 |
| 74ddde11-7fee-49c0-9d62-2ee80d8f3752 | sriovVm2 | ACTIVE | -          | Running     | sriovTestNetwork=192.168.1.9 |
+--------------------------------------+----------+--------+------------+-------------+------------------------------+


[root@openstackJuno ~]# neutron net-show 1aed54f9-5ae0-4bc4-a688-dab654c67b4d
+---------------------------+--------------------------------------+
| Field                     | Value                                |
+---------------------------+--------------------------------------+
| admin_state_up            | True                                 |
| id                        | 1aed54f9-5ae0-4bc4-a688-dab654c67b4d |
| name                      | sriovTestNetwork                     |
| provider:network_type     | vlan                                 |
| provider:physical_network | physnet1                             |
| provider:segmentation_id  | 3                                    |
| router:external           | False                                |
| shared                    | False                                |
| status                    | ACTIVE                               |
| subnets                   | d0e8be77-5e5d-4d29-ab02-c507068461e6 |
| tenant_id                 | fd987a8fb1b845fbb04b28e8f680d040     |
+---------------------------+--------------------------------------+

[root@openstackJuno ~]# neutron port-show 8d9831e0-0076-4b28-8358-c24e505e7b71
+-----------------------+----------------------------------------------------------------------------------------------+
| Field                 | Value                                                                                        |
+-----------------------+----------------------------------------------------------------------------------------------+
| admin_state_up        | True                                                                                         |
| allowed_address_pairs |                                                                                              |
| binding:host_id       | openstackJuno                                                                                |
| binding:profile       | {"pci_slot": "0000:04:10.5", "physical_network": "physnet1", "pci_vendor_info": "8086:1515"} |
| binding:vif_details   | {"port_filter": false, "vlan": "3"}                                                          |
| binding:vif_type      | hw_veb                                                                                       |
| binding:vnic_type     | direct                                                                                       |
| device_id             | 74ddde11-7fee-49c0-9d62-2ee80d8f3752                                                         |
| device_owner          | compute:None                                                                                 |
| extra_dhcp_opts       |                                                                                              |
| fixed_ips             | {"subnet_id": "d0e8be77-5e5d-4d29-ab02-c507068461e6", "ip_address": "192.168.1.9"}           |
| id                    | 8d9831e0-0076-4b28-8358-c24e505e7b71                                                         |
| mac_address           | fa:16:3e:79:55:a1                                                                            |
| name                  | sriovPort2                                                                                   |
| network_id            | 1aed54f9-5ae0-4bc4-a688-dab654c67b4d                                                         |
| security_groups       | e236afa5-f322-4add-8c86-bbb25debc826                                                         |
| status                | ACTIVE                                                                                       |
| tenant_id             | fd987a8fb1b845fbb04b28e8f680d040                                                             |
+-----------------------+----------------------------------------------------------------------------------------------+

[root@openstackJuno ~]# neutron port-show d4ec34d5-9493-43a5-8694-60476f22dd7c
+-----------------------+----------------------------------------------------------------------------------------------+
| Field                 | Value                                                                                        |
+-----------------------+----------------------------------------------------------------------------------------------+
| admin_state_up        | True                                                                                         |
| allowed_address_pairs |                                                                                              |
| binding:host_id       | openstackJuno                                                                                |
| binding:profile       | {"pci_slot": "0000:04:10.7", "physical_network": "physnet1", "pci_vendor_info": "8086:1515"} |
| binding:vif_details   | {"port_filter": false, "vlan": "3"}                                                          |
| binding:vif_type      | hw_veb                                                                                       |
| binding:vnic_type     | direct                                                                                       |
| device_id             | 8949c0c2-06ad-4746-9179-64632a06113a                                                         |
| device_owner          | compute:None                                                                                 |
| extra_dhcp_opts       |                                                                                              |
| fixed_ips             | {"subnet_id": "d0e8be77-5e5d-4d29-ab02-c507068461e6", "ip_address": "192.168.1.8"}           |
| id                    | d4ec34d5-9493-43a5-8694-60476f22dd7c                                                         |
| mac_address           | fa:16:3e:08:15:2e                                                                            |
| name                  | sriovPort1                                                                                   |
| network_id            | 1aed54f9-5ae0-4bc4-a688-dab654c67b4d                                                         |
| security_groups       | e236afa5-f322-4add-8c86-bbb25debc826                                                         |
| status                | ACTIVE                                                                                       |
| tenant_id             | fd987a8fb1b845fbb04b28e8f680d040                                                             |
+-----------------------+----------------------------------------------------------------------------------------------+

[root@openstackJuno ~]# ping -c 4 192.168.1.9
PING 192.168.1.9 (192.168.1.9) 56(84) bytes of data.
From 192.168.1.120 icmp_seq=1 Destination Host Unreachable
From 192.168.1.120 icmp_seq=2 Destination Host Unreachable
From 192.168.1.120 icmp_seq=3 Destination Host Unreachable
From 192.168.1.120 icmp_seq=4 Destination Host Unreachable

--- 192.168.1.9 ping statistics ---
4 packets transmitted, 0 received, +4 errors, 100% packet loss, time 2999ms
pipe 4
[root@openstackJuno ~]


[root@openstackJuno ~]# ip link show enp4s0f1
50: enp4s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000
    link/ether a0:36:9f:0b:fb:fa brd ff:ff:ff:ff:ff:ff
    vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
    vf 1 MAC fa:16:3e:f9:b1:c5, spoof checking on, link-state auto
    vf 2 MAC fa:16:3e:79:55:a1, vlan 3, spoof checking on, link-state auto
    vf 3 MAC fa:16:3e:08:15:2e, vlan 3, spoof checking on, link-state auto

After seeing the VF's configuration's assinged to VM, it looks like all VF's are forming VLAN having the same ID assigned to network. And due to this packets from HOST are dropped. dropped.

Just for checking , i have manaly clear the vlan settings from all VF's VF's

[root@openstackJuno ~]# ip link set enp4s0f1 vf 2 vlan 0
[root@openstackJuno ~]# ip link set enp4s0f1 vf 3 vlan 0
[root@openstackJuno ~]# ip link show enp4s0f1
50: enp4s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000
    link/ether a0:36:9f:0b:fb:fa brd ff:ff:ff:ff:ff:ff
    vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
    vf 1 MAC fa:16:3e:f9:b1:c5, spoof checking on, link-state auto
    vf 2 MAC fa:16:3e:79:55:a1, spoof checking on, link-state auto
    vf 3 MAC fa:16:3e:08:15:2e, spoof checking on, link-state auto

[root@openstackJuno ~]# ping -c 4 192.168.1.9
PING 192.168.1.9 (192.168.1.9) 56(84) bytes of data.
64 bytes from 192.168.1.9: icmp_seq=1 ttl=64 time=0.802 ms
64 bytes from 192.168.1.9: icmp_seq=2 ttl=64 time=0.320 ms
64 bytes from 192.168.1.9: icmp_seq=3 ttl=64 time=0.395 ms
64 bytes from 192.168.1.9: icmp_seq=4 ttl=64 time=0.282 ms

--- 192.168.1.9 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3000ms
rtt min/avg/max/mdev = 0.282/0.449/0.802/0.209 ms
[root@openstackJuno ~]#

So my question is from openstack, is it possible to create network and VM with SR-IOV port without VLAN tag so that we can access from HOST? Or Is there any other way we can access VM without clearing VLAN?

VLAN?