Activating network connections automatically

Issues related to configuring your network
Post Reply
Posts: 1
Joined: 2018/05/27 06:41:39

Activating network connections automatically

Post by aca » 2018/05/27 06:51:00


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.

Posts: 1552
Joined: 2015/02/17 15:14:33
Location: Bulgaria

Re: Activating network connections automatically

Post by hunter86_bg » 2018/05/30 14:41:31

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.

Post Reply