Networking

System networking modes

Router mode

In router mode, the IP termination of each packet data context is on the module, which acts as a router. The DTE will send its packet to the module which will then use its routing table to perform the routing of the packet over the right context.

A DHCP server will provide to the connected hosts the configuration of the private network provided by the module. Only the IPv4 address is allowed.

IPv4

  • The DTE will configure its DHCP client over its virtual Ethernet interface and it will assign a private IP and DNS configuration. No public IP address is assigned

  • The DTE will access the packet data network using the NAT procedure

  • For each active packet data context the module creates an internal IP interface

  • In case of multiple packet data contexts (each with an assigned IP address), the module will apply the following routing rules by checking destination IP address of each uplink packet:

    • If the address belongs to the IP subnet of one of the active contexts, then the packet will be sent over that link

    • In all other cases, the packet will be sent over the context which has been activated first (i.e. the default gateway)

In case of multiple contexts the first activated context should be the one associated to the public Internet.

IPv6

Router mode is not supported in IPv6. Module is forced to work in bridge mode even if configured for router mode.

Bridge mode

In bridge mode, the IP termination of each context is on the DTE. The module will act as a bridge and forward the IP packets based on the source address.

At the EPS bearer/PDP context activation the module will receive the IP configuration from the cellular network. It will use the received IP configuration to properly set the parameters of the DHCP server. The host will receive within the DHCP protocol the correct configuration to obtain connectivity. The IP configuration consists of the IP address of the activated EPS bearer/PDP context, the IP address of the gateway needed by the host to set the connectivity, and the list of DNS servers provided by the cellular network (additionally a fallback DNS server is provided). After the PDP context activation it is suggested for the DTE to perform a DHCP request to obtain the updated IP configuration.

  • It supports only one active packet data context.

  • For more details on the bridge mode configuration, see the +UNETCFG AT command.

IPv4

  • For each active context the module creates an IP interface (which takes care of replying to ARP requests)

  • The module will perform routing over contexts using the IP alias set by the DTE

  • The DTE should use automatic configuration of the virtual interface via the DHCP protocol as the preferred method over manual configuration.

  • The DTE can manually configure its virtual interface with the information obtained using the appropriate AT commands:

    • Retrieve the associated public IP address via the +CGDCONT AT command and assign it as IP alias

    • Retrieve the module’s local configuration of the bridged interface (IP address and subnet mask) and add the required routing rules. The value of the <ipv4_address> of the RNDIS or ECM interface of the module may be used as the default gateway of the DTE virtual interface.

IPv6

In general terms, the global connectivity configuration of the network node shall be performed automatically by the IPv6 network through the use of IPv6 Neighbor Discovery Protocol (NDP).

  • The DTE will create its own link local address for the virtual Ethernet interface

  • The module will do the same

  • For each active context the module will not create any virtual interface:

    • The DTE will receive RA (Routing Advertisement) messages and it will be able to configure its global address

    • The module will perform routing over contexts using the IP alias set by the DTE

The DTE should prevent the transmission of any NS (Neighbor Solicitment).

Get the USB IP configuration +UIPADDR

+UIPADDR

Modules

All products

Attributes

Syntax

PIN required

Settings saved

Can be aborted

Response time

Error reference

full

No

No

No

-

+CME Error

Description

Returns the current configuration of the network interface mapped to the required active <cid> of the internal context and the USB IP configuration in bridge mode. If the <cid> parameter is omitted, the information text response will display all the active <cid>s.

Syntax

TypeSyntaxResponseExample

Set

AT+UIPADDR=[<cid>]

+UIPADDR: <cid>,<if_name>,<ipv4_address>,<subnet_mask>,<ipv6_global_address>[,<ipv6_link_local_address>][,<ipv4_primary_dns>,<ipv4_secondary_dns>,<ipv6_primary_dns>,<ipv6_secondary_dns>]

[…​]

OK

See

Examples

Test

AT+UIPADDR=?

