无法 ping 通网关 /etc/netw/interfaces

无法 ping 通网关 /etc/netw/interfaces

我有一台连接到网络的树莓派和调制解调器。我将以下几行添加到/etc/network/interfaces

source-directory /etc/network/interfaces.d/*

auto eth0
iface eth0 inet static
    address 192.168.1.1 
    netmask 255.255.255.0
    gateway 192.168.1.1
    metric 0

auto wwan0
iface wwan0 inet static
    address 177.177.8.5
    netmask 255.255.255.0
    gateway 177.177.8.1
    metric 100

当我ping 177.177.8.1这是调制解调器网络的网关时,它没有 ping 屏幕卡在

pi@raspberrypi:~ $ ping 177.177.8.1
PING 177.177.8.1 (177.177.8.1) 56(84) bytes of data.

eth0有一台 IP 摄像机,其 IP 为,192.168.1.10可在网络中 ping 通,但网关wwan0无法 ping 通,因此我无法连接到调制解调器网络。我检查了语法,更改了矩阵值并分配了wwan0相同的网关和 IP,但不起作用。以下是结果ifconfig

pi@raspberrypi:~ $ ifconfig -a
eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.1.1  netmask 255.255.255.0  broadcast 192.168.1.255
        ether dc:a6:32:11:ff:10  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 92  bytes 8202 (8.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 92  bytes 8202 (8.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wwan0: flags=4240<POINTOPOINT,NOARP,MULTICAST>  mtu 1500
        inet 177.177.8.5  netmask 255.255.255.0  destination 177.177.8.5
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 17  bytes 2075 (2.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

相关内容