Network issue. Ifup says unknown interface
This is the output of ifconfig
# ifconfig
enp0s3 Link encap:Ethernet HWaddr 08:00:27:ef:b6:e6
inet addr:192.168.2.3 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::cf19:776a:4d5c:36e0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:713069 errors:0 dropped:0 overruns:0 frame:0
TX packets:6767 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:45869812 (45.8 MB) TX bytes:667164 (667.1 KB)
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:1108 errors:0 dropped:0 overruns:0 frame:0
TX packets:1108 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:86846 (86.8 KB) TX bytes:86846 (86.8 KB)
When I do
# ifdown enp0s3
It says Unknown interface enp0s3
The network is fine and works without any issues. Its just the command that does not work
Ubuntu 16.04 (Xenial)
Below is the output of ip a s
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
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 group default qlen 1000
link/ether 08:00:27:ef:b6:e6 brd ff:ff:ff:ff:ff:ff
inet 192.168.2.7/24 brd 192.168.2.255 scope global enp0s3
valid_lft forever preferred_lft forever
inet6 fe80::cf19:776a:4d5c:36e0/64 scope link
valid_lft forever preferred_lft forever
Below is my /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
Output of nmcli conn sh
Wired connection 1 42d740b1-21c3-3b7c-8b9e-5922fe8a6380 802-3-ethernet enp0s3
ifup
and ifdown
are used to set up interfaces listed in /etc/network/interfaces
. enp0s3
isn't described in this file, so it's absolutely expected that ifup
and ifdown don't know what to do with it. Add some lines such as
iface enp0s3 inet dhcp
And you'll see that it will work much better.
I used the following commands:
cat /proc/net/dev
ls /sys/class/net
ip link show
ifconfig
sudo ifconfig [interface-name] down / up