ifcfg is all we have. How do we set up a network interface

Issues related to configuring your network
Post Reply
1885
Posts: 139
Joined: 2014/10/25 13:33:03

ifcfg is all we have. How do we set up a network interface

Post by 1885 » 2014/12/01 23:14:42

We just did a minimal install with centos 7. ifcfg is all we have to connect .
Please throw me a bone.

Our network scripts do not work:
#pwd /etc/sysconfig/network-scripts
#ls
ifcfg-enp4s0 ifdown-ppp ifup-eth ifup-sit
ifcfg-lo ifdown-routes ifup-ippp ifup-Team
ifdown ifdown-sit ifup-ipv6 ifup-TeamPort
ifdown-bnep ifdown-Team ifup-isdn ifup-tunnel
ifdown-eth ifdown-TeamPort ifup-plip ifup-wireless
ifdown-ippp ifdown-tunnel ifup-plusb init.ipv6-global
ifdown-ipv6 ifup ifup-post network-functions
ifdown-isdn ifup-aliases ifup-ppp network-functions-ipv6
ifdown-post ifup-bnep ifup-routes
[root@uomo network-scripts]#

# ifcfg
Usage: ifcfg DEV [[add|del [ADDR[/LEN]] [PEER] | stop]
add - add new address
del - delete address
stop - completely disable IP
[root@uomo cwc]#

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: ifcfg is all we have. How do we set up a network inter

Post by scottro » 2014/12/02 03:33:36

You might have NetworkManager. If so, there's probably a way to use it. I don't know because I remove it quickly.

You probably have the ip command. I have a page on it with a link to another cheat sheet at http://srobb.net/ip.html

Usually, even if you stop NetworkManager it's doing something behind the scenes, to the point where I just find it quicker to reboot.

So, you could see if you have it first


systemctl status NetworkManager (or maybe NetworkManager.service, I'm not sure).

If so then

systemctl disable NetworkManager.service


Unless you want to use it, of course.

Then you can probably use the ip command.
New users should check the FAQ and Read Me First pages

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: ifcfg is all we have. How do we set up a network inter

Post by gerald_clark » 2014/12/02 03:46:14


1885
Posts: 139
Joined: 2014/10/25 13:33:03

Re: ifcfg is all we have. How do we set up a network inter

Post by 1885 » 2014/12/02 23:31:24

Centos is not picking up the NIC.
I'll resort to plan b. Get the firmware or reinstall with the livecd.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: ifcfg is all we have. How do we set up a network inter

Post by TrevorH » 2014/12/03 08:56:37

CentOS is picking up your NIC, it's just not called what you think it might be. You have a file there called ifcfg-enp4s0 which is your network interface.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

1885
Posts: 139
Joined: 2014/10/25 13:33:03

Re: ifcfg is all we have. How do we set up a network inter

Post by 1885 » 2014/12/27 14:39:57

got things fixed. had to install a pci 3com 10/100 to get a connection

Post Reply