What is APN? APN settings in iPhone and Android

APN or Access Point Name

What is APN?

If a mobile operator wants to provide data or internet service.  The operator needs to set up a gateway node in-home network.  APN is the address of the gateway node for providing data services to mobile subscribers. In GSM, the name of the node is GGSN.

Along with data, the network may have nodes for roaming and messaging too. It depends on what service are provisioned for a sim card.E.g., for roaming HLR, for messaging SMSC. There are other nodes as well, e.g., IN SCP,  OCS for billing, and charging.

When a subscriber roams, it connects to the home network for its services (voice, SMS, and data) via roaming network. For accessing data service,  SGSN in the roaming network does the signaling with the GGSN and HLR in-home network for setting up a PDP context. An APN addresses the GGSN.  Similar as SMSC does by SMSC address.  A phone needs to provision an APN to access the external Packet data network via GGSN in 3G. In the case of 4G, APN is the address of PGW.

Subscriber subscription and APN :

HLR provisions the list of APNs and QoS profiles for 3G subscribers. First, a sim card attaches to the home network via roaming SGSN for data. During attachment procedure. SGSN downloads APN and QoS profile for the data services.

In the case of 4G, HSS stores the APN profiles for a SIM card. Each SIM has a GPRS profile that contains the APN name and quality of service. Subscriber attaches to the HSS via MME.  During attach, Mme downloads the EPS-Subscribed QoS profile. There can be multiple APNs for a subscriber. HSS marks one the APN as default.

APN format: 

APN format is a string type. It is similar to a url for a website. The roaming network does a DNS lookup of the APN to get the IP address of the GGSN or PGW. The string may have operator information with MCC and MNC digits or just a simple string with no details. Its a kind of URL.  This includes the network identifier and may also include the MCC and MNC of the GGSN location.

String Format for APN with examples: 

internet – This name has no information for the serving mobile operator or company.

internet.co.uk – This name belongs to the UK based mobile company.

Airtel .in – This name belongs to the India mobile operator Airtel.

internet.mnc234.mcc345.GPRS – This blogs to the mobile operator with MCC as 345 and MNC as 234.  A mobile operator may have multiple MNC within a country. Multiple MNCs leads to having multiple APNs by the same operator in the same country.

Network Format of APN: 

When a device does and location update, HLR sends the APN to the roaming network over the wire. On the wire, string converts to bytes and sends it to the network.  A character converts to ASCII value. The first byte contains the length of the next string before the dot (.).  The following are the few examples of APN encoding.

internet –   0x08, ASCII(i), ASCII(n), ASCII(t), ASCII(e), ASCII(r), ASCII(n), ASCII(e), ASCII(t)

internet.co.uk – 0x08, ASCII(i), ASCII(n), ASCII(t), ASCII (e), ASCII(r), ASCII(n), ASCII(e), ASCII(t), 0x02, ASCII(c),ASCII(o), 0x02, ASCII(u),ASCII(k)

How to configure APN settings?

The mobile operator configures the setting of the APN in the device during the attach procedure. Still, if data is not working, there are options to set settings manually. The following section will describe how you can for a device to use an APN by changing APN settings in iPhone or Android devices.

APN Settings in iPhone:

To set the manually following are the steps.

  • Got to settings and click on cellular.
  • Select the data network.
  • Change your settings for APN paramter.
  • After the change, come back to the home screen, the changes will be saved.

Apn settings in Android or what is my APN:

Go to settings -> Connections->Mobile Networks-> Access Point Names. Here one can edit or add new APN.

What is MCC and MNC in the APN setting?

HLR sends the list of APNs in the subscription profile during location updates. The phone selects one APN for the data service. Which APN, depends on the data requirements. You might see that there are also settings for APN in the device, where APN can be configured manually.  APN has many settings, in setting there are MCC and MNC.  Never worry about what is MCC and MNC in APN?  When mobile phones roam, it comes under a PLMN. PLMN identified by the MCC and MNC.  If the user sets the MCC and MNC value, the phone will allow getting data service in PLMN which have configured MCC and MNC values.

For example, if you are carrying a sim card of TMobile USA and roams in India. If you set the MCC and MNC of Airtel, The phone can use data only when the Airtel network is selected.  It is not advisable to set MCC and MNC in and by the mobile subscriber.

Leave a Comment