OVH Community, your new community space.

2 NICs


vaarsn
10-11-2014, 15:43
He wants to setup his VM with multiple network cards to use multiple IPs.
You are right.

heise
10-11-2014, 13:26
ESXi VM (CentOS)
He wants to setup his VM with multiple network cards to use multiple IPs.

Neil
10-11-2014, 12:40
Hi

Does your server actually have two nics with network access?

vaarsn
07-11-2014, 12:09
About a week I'm trying to resolve the problem.
I changed my original IPs for security reasons

Please advice me how to use 2 separate NICs under single VM.

I have an ESXi VM (CentOS).

I did everything in accordance with the http://help.ovh.co.uk/bridgeclient

In a few words (to avoid further misunderstanding or wrong suggestions):

1. To bind one public IP I need to generate through the panel provider for his virtual MAC.

2. This MAC I specify in the settings of the virtual network card for a specific VM.

3. Repeat the same steps for the second NIC.

I performed a tests with several configurations below:

Method 1)

Adapter eth0:
Code:
     root @ srv [/etc/sysconfig/network-scripts] # cat ifcfg-eth0
DEVICE = eth0
HWADDR = 00: 50: 56: 0B: 84: B7
TYPE = Ethernet
ONBOOT = yes
NM_CONTROLLED = no
BOOTPROTO = none
IPADDR = 192.95.38.13
NETMASK = 255.255.255.255
GATEWAY = 192.99.161.254
IPV6INIT = no
USERCTL = no
ARP = yes
Adapter eth1:
Code:
     root @ srv [/etc/sysconfig/network-scripts] # cat ifcfg-eth1
DEVICE = eth1
HWADDR = 00: 50: 56: 05: 15: 9B
TYPE = Ethernet
ONBOOT = yes
NM_CONTROLLED = no
BOOTPROTO = none
IPADDR = 198.50.158.9
NETMASK = 255.255.255.255
GATEWAY = 192.99.161.254
IPV6INIT = no
USERCTL = no
ARP = yes
The route for eth0:
Code:
root @ srv [/etc/sysconfig/network-scripts] # cat route-eth0
192.99.161.254 dev eth0
default via 192.99.161.254 dev eth0
The route for eth1:
Code:
root @ srv [/etc/sysconfig/network-scripts] # cat route-eth1
192.99.161.254 dev eth1
default via 192.99.161.254 dev eth1
where:

192.95.38.13 and 198.50.158.9 - Public IPs

192.99.161.254 - a single gateway to all IP, which gave me a provider (such a configuration requires the provider itself).

255.255.255.255 - actually mask for each IP (such mask also requires the provider).



This configuration works only if one of both adapters is inactive, but not simultaneously. Because when restarting the network adapter is first turned on first, then he is always active. If on the same server (where installed ESXi) I put the same WHM (cPanel), then all the work at all without any additional distortions. Ie added in WHM necessary IP and drove off. Ie problems somewhere in the settings of the guest OS (incorrectly prescribed Roth?) or in the connection settings ESXi (what could it be? for example the same promiscuous mode, etc.)


Method 2 - Alias)


Through OVH management panel I added (I understand it's absurd) 1 MAC for 192.95.38.13 and 198.50.158.9.


Adapter eth0:

Code:
root @ srv [/etc/sysconfig/network-scripts] # cat ifcfg-eth0
DEVICE = eth0
HWADDR = 00: 50: 56: 0B: 84: B7
TYPE = Ethernet
ONBOOT = yes
NM_CONTROLLED = no
BOOTPROTO = none
IPADDR = 192.95.38.13
NETMASK = 255.255.255.255
GATEWAY = 192.99.161.254
IPV6INIT = no
USERCTL = no
ARP = yes
Adapter eth0:0:
Code:
root @ srv [/ etc / sysconfig / network-scripts] # cat ifcfg-eth0: 0
DEVICE = eth0: 0
BOOTPROTO = none
IPADDR = 198.50.158.9
NETMASK = 255.255.255.255
ONBOOT = yes
BROADCAST = 198.50.158.9
Route (the same as it was before):
Code:
root @ srv [/etc/sysconfig /network-scripts] # cat route-eth0
192.99.161.254 dev eth0
default via 192.99.161.254 dev eth0
It works, but the picture is worse. Also I'm getting the error during restart of network interfaces:

SIOCADDRT: No such process

I did no more other system settings with the system. Please advice me how to use 2 separate NICs under single VM.

I really hope for advice that will help me to solve that, sine I'm playing with this issue about around the week.
Thank you.