LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-04-2020, 06:49 PM   #1
Gene C
LQ Newbie
 
Registered: Jun 2020
Posts: 9

Rep: Reputation: Disabled
Interface not configured - I can't use ifup or ifdown


I need a simple way to bring lan and wireless devices up and down in a script. Hence ifupdown. I have configured /etc/network/interfaces and NetworkManager.conf as shown below. What am I missing?

uname -a
Linux Bill-Ubuntu 4.15.0-118-generic #119~16.04.1-Ubuntu SMP Tue Sep 8 14:45:47 UTC 2020 i686
i686 i686 GNU/Linux

cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
iface enp8s8 inet static
address 192.168.1.165
netmask 255.255.255.0

cat /etc/NetworkManager/NetworkManager.conf
[ifupdown]
managed=true

ifconfig
enp8s8 Link encap:Ethernet HWaddr 00:16:d4:32:8c:3d
inet addr:192.168.1.165 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::b521:b762:ca4a:d0c6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6459113 errors:0 dropped:0 overruns:0 frame:0
TX packets:1234859 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1557602946 (1.5 GB) TX bytes:137259083 (137.2 MB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:20152 errors:0 dropped:0 overruns:0 frame:0
TX packets:20152 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1842616 (1.8 MB) TX bytes:1842616 (1.8 MB)

wlan Link encap:Ethernet HWaddr 7c:a7:b0:be:e5:8f
inet addr:192.168.1.175 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::23d4:aee5:eb73:11a9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8524 errors:0 dropped:126945 overruns:0 frame:0
TX packets:56 errors:0 dropped:5 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1589094017 (1.5 GB) TX bytes:1612227 (1.6 MB)

sudo ifdown enp8s8
ifdown: interface enp8s8 not configured
 
Old 11-04-2020, 07:25 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,770

Rep: Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933
Might have to restart network manager. Also try

sudo nmcli con up enp8s8
sudo nmcli con down enp8s8
 
Old 11-05-2020, 07:08 PM   #3
Gene C
LQ Newbie
 
Registered: Jun 2020
Posts: 9

Original Poster
Rep: Reputation: Disabled
Interface not configured - I can't use ifup or ifdown

Thanks for your suggestion of using nmcli to take devices up or down. Initially when I took any device down, it would automatically restart. I solved the wireless part by modifying the connection to NOT automatically connect when available. However I still have a problem with the ethernet. Whenever I take the device down, it comes back up a couple of seconds later. Any ideas how to prevent it from restarting?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
IPv6 only works as configured when ifdown/ifup eth0 - not on reboot maxrate Linux - Networking 3 11-02-2009 05:42 PM
how to send DHCP request without using ifup nor ifdown exabrial Linux - Networking 1 08-23-2004 10:37 AM
slack 9.1 and ifdown/ifup? redbull Linux - Networking 3 04-04-2004 09:11 AM
ifup/ifdown? redbull Linux - Software 2 04-04-2004 04:30 AM
dhclient and ifup/ifdown Atroxic Linux - Networking 0 10-19-2003 12:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration