Toradex easy installer not getting external IP via dnsmasq

This for Colibri IMX6 Dual Lite 512MB IT v1.1A
I executed the script to install tezi and the output is:

INFO:SHC-Program:Found device.
INFO:SHC-Program:Sending Tezi via USB.
INFO:SHC-Program:Attached device was in recovery mode, successfully loaded Tezi application.

This also created a network adapter on my host server.
Screenshot from 2022-07-11 08-55-33

The TigerVNC shows that there is no ethernet address assigned.

Here is the etc/dnsmasq.conf directives:

no-resolv
server=10.0.1.20
server=10.0.4.52
interface=enp4s0
addn-hosts=/etc/dnsmasq.hosts
dhcp-range=192.168.10.50,192.168.10.150,12h

/etc/dnshost:
192.168.10.1 tezi.toradex.com.

systemd-resolved service is disabled and stopped.

dnsmasq service is giving the following errorr:
warning: interface enp4s0 does not currently exist
using nameserver 10.0.4.52#53
using nameserver 10.0.1.20#53
read /etc/hosts - 7 addresses
read /etc/dnsmasq.hosts - 1 addresses
Started dnsmasq - A lightweight DHCP and caching DNS server.

enp4so is the interface/ethernet port from the server that connects to the ethernet slot on the board.

When I do ip a show, enp4so is down and I am unable to bring it up. It has some 169.xyz address. dnsmasq has not assigned an ip from the range specified in the dnsmasq.conf file.

The nginx server is configured correctly according to:

Hi @rocketman125,

First, welcome to our community! Feel free to ask any questions.

Regarding your issue, what is your objective?
Do you want to set up a local server for your image?
Which carrier board are you using?

Have you tried our latest release 5.6.0 of TEzi?
You can download it here: Loading Toradex Easy Installer

Best Regards,
Hiago.

My objective is to use a custom image server to flash the image.

I followed the guide here to setup the nginx local webserver which has the image I want to flash - Detailed Manual | Toradex Developer Center

The problem is with dnsmasq. It is not assigning an IP to the interface in /etc/dnsmasq.conf from the dhcp-range. In the VNC you can see that there is no address assigned to Ethernet. Additionally if you look at my entire post, dnsmasq service is giving the error - warning: interface enp4s0 does not currently exist. It’s unable to assign an address from dhcp-range.

This is the career board - Colibri IMX6 Dual Lite 512MB IT v1.1A

Hi @rocketman125,

I would like to ask to test some things:

  • Have you checked if you get an IP without your DNS configs? Just boot up TEZI without any custom settings for DNS or your network, and then check if you have an IP address.
  • Could you please set up a server in your host machine and try to use the RNDIS mode to get your image? Make sure you configured your images.json file: Detailed Manual | Toradex Developer Center

Best Regards,
Hiago.

Yes, I get an IP address on the interface when I don’t use dnsmasq. The IP address is coming from the main company DHCP server. The interface is getting a 10.0.x.y ip address and I believe the interface needs a 192.168.10.x address. Hence the need for dnsmasq to provide the address via it’s DHCP (not the main company’s DHCP). The dnsmasq should provide any ipaddress to the interface from this range dhcp-range=192.168.10.50,192.168.10.150,12h but it is not doing that.

The local webserver is already configured along with the images.json file. As I mentioned in my posted, I setup the nginx exactly according to instructions.

I am using the RNDIS mode. How could tezi be loaded other wise:

INFO:SHC-Program:Found device.
INFO:SHC-Program:Sending Tezi via USB.
INFO:SHC-Program:Attached device was in recovery mode, successfully loaded Tezi application.

Please look at all the screenshots in my original posts.

enp4so should be configured with a static IP e.g. 192.168.10.2 which is out of the range dhcp IP pool. If the Ethernet port of the carrier board is directly connected to your server/PC where DHCP server is hosted, there could be a potential issue that enp4so is down during Colibri iMX6 boots. It will be good to connect the carrier board and PC/server by a switch that always makes enp4so up.

I was under the impression that enp4s0 would be assigned an IP by dnsmasq. The /etc/dnsmasq.conf file mentions interface=enp4s0. What is the purpose of that line? What I see is that dnsmasq is assigning an IP to the board’s interface. The ethernet address in the VNC viewer has an IP assigned from dhcp-pool.

Why should the static IP assigned be outside of the dhcp-range? What should be the gateway address of the static IP if it is 192.168.10.2

I did’t quite understand the part where you said “If the Ethernet port of the carrier board is directly connected to your server/PC where DHCP server is hosted, there could be a potential issue that enp4so is down during Colibri iMX6 boots. It will be good to connect the carrier board and PC/server by a switch that always makes enp4so up.”

Could you explain that, please? Here is the current setup: I have one interface on the server that gets the IP from the office DHCP server. I assigned enp4s0 a temporary static address and ubuntu documentation didn’t require a gateway address for the temporary one. When the board is not connected, enp4s0 doesn’t have any address. systemctl status of dnsmasq gives the error that “warning: interface enp4s0 does not currently exist”. Once I power on the board, I can see the ethernet address assigned in the VNC viewer and when I do ip addr show on the server, I can see the static IP assigned.

Additionally, everytime I want to flash an image on the board, I have to add the IP of enp4s0 in the feed manually. For example: http://192.168.10.53/ and then the flashing begins. Is there a way that I don’t have to enter this manually everytime?

interface=enp4s0 makes dnsmasq listen only on this interface for DHCP and DNS services. When this interface is down, for example, the carrier board is power off and this interface is directly connected to the carrier board, you will see the error warning: interface enp4s0 does not currently exist. This could breadh DHCP service from dnsmasq. At least, it does for another DHCP server isc-dhcp-server. I used to run into this issue with isc-dhcp-server . But now it is dnsmasq, maybe it doesn’t hurt.

It is better to set a static IP address for enp4s0 that is out range of DHCP pool. Otherwise, there will be a conflict with the Colibri iMX6’s IP address.

you can create a file /etc/dnsmasq.hosts which you have added in dnsmasq.conf and add 192.168.10.53 tezi.toradex.com to it.
192.168.10.53 is a tezi feed server where your custom image is hosted. But the IP address 192.168.10.53 is in DHCP pool dhcp-range=192.168.10.50,192.168.10.150,12h. The feed server should be assigned with a static one .e.g. 192.168.10.10/24.

Ok thank you. It is auto flashing now.