Static Address for Ethernet interface
by Eswaran Vinothkumar (BEG/PJ-IOT-EL)
Hi,
I am using Connman in one of our internal IOT project. Connman version:1.35
The hardware I am using has two Ethernet interfaces. To set up the static IP I run the following commands:
'connmanctl config ethernet_0001c01e6612_cable --ipv4 manual 192.168.1.40 255.255.255.0 192.168.0.1 --ipv6 off'
'connmanctl config ethernet_0001c01e6621_cable --ipv4 manual 192.168.1.45 255.255.255.0 192.168.0.1 --ipv6 off'
This works without any problems and I can see the IP addresses being set as requested.
For the project I will be using 50 or more hardwares and manually setting IP for every hardware is bit annoying. It becomes more complicated when I use over the air software updates. Manual interruption is required everytime after software update to set up the static IP. Is there any config available within connman to set up the static IP for Ethernet inerfaces?
I have looked into the connman-config documents and found out that I can set up the static IP by using a config file.
[service_ethernet]
Type = ethernet
IPv4 = 192.168.1.40/255.255.255.0/192.168.1.1
IPv6 = off
I purposefully omitted the MAC address because the addresses will be unique for each hardware. But using this sets up the same IP address for both the Ethernet interfaces. Is there any way to setup static IP without using MAC address in Connman? Any other proposal to solve the problem will also be helpful.
Mit freundlichen Grüßen / Best regards
Vinothkumar Eswaran
BEG-PT/PJ-EL