5

Virtualbox桥接无网络解决

 2 years ago
source link: https://wakzz.cn/2018/04/19/linux/Virtualbox%E6%A1%A5%E6%8E%A5%E6%97%A0%E7%BD%91%E7%BB%9C%E8%A7%A3%E5%86%B3/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Virtualbox桥接无网络解决

祈雨的博客
2018-04-19

virtualbox网络设置为桥接方式,Linux虚拟机没有网络。即使手动设置ip、子掩码也没有网络。

2、解决步骤

设置virtualbox连接方式为桥接网卡,界面名选择为当前电脑使用的网卡驱动。如果是网线有线连接则选择有线网卡,如果是无线连接则选择无线网卡,如图。

P4ipt2iizh.png

进入网络和共享中心中的适配器设置,选择当前使用的网络适配器,如图。

HnEby87z4i.png

并查看该网络适配器的当前网络连接信息。

SNRBtcjZwk.png

启动Linux虚拟机,修改网络设置(==其中的ifcfg-eth0并不绝对,但一般都是ifcfg-ethXX之类的==):

vi /etc/sysconfig/network-scripts/ifcfg-eth0

修改或添加一下配置,为Linux手动设置ip(注:ip必须同上与主机ip处于同一个网段)。配置如下,除了ip的末尾需要变动以外,其他均与上图的网络配置相同。

BOOTPROTO=static
IPADDR=10.30.5.225
NETMASK=255.255.255.0
GATEWAY=10.30.5.1
DNS1=114.114.114.114

重启网卡解决桥接无网络问题。

service network restart

3、方案二

https://blog.csdn.net/lcdcxy/article/details/49362171


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK