LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Customized Linux system, wired and wireless connectivity interoperability? (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/customized-linux-system-wired-and-wireless-connectivity-interoperability-4175734078/)

guoyanzhang 02-20-2024 09:53 PM

Customized Linux system, wired and wireless connectivity interoperability?
 
The Linux system I customized runs on device A, which uses an ARM processor. Device A has an eth2 (fixed IP 192.168.5.1) and a wlan2, which is a wireless transmitter with a fixed IP 192.168.1.6. My computer can connect to device A through 192.168.1.6, but in this case, without wired connection, I can still log in to device A using 192.168.5.1; But if I am unable to log in to device A using 192.168.1.6 after connecting it with a wired connection, what is the problem?

[root@dobot ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
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
eth0 Link encap:Ethernet HWaddr 4E:BF:B7:B3:54:5F
inet6 addr: fe80::4cbf:b7ff:feb3:545f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8681 errors:2 dropped:0 overruns:0 frame:2
TX packets:8689 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:627545 (612.8 KiB) TX bytes:356046 (347.7 KiB)

eth1 Link encap:Ethernet HWaddr 00:0E:C6:87:72:01
inet addr:192.168.100.6 Bcast:192.168.100.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

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 MULTICAST MTU:1500 Metric:1
RX packets:28924 errors:0 dropped:0 overruns:0 frame:0
TX packets:41781 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2545558 (2.4 MiB) TX bytes:5457600 (5.2 MiB)

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:60760 errors:0 dropped:0 overruns:0 frame:0
TX packets:60760 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3955747 (3.7 MiB) TX bytes:3955747 (3.7 MiB)

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:157031 errors:0 dropped:589 overruns:0 frame:0
TX packets:15430 errors:0 dropped:82 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2875938 (2.7 MiB) TX bytes:4311430 (4.1 MiB)

des_a 02-23-2024 04:17 AM

Perhaps missing a default gateway, from the looks of it to me? Or else, is your wireless network working OK? Is it actually connected to the proper wireless network? It looks like it is, but maybe check.

guoyanzhang 02-29-2024 09:59 PM

[root@dobot ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
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

___ 02-29-2024 10:13 PM

As configured, A's 192.168.1.* pkts can only go thru wlan2

What exactly does "without wired connection" mean? What is ?turned off? &where?

Post route from "computer" (not A)
Maybe routing takes a different path "after connecting it with a wired connection"

guoyanzhang 03-01-2024 01:04 AM

Quote:

Originally Posted by ___ (Post 6486788)
As configured, A's 192.168.1.* pkts can only go thru wlan2

What exactly does "without wired connection" mean? What is ?turned off? &where?

Post route from "computer" (not A)
Maybe routing takes a different path "after connecting it with a wired connection"

"without wired connection" mean I did not use an Ethernet cable to connect device A's eth2.

___ 03-01-2024 03:29 AM

https://www.linuxquestions.org/quest...og.php?b=36313
Code:

ip r # or route, on 'computer', not A, both without & with ethernet connected

guoyanzhang 03-01-2024 04:10 AM

Quote:

Originally Posted by ___ (Post 6486815)
https://www.linuxquestions.org/quest...og.php?b=36313
Code:

ip r # or route, on 'computer', not A, both without & with ethernet connected

I am not clear, any question?

___ 03-02-2024 01:16 AM

Post the output of the route command, run on your 'computer', not the ARM device A, both with & without the ethernet connected.

That will show what device 192.168.1.6 is using.

guoyanzhang 03-04-2024 08:13 PM

Quote:

Originally Posted by ___ (Post 6487005)
Post the output of the route command, run on your 'computer', not the ARM device A, both with & without the ethernet connected.

That will show what device 192.168.1.6 is using.

with the ethernet connected:

C:\Users\guoya>route print
===========================================================================
接口列表
11...90 2e 16 c7 1b a3 ......Realtek PCIe GbE Family Controller
7...00 ff 31 c7 b2 a8 ......TeamViewer VPN Adapter
13...10 3d 1c 9c 87 9b ......Microsoft Wi-Fi Direct Virtual Adapter
4...12 3d 1c 9c 87 9a ......Microsoft Wi-Fi Direct Virtual Adapter #2
21...10 3d 1c 9c 87 9a ......Intel(R) Wi-Fi 6 AX201 160MHz
8...34 29 8f 73 63 27 ......Realtek USB GbE Family Controller
19...00 ff c6 0d db 24 ......SVN Adapter V1.0
20...10 3d 1c 9c 87 9e ......Bluetooth Device (Personal Area Network) #3
1...........................Software Loopback Interface 1
===========================================================================

IPv4 路由表
===========================================================================
活动路由:
网络目标 网络掩码 网关 接口 跃点数
0.0.0.0 0.0.0.0 192.168.50.254 192.168.50.201 30
127.0.0.0 255.0.0.0 在链路上 127.0.0.1 331
127.0.0.1 255.255.255.255 在链路上 127.0.0.1 331
127.255.255.255 255.255.255.255 在链路上 127.0.0.1 331
192.168.5.0 255.255.255.0 在链路上 192.168.5.123 291
192.168.5.123 255.255.255.255 在链路上 192.168.5.123 291
192.168.5.255 255.255.255.255 在链路上 192.168.5.123 291
192.168.50.0 255.255.255.0 在链路上 192.168.50.201 286
192.168.50.201 255.255.255.255 在链路上 192.168.50.201 286
192.168.50.255 255.255.255.255 在链路上 192.168.50.201 286
224.0.0.0 240.0.0.0 在链路上 127.0.0.1 331
224.0.0.0 240.0.0.0 在链路上 192.168.50.201 286
224.0.0.0 240.0.0.0 在链路上 192.168.5.123 291
255.255.255.255 255.255.255.255 在链路上 127.0.0.1 331
255.255.255.255 255.255.255.255 在链路上 192.168.50.201 286
255.255.255.255 255.255.255.255 在链路上 192.168.5.123 291
===========================================================================
永久路由:


IPv6 路由表
===========================================================================
活动路由:
接口跃点数网络目标 网关
1 331 ::1/128 在链路上
21 286 fe80::/64 在链路上
8 291 fe80::/64 在链路上
21 286 fe80::dd32:93b6:51f6:4cdc/128
在链路上
8 291 fe80::fa02:92bd:9721:9/128
在链路上
1 331 ff00::/8 在链路上
21 286 ff00::/8 在链路上
8 291 ff00::/8 在链路上
===========================================================================
永久路由:

guoyanzhang 03-04-2024 08:18 PM

Quote:

Originally Posted by ___ (Post 6487005)
Post the output of the route command, run on your 'computer', not the ARM device A, both with & without the ethernet connected.

That will show what device 192.168.1.6 is using.


without the ethernet connected:

C:\Users\guoya>route print
===========================================================================
接口列表
11...90 2e 16 c7 1b a3 ......Realtek PCIe GbE Family Controller
7...00 ff 31 c7 b2 a8 ......TeamViewer VPN Adapter
13...10 3d 1c 9c 87 9b ......Microsoft Wi-Fi Direct Virtual Adapter
4...12 3d 1c 9c 87 9a ......Microsoft Wi-Fi Direct Virtual Adapter #2
8...34 29 8f 73 63 27 ......Realtek USB GbE Family Controller
19...00 ff c6 0d db 24 ......SVN Adapter V1.0
21...10 3d 1c 9c 87 9a ......Intel(R) Wi-Fi 6 AX201 160MHz
20...10 3d 1c 9c 87 9e ......Bluetooth Device (Personal Area Network) #3
1...........................Software Loopback Interface 1
===========================================================================

IPv4 路由表
===========================================================================
活动路由:
网络目标 网络掩码 网关 接口 跃点数
0.0.0.0 0.0.0.0 192.168.1.6 192.168.1.20 55
127.0.0.0 255.0.0.0 在链路上 127.0.0.1 331
127.0.0.1 255.255.255.255 在链路上 127.0.0.1 331
127.255.255.255 255.255.255.255 在链路上 127.0.0.1 331
192.168.1.0 255.255.255.0 在链路上 192.168.1.20 311
192.168.1.20 255.255.255.255 在链路上 192.168.1.20 311
192.168.1.255 255.255.255.255 在链路上 192.168.1.20 311
192.168.5.0 255.255.255.0 在链路上 192.168.5.123 291
192.168.5.123 255.255.255.255 在链路上 192.168.5.123 291
192.168.5.255 255.255.255.255 在链路上 192.168.5.123 291
224.0.0.0 240.0.0.0 在链路上 127.0.0.1 331
224.0.0.0 240.0.0.0 在链路上 192.168.1.20 311
224.0.0.0 240.0.0.0 在链路上 192.168.5.123 291
255.255.255.255 255.255.255.255 在链路上 127.0.0.1 331
255.255.255.255 255.255.255.255 在链路上 192.168.1.20 311
255.255.255.255 255.255.255.255 在链路上 192.168.5.123 291
===========================================================================
永久路由:


IPv6 路由表
===========================================================================
活动路由:
接口跃点数网络目标 网关
1 331 ::1/128 在链路上
21 311 fe80::/64 在链路上
8 291 fe80::/64 在链路上
21 311 fe80::dd32:93b6:51f6:4cdc/128
在链路上
8 291 fe80::fa02:92bd:9721:9/128
在链路上
1 331 ff00::/8 在链路上
21 311 ff00::/8 在链路上
8 291 ff00::/8 在链路上
===========================================================================
永久路由:

onebuck 03-05-2024 07:43 AM

Member Response
 
Hi,

I would suggest that you use as root 'route-n' to get the routing table.
:hattip:


All times are GMT -5. The time now is 01:24 PM.