Page 1 of 1

Activating network connections automatically

Posted: 2018/05/27 06:51:00
by aca
Hi,

I have setup two ip addresses on one network interface: conn1, conn2.

In network manager i can only activate one connection manually, and then the second becomes inactive.

I have a scenario where the vm gets migrated to different host on different network, and the second connection conn2 is setup with network configration of second network.
The question:

Is there a way to have both connections active, or at least activate connection from command line, so i could find a way to script it.

I have centos 7.5.1804 installed.


Thank you very much.

Re: Activating network connections automatically

Posted: 2018/05/30 14:41:31
by hunter86_bg
You can start only 1 connection per interface ,and you can easily script it.
Here is an example:

Code: Select all

nmcli con up conn2
This will stop conn1 and up the conn2 with all the routing you have configured for it.