NIC not listed in network-scripts

Issues related to configuring your network
Post Reply
daftendireckt
Posts: 4
Joined: 2014/09/17 11:05:17

NIC not listed in network-scripts

Post by daftendireckt » 2014/09/17 11:19:07

Hi

I have installed CentOS 7 minimal with 2 NICs and I need to configure a manual IP address to one of them. The strange thing is that both interfaces are listed in ifconfig output but only one them shows up in /etc/sysconfig/network-scripts/ :

Code: Select all

[dockmon@localhost ~]$ ifconfig
enp0s25: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.254.120.191  netmask 255.255.255.0  broadcast 10.254.120.255
        inet6 fe80::20b:abff:fe81:653c  prefixlen 64  scopeid 0x20<link>
        ether 00:0b:ab:81:65:3c  txqueuelen 1000  (Ethernet)
        RX packets 100  bytes 10266 (10.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 43  bytes 7197 (7.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 23  memory 0xfebc0000-febe0000

enp0s29f7u2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.254.120.194  netmask 255.255.255.0  broadcast 10.254.120.255
        inet6 fe80::a2ce:c8ff:fe00:40b2  prefixlen 64  scopeid 0x20<link>
        ether a0:ce:c8:00:40:b2  txqueuelen 1000  (Ethernet)
        RX packets 12626  bytes 1121924 (1.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 238  bytes 28109 (27.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 4  bytes 420 (420.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4  bytes 420 (420.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[dockmon@localhost ~]$ ls /etc/sysconfig/network-scripts/
ifcfg-enp0s25  ifdown-ippp  ifdown-routes    ifup          ifup-ipv6   ifup-ppp       ifup-tunnel
ifcfg-lo       ifdown-ipv6  ifdown-sit       ifup-aliases  ifup-isdn   ifup-routes    ifup-wireless
ifdown         ifdown-isdn  ifdown-Team      ifup-bnep     ifup-plip   ifup-sit       init.ipv6-global
ifdown-bnep    ifdown-post  ifdown-TeamPort  ifup-eth      ifup-plusb  ifup-Team      network-functions
ifdown-eth     ifdown-ppp   ifdown-tunnel    ifup-ippp     ifup-post   ifup-TeamPort  network-functions-ipv6
[dockmon@localhost ~]$
Any idea on what's going on? FYI, enp0s29f7u2 is an USB3/Ethernet adapter.

vanecka
Posts: 45
Joined: 2010/01/28 21:05:11
Location: University of the Free State - South Africa
Contact:

Re: NIC not listed in network-scripts

Post by vanecka » 2014/10/22 10:37:14

The network device(s) are controlled using NetworkManager:

Code: Select all

rpm -q NetworkManager
You can create your own configuration file, or use the NetworkManager terminal user interface to generate one for you. Note that if your IP is configured automatically (DHCP),
you may not have a configuration file under /etc/sysconfig/network-scripts/ but you can create one if you'd like.

If you use the terminal interface to manually configure an interface, a configuration file will be created under /etc/sysconfig/network-scripts/

Code: Select all

#Install the NetworkManager-tui, if it is not installed:
rpm -q NetworkManager-tui  ||  yum -y install NetworkManager-tui

#Run the configuration manager (Note that you can rename the "Profile name" to eg. enp0s29f7u2  - this name is used  for the script name too) :
/usr/bin/nmtui-edit

#Restart the NetworkManager:
systemctl restart  NetworkManager.service

ls /etc/sysconfig/network-scripts/ifcfg-*
/etc/sysconfig/network-scripts/ifcfg-eth0  /etc/sysconfig/network-scripts/ifcfg-lo  /etc/sysconfig/network-scripts/ifcfg-enp0s29f7u2

Post Reply