桥接模式下,虚拟机Ubuntu设置静态IP上网
2017-04-15 03:21
417 查看
1. 先设置IP,网关,掩码
vim /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.123
gateway 192.168.1.1
netmask 255.255.255.0
2. 再设置DNS服务器地址
vim /etc/resolvconf/resolv.conf.d/base (该文件默认是空的)
nameserver 8.8.8.8
3. 执行一下这条命令
resolvconf -u
会更新内容到/etc/resolv.conf
4. 重启网络
/etc/init.d/networking restart
5. 验证
ping www.baidu.com
可以ping通外网
vim /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.123
gateway 192.168.1.1
netmask 255.255.255.0
2. 再设置DNS服务器地址
vim /etc/resolvconf/resolv.conf.d/base (该文件默认是空的)
nameserver 8.8.8.8
3. 执行一下这条命令
resolvconf -u
会更新内容到/etc/resolv.conf
4. 重启网络
/etc/init.d/networking restart
5. 验证
ping www.baidu.com
可以ping通外网
相关文章推荐
- VMWARE中的UBUNTU虚拟机设置静态IP通过NAT上网的方法
- 虚拟机中ubuntu设置静态IP
- linux suse10虚拟机在静态IP局域网中如何设置桥接上网
- Ubuntu:nat模式设置静态ip,达到上网与主机相互通信
- Linux系列:Ubuntu虚拟机设置固定IP上网(配置IP、网关、DNS、防止resolv.conf被重写)
- vmware中的ubuntu 虚拟机 静态IP设置
- Linux系列:Ubuntu虚拟机设置固定IP上网(配置IP、网关、DNS、防止resolv.conf被重写)
- 在 Ubuntu 8.0.4下设置静态IP和虚拟机
- Linux系列:Ubuntu虚拟机设置固定IP上网(配置IP、网关、DNS、防止resolv.conf被重写)
- vmware 虚拟机 nat模式设置静态ip,达到上网与主机相互通信
- 虚拟机中ubuntu设置静态IP的方法
- Ubuntu虚拟机设置固定IP上网
- Ubuntu下设置通过NAT方式上网(静态IP)
- Ubuntu 设置静态IP上网
- Ubuntu下设置通过NAT方式上网(静态IP)
- ubuntu静态ip上网的网络设置
- 在虚拟机下如何设置静态IP上网(利用桥接)
- Ubuntu虚拟机设置固定IP上网(配置IP、网关、DNS、防止resolv.conf被重写)
- Ubuntu虚拟机设置固定IP上网(配置IP、网关、DNS、防止resolv.conf被重写)