Apn or Access Point Name
Every mobile operator have a home network. Home network have nodes for subscriber profile, e.g for roaming HLR , for messaging SMSC and for data, GGSN or PGW. There are other nodes as well e.g IN SCP, OCS for billing and charging. But here main focus is on mobile data. When a subscriber roams , it connects to the home network for its services (voice, sms and data). To get services, roaming network needs to get the address of serving nodes in the home network for a services. For accessing data services , ggsn is a contacted by the SGSN in roaming network. The ggsn is addressed by a apn. Same as smsc, does by smsc address. A phone uses apn to access external Packet data network via ggsn. In 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 download apn and qos for data services.
In case of 4G , HSS stores the APN profiles. Each profile contains 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 is a string. 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 :
internet - This name have 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 with in a country. This leads to have multiple APNs by same operator in same country.
On network the apn is transmitted in strem of bytes. String converts to bytes and send to the network. A character converts to ASCII value. The fist byte contains the length of the next string before the dot (.). Following are the few example 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 phone
The mobile operator configures the setting of 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:
Go to settings -> Connections->Mobile Networks-> Access Point Names. Here one can edit or add new apn.
What is mcc and mnc in apn settings ?
HLR sends the list of APNs in subscription profile during location update. 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 device , where apn can be configured manually. Apn has many settings , in setting there are mcc and mnc. Never worried about what is mcc and mnc in apn ? When mobile phones roams it comes under a PLMN. PLMN identified by the MCC and MNC. If the use sets the MCC and MNC value, phone will allow to get data service in PLMN which have configured MCC and MNC values.
For example , if you are carrying 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 Airtel network is selected. It is not advisable to set mcc and mnc in apn by the mobile subscriber.