LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-05-2018, 12:58 AM   #1
ilesterg
Member
 
Registered: Jul 2012
Location: München
Distribution: Debian, CentOS/RHEL
Posts: 587

Rep: Reputation: 72
Centos 7 NetworkManager does not read subinterfaces


Hello!

I have a Centos 7.4 setup with NetworkManager handling the networking, and I can't do the usual "systemctl disable NetworkManager; systemctl enable network" because of company restrictions.

Anyway..I was trying to add a sub-interface using nmtui, and I was able to. However, it needed a server restart to take effect. restarting or reloading the NetworkManager service doesn't add the sub interfaces.

The following don't work either:
Code:
nmcli connection reload
nmcli connection load /etc/sysconfig/network-scripts/ifcfg-ens160
Any idea how to bring the sub interfaces online without rebooting the server?

TIA.
 
Old 06-05-2018, 07:37 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
You could just try:
ifup <sub-interface>
(e.g. ifup eth2:1 or ifup em1:1)

If that doesn't work:
ifdown <interface>;ifup <interface>
Where interface is the primary interface to which you added a sub-interface. (e.g. eth2 if your sub is eth2:1)

Typically it will bounce the interface fast enough that you won't lose connection even if you're on that interface when running the command. However, it is a good idea to be logged in via console or an alternate interface "just in case".
 
1 members found this post helpful.
Old 06-05-2018, 09:50 PM   #3
ilesterg
Member
 
Registered: Jul 2012
Location: München
Distribution: Debian, CentOS/RHEL
Posts: 587

Original Poster
Rep: Reputation: 72
Quote:
Originally Posted by MensaWater View Post
You could just try:
ifup <sub-interface>
(e.g. ifup eth2:1 or ifup em1:1)

If that doesn't work:
ifdown <interface>;ifup <interface>
Where interface is the primary interface to which you added a sub-interface. (e.g. eth2 if your sub is eth2:1)

Typically it will bounce the interface fast enough that you won't lose connection even if you're on that interface when running the command. However, it is a good idea to be logged in via console or an alternate interface "just in case".
Thank you very much!

Any idea why NetworkManager does not handle that? I also noticed that even stopping NetworkManager does not bring the network down, in contrast to the behavior of network service in CentOS/RHEL6 and earlier.

Anyway.. for the benefit of others..

For NetworkManager-managed interfaces, this works.
Code:
ifdown <interface>;ifup <interface>
For legacy, this one works, no need to restart the network service contrary to what the internet says.
Code:
ifup <interface>:<subinterface>
 
1 members found this post helpful.
  


Reply

Tags
centos, networking, networkmanager, systemd



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] I can't manage NetworkManager via /etc/rc.d/rc.networkmanager script igadoter Slackware 20 03-22-2018 03:17 PM
CentOS 7, enable NetworkManager.service has errors thllgo Linux - Networking 1 02-06-2016 05:11 AM
[SOLVED] CentOS 7 install hanging on NetworkManager startup herkalurk CentOS 4 12-01-2015 11:55 PM
Subinterfaces reliable? techux Linux - Networking 2 05-27-2013 01:14 AM
Vlans + subinterfaces on RH9.0 homa2001 Linux - Networking 0 11-29-2005 04:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration