I am referring to https://openwrt.org/docs/guide-user/network/wan/wwan/ltedongle
Having a built-in EC25 modem, to be run in QMI mode, I read:
dhcp boolean no 1 Whether to use dhcp (default) or uqmi (0) to get IPv4 interface configuration
Is this correct ?
In other (may be outdated) infos on the web, I read to use "dhcp 0" .
Further down in the wiki,
config interface wwan
option ifname wwan0
option proto dhcp
I read somewhere else, here should be "option proto 'qmi'" instead.
Can somebody enlighten me, running openwrt 22.03.2 ?
For EC25 just use
config interface wwan
option proto qmi
option apn <your-apn>
option device /dev/cdc-wdm0
dhcp option 0 is required for other modems that "do not have a dhcp server" and need to get IP from qmi parameters.
This is what I have on two identical routers (Teltonika RUT955) already. Having identical custom firmware, I built, identical firmware for the EC25-V (Verizon). However, one of the devices works properly using QMI, getting an IP like 100.x.x.x, and the other one does not work, although getting an IP, but like 10.x.x.x . Which looks like some local/private IP to me. Any idea, where/what to look for ? I compared lot of pars between the two routers, everything same besides the connected network: The working one is connected to "Verizon ", the non-working one to "Verizon Wireless".
Both are private addresses.
But the 100.x.x.x more looks like a CGNAT IP.
Still, you should treat it as a private address.
100.x.x.x is not a private address. 126.96.36.199-188.8.131.52 is Verizon. Next block is Amazon. Then, 184.108.40.206-220.127.116.11 is Verizon again. Maybe there are more Verizon blocks in that range. OP can easily check his address.
I suppose OP receives an IP from The Shared Address Space address range that is
100.64.0.0/10 per rfc6598
The different IPaddresses can be dependent on your ISP/subscription and APN. My ISP uses two APNs, one for smart phones and another for mobile broadband. The smart phone APN use private addresses and the mobile broadband APN use public addresses.
If you use
option dhcp 0 or
option dhcp 1 will not change the assigned IPaddress. You can always use
option dhcp 0 for all modems, but as @cezary says,
option dhcp 1 is for modems with an inbuilt dhcp server. Which your EC25 has.
The easiest way to setup your modem is with
option proto qmi and use
luci-proto-qmi to configure it. Then the
/lib/netifd/proto/ will be used.
But you can use
option proto dhcp aswell. Then you need to create your own scripts for configure and control your modem. This will just work with modems with inbuilt dhcp server.
Some updates: Fiddling around manually, I managed to get a 100.x.x.x IP, and internet connection. Procedure:
boot, using following /etc/config/network:
config interface 'wwan'
option device '/dev/cdc-wdm0'
option proto 'qmi'
option ipv6 '0'
option defaultgateway '1'
option metric '50' #Because also used for mwan3
option disabled '0'
# option autoconnect '0'
option apn 'vzwinternet'
This gives me an IP 10.x.x.x, and not internet.
Then, "ifdown wwan" .
option autoconnect '0' #Option enabled !
and I get an 100.x.x.x IP , and I can access the web.
My fiddling around here with "autoconnect" is based on old bug reports, I found, regarding QMI and autoconnect. Actually, my uneducated guess is, that it might be a timing effect, that first the EC25 hands out a local IP (10.x.x.x) before being properly connected to Verizon, in my case. And the change of IP then not to be recognized, until my manual fiddling around. There are also some old bug reports regarding "silent" change of IP after successful establishment of QMI connection. Only to be recognized using permanent pings, which suddenly do not work any more. Until connection re-established from the router.