通过网桥将 Raspberry PI 连接到互联网

通过网桥将 Raspberry PI 连接到互联网

我想通过笔记本电脑上的网桥将 Raspberry PI 连接到互联网。这是一台 Windows 8.1 机器。我已经桥接了以太网和无线接口。Raspberry PI 有一个静态 IP 地址。我尝试了以下方法教程说。

路由器192.168.1.1

视窗192.168.1.15

树莓派192.168.1.100

我可以从 PC ping 通路由器和 Raspberry,也可以从 Raspberry ping 通 PC。问题是,当我尝试从 Raspberry ping 通路由器或 google.pl 时:

pi@raspberrypi ~ $ ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
^C
--- 192.168.1.1 ping statistics ---
8 packets transmitted, 0 received, 100% packet loss, time 7006ms

PC上的防火墙已关闭。以下是ifconfig

pi@raspberrypi ~ $ ifconfig eth0
eth0      Link encap:Ethernet  HWaddr b8:27:eb:9a:ea:1d
          inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1796 errors:0 dropped:0 overruns:0 frame:0
          TX packets:426 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:133358 (130.2 KiB)  TX bytes:54438 (53.1 KiB)

路由表:

pi@raspberrypi ~ $ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0

ARP 表:

pi@raspberrypi ~ $ arp -n
Address                  HWtype  HWaddress           Flags Mask            Iface
192.168.1.1              ether   88:ae:1d:7e:07:2f   C                     eth0
192.168.1.15             ether   88:ae:1d:7e:07:2f   C                     eth0

和接口

pi@raspberrypi ~ $ cat /etc/network/interfaces
auto lo

iface lo inet loopback
iface eth0 inet static
        address 192.168.1.100
        netmask 255.255.255.0
        gateway 192.168.1.1

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

我尝试过操作接口、默认网关,但似乎没有任何效果。

ipconfig -all从 Windows 是这里

相关内容