APN or Access Point Name

Every mobile operator has a home network components for a mobile data service.  APN is the address of a data component. The home network has nodes for subscriber profile, e.g for roaming HLR, for messaging SMSC and for mobile data,  GGSN or PGW. There are other nodes as well e.g IN SCP,  OCS for billing and charging. But here we will discuss mobile data or GPRS.  When a subscriber roams, it connects to the home network for its services (voice, SMS, and data) via roaming network.  To start signaling, the roaming network needs to get the address of serving nodes in the home network for service.  For accessing data service,  SGSN in the roaming network does the signaling with the GGSN in-home network. The GGSNis addressed by an APN.  Same as SMSC does by SMSC address.  A phone uses APN to access the external Packet data network via GGSN. In the case of 4G, APN is the address of PGW.

HLR stores the list of APNs and QoS profile for a subscriber. First, a phone is attached to the home network via roaming SGSN for data. During attachment procedure. SGSN downloads APN and QoS for the data services.

In the case of 4G, HSS stores the APN profiles. Each profile 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 is a string. The roaming network does a DNS lookup to get the IP address, where the GGSN or PGW is hosted. The string may have operator information or just a string. Its a kind of URL.  This includes the network identifier and may also include the MCC and MNC of the GGSN location.

String Format 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. This leads to having multiple APNs by the same operator in the same country.

Network Format: 

On the network, the APN is transmitted in a stream of bytes. 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 change APN in the phone

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.

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.

Related Posts

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top