Ask Your Question
0

unable to create multiple interfaces from one VM attached to the same network

asked 2015-10-26 09:44:16 -0500

abhinav gravatar image

I am using HEAT orchestrator to create a deployment. one of configuration requires creating 2 ports on single VM connecting to same network. 1. creating network net1 2. Create VM with 2ports. VM.port0 = Net1 VM.port1= Net1

server1:

type: OS::Nova::Server
properties:
  name: Server1
  image: { get_param: image }
  flavor: { get_param: flavor }
  key_name: { get_param: key_name }
  networks:
    - port: { get_resource: server1_port0 }
    - port: { get_resource: server1_port1}

server1_port0:

type: OS::Neutron::Port
properties:
  network_id: { get_resource: private_net }
  fixed_ips:
    - subnet_id: { get_resource: private_subnet }

server1_port1:

type: OS::Neutron::Port
properties:
  network_id: { get_resource: private_net }
  fixed_ips:
    - subnet_id: { get_resource: private_subnet }

I get an error saying : Duplicate Port/Network, VM creation failed.

My question is: why nova doesn't allow creating multiple ports attached to same network. same problem is described in

http://specs.openstack.org/openstack/nova-specs/specs/juno/implemented/nfv-multiple-if-1-net.html (http://specs.openstack.org/openstack/...) fix is also propsed : https://review.openstack.org/#/c/26370

Work around is to hot plug the port after VM creation. But I want the deployment to be created using HEAT without manually adding the port from cmd line.

edit retag flag offensive close merge delete

Comments

Any reason, why you are trying to achieve this?

fgorbat gravatar imagefgorbat ( 2015-10-26 13:07:42 -0500 )edit

I am trying to do a LTE-EPC deployment on openstack . LTE-MMe nodes have various interfaces.. so need multiple ips/nics some of them connected to same network.

abhinav gravatar imageabhinav ( 2015-10-29 07:47:47 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-10-29 08:03:20 -0500

abhinav gravatar image

updated 2015-10-30 02:08:35 -0500

I am able to create multiple Nics connected to same network.

neutron.conf --> allow_duplicate_networks = True

nova.conf -->allow _duplicate_networks =True

nova/network/neutronv2/api.py : allow_duplicate_networks = True.

We are able to create VM with 2 nics attached to the same network. BUT

unable to ping all the ips in the same subnet.

only one interface is pingable.

say VM has

eth0 20.0.0.101

eth1 20.0.0.102

I am able to ping 20.0.0.101 but unable to ping 20.0.0.102

when pinging 102 and doing tcpdump -i eth1 : no pkts but tcpdump -i eth0 : icmp req and reply both are going.

Also i did ifconfig eth0 down then after some time ping is going to eth1(20.0.0.102) then quickly if you ping 20.0.0.101 it is un pingable!!!!!

any explanation for this behaviour.

edit flag offensive delete link more

Comments

solved** multiple vEThs are created as discussed above and traffic issue can be resolved in two ways. 1. iptables --flush on compute nodes. 2. add iptable rules on each vm .

abhinav gravatar imageabhinav ( 2015-11-16 04:55:07 -0500 )edit

Hi, i would like to know how you did it to solve the problem adding the iptables rules on each Vm. Exactly wich Iptable rules you need to add?

Thank you.

filatan gravatar imagefilatan ( 2018-12-04 07:32:11 -0500 )edit
0

answered 2015-11-03 05:56:01 -0500

capsali gravatar image

Is a bad practice to have multiple eth on the same subnet on linux from routing point of view. It can be done with some dirty workarounds but it is not recommanded. Instead of issuing nova attach-interface, you should be adding another ip to the first port with nova add-fixed-ip. This way you will have only one interface on the subnet and can create multiple veth on it for multiple IP's (eg eth0:1, eth0:2 and so on).

Alternativly you can create the port using neutron prior to booting and set as many ip's on the port as necessary and then boot up the instance with the created port!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-10-26 09:44:16 -0500

Seen: 2,177 times

Last updated: Nov 03 '15