2

My 'nmcli conn show' & /'etc/sysconfig/network-scripts' config files don't match up, showing just one connection/devices of each:

[root@ciroc network-scripts]# ls |grep ifcfg
ifcfg-enp0s3
ifcfg-lo
[root@ciroc network-scripts]# nmcli conn show
NAME                UUID                                  TYPE            DEVICE 
Wired connection 1  644049a4-bf5c-41ce-aa77-477b567df2e3  802-3-ethernet  enp0s8 

However, when I do 'ip addr show' it shows two connections/devices. I do indeed have two devices set up on this VM.

[root@ciroc network-scripts]# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 08:00:27:2a:8b:80 brd ff:ff:ff:ff:ff:ff
    inet 192.168.56.112/24 brd 192.168.56.255 scope global enp0s3
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe2a:8b80/64 scope link 
       valid_lft forever preferred_lft forever
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 08:00:27:6b:72:ba brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.4/24 brd 10.0.2.255 scope global dynamic enp0s8
       valid_lft 779sec preferred_lft 779sec
    inet6 fe80::a00:27ff:fe6b:72ba/64 scope link 
       valid_lft forever preferred_lft forever

Taking a look at the routes:

[root@ciroc network-scripts]# ip route show
default via 10.0.2.1 dev enp0s8  proto static  metric 1024 
10.0.2.0/24 dev enp0s8  proto kernel  scope link  src 10.0.2.4 
169.254.0.0/16 dev enp0s3  scope link  metric 1002 
192.168.56.0/24 dev enp0s3  proto kernel  scope link  src 192.168.56.112 

Why is enp0s3 missing from the nmcli? and enp0s8 missing from the network-scripts part?

3
  • check out the files ifcfg-enp0s3 e ifcfg-enp0s8 inside etc/sysconfig/network-scripts/. Both have the parameter NM_CONTROLLED=yes ? – user34720 Feb 5 '15 at 11:45
  • As mentioned in the first part of my post, 'ifcfg-enp0s8' file is missing. I never deleted it, this is a fresh install. – nehalpatels Feb 5 '15 at 16:16
  • Well, the default behavior of the parameter NM_CONTROLLED= is to set the no value. Try to create this file copying from the other interface, and removing UUID HWADDR and renaming the interface NAME parameter... – user34720 Feb 5 '15 at 19:14
3

enp0s3 is managed by system scripts under etc/sysconfig/network-scripts/; i.e. that network will be configured on boot even if NetworkManager isn't running. enp0s8 is not managed by system scripts (as there's no network script to set it up).

enp0s8 instead is managed by NetworkManager; i.e. that network will be configured by NetworkManager once NetworkManager starts. nmcli only shows the connections managed by NetworkManager, and NetworkManager itself makes sure it doesn't interfere with other network interfaces configured via network scripts. So basically NetworkManager (and therefore nmcli) will ignore enp0s3.

ip addr and ip route both talk to the kernel asking which interfaces and routes are available in the system. The kernel doesn't care if these are managed via system scripts or NetworkManager.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.