我正在尝试使用 WIN 10 笔记本电脑、Cisco Meraki MR-18 接入点 (AP)、Oracle VirtualBox 5.1.4 和 Ubuntu 16.04 LTS 构建热点,以虚拟机 (VM) 运行,以服务传入的无线连接。笔记本电脑有一个连接到 MR-18 AP 的物理以太网端口和一个连接到互联网的无线连接。
问题:从智能设备,我可以通过 MR-18 AP 建立无线连接,打开 SSH 会话,连接到 Ubuntu VM 上的 HTTP 服务器,或 PING(从而解析)任何域名。但是,MR-18 AP 一直报告“无互联网”,如果我尝试在 IPAD 的浏览器上打开任何 URL,这将不起作用。
VirtualBox 创建第一个网络适配器,并为 Ubuntu 的接口 enps03 分配 IP 地址:10.0.2.15/24 和默认路由:10.0.2.2/24。这是与 Windows 10 主机操作系统的连接。
第二个 VirtualBox 网络适配器被定义为在笔记本电脑的物理以太网端口和第二个 Ubuntu 的 enps08 虚拟以太网接口之间建立桥接。这是与 MR-18 AP 的连接。
在 Ubuntu 上创建这两个网络连接后,/etc/network/interfaces 文件中不会显示这两个虚拟以太网接口;但是,第一个接口 enp0s3 已启动并正在运行,并根据 ifconfig 与主机操作系统通信。第二个虚拟接口 enp0s8 一旦在接口文件中声明,就会启动并运行。
接口文件
Interfaces file
auto lo
iface lo inet loopback
auto enp0s3
iface enp0s3 inet dhcp
auto enp0s8
iface enp0s8 inet static
address 192.168.2.1
netmask 255.255.255.0
配置文件
enp0s3 Link encap:Ethernet HWaddr 08:00:27:0b:75:e8
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe0b:75e8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:38693 errors:0 dropped:0 overruns:0 frame:0
TX packets:17734 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:34637394 (34.6 MB) TX bytes:2140816 (2.1 MB)
enp0s8 Link encap:Ethernet HWaddr 08:00:27:b4:74:9d
inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:feb4:749d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:39564 errors:0 dropped:0 overruns:0 frame:0
TX packets:10545 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3753385 (3.7 MB) TX bytes:1238937 (1.2 MB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1670 errors:0 dropped:0 overruns:0 frame:0
TX packets:1670 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:216048 (216.0 KB) TX bytes:216048 (216.0 KB)
Ubuntu 的 dnsmasq 配置为在第二个接口 enp0s8 上为 DHCP 和 DNS 请求提供服务,因此它将为 MR-18 AP 分配一个 IP 地址和一个默认路由。
dnsmaq配置文件
domain-needed
bogus-prtv
filterwin2k
local=/oeinc.lan/
server=192.168.1.1
interface=enp0s8
bind-interfaces
expand-hosts
domain=oeinc.lan
dhcp-range=192.168.2.50,192.168.2.150,72hs
域名系统
— dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled)
Drop-In: /run/systemd/generator/dnsmasq.service.d
└─50-dnsmasq-$named.conf, 50-insserv.conf-$named.conf
Active: active (running) since Tue 2016-08-23 15:09:09 EDT; 3 days ago
Main PID: 1748 (dnsmasq)
CGroup: /system.slice/dnsmasq.service
└─1748 /usr/sbin/dnsmasq -x /var/run/dnsmasq/dnsmasq.pid -u dnsmasq -r /var/run/dnsmasq/resolv.conf -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service --trust- anchor=.,19036,8,2,49AAC11D7B6F6446702E54A1607371607A1A41855200FD2CE1CDDE32F24E8FB5
Aug 24 05:30:46 oehotspot dnsmasq-dhcp[1748]: DHCPREQUEST(enp0s8) 192.168.2.100 00:18:0a:84:0b:03
Aug 24 05:30:46 oehotspot dnsmasq-dhcp[1748]: DHCPACK(enp0s8) 192.168.2.100 00:18:0a:84:0b:03 m00180a840b03
Aug 24 11:14:16 oehotspot dnsmasq-dhcp[1748]: DHCPDISCOVER(enp0s8) 00:18:0a:84:0b:03
Aug 24 11:14:16 oehotspot dnsmasq-dhcp[1748]: DHCPOFFER(enp0s8) 192.168.2.100 00:18:0a:84:0b:03
Aug 24 11:14:16 oehotspot dnsmasq-dhcp[1748]: DHCPREQUEST(enp0s8) 192.168.2.100 00:18:0a:84:0b:03
Aug 24 11:14:16 oehotspot dnsmasq-dhcp[1748]: DHCPACK(enp0s8) 192.168.2.100 00:18:0a:84:0b:03 m00180a840b03
Aug 24 11:14:20 oehotspot dnsmasq-dhcp[1748]: DHCPDISCOVER(enp0s8) 28:d2:44:b3:96:a5
Aug 24 11:14:20 oehotspot dnsmasq-dhcp[1748]: DHCPOFFER(enp0s8) 192.168.2.128 28:d2:44:b3:96:a5
Aug 24 11:14:20 oehotspot dnsmasq-dhcp[1748]: DHCPREQUEST(enp0s8) 192.168.2.128 28:d2:44:b3:96:a5
Aug 24 11:14:20 oehotspot dnsmasq-dhcp[1748]: DHCPACK(enp0s8) 192.168.2.128 28:d2:44:b3:96:a5 Carlitros
Windows 10 笔记本电脑上的网络接口:
Windows IP Configuration
Host Name . . . . . . . . . . . . : Carlitros
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : Yes
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : oeinc.lan
以太网适配器以太网:(这是到 Ubuntu 虚拟以太网接口的桥接)
Connection-specific DNS Suffix . : oeinc.lan
Description . . . . . . . . . . . : Intel(R) Ethernet Connection I218-V
Physical Address. . . . . . . . . : 28-D2-44-B3-96-A5
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::404a:2b1e:3ab2:fe62%7(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.2.128(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : August 24, 2016 1:49:06 PM
Lease Expires . . . . . . . . . . : August 27, 2016 11:53:29 PM
Default Gateway . . . . . . . . . : 192.168.2.1
DHCP Server . . . . . . . . . . . : 192.168.2.1
DHCPv6 IAID . . . . . . . . . . . : 120115780
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1E-2D-F0-7F-28-D2-44-B3-96-A5
DNS Servers . . . . . . . . . . . : 192.168.2.1
NetBIOS over Tcpip. . . . . . . . : Enabled
以太网适配器 VirtualBox 仅主机网络:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : VirtualBox Host-Only Ethernet Adapter
Physical Address. . . . . . . . . : 0A-00-27-00-00-06
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::8dcf:5844:a517:227f%6(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.56.1(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 386531367
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1E-2D-F0-7F-28-D2-44-B3-96-A5
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
NetBIOS over Tcpip. . . . . . . . : Enabled
无线局域网适配器 Wi-Fi:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) Dual Band Wireless-N 7260
Physical Address. . . . . . . . . : E8-B1-FC-28-4F-29
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::54f7:c605:ff1a:a7f8%2(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.1.5(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : August 24, 2016 1:33:08 PM
Lease Expires . . . . . . . . . . : August 25, 2016 11:53:21 PM
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.1
DHCPv6 IAID . . . . . . . . . . . : 48804348
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1E-2D-F0-7F-28-D2-44-B3-96-A5
DNS Servers . . . . . . . . . . . : 192.168.1.1
NetBIOS over Tcpip. . . . . . . . : Enabled