侧边栏壁纸
博主头像
落叶人生博主等级

走进秋风,寻找秋天的落叶

  • 累计撰写 130562 篇文章
  • 累计创建 28 个标签
  • 累计收到 9 条评论
标签搜索

目 录CONTENT

文章目录

ubuntu 16.04 no valid active connections found

2023-11-05 星期日 / 0 评论 / 0 点赞 / 37 阅读 / 1318 字

在虚拟机中安装ubuntu 16.04用的桥接模式,设置静态ip在interfaces中修改: auto ens33 iface ens33 inet static address 192.168.1

在虚拟机中安装ubuntu 16.04用的桥接模式,设置静态ip在interfaces中修改:

auto ens33
iface ens33 inet static
address 192.168.1.80
netmask 255.255.255.0
gateway 192.168.1.1
//用桥接是为了用putty,ssh虚拟机方便,但是不能上网

重新切换NAT上网模式后发现上不了网,需要修改interfaces

auto lo

iface lo inet loopback
重启后就可以上网了。

 

还有一种没有验证的方法:

ubuntu 重启网卡方法
      查看网卡信息: ifconfig
      设定一个网卡IP:ifconfig eth1 192.168.1.10 netmask 255.255.255.0
      重启网卡使设定生效:sudo /etc/init.d/networking restart
      用ubuntu的系统——>系统管理——>网络的网络设置
      关闭网卡 ifdown eth0
      开启网卡 ifup eth0
      重启网卡,优点是可以指定网卡,不影响其他网络接口2.上面设置网卡信息后,重启发现网卡又恢复了,这在前面加上自动加载网卡auto eth0,重启后就会显示信息了。

广告 广告

评论区