question

hansgeorgk avatar image
hansgeorgk asked

wifi0 and eth0 up at the same time

Hi,

I need wifi0 and eth0 up and running at the same time both on different networks:

wifi0 should use route to router and connect to internet (192.168.1.0)

eth0 is for node-red data and connected to raspberry running influxDB and grafana (192.168.2.0)

I configured both in the console. I have explicitly not provided the Gateway in the eth0 config, since I do want node-red traffic to be connected to internet

I get the following result:

root@nanopi:~# route

Kernel IP routing table

Destination Gateway Genmask Flags Metric Ref Use Iface

default * 255.255.255.255 UH 0 0 0 eth0

169.254.0.0 * 255.255.0.0 U 0 0 0 ll-eth0

172.24.24.0 * 255.255.255.0 U 0 0 0 ap0

192.168.1.0 * 255.255.255.0 U 100 0 0 wifi0

192.168.1.1 * 255.255.255.255 UH 99 0 0 wifi0

192.168.2.0 * 255.255.255.0 U 0 0 0 eth0

where wifi0 is missing the gateway to the router 192.168.1.1


If I manually add a gw like this:

root@nanopi:/etc/network# route add default gw 192.168.1.1

root@nanopi:/etc/network# route

Kernel IP routing table

Destination Gateway Genmask Flags Metric Ref Use Iface

default * 255.255.255.255 UH 0 0 0 eth0

default 192.168.1.1 0.0.0.0 UG 0 0 0 wifi0

169.254.0.0 * 255.255.0.0 U 0 0 0 ll-eth0

172.24.24.0 * 255.255.255.0 U 0 0 0 ap0

192.168.1.0 * 255.255.255.0 U 100 0 0 wifi0

192.168.1.1 * 255.255.255.255 UH 99 0 0 wifi0

192.168.2.0 * 255.255.255.0 U 0 0 0 eth0


wifi0 is routed to router and the GX device is connected to internet.

But the only laste for a few second and the manually added route is gone :-(


After waiting for a few minutes the default route is loaded - sometimes ...

Or after a reboot the default route appears

hg@HGsMBP ~ % ssh -l root 192.168.1.2

Last login: Fri Jan 5 19:48:27 2024

root@nanopi:~# route

Kernel IP routing table

Destination Gateway Genmask Flags Metric Ref Use Iface

default * 255.255.255.255 UH 0 0 0 eth0

169.254.0.0 * 255.255.0.0 U 0 0 0 ll-eth0

172.24.24.0 * 255.255.255.0 U 0 0 0 ap0

192.168.1.0 * 255.255.255.0 U 100 0 0 wifi0

192.168.1.1 * 255.255.255.255 UH 99 0 0 wifi0

192.168.2.0 * 255.255.255.0 U 0 0 0 eth0

root@nanopi:~# reboot


Broadcast message from root@nanopi (pts/0) (Fri Jan 5 20:03:07 2024):


The system is going down for reboot NOW!

root@nanopi:~# client_loop: send disconnect: Broken pipe

hg@HGsMBP ~ % ssh -l root 192.168.1.2

Last login: Fri Jan 5 20:03:51 2024

root@nanopi:~# route

Kernel IP routing table

Destination Gateway Genmask Flags Metric Ref Use Iface

default * 255.255.255.255 UH 0 0 0 eth0

default 192.168.1.1 0.0.0.0 UG 0 0 0 wifi0

169.254.0.0 * 255.255.0.0 U 0 0 0 ll-eth0

172.24.24.0 * 255.255.255.0 U 0 0 0 ap0

192.168.1.0 * 255.255.255.0 U 100 0 0 wifi0

192.168.1.1 * 255.255.255.255 UH 99 0 0 wifi0

192.168.2.0 * 255.255.255.0 U 0 0 0 eth0


any idea to get the network configured correct and to have it working in a reliable mode?

thanks
HG


TCP IP Networking
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

0 Answers

Related Resources

Additional resources still need to be added for this topic