+UIPADDR: (list of <cid>'s active virtual device)

OK

+UIPADDR: 1,2

OK

Defined values

ParameterTypeDescription

<cid>

Number

Specifies the active PDP context. By default the active <cid> is reported. If the <cid> parameter is omitted, all the active <cid>s are reported.For the parameter range, see <cid>.

<if_name>

String

Interface name. For more details on interface nomenclature, see Notes.

<ipv4_address>

String

IPv4 address of the interface. The IPv4 address consists of 4 octets: "ddd.ddd.ddd.ddd". The default value is "192.168.1.1".

<subnet_mask>

String

The subnet mask consists of 4 octets: "ddd.ddd.ddd.ddd". The default value is "255.255.255.0".

<ipv6_global_address>

String

Global IPv6 address of the interface. It consists of 8 groups of four hexadecimal digits representing 2 octets. The groups are separated by colons. Leading zero suppression and zero compression maybe applied. The network prefix is written in CIDR notation, by appending a slash and the needed decimal digits to the IPv6 address.

<ipv6_link_local_address>

String

Link Local IPv6 address of the interface. It consists of 8 groups of four hexadecimal digits representing 2 octets. The groups are separated by colons. Leading zero suppression and zero compression maybe applied. The network prefix is written in CIDR notation, by appending a slash and the needed decimal digits to the IPv6 address.

<ipv4_primary_dns>

String

IPv4 address of primary DNS used by the interface. The IPv4 address consists of 4 octets: "ddd.ddd.ddd.ddd".

<ipv4_secondary_dns>

String

IPv4 address of secondary DNS used by the interface. The IPv4 address consists of 4 octets: "ddd.ddd.ddd.ddd".

<ipv6_primary_dns>

String

IPv6 address of primary DNS used by the interface. It consists of 8 groups of four hexadecimal digits representing 2 octets. The groups are separated by colons. Leading zero suppression and zero compression maybe applied. The network prefix is written in CIDR notation, by appending a slash and the needed decimal digits to the IPv6 address.

<ipv6_secondary_dns>

String

IPv6 address of secondary DNS used by the interface. It consists of 8 groups of four hexadecimal digits representing 2 octets. The groups are separated by colons. Leading zero suppression and zero compression maybe applied. The network prefix is written in CIDR notation, by appending a slash and the needed decimal digits to the IPv6 address.

Notes

  • If the requested <cid> is not active the command will reply with an error result code.

  • The <ipv6_link_local_address> parameter is not supported.

  • For the internal context the interface name (see the <if_name> parameter) is "app_net(x)", where:

    • The "app_net(x)" is the name of the internal network interface mapped to an activated CID.

    • The x parameter is in the range from 1 to 15.

    • Example: "app_net1" interface is mapped to the PDP context with CID 1.

  • The interface name (see the <if_name> parameter) is either "ECM" or "RNDIS" based on +UUSBCONF configuration.

    • The values reported for the USB IP configuration in both bridge and router mode should be used by the DTE to set its interface when it uses the manual configuration (for more details, see the System networking modes section).

Examples

DescriptionCommandResponse

Internal context (IPv4 context)

AT+UIPADDR=1

+UIPADDR: 1,"app_net1","192.168.21.1","255.255.255.0","","185.215.195.114","185.215.195.115","",""

OK

Internal context (IPv6 context)

AT+UIPADDR=1

+UIPADDR: 1,"app_net1","","","2A0B:AD40:1:1044:15E3:6CD4:8B8C:84E2","","","2A0B:AD40:1:100::114",""

OK

Internal context (IPv4v6 context)

AT+UIPADDR=1

+UIPADDR: 1,"app_net1","192.168.20.34","255.255.255.0","2A0B:AD40:1:1044:15E3:6CD4:8B8C:84E2","185.215.195.114","185.215.195.115","2A0B:AD40:1:100::114",""

OK

ECM Bridge mode (IPv4 context)

AT+UIPADDR=1

+UIPADDR: 1,"ECM","10.12.6.148","255.255.255.248","","217.200.201.65","217.200.201.64","",""

OK

RNDIS Bridge mode (IPv6 context)

AT+UIPADDR=1

+UIPADDR: 1,"RNDIS","","","2001:468:3000:1:2C6C:4615:B341:FA8C","","","2A0B:AD40:1:100::114","::"

OK

ECM Bridge mode (IPv4v6 context)

AT+UIPADDR=1

+UIPADDR: 1,"ECM","192.168.21.1","255.255.255.252","2001:468:3000:1:2C6C:4615:B341:FA8C","185.215.195.114","185.215.195.115","2A0B:AD40:1:100::114","::"

OK

RNDIS router mode (IPv4 context)

AT+UIPADDR=1

+UIPADDR: 1,"RNDIS","192.168.2.1","255.255.255.0","","217.200.201.65","217.200.201.64","",""

OK

Wrong CID

AT+UIPADDR=4

ERROR

IPv4v6 context (check active CID)

AT+UIPADDR=?

+UIPADDR: 1,2

OK

Set network adapter parameters +UNETCFG

+UNETCFG

Modules

All products

Attributes

Syntax

PIN required

Settings saved

Can be aborted

Response time

Error reference

Full

No

NVM

No

-

+CME Error

Description

Configures the network adapter parameters.

For ECM or RNDIS USB networking (virtual ethernet), it enables or disables the NAT (Network Address Translation) and hence the selection between router and bridge modes.

  • When router mode is enabled, it configures the local host IP address.

  • When bridge mode is enabled, it configures the local host IP address to be as the global IP address allocated by LTE network.

For PPP dial-up established on UART or USB CDC-ACM interface, it configures the PPP authentication rule.

  • It selects whether to use the authentication credentials manually set via +CGAUTH command or to get them from the host via the PPP LCP protocol.

  • The command is accepted even if USB is not present, but USB networking requires a configured USB profile exposing either ECM or RNDIS protocol.

Syntax

TypeSyntaxResponseExample

Generic syntax

Set

AT+UNETCFG=<option>,[<…​ option_specific_params …​>]

OK

AT+UNETCFG="nat",0,"192.168.10.2"

OK

Read

AT+UNETCFG?

+UNETCFG: <option1>,<…​ option_specific_params …​>

+UNETCFG: <option2>,<…​ option_specific_params …​>

OK

+UNETCFG: "nat",0,"192.168.10.2"

+UNETCFG: "pppauthselect",0

OK

Test

AT+UNETCFG=?

+UNETCFG: <option1>,<…​ range_of_option1_params …​>

+UNETCFG: <option2>,<…​ range_of_option2_params …​>

OK

+UNETCFG: "nat",(0,1),("192.168.(0-255).(2-254)")

+UNETCFG: "pppauthselect",(0,1)

OK

Interface Nat configuration

Set

AT+UNETCFG="nat",<nat_value>[,<host_addr>]

OK

AT+UNETCFG="nat",0,"192.168.10.2"

OK

PPP authentication select

Set

AT+UNETCFG="pppauthselect",<pppauth>

OK

AT+UNETCFG="pppauthselect",0

OK

Defined values

ParameterTypeDescription

<option>

String

Command options

  • "nat": networking mode configuration

  • "pppauthselect": PPP authentication rule

<nat_value>

Number

NAT setting (router or bridge mode configuration)

  • 0 (factory-programmed value): NAT is disabled (bridge mode)

  • 1: NAT is enabled (router mode)

<host_addr>

String

Local host IPv4 address, if router mode is enabled

  • 192.168.10.2 (default value)

  • 192.168.(0-255).(2-254): available IPv4 addresses range

<pppauth>

Number

Selection of PPP authentication parameters

  • 0 (factory-programmed value): PPP dial-up authentication parameters are predefined by +CGAUTH.

  • 1: PPP dial-up authentication parameters are defined in the PPP link control protocol (LCP) procedure.

Notes

  • The set command has immediate effect for all setting with the exception of <option> = "nat" configuration, which requires a power cycle to be correctly applied.

Configure and control the data path for the network adapter +UNETDEVCTL

+UNETDEVCTL

Modules

All products

Attributes

Syntax

PIN required

Settings saved

Can be aborted

Response time

Error reference

Full

No

NVM

No

-

+CME Error

Description

Controls the data path for the network adapter.

  • Activate the network adapter and the associated data path; this includes binding the assigned TCP/IP stack resources to the selected PDN context.

  • Deactivate the network adapter and the associated data path; this includes unbinding the assigned TCP/IP stack resources to the selected PDN context.

  • Only one network adapter can be activated, since the module supports just one virtual network interface.

  • Network adapter presence (either ECM or RNDIS USB virtual ethernet) is determined by the support of either ECM or RNDIS protocol in the USB profile in use.

  • The required USB profile (including either ECM or RNDIS protocol) must be selected via +UUSBCONF AT command.

  • Command shall be used after a proper configuration of the network adapter executed via +UNETCFG AT command.

Syntax

TypeSyntaxResponseExample

Set

AT+UNETDEVCTL=<op>,<cid>,[,<urc_en>]

OK

AT+UNETDEVCTL=1,1,1

OK

Read

AT+UNETDEVCTL?

+UNETDEVCTL: <op>,<cid>,<urc_en>,<state>

OK

+UNETDEVCTL: 1,1,1,1

OK

Test

AT+UNETDEVCTL=?

+UNETDEVCTL: (list of supported (<op>,<cid>,<urc_en>)s)

OK

+UNETDEVCTL: (0-3),(1-15),(0-1)

OK

URC

+UUNETDEVCTL: <state>

+UUNETDEVCTL: 0

Defined values

ParameterTypeDescription

<op>

Number

Binding option

  • 0 (factory-programmed value): unbind the specified <cid> to the assigned TCP/IP stack resources

  • 1: bind the specified <cid> to the assigned TCP/IP stack resources once and no re-bind if the PDN context is re-activated upon deactivation

  • 2: bind the specified <cid> to the assigned TCP/IP stack resources and re-bind if the PDN context is re-activated upon deactivation

  • 3: auto activate and bind the specified <cid> to the assigned TCP/IP stack resources when power on (setting saved in NVM)

<cid>

Number

Identifier of the PDN context to be bound

  • 1-15: supported cid number

<urc_en>

Number

URC reporting

  • 0 (default and factory-programmed value): +UUNETDEVCTL: <state> URC is disabled

  • 1: +UUNETDEVCTL: <state> URC is enabled

<state>

Number

Activation state

  • 0: Activation of network adapter and data path has failed

  • 1: Activation of network adapter and data path has succeeded

Notes

  • If the <cid> for the PDN context is defined but deactivated, the binding of this cid auto activates the PDN context.

  • If the <cid> for the PDN context is undefined, the binding of this cid causes a failure in the network adapter activation.

  • If the router networking mode is selected via +UNETCFG AT command, the network interface appears enabled at host side, even before the data path is activated.

  • Only the configuration applied with <op>=3 is persistent. Any other configuration results in factory-programmed values stored in NVM.

Last updated: Jan 13, 2025
Need help?Contact Support
Questions?Contact us