X

Move your VMware and KVM applications to the cloud without making any changes

  • May 8, 2015

How to configure multiple NICs and multiple IPs per VM on AWS EC2

It is often required to configure more than a single network interface on your VMs, and sometimes one also needs to configure additional IPs on a given NIC. However, it is not as straightforward a task as it may sound, not even on the public cloud. On AWS, for example, you cannot "natively” define as many interfaces as you’d like, nor as many additional (secondary) IP addresses on each NIC, and in order to be able to define a large number of NICs, you’ll need to lease the larger, more expensive hosts (See the list of maximum allowed ENI and IP address on AWS). However Ravello uses nested virtualization to enable you to easily set multiple NICs and multiple IPs and run it on AWS or Google Cloud. In this post I’ll illustrate how this can be achieved, and what are the few simple actions required to be taken in order to achieve this.

Assigning Multiple NICs to a Single VM

  1. Select the VM you want to edit, and go to the Network tab in the right-hand side VM properties tab.

    In the image you can see the list of already defined network interfaces, each with its own configuration of DHCP or static IP and external connectivity.
  2. In order to add a new interface, simply click the “Add +” link, and a new interface definition section will appear.
  3. Here you can define the NIC’s name, MAC address, device type, and IP address configuration.
  4. You can also define what type of external connectivity this NIC will have (public IP, Elastic IP or port forwarding)

For more information about how you can configure your application’s network, please refer to our post about software defined networking.

Assigning Multiple Secondary IPs to a NIC

You are able to add multiple secondary IP addresses to each of the NICs on your VMs. Adding a secondary IP is done in the following way:

  1. Select the VM you want to edit, and go to the Network tab in the right-hand side VM properties tab.
  2. Select the NIC you want to edit, and press “Advanced”
  3. At the bottom of the NIC’s section you’ll notice the “Additional IP addresses” section.
  4. In order to add a new secondary IP address, simply click the “Add +” link, and a new interface definition section will appear.
  5. Now you can define the additional IP address, Netmask and Gateway parameters.
    Note the secondary IP address cannot be configured by a DHCP server, and must always be static.
  6. You can also define what type of external connectivity this NIC will have (public IP, Elastic IP or port forwarding)

Summary

In this short post we illustrated how you can use Ravello in order to create multiple NICs and secondary IP addresses on AWS or Google cloud, without being concerned with each cloud’s constraints and limitation. Using Ravello, configuring NICs and IPs is easy and straightforward, and allows you to focus solely on building your application and not on any infrastructure specifics. Feel free to sign up for a free trial and see how this facilitates your labs for development, testing, training, demos and more.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha