LinuxQuestions.org
Review your favorite Linux distribution.
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-11-2018, 05:50 PM   #1
mgoblue0970
LQ Newbie
 
Registered: Aug 2015
Posts: 25

Rep: Reputation: Disabled
Stuck configuring enp*s* network interface


Hello:

Before posting, I looked at this: https://wiki.centos.org/FAQ/CentOS7#...dd5315906fa493 No help.

Running CentOS 7 here. I have two NICs... they are now named enp0s3 and enp0s8 rather than eth0 and eth1.

For enp0s8 I do NOT want it to autostart. I want to be able to bring it up or down on demand just like in the good 'ol days with ifup/ifdown or ifconfig eth0 up/down.

Those commands may have worked on eth0 but not on enp0s8.

1. What are the commands to bring up or down enp0s8 from the terminal?

Also, I've noticed /etc/sysconfig/network and the network-scripts (for ifcfg-ethN files) are gone.

2. What replaced them? Surely there has to be a file based way I can manage the interfaces -- and WITHOUT using nmtui?!

Thanks in advance for any assistance!
 
Old 06-11-2018, 06:52 PM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,664

Rep: Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199
On my desktop, there are files in /etc/sysconfig/network-scripts/ :
Code:
-rw-------. 1 root root   396 Feb  5 17:03 ifcfg-enp3s0
-rw-r--r--. 1 root root   254 May  3  2017 ifcfg-lo
lrwxrwxrwx. 1 root root    24 Feb  6 12:53 ifdown -> ../../../usr/sbin/ifdown
lrwxrwxrwx. 1 root root    22 Feb  6 12:53 ifup -> ../../../usr/sbin/ifup
Code:
ifdown enp3s0
will bring the NIC down, and
Code:
ifup enp3s0
will bring it back up.
Each NIC will (should) have an ifcfg-* in /etc/sysconfig/network-scripts/ and
Code:
systemctl start network.service
or a reboot will startup both NICs.
Setting the
Code:
ONBOOT=no
inside ifcfg-enp8s0 should prevent it from starting at boot, but I'm not sure if that will keep it from responding to a
Code:
systemctl restart network.service
...and only have one NIC on my pc to test with.

So: The commands are the same, but substitute the new name of the NIC for eth0/1

FWIW, on my headless server, I copied the ifcfg-* files from the old server, which preserved the eth0 name, because the name is one of the values in the ifcfg files. Still only one NIC there, tho, too.

PS: That link you posted says all of the above...wish I'd looked at it first

Last edited by scasey; 06-11-2018 at 06:53 PM.
 
1 members found this post helpful.
Old 06-12-2018, 11:22 AM   #3
mgoblue0970
LQ Newbie
 
Registered: Aug 2015
Posts: 25

Original Poster
Rep: Reputation: Disabled
You got me on the /etc/sysconfig/network-scripts/, I was mistaken on the proper path to the config files.

However, ifup enp0s8 is not working. It times out after a few minutes without bringing up the interface.

I used nmtui to configure enp0s8. Now that I have the proper path, I went and looked at it. Even though I speficied a staid IP address, the ifcfg-enp0s8 has this:

BOOTPROTO=dhcp

with this later in the file:

IPADDR=10.242.34.100

Ugh. So I changed BOOTPROTO to static.

I also added:

NM_CONTROLLED=no

ifup enp0s8 now works.

Thanks for your assistance.
 
Old 06-12-2018, 02:18 PM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,664

Rep: Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199
Happy to help. Please use the Thread Tools to mark the thread Solved.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Configuring Network(BASICS) Do I have only 1 Device(Interface) ? andalogokct CentOS 6 08-17-2015 11:28 AM
There was an error configuring your network interface. egaugup Linux - Server 1 07-23-2012 11:53 AM
Configuring a network interface from a RESCUE system Serapis Linux - Networking 1 07-18-2008 06:42 AM
help required on configuring network interface binumohanr Solaris / OpenSolaris 1 02-13-2006 03:04 AM
Configuring a 4 interface network evalastin Linux - Networking 0 06-28-2004 01:16 PM

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

All times are GMT -5. The time now is 05:27 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