apn types

What is the APN type? A SIM card has GPRS settings to access the internet. The mobile operator …

Read more


What is APN in telecom for 3G and 4G?

APN or Access Point Name

What is APN in telecom?

To provide internet services to its subscribers, an operator needs to set up a gateway network node in its HPLMN. For 3G network, it’s known as GGSN and for 4G it’s PGW. Whenever a mobile subscriber needs to access the internet from any corner of the world. It must connect to the carrier’s gateway for setting up a logical tunnel between the internet and the sim card.

What is APN
What is APN

APN is a string that represents the address of the gateway. It is similar to a website URL. An URL translates to the webserver and APN to the GGSN/PGW IP address.  In this tutorial, we will learn about the format, subscription,  configuration settings, and other details about the Access Point Name.
Similar to SMSC Number. The SMSC number is 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.

How does a device know what APN to use? 

Besides the GGSN, the GPRS network has an additional component(HLR) to enable data roaming. Before setting up a data connection,  the SIM card does registration with the HLR and downloads the subscription profile.

When a subscriber roams, it attaches to the home network for services(voice, SMS, and data). For accessing data service,  SGSN in the roaming network does the signaling with the HLR for GPRS registration. After getting GPRS access, it attaches to the GGSN and sets up a tunnel for the internet by using a GTP to create PDP context.

Subscriber subscription and APN:

HLR provisions the list of APNs and QoS profiles for 3G subscribers. On network attach, SGSN downloads APN and QoS profiles for the subscriber.

In the case of 4G, HSS stores the APN profiles. Each SIM has an EPC 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 that may consist of alphabets, numbers, and other characters.  The roaming network needs to do a DNS lookup to get the IP address of the GGSN/PGW, before starting any signaling. The string may contain operator information by including MCC and MNC digits or just a plain string with no such information.

Few examples of Apn names: 

internet – This name has no information about 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.

How does an APN string encode in the network protocol messages?

During the location update procedure, while attaching, HLR sends the APN to the roaming network as part of the subscription data. Over the wire, the APN string needs to convert to bytes in protocol format as per the 3GPP specification. 

Each character converts to its equivalent ASCII value. If APN contains dots(.), the first byte contains the length of the immediate string till the next dot (.).  Following are a few examples of APN encoding with dots and with no dots.

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 other options you may use to do settings manually. The following section will describe how you can change APN settings on iPhone and Android devices.

How to change APN Settings on 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, and 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 a list of APNs in the subscription profile during camping on a network. The phone selects only one of them for data. Which one it will select, is determined by the data requirements. You do not need to worry.

But while selecting APN manually, you see that it has many settings, MCC and MNC are two of them.  Till now you may never worried about what is MCC and MNC in APN? 

When mobile phones roam, it comes under a PLMN, which is identified by the MCC and MNC pair.  If the user sets the MCC and MNC value, the phone will allow getting data service in PLMN which has configured MCC and MNC values only.

For example, if you are carrying a sim card from TMobile USA and roam 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.

More topics to read—>