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]
      |                |
VLAN A             VLAN B

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

Question information

English Edit question
Ubuntu cloud-init Edit question
No assignee Edit question
Solved by:
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 ^M
ci-info: eth1 : 0 02:16:3e:3c:c2:74^M
ci-info: eth0 : 1 02:16:3e:22:83:f2^M
ci-info: eth0 : 1 02:16:3e:22:83:f2^M
ci-info: route-0: eth0 UG^M
ci-info: route-1: eth0 U^M
cloud-init start running: Fri, 02 Mar 2012 04:53:33 +0000. up 3.36 seconds^M


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