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 :-(

any idea to get the network configured correct?

thanks
HG


TCP IP Networking
2 comments
2 |3000

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

mvader (Victron Energy) avatar image mvader (Victron Energy) ♦♦ commented ·
Its connman (or conmann) that is in control of eth0 and wifi0.


Perhaps you can simply disable the whole thing? But when you start tinkering with this, have a serial console cable around in case it no longer works at all.


Note that I don't know if what you want is possible; at least from VE side this is not something we can support you with.

0 Likes 0 ·
mvader (Victron Energy) avatar image mvader (Victron Energy) ♦♦ mvader (Victron Energy) ♦♦ commented ·

in case you're familiar with github: our connman config, plus history which might help you on how and why certain things are done, is here:


https://github.com/victronenergy/meta-victronenergy/tree/master/meta-alternatives/recipes-connectivity/connman


But, thinking about it, I recommend you to buy some off the shelf hardware device, ie a wireless access point, similar device that can get the internet access onto to the wired network, so you don't need to use wifi, and don't need to modify Venus OS on this level.


Maximum few hundred euros and you'll save yourself endless trouble both now, as well as in the future when we might change something on this.

0 Likes 0 ·
2 Answers
enodev avatar image
enodev answered ·

from what you are writing the problem is on your nanopi? Not on the cerbo which if I read it correctly works as expected, wlan0 going to the internet and eth0 being on separate link local subnet. So just make nanopi part of that subnet via fixed up address and you do not need a gw on the nanopi, should just work…

2 |3000

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

hansgeorgk avatar image
hansgeorgk answered ·

Hi,

I have an Easysolar II GX - the nanopi is the built in GX Device.

it is somehow working, but not reliable :-(

After a reboot default route is gone. Doing another reboot it is up again ...

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
root@nanopi:~#

cheers

HG


2 |3000

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

Related Resources

Additional resources still need to be added for this topic