내 맞춤형 Linux 시스템은 ARM 프로세서를 사용하는 장치 A에서 실행됩니다. 장치 A에는 두 개의 네트워크 카드가 있습니다: ( eth2
고정 IP: 192.168.5.1) 및 wlan2
(고정 IP: 192.168.1.6). wlan2
USB-WiFi 송신기입니다. 을 실행하여 데이터 전달을 비활성화했지만 echo 0 > /proc/sys/net/ipv4/ip_forward
여전히 ping 192.168.1.6
성공합니다. 어떻게 되어가나요?
[root@dobot ~]# echo 0 > /proc/sys/net/ipv4/ip_forward
[root@dobot ~]# cat /proc/sys/net/ipv4/ip_forward
0
[root@dobot ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.5.1 0.0.0.0 UG 0 0 0 eth2
192.168.1.0 * 255.255.255.0 U 0 0 0 wlan2
192.168.5.0 * 255.255.255.0 U 0 0 0 eth2
192.168.100.0 * 255.255.255.0 U 0 0 0 eth1
[root@dobot ~]# ifconfig eth2
eth2 Link encap:Ethernet HWaddr 00:0E:C6:87:72:01
inet addr:192.168.5.1 Bcast:192.168.5.255 Mask:255.255.255.0
inet6 addr: fe80::20e:c6ff:fe87:7201/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:37729 errors:0 dropped:0 overruns:0 frame:0
TX packets:55791 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3182517 (3.0 MiB) TX bytes:7180021 (6.8 MiB)
[root@dobot ~]# ifconfig wlan2
wlan2 Link encap:Ethernet HWaddr D0:37:45:8A:68:90
inet addr:192.168.1.6 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::d237:45ff:fe8a:6890/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1110732 errors:0 dropped:503 overruns:0 frame:0
TX packets:4261 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:32466 (31.7 KiB) TX bytes:364864 (356.3 KiB)