我正在尝试建立一个集群。
物理要素包括:
internet access : netgear wifi
host A : ubuntu + RJ 45 + usb wifi
host b : ubuntu + RJ 45
router : dlink (rj45 + wifi)
host c : mac book air
逻辑网络包括:
- 互联网 :10.0.0.0/24
- 局域网:192.168.0.0/24
主机 A 通过其连接到 netgear 的 USB wifi 卡连接到互联网。它还通过其 eth0 连接到 LAN。
eth1 Link encap:Ethernet HWaddr 00:21:5a:69:33:d6
inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0
wlan0 Link encap:Ethernet HWaddr 24:05:0f:36:30:ba
inet addr:10.0.0.3 Bcast:10.0.0.255 Mask:255.255.255.0
我的 MacBook 通过 wifi 连接到网络(使用 dlink wifi 接口)。我正尝试通过主机 A 上打开的网关在 chrome 中获取互联网访问权限。
MacBook-Air-$ netstat -nr
路由表
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 192.168.0.1 UGSc 4 0 en0
10 192.168.0.100 UGSc 0 0 en0
127 127.0.0.1 UCS 0 0 lo0
127.0.0.1 127.0.0.1 UH 35 10672 lo0
169.254 link#4 UCS 0 0 en0
192.168.0 link#4 UCS 3 0 en0
192.168.0.1 54:b8:a:a:40:20 UHLWIir 6 342 en0 1164
192.168.0.100 0:21:5a:69:33:d6 UHLWIir 1 462 en0 1093
192.168.0.101 127.0.0.1 UHS 0 0 lo0
Internet6:
Destination Gateway Flags Netif Expire
::1 link#1 UHL lo0
fe80::%lo0/64 fe80::1%lo0 UcI lo0
fe80::1%lo0 link#1 UHLI lo0
fe80::%en0/64 link#4 UCI en0
fe80::60c:ceff:fee1:b448%en0 4:c:ce:e1:b4:48 UHLWIi en0
fe80::3e15:c2ff:febe:5906%en0 3c:15:c2:be:59:6 UHLWIi en0
fe80::8638:35ff:fe4f:7936%en0 84:38:35:4f:79:36 UHLI lo0
ff01::%lo0/32 fe80::1%lo0 UmCI lo0
ff01::%en0/32 link#4 UmCI en0
ff02::%lo0/32 fe80::1%lo0 UmCI lo0
ff02::%en0/32 link#4 UmCI en0
MacBook-Air:~ romain$ ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
options=3<RXCSUM,TXCSUM>
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 84:38:35:4f:79:36
inet6 fe80::8638:35ff:fe4f:7936%en0 prefixlen 64 scopeid 0x4
inet 192.168.0.101 netmask 0xffffff00 broadcast 192.168.0.255
media: autoselect
status: active
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
ether 06:38:35:4f:79:36
media: autoselect
status: inactive
我在这里迷路了:我无法通过 chrome 访问互联网(甚至无法 ping 某些东西)(不幸的是,我的跟踪中没有错误,抱歉)。我对设置网络还很陌生,我怀疑网关打开的方式有问题?