What is APN? APN settings in iPhone and Android

APN or Access Point Name

What is APN?

When a mobile operator wants to provide data or internet services to its subscribers.  The operator needs to set up a gateway node(GGSN-3G/PGW-4G) in-home network.  APN is the address of the gateway node to access data services while roaming.  In this tutorial, we will learn about the format, subscription,  configuration settings, and other details of the APN. 

Along with GGSN, the network has nodes for roaming and messaging too. It depends on what services are provisioned for a sim subscriber .E.g., HLR, for roaming, SMSC for messaging. There are other nodes as well, e.g., IN SCP,  OCS for billing, and charging.

When a subscriber roams, it attaches to the home network for mobile services(voice, SMS, and data) via a roaming network. For accessing data service,  SGSN in the roaming network does the signaling with the HLR and GGSN in-home network to attach for data and for setting up a PDP context to access the internet.

it is similar to SMSC Number is for SMSC address used for mobile originated text.  A SIM needs to provision APN settings 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 to access data services. During the attachment procedure. SGSN downloads APN and QoS profiles for the subscriber.

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 of the APN as default.

What is the APN format? 

The format is a string type with alphabets, numbers, and other characters. Similar to a URL (www.cspsprotocol.com) for a website. The roaming network does a DNS lookup of the APN to get the IP address of the GGSN/PGW, before sending any signaling. The string may have operator information with MCC and MNC digits or just a plain string with no information.

Few Apn name examples: 

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

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

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

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

Network Format of APN: 

When a phone does a location update, HLR sends the APN to the roaming network as part of the subscription data. Over the wire, the APN string converts to bytes as per 3GPP format.  A character converts to ASCII value. The first byte contains the length of the next string before the dot (.).  The following are a 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.

  • Go to settings and click on cellular.
  • Select the data network.
  • Change your settings for APN parameters.
  • 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 a new APN.

What are 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