Netgear 4G/LTE Modem - How to get it recognised at OPNsense Boot

Started by sancra01, April 11, 2018, 03:54:03 AM

Previous topic - Next topic
Apologies for the delay getting back to you. OPNsense and the USB modem have been working quite well up until about a week ago and then I noticed that the USB modem is detaching and reattaching 6 seconds later once a day at random times (but usually in the early hours of the morning) so resolving this has jumped the priority list :)

I've added the line as suggested to my /usr/local/etc/devd/ifnet.conf as per below ...

notify 101 {
   match "system"      "IFNET";
   match "subsystem"   "!usbus[0-9]+";
   match "type"      "ATTACH";
   action "ifconfig $subsystem up";
};


... and I've had some success.

When I detach the USB modem and attach it again I've noticed that the status of the WAN interface is UP (previously DOWN after detach/attach) but it doesn't have a DHCP address from the modem. So I went to "Interfaces | Overview" and selected the dropdown for my WAN interface and then hit the button to renew the DHCP and the WAN interface started working again.

So I'm nearly there. I guess I need to add another line perhaps to renew the DHCP after the WAN interface comes up? I just have no idea what I need to add though.

Can you provide another gentle push in the right direction?

Many thanks

Craig

I'm still having a bit of trouble trying to figure this out.

I'm guessing that I need to add another "action" in the ifnet.conf that will renew the IP address just after the WAN interface comes up. I've opened up a shell in OPNsense to try out a couple of commands to renew the IP address that the USB modem assigns but I'm not even sure of the command to renew.

I've read that ...

dhclient -r

... should renew it but when I run that it says there is no "r" option.

So how do you renew an ip address in OPNsense/FreeBSD? If I can work that out then adding that command line to the ifnet.conf might resolve my issue.

Grateful for any information anyone can provide.

Cheers

Craig

Tried something else. Added line in red below to ifnet.conf which I found in the logs after I renewed the IP address using the OPNsense GUI ...

notify 101 {
   match "system"      "IFNET";
   match "subsystem"   "!usbus[0-9]+";
   match "type"      "ATTACH";
   action "ifconfig $subsystem up";
   action "/usr/local/etc/rc.newwanip ue0";
};


Disconnected/reconnected the modem, WAN interface came up but it didn't acquire an IP. Would I need to introduce a delay or something after bringing up the WAN interface and if so how would I do that?