How to set default server ip and gateway in multiple networks with OpenStack?
Use OpenStack's heat template set several networks as
---
parameters:
...
network:
- network: network1
vnic_type: direct
fixed_ip:
- "IP1"
- network: network2
vnic_type: direct
fixed_ip:
- "IP2"
- network: network3
vnic_type: direct
fixed_ip:
- "IP3"
IP2 and IP3 are the same but from different vlans. IP1 is in the third vlan.
Relation:
- Gateway1: IP1 (vlan1)
- Gateway2: IP2 (vlan2), IP3 (vlan3)
After creating the stack, its server_ip
became IP2(or IP3). And used vlan2(or vlan3)'s gateway as default gateway.
How to set IP1 as server_ip
and use Gateway1
as default gateway?
By using DHCP
Do you mean I should use DHCP?
It is started by neutron-dhcp-agent
Could you tell me how to config it? And how to set right usage in heat template?
Haven;t you set iit during creating the subnets in the database?
$ openstack subnet create --dns-nameserver --gateway