背景:用着实验室代理服务器上网。

原因:网关和DNS没有设置正确
网关和DNS参照 真机cmd在命令窗口使用ipconfig  /all命令查看
 
虚拟机:
sudo gedit /etc/network/interfaces
# The primary network interface
auto eth0
iface eth0 inet static
address 10.62.118.243
gateway 10.62.118.253
netmask 255.255.254.0
 
sudo gedit /etc/resolv.conf  (此处设置的ip和你物理机的DNS相同)
nameserver 202.197.96.1
 nameserver 202.197.96.16
 
sudo gedit /etc/resolvconf/resolv.conf.d/base
nameserver 202.197.96.1
nameserver 202.197.96.16
 
重启网络,使网络配置生效,
sudo /etc/init.d/networking restart
 
设置代理:
setting---》network---》设置代理信息(ip:202.197.96.12  端口:8080)
 
重启虚拟机:
sudo reboot
 
重启后,虚拟机终于成功连上网了!用了一天多时间,找了很多原因,终于在这里解决了问题。

在虚拟机Ubuntu14.04中设置静态ip后无法上网的问题的解决的更多相关文章

  1. vmware中nat模式中使用静态ip后无法上网的问题

    在/etc/network/interfaces中添加静态ip auto eth0iface eth0 inet staticaddress 192.168.31.133netmask 255.255 ...

  2. centOS7设置静态ip后无法上网的解决,【亲可测】

    最近在VMware虚拟机里玩Centos,装好后发现上不了网.经过一番艰辛的折腾,终于找到出解决问题的方法了.最终的效果是无论是ping内网IP还是ping外网ip,都能正常ping通.方法四步走: ...

  3. ubuntu14.04如何设置静态IP的方法

    第一步: 配置静态IP地址: 打开/etc/network/interfaces文件,内容为 auto lo iface lo inet loopback auto eth0 iface eth0 i ...

  4. ubuntu设置静态ip后不能上网

    加上下面的配置,然后重启 sudo vim /etc/resolvconf/resolv.conf.d/base nameserver 223.5.5.5nameserver 8.8.8.8names ...

  5. Ubuntu中设置静态IP和DNS(转载)

    原文地址:http://blog.sina.com.cn/s/blog_669421480102v3bb.html VMware 中使用网络,对虚拟机设置静态IP:在Ubuntu中设置静态IP共两步: ...

  6. 在linux中设置静态ip地址

    在linux中设置静态ip地址1.在终端中输入:vi /etc/sysconfig/network-scripts/ifcfg-eth0 2.开始编辑,填写ip地址.子网掩码.网关.DNS等[root ...

  7. Ubuntu中设置静态IP和DNS

    在Ubuntu中设置静态IP共两步:1>设置IP:2>设置DNS1>设置IP    编辑 /etc/network/interface文件:       sudo vi /etc/n ...

  8. Linux:Vmware安装linux虚拟机,桥接方式配置静态IP后重启网卡,提示:Error,some other host already uses address 10.252.252.21...

    问题: Vmware安装linux虚拟机,桥接方式配置静态IP后重启网卡,提示:Error,some other host already uses address 10.252.252.21... ...

  9. Linux设置静态IP后出现的几种问题

    一.设置静态IP后无法重启网卡 如下图所示 原因分析:control process exited with error code.控制进程存在错误代码. 解决方案:可以检查网卡配置文件是否修改错误. ...

随机推荐

  1. href 页面跳转页面 参数

    $.getUrlParam = function (name) { var reg = new RegExp("(^|&)" + name + "=([^& ...

  2. 使用传统javaweb进行文件上传

    使用传统文件上传方式 1.配置依赖 <properties> <project.build.sourceEncoding>UTF-8</project.build.sou ...

  3. tp5.1 swoole 实现异步处理

    客户端请求:<?phpnamespace app\index\controller; class Index{ public function index() { $client = new \ ...

  4. [转]【全面解禁!真正的Expression Blend实战开发技巧】第六章 认识ListBox

    反反复复考虑后,准备把这一章的切入点瞄准ListBox.并用了一个看起来有点别扭的标题“认识ListBox",许多人看到这里就不爱看了,即使是大学里用winform的学生也会说ListBox ...

  5. MaxCompute用户初体验

    作为一名初次使用MaxCompute的用户,我体会颇深.MaxCompute 开箱即用,拥有集成化的操作界面,你不必关心集群搭建.配置和运维工作.仅需简单的点击鼠标,几步操作,就可以在MaxCompu ...

  6. VS未能加载文件或程序集“xxx.dll” 设置Build Events

    完整错误信息:"System.IO.FileNotFoundException"类型的未经处理的异常在 未知模块 中发生 未能加载文件或程序集"Ctp.Core.dll& ...

  7. MyBatis配置文件(五)--objectFactory对象工厂

    我们在使用MyBatis执行查询语句的时候,通常都会有一个返回类型,这个是在mapper文件中给sql增加一个resultType(或resultMap)属性进行控制.resultType和resul ...

  8. PAT甲级——A1024 Palindromic Number

    A number that will be the same when it is written forwards or backwards is known as a Palindromic Nu ...

  9. 《DSP using MATLAB》Problem 7.30

    代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...

  10. 023-linux(2)

    1. head 查看文件的前N行 -n ,表示查看前几行 head - test.txt 2. tail 查看文件的后N行 -n,表示查看文件的后几行 tail - test.txt -f(循环读取) ...