Quantcast
Channel: The Ravello Blog
Viewing all articles
Browse latest Browse all 333

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

$
0
0

Advanced Enterprise Networking In AWS EC2 - A Hands On Guide

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.
    defined-network-interfaces
    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. add-new-interface

  5. 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, add-secondary-IPand a new interface definition section will appear.
  5. define-netmask-gateway

  6. 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.
  7. 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.

The post How to configure multiple NICs and multiple IPs per VM on AWS EC2 appeared first on The Ravello Blog.


Viewing all articles
Browse latest Browse all 333

Trending Articles