admin管理员组

文章数量:1625803

Ubuntu 16.04通过无线网卡使用桥接模式上网

(1) 虚拟机虚拟网络编辑器设置,桥接模式-- 选择“自动” 或者 无线网卡;

(2) 虚拟机网络适配器设置桥接模式;

(3) 先查看物理主机无线连接信息:

根据上面信息编辑虚拟机的网络配置文件,

vim /etc/network/interfaces


(4) 重启虚拟机的网络服务

# /etc/init.d/networking restart

(5) 查看dns信息是否更新,内容如下,如果没有需要在这个文件手动添加 nameserver.

# cat /etc/resolv.conf 
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.43.226

(6) 尝试ping外网,正常

# ping www.baidu
PING www.a.shifen (183.232.231.174) 56(84) bytes of data.
64 bytes from 183.232.231.174: icmp_seq=1 ttl=55 time=32.1 ms
64 bytes from 183.232.231.174: icmp_seq=2 ttl=55 time=52.1 ms
64 bytes from 183.232.231.174: icmp_seq=3 ttl=55 time=41.9 ms
^C
--- www.a.shifen ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2004ms
rtt min/avg/max/mdev = 32.180/42.120/52.198/8.174 ms

本文标签: 无线网卡桥接模式Ubuntu