ubuntu升级到16.04后无网络

时间:2018-08-12 10:05:11

标签: ubuntu networking ubuntu-16.04 digital-ocean ifconfig

数字海洋小滴(do-release-upgrade)中的Ubuntu升级。当前是16.04

已登录。

#ping -c3 google.com 
ping: unknown host
sudo service networking status
neworking.service
   Loaded: masked (/dev/null; bad)
   Active: inactive (dead)

不知道为什么它被屏蔽了,但是我没有屏蔽。然后再次

sudo service networking status
networking.service - LSB: Raise network interfaces.
Loaded: loaded (/etc/init.d/networking: bad; vendor preset: enabled)
Drop-In: /run/systemd/generator/networking.service.d
             50-insserv.conf-$network.conf
Active: active (exited) since Sat 2018-08-11 15:04:02 MSK; 16 min ago
Docs: man:systemd-sysv-generator(8)
Process: 943 ExecStop=/etc/init.d/networking stop (code=exited, status=0/SUCCESS
Process: 946 ExecStart=/etc/init.d/networking start (code=exited, status=0/SUCCESS

检查现有接口:

cat /etc/network/interfaces

auto lo
iface lo inet loopback

auto ens3
iface ens3 inet static
    address 162.243.XX.XX
    netmask 255.255.255.0
    gateway 162.243.XX.1
    dns-nameservers 8.8.8.8 8.8.4.4

ifconfig - a

ens3  Link encap:Ethernet  HWaddr 00:1b:fc:2d:21:3b  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


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:38337 errors:0 dropped:0 overruns:0 frame:0
          TX packets:38337 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:3591223 (3.5 MB)  TX bytes:3591223 (3.5 MB)

据我了解,网络服务无法正常运行。 journalctl -u NetworkManager中的/ var / log / syslogor中没有任何内容

尝试刷新接口以使静态ip出现在ens3接口上:

sudo ip addr flush dev ens3

sudo service networking restart

结果ifconfig -a显示绝对相同的输出

我不知道下一步该怎么做。有什么步骤可以解决?也许我没有检查过任何日志文件以查找问题所在?

0 个答案:

没有答案