LTE / QMI IPv6 prefix request size

I use an interface WWAN with proto='qmi' to connect to the internet and it works fine. But I always get a /64 IPv6 prefix, which is kinda small :frowning: With DHCPv6 there's an interface-option reqprefix='xx' to request a specific prefix. I tried uci set network.WWAN.reqprefix='xx' with several different values, to no avail.

My question is whether a QMI interface obeys these commands (it's not supported via Luci). If so, my provider sucks. If not, is there a way to try to request a larger prefix? I would like to avoid NAT6ing anything....

Thanks in advance!

I don't think that qmi can request for delegated prefix. It's primary purpose is to connect a single host. You can ask your ISP if they delegate prefixes to be certain.
But even with just a /64 you can enable relay.

1 Like

Yeah, tried that, with very limited success (Mobile providers and technical support seem to be an oxymoron, at least here in Germany: "Let is know what you find out"). And prefix delegation works by default with QMI and Luci, but I have several internal networks and /64 just doesn't cut it...

There seem to be a lot of ways for WWAN connectivity. I wouldn't mind trying others, but I don't want to try them all. Any ideas?

Prefix is requested by odhcp6c using the following parameter

-P <length>	Request IPv6-Prefix (0 = auto)

odhcp6c is called by /lib/netifd/proto/dhcpv6.sh

You can start tcpdump on your wwan and kill odhcp6c, then it will be automatically restarted (as I recall) and will send a request upstream.

I'm not very familiar with shell-scripting, but it seems to go like this. Define valid values:

proto_config_add_string 'reqprefix:or("auto","no",range(0, 64))'

Define and read local variables in procedure proto_dhcpv6_setup

local reqaddress reqprefix clientid reqopts defaultreqopts noslaaconly forceprefix extendprefix norelease noserverunicast noclientfqdn noacceptreconfig ip6prefix ip6prefixes iface_dslite iface_map iface_464xlat ifaceid userclass...
json_get_vars reqaddress reqprefix clientid reqopts defaultreqopts noslaaconly forceprefix extendprefix norelease noserverunicast noclientfqdn noacceptreconfig iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass de...

and finally configure the settings:

[ -z "$reqprefix" -o "$reqprefix" = "auto" ] && reqprefix=0
[ "$reqprefix" != "no" ] && append opts "-P$reqprefix"

Now for me the question is: where is json_get_vars defined? It's not in /lib/netifd/proto/dhcpv6.sh. So what is it and where does it "get" it's variables from?

too complex :wink:
just replace $reqprefix in the script with the desired static value and test
common values are 64, 56, 48

Cell phone providers rarely offer more than a single /64, usually with quite some additional restrictions as well. Aside from a business contract, there is little you can do (leaving NDP proxying as the only option).

@AndrewZ: I'll look into that when I have the time, thanks!

@slh: If I understand that correctly, the NDP proxies would have to run on my internal routers and turn all networks into a single "pseudo-briged" Ethernet. I'd expect compatibility issues (e.g. Windows RRAS) as well as problems with firewalls. I'll have to investigate further and see what's right for me. But thanks for bringing up NDP proxies, hadn't thought about that.

I really hate it that mobile providers seem to intentionally cripple the technology...