ubuntu – 网络问题. Ifup说未知界面

前端之家收集整理的这篇文章主要介绍了ubuntu – 网络问题. Ifup说未知界面前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
这是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)

当我做

# ifdown enp0s3

它说Unknown interface enp0s3

网络很好,工作没有任何问题.
它只是不起作用的命令

Ubuntu 16.04(Xenial)

以下是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,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

下面是我的/ etc / network / interfaces

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

输出nmcli conn sh

Wired connection 1  42d740b1-21c3-3b7c-8b9e-5922fe8a6380  802-3-ethernet  enp0s3
ifup和ifdown用于设置/ etc / network / interfaces中列出的接口. enp0s3没有在这个文件中描述,所以绝对希望ifup和ifdown不知道如何处理它.添加一些如
iface enp0s3 inet dhcp

你会发现它会更好地运作.

原文链接:https://www.f2er.com/ubuntu/348737.html

猜你在找的Ubuntu相关文章