8

I'm having a strange problem on a RPi 2 Model B. I just reformatted the sd card with the newest version of Raspbian and done all the sudo get update/upgrade stuff. I've plugged in an ethernet connection and a wifi-dongle. They both are operational. I have internet access from the ethernet cable.

In terminal, running

sudo ifdown wlan0

returns

ifdown: interface wlan0 not configured

even if I have run

ifconfig wlan0

which outputs

wlan0: flags=4099<UP,BROADCAST,MULTICASST> mtu 1500
        ether 00:0f:60:07:fa:ef txqueuelen 1000 (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 0 bytes 0 (0.0 B)
        TX errors 0 dropped 0 overruns 0  carrier 0  collisions 0

Why doesn't ifdown work (can I fix it)? It doesn't work for my eth0 connection either. Also my /etc/network/interfaces file seems a bit weird to me, the only line in it that's not commented is:

source-directory /etc/network/interfaces.d

There is nothing in /etc/network/interfaces.d. The reason why I want to run ifdown is that I want to use the raspberry pi as a router and one of the steps in the guide I'm following says to use that. Either way, I'll need it to be functional in the future (and ifup outputs the same error message).

Notes: In the taskbar, hovering over the internet icon shows a tooltip: Connection to dhcpd lost. I don't know what it means, but Wicd Network Manager shows that I have access to both a wired network and I can see all of the wifi networks from the Wicd GUI. lsusb shows the wireless network adapter. iw list shows the normal stuff. dmesg | more shows the USB Receiver and normal stuff.

88weighed
  • 915
  • 6
  • 17
Paul Ngo
  • 83
  • 1
  • 1
  • 3

1 Answers1

12

ifdown/ifup and ifconfig are different ways to control your network interfaces.

ifconfig controls your interfaces directly, ie: ifconfig wlan0 down

ifdown wlan0 will try to use configuration in /etc/network/interfaces

Since you state that there is no config there, the ifup and ifdown commands will fail.

EDIT: As Milliways stated. ifconfig is depracated.

The method that should be used now is the ip command. ip link set wlan0 down is now the way to directly control your interface.

88weighed
  • 915
  • 6
  • 17