LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't Configure New Network Connection Manually (https://www.linuxquestions.org/questions/linux-newbie-8/cant-configure-new-network-connection-manually-4175678469/)

Merab Sethi 07-10-2020 05:55 AM

Can't Configure New Network Connection Manually
 
Hi, I have been trying to manually configure a network connection but when i am trying to execute the ' ifdown ' & ' ifup ' command it is giving me the error I have shown bellow.


[merab@localhost ~]$ sudo ifdown enp0s8
Error: '/etc/sysconfig/network-scripts/ifcfg-enp0s8' is not an active connection.
Error: no active connection provided.

berndbausch 07-10-2020 07:34 AM

This sounds like RHEL or Centos. Can you share your distro and version?

Guessing: Your version of ifup/ifdown uses NetworkManager, which in turn uses the concept of "connection". You don't have a connection for enp0s8, thus the error.

I believe you can replace ifup/down with a different version, but it depends on your particular distro whether that is advisable.

Merab Sethi 07-10-2020 09:12 AM

Thank you for responding. Yes my distro is RedHat and the version is 8.

berndbausch 07-10-2020 09:24 AM

I would use nmcli in this case.

First, list your connections and list your devices.
Code:

nmcli con
nmcli dev

Normally, you can bring a connection up with nmcli con CONNECTION_NAME up. However, your device might be unmanaged, or there may be other conditions that prevent you from doing this.

I suggest you read Red Hat's documentation, in particular https://access.redhat.com/documentat...ing-networking.

michaelk 07-10-2020 09:52 AM

Network scripts are deprecated in RHEL 8. Networking is completely controlled by Network Manager with ifup/ifdown actually calling nmcli. In addition to the Redhat documents

https://www.cyberciti.biz/faq/how-to...ess-on-rhel-8/


All times are GMT -5. The time now is 06:21 AM.