Multiple NICs and DHCP

Asked by Ryota Hashimoto on 2012-03-02

I'm using cloud-init-including image on OpenStack.

When I create an VM instance which has two NICs, one NIC gains IP address but another won't.

[DHCP1]         [DHCP2]
      |                |
     +--(eth0)[VM](eth1)--+
VLAN A             VLAN B

How can I set each IP address from both DHCP servers to both NICs?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu cloud-init Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Ryota Hashimoto (hashimotor) said : #1

boot log from KVM console.log

Begin: Running /scripts/init-bottom ... done.
lxcmount stop/pre-start, process 256^M
cloud-init start-local running: Fri, 02 Mar 2012 04:53:33 +0000. up 3.20 seconds^M
no instance data found in start-local^M
ci-info: lo : 1 127.0.0.1 255.0.0.0 ^M
ci-info: eth1 : 0 02:16:3e:3c:c2:74^M
ci-info: eth0 : 1 10.4.3.5 255.255.255.0 02:16:3e:22:83:f2^M
ci-info: eth0 : 1 10.4.3.5 255.255.255.0 02:16:3e:22:83:f2^M
ci-info: route-0: 0.0.0.0 10.4.3.1 0.0.0.0 eth0 UG^M
ci-info: route-1: 10.4.3.0 0.0.0.0 255.255.255.0 eth0 U^M
cloud-init start running: Fri, 02 Mar 2012 04:53:33 +0000. up 3.36 seconds^M

try:

sudo dhclient eth1
sudo dhclient eth0

Network manager (as far as I know) will only allow one link one interface, you may want to use the /etc/network/interfaces file

Ryota Hashimoto (hashimotor) said : #3

Thanks actionparsnip, that solved my question.

Ryota Hashimoto (hashimotor) said : #4

Tried but failed because of other reasons (maybe tag VLAN configurations.)