# How to properly disconnect from carrier network?

**URL:** <https://forum.sierrawireless.com/t/how-to-properly-disconnect-from-carrier-network/22263>\
**Category:** MC/EM Series\
**Created:** [November 29, 2020, 11:12pm UTC](https://forum.sierrawireless.com/t/how-to-properly-disconnect-from-carrier-network/22263 "2020-11-29T23:12:45Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Donald](https://avatars.discourse-cdn.com/v4/letter/d/ac8455/32.png) [@Donald](https://forum.sierrawireless.com/u/Donald)\
**Post date:** [November 30, 2020, 7:27am UTC](https://forum.sierrawireless.com/t/how-to-properly-disconnect-from-carrier-network/22263/3 "2020-11-30T07:27:36Z")

</div>

Hi @qingtao.cao.au

The modem uses raw-IP only, so you can’t just use normal DHCP. You have to get the IP information from the modem and manually set the Linux-side network interface to match. You also have to set the IP mode to “raw” every time the interface appears (on boot and after suspend/resume).

You’ve configured an auto connect profile, so you don’t have to start the modem manually each time:  
qmicli -d /dev/cdc-wdm1 --wds-create-profile=3gpp,name=t mobile,[apn=fast.tmobile.com](http://apn=fast.tmobile.com),pdp-type=IPV4V6  
qmicli -d /dev/cdc-wdm1 --wds-set-autoconnect-settings=[/(enabled|disabled|paused)[,(roaming-allowed|home-only)]]

–wds-get-autoconnect-settings Get autoconnection settings  
–wds-set-autoconnect-settings=[/(enabled|disabled|paused)[,(roaming-allowed|home-only)]] Set autoconnection settings (roaming settings optional)

Please refer to the links below for more information:  
[https://gist.github.com/cullum/cf401be9b6392f11f226a40d39ad0eb3](https://gist.github.com/cullum/cf401be9b6392f11f226a40d39ad0eb3)  
[https://www.freedesktop.org/software/libqmi/man/latest/qmicli.1.html](https://www.freedesktop.org/software/libqmi/man/latest/qmicli.1.html)

> [@How to disable MC7430 auto data connection?](https://forum.sierrawireless.com/t/how-to-disable-mc7430-auto-data-connection/9221/4):
>
> Hi mlw, thank you and aleksander0m for your responses. Could you possibly elaborate on the unit starting the default bearer? I have tested our MC7430 units and determined the pDefaultPDNEnabled setting is not enabled on them, and is not enabled by them during the boot process. I assume this also lines up with the !SCACT AT command referenced in the documentation, but I’m not certain about this. The MC7430 unit still attaches and starts an LTE data session on our private APN even when it is no…

> [@How to auto connect to network by MC7304 in Linux](https://forum.sierrawireless.com/t/how-to-auto-connect-to-network-by-mc7304-in-linux/21733/11):
>
> The DHCP server in the modem firmware is similar to autoconnect. It is a feature designed to let the host ignore the fact that this is a modem, and just treat it as any unmanaged ethernet link. That’s nice if you don’t want to manage the mobile network connection. I recommend letting the host manage the IP configuration. That is: Use QMI or MBIM to retrieve the connection information from the modem and configure the IP interface on the host. based on this. No DHCP. I believe this is what …

Please help to tick “Solutions” if your question is answered.

---

_[View the full topic](https://forum.sierrawireless.com/t/how-to-properly-disconnect-from-carrier-network/22263)._
