Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] nmcli, can not activate wired network adapter

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
Olsen17
Posts: 2
Joined: 2018-12-12 12:08

[SOLVED] nmcli, can not activate wired network adapter

#1 Post by Olsen17 »

I have a virtual server running Debian 9 on VMware ESXi. This server is used for the FOG free computer cloning and management software.

The server has network connectivity, and the cloning software works. However, the server can no longer resolve host names in DNS, which is keeping me from updating FOG from version 1.5.4 to 1.5.5, as it cannot download necessary packages from the Internet. I do not know what caused this. It is possible that a certain coworker has made unwise configuration changes.

I do not know Linux very well, but as far as i understand, network configuration changes, on this version of Debian, should preferably be done through the NetworkManager nmcli command. It seems that my coworker did not use nmcli when he changed the server's IP address a few months ago, as when I started looking into this, the NetworkManager settings still had the old IP address that the server was not actually using. I corrected that, by the way. But NetworkManager is no longer managing the wired network adapter, and i think this might be the core of the problem. I believe that if I could get NetworkManager to manage the network adapter, the DNS problems would be fixed, or easy to fix. The output of nmcli c show Wired\ connection\ 1 contains the correct DNS servers.

I have made sure that our network firewall is not blocking DNS requests from the FOG server to the DNS servers, which are in a different subnet. I can also ping our DNS servers from the FOG server.

This is the output of the nmcli command:
ens192: unmanaged
"VMware VMXNET3 Ethernet Controller"
ethernet (vmxnet3), 00:50:56:xx:xx:xx, hw, mtu 1500

I have ran nmcli device set ens192 managed yes. This produces no output at all, just a new prompt. But the network adapter still shows as unmanaged. So I tried nmcli device reapply ens192, and got this error:

Error: Reapplying connection to device 'ens192' (/org/freedesktop/NetworkManager/Devices/2) failed: Device is not activated

I have tried googling this, but found nothing. I have little Linux experience. I would appreciate it very much if someone would help me fix this.


Output of some more nmcli commands:

root@fogserver:/etc# nmcli device show
GENERAL.DEVICE: ens192
GENERAL.TYPE: ethernet
GENERAL.HWADDR: 00:50:56:xx:xx:xx
GENERAL.MTU: 1500
GENERAL.STATE: 10 (unmanaged)
GENERAL.CONNECTION: --
GENERAL.CON-PATH: --
WIRED-PROPERTIES.CARRIER: on
IP4.ADDRESS[1]: 10.80.1.9/24
IP4.GATEWAY: --
IP6.ADDRESS[1]: removed
IP6.GATEWAY: --

root@fogserver:/etc# nmcli c show
NAME UUID TYPE DEVICE
Wired connection 1 5ed43a63-removed 802-3-ethernet --

root@fogserver:/etc# nmcli c show Wired\ connection\ 1
connection.id: Wired connection 1
connection.uuid: 5ed43a63-removed
connection.stable-id: --
connection.interface-name: ens192 This was probably set by me in an attempt to solve the problem. Maybe i should clear it?
connection.type: 802-3-ethernet
connection.autoconnect: yes
connection.autoconnect-priority: 0
connection.autoconnect-retries: -1 (default)
connection.timestamp: removed
connection.read-only: no
connection.permissions:
connection.zone: --
connection.master: --
connection.slave-type: --
connection.autoconnect-slaves: -1 (default)
connection.secondaries:
connection.gateway-ping-timeout: 0
connection.metered: unknown
connection.lldp: -1 (default)
802-3-ethernet.port: --
802-3-ethernet.speed: 0
802-3-ethernet.duplex: --
802-3-ethernet.auto-negotiate: no
802-3-ethernet.mac-address: --
802-3-ethernet.cloned-mac-address: --
802-3-ethernet.generate-mac-address-mask:--
802-3-ethernet.mac-address-blacklist:
802-3-ethernet.mtu: auto
802-3-ethernet.s390-subchannels:
802-3-ethernet.s390-nettype: --
802-3-ethernet.s390-options:
802-3-ethernet.wake-on-lan: 1 (default)
802-3-ethernet.wake-on-lan-password: --
ipv4.method: manual
ipv4.dns: xx.xx.0.2,xx.xx.0.3
ipv4.dns-search:
ipv4.dns-options: (default)
ipv4.dns-priority: 0
ipv4.addresses: xx.xx.x.x/24
ipv4.gateway: xx.xx.1.1
ipv4.routes:
ipv4.route-metric: -1
ipv4.ignore-auto-routes: no
ipv4.ignore-auto-dns: no
ipv4.dhcp-client-id: --
ipv4.dhcp-timeout: 0
ipv4.dhcp-send-hostname: yes
ipv4.dhcp-hostname: --
ipv4.dhcp-fqdn: --
ipv4.never-default: no
ipv4.may-fail: yes
ipv4.dad-timeout: -1 (default)
ipv6.method: auto
ipv6.dns:
ipv6.dns-search:
ipv6.dns-options: (default)
ipv6.dns-priority: 0
ipv6.addresses:
ipv6.gateway: --
ipv6.routes:
ipv6.route-metric: -1
ipv6.ignore-auto-routes: no
ipv6.ignore-auto-dns: no
ipv6.never-default: no
ipv6.may-fail: yes
ipv6.ip6-privacy: 2 (enabled, prefer temporary IP)
ipv6.addr-gen-mode: eui64
ipv6.dhcp-send-hostname: yes
ipv6.dhcp-hostname: --
ipv6.token: --
proxy.method: none
proxy.browser-only: no
proxy.pac-url: --
proxy.pac-script: --
Last edited by Olsen17 on 2018-12-12 16:42, edited 1 time in total.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: nmcli, can not activate wired network adapter

#2 Post by Head_on_a_Stick »

Olsen17 wrote:This is the output of the nmcli command:
ens192: unmanaged
"VMware VMXNET3 Ethernet Controller"
ethernet (vmxnet3), 00:50:56:B0:E4:ED, hw, mtu 1500
Check /etc/network/interfaces and any files under /etc/network/interfaces.d/ for any stanzas configuring the ethernet interface, I think NM will disregard any that are mentioned in those files.

I would actually recommend disabling NetworkManager and switching to ifupdown & /ect/network/interfaces{,.d/} for all connections, the overhead is lower.
deadbang

Olsen17
Posts: 2
Joined: 2018-12-12 12:08

Re: nmcli, can not activate wired network adapter

#3 Post by Olsen17 »

Head_on_a_Stick wrote:
Olsen17 wrote:This is the output of the nmcli command:
ens192: unmanaged
"VMware VMXNET3 Ethernet Controller"
ethernet (vmxnet3), 00:50:56:xx:xx:xx, hw, mtu 1500
Check /etc/network/interfaces and any files under /etc/network/interfaces.d/ for any stanzas configuring the ethernet interface, I think NM will disregard any that are mentioned in those files.
That was the problem, thanks! Found the stanzas in /etc/network/interfaces, commented them out, and rebooted the server. NM now manages the network adapter, DNS works again, and I was able to update FOG to the newest version. I really should have figured this out myself, it was so simple. Again, thank you!

Post Reply