diff --git a/server/src/com/cloud/network/router/NetworkHelperImpl.java b/server/src/com/cloud/network/router/NetworkHelperImpl.java index e096439de6e..23cdf1a89c7 100644 --- a/server/src/com/cloud/network/router/NetworkHelperImpl.java +++ b/server/src/com/cloud/network/router/NetworkHelperImpl.java @@ -613,14 +613,21 @@ public class NetworkHelperImpl implements NetworkHelper { @Override public LinkedHashMap> configureDefaultNics(final RouterDeploymentDefinition routerDeploymentDefinition) throws ConcurrentOperationException, InsufficientAddressCapacityException { - final LinkedHashMap> networks = configureGuestNic(routerDeploymentDefinition); + final LinkedHashMap> networks = new LinkedHashMap>(3); + + // 1) Guest Network + final LinkedHashMap> guestNic = configureGuestNic(routerDeploymentDefinition); // 2) Control network s_logger.debug("Adding nic for Virtual Router in Control network "); final List offerings = _networkModel.getSystemAccountNetworkOfferings(NetworkOffering.SystemControlNetwork); final NetworkOffering controlOffering = offerings.get(0); final Network controlConfig = _networkMgr.setupNetwork(s_systemAccount, controlOffering, routerDeploymentDefinition.getPlan(), null, null, false).get(0); + networks.put(controlConfig, new ArrayList()); + // The guest nic has to be added after the Control Nic. + networks.putAll(guestNic); + // 3) Public network if (routerDeploymentDefinition.isPublicNetwork()) { s_logger.debug("Adding nic for Virtual Router in Public network ");