Monday, April 27, 2009

PDN GW selection function

Source : 3GPP TS 29.401 Clause: 4.3.8

The inspiration to the post is one of the comments raised by my blog reader. What does this PDN GW selection function mean? How is PDN allocated to the user? Can a UE have multiple PDN connections? Lets take each one step by step.


LTE.jpg

UE creates attach request and sends it to eNB. eNB forwards the request to MME. During Initial attach a UE "may send" APN in attach request. If UE sends attach request without an APN then MME will contact HSS which returns a default APN. If UE sends attach request with APN then HSS will return the corresponding PDN GW identity which may contain PDN GW IP address or PDN GW FQDN. If the case is where UE already has a PDN connection ,then UE "must" send the APN in attach request. Once the PDN GW is identified then S-GW forwards the attach request to that PDN GW.

So if UE is running two applications app1 and app2 and if app2 wants to use new pdn connection, then it sends out attach request by placing the new APN address. Basic idea is a APN is bound to PDN.

Alternatively a UE may ask for dedicated bearer establishment to the PDN GW. Then app1 can run on one bearer and app2 can run other bearer, but both are pointing to the same PDN. Note that network initiated dedicated bearer can only initiated by PDN GW to which UE has attached to.

Comments/Questions are greatly welcomed.

47 comments:

Manish Panchmatia said...

Santosh

Again a nice article

Let me add few things.

1. We have IE: APN Restriction. I think it is about max number of APN that UE can connect to.

2. I think, HSS will approve that the subscriber is eligible to connect to that APN or not.

3. For dynamic IP address allocation case, the IP pool/range for free IP addresses is decided with APN

4. Public DNS server IP address is also specific to that APN and informed to UE. And yes, many times we have private DNS server to resolve FQDN within core network.

Regards and Keep Smiling
Manish

Santosh Dornal said...

Manish

APN restriction is used to determine if the UE is allowed to establish EPS bearers to other APN's. I dont know if it i used to limit the max number of APN that a UE can connect too. (Will write more on this)

HSS will approve the subscriber. UE will send attach request with Ciphered options transfer flag on when it is sending APN. Once MME receives this, it contacts HSS to get the appropriate P-GW adresses.

Thanks again for comments.

Santosh

Anonymous said...

Thanks once again for the quick replies and these new posts. How application knows to which IP address (or ti which APN) it should connect to or it should change to?

Santosh Dornal said...

Well, Iam not sure of that scenario. I havent seen a case where a mobile connects to two different APN's at a point. Even if that is the case, I think the application itself should be configured to pickup up the right APN.

Lets try to find a app developer and shoot the question to him/her. Anybody there??

Anonymous said...

yes you are right Santosh...anybody here an application developer? The question is:
If UE supports multiple PDN addresses(multiple IPs) and if one of the applications wants to change the PDN address, how does application know which address to choose (to which IP address / APN to choose)?

Anonymous said...

Hi,

I have a few questions:
1)How does the qos the sdf relate?
2)How does the PCRF authorize a particular QoS for the subscriber.
3)How does SPR and HSS data for the subscriber.

Thanks.

Santosh Dornal said...

I am not much aware of the answers for your questions at this point. I need to get back to specs and do some research. Meanwhile lets hope if somebody can answer them.

Santosh Dornal said...

Regarding Multipe APN/PDN connections: Bearer Aware Applications is the answer.

Page from Dean Bubley;s Disruptive wireless.

http://disruptivewireless.blogspot.com/2008/01/qos-and-bearer-aware-applications.html

santosh.m said...

Hi Santosh.. I wanted to know when an additional pdn connctivity request is sent to the same apn/pdn with the same pdn type ?

Santosh Dornal said...

Additional PDN connectivity to same APN mean dedicated bearer creation. UE or network can initiate this procedure. When? May be UE want to start a new application or may be network wants to forward a SIP call to UE.

Anonymous said...

Hi Santosh, thanks for the great article.

I was wondering:
If the HSS returns a FQDN for the P-GW (instead of the IP address), who is querying the DNS server for the PGW IP?
If I own the internal DNS server, Can I configure it to send the IP address of a different PGW? (based on availability/LB for example), thus the UE will be routed via SiteB instead of SiteA.

Santosh Dornal said...

Hey there!

MME is the one which asks HSS for PGW FQDN or IP address. You are right with DNS Server concept. MME can ask DNS server for IP address of PGW and DNS can return the IP address configured based on the rules you have written. This PGW information will be passed as an IE in create session request to SGW which will forward it to PGW.

But why do you consider having multiple PGW's for load balancing? I am not expert in ATCA 's but I think PGW is one single box with multiple interfaces. So load balancing can be done in create session request/response itself. You really dont have to strain the DNS here.

Let me know if you think otherwise.

Cheers, Santosh

fahim said...

hi, What is default APN ? When it is allocated ?When it is released? or
Is it is stored in USIM by default ?

Santosh Dornal said...

APN is a set of services that is configured in GGSN/PGW. UE gets the services based on the kind of APN it is being connected to. Usually APN is pre configured in the phone.

2009 Journal said...

Can you map a set of IMEI/IMSI to an APN?

Santosh Dornal said...

Yes, there are several ways to do that. You can make a set of IMSI/IMEI's to direct towards a APN.

Anonymous said...

Hi Santosh,

could it be possible to share your comments/knowledge about the below questions...

1. Request for IP address allocation through DHCP. how this is related to default bearer activation.

the below text from 23.401 a00 ...page 186 is very confusing to me" The Protocol Configuration Options may include the Address Allocation Preference, which indicates that the UE prefers to obtain an IPv4 address only after the default bearer activation by means of DHCPv4."

what it mean "only after" here?
Does this mean it is not possible for the UE to request IP address alloc via DHCP for the default PDN connection or it is possible only after the default PDN .i.e assuming UE supports multiple PDN connections UE can request for a second IP address via DHCP?


2. I do not understand the logic behind having a provision for UE to request meaning "UE prefers"
not "UE demands" but still it is always the network (P-GW) which decides to send an empty PDN with 0.0.0.0 or allocate an IP address via NAS?

Is this true , may be i am wrong could be pls share?

Kind Regards,
Kris

sameer said...

I have question on a practical use case.

In the initial deployments of LTE, operators are resorting to USB based dongles, wherein, user can plug-in USB dongles to the laptop to get wireless internet access.

In this case, if a laptop already has wifi connectivity to internet through DSL/Broadband connection then how would things work out?

Because now laptop suddenly has two ways to connect to internet via Wireless ISP and Broadband (via Cable/DSL/)Wireline ISP.

Several Questions on this:

1> Is there any way to enforce which connection (loosely used network) to use for a particular kind of traffic such for torrent/browsing/chat/email use Wifi and for VoIP calls use LTE access.

2> Does OS running on laptops support this kind of selection?

While what dean bubly is talking about is long term solution and is understandable I am wondering what is being done now.

Santosh Dornal said...

This is similar to asking if a laptop has both LAN and wifi-connection and internet is provided on both then which connection it should use. I believe the decision should be taken by operating system. I feel precedence should be LAN, then wifi and then USB dongle. Or simply give the choice to user.

Anonymous said...

Hello!!

I think that is possible one EPS bearer with a certain QoS be used by more than one UE, I'm right?
So, if this is possible how traffic is distinguishes, it is by using one GTP tunnel per UE ?what is the relation between bearers, GTP tunnels and users?

Thanks

Santosh Dornal said...

EPS bearers are mapped to set of tunnel ids. QoS in EPC is at the bearer bearer level.

Anonymous said...

Hello!!
Thanks your answer.

So, I can conclude that is possible one EPS bearer be used by several UEs, correct?
If this is possible, and knowing that a EPS bearer is created to ensure QoS for a particular service, how this service is garanteed to one particular UE? (since this EPS bearer is used by several UEs)

Thanks

Santosh Dornal said...

Bearers are created for UE. Bearer is a resource. You cannot use bearer created for one UE for other UE.

TEIDs are unique. eNB/SGW/PGW will have UE to TEID to Qos mapping. Based on this the QoS will be enforced.

Anonymous said...

Hello Santosh!!

The QoS of one user is provided by bearers, correct? To transport data for one user is used GTP tunnels associated with the bearers, correct?
So, is possible one bearer have associated several GTP tunnels, or for one bearer is only associated one GTP tunnel?

If possible one bearer have associated several GTP tunnels, this GTP tunnels has the same QoS,correct (since the QoS is associeted to bearer)?

Thanks

Santosh Dornal said...

One bearer can have only one GTP-U tunnel. There can be only one control place tunnel per user.

QoS is at the bearer level. So each tunnel will have different QoS treatment.

Anonymous said...

Hello!!!!

For example, if one UE has three types of services:
-Internet
-P2P file sharing
-VoIP

So, for VoIP service is necessary created one dedicated bearer to ensure the necessary QoS and this type of traffics are carried by GTP-U protocol, correct? For the two another services, since aren't necessary dedicated bearers, the packets of these services are carried in the same bearer (default bearer) using diferent GTP-U tunnels? or it's created two diferent bearers for this two types of services?

And if another service has the same VoIP QoS, it use the same dedicate bearer that VoIP used or it's created a new dedicated bearer?

Thanks

Santosh Dornal said...

Dedicated bearer creation is not mandatory. Its optional and depends on service provider configurations.

From network point of view, Internet, file sharing, voip etc will be mapped to SDFs and these SDFs will be associated to bearers.

Anonymous said...

Hello!!

Thanks your aswer, but what i really want know is if possible one bearer created for one UE can be used for more than one service (of the same UE) with the same QoS.

Thanks

Santosh Dornal said...

Yes.By default all the data flows in default bearer. You can also allow different services to flow on a dedicated bearer if multiple packet filters are associated to it.

Anonymous said...

Hello Santosh!!! Good Article & Good Work...please keep it up!!!

Unknown said...

Actually I have some doubt about:
When the UE is in Idle state means there is no S1 connection between ENB and MME,then how the Downlink data is mapped to the corresponding UE.
Here what is the role of APN.

Santosh Dornal said...

There is S11 and S5 connection. MME will page the UE and re-establish the S1 connection when there is downlink data.

Anonymous said...

I have some questions related to DHCP request from UE:
1. I understand that there are a couple of ways of this:
(a) UE will request PGW for IP address to be allocated, using DHCP.
(b) In a GTP-U packet coming from UE (towards PDN), if source IP is not present, then PGW triggers IP allocation using DHCP.
Is the above correct?

2. In case of 1(a), how will the DHCP request from UE come to PGW - i.e., will it be a GTP-U data packet?

Pl. clarify.

Santosh Dornal said...

Case (b) may not be right. Since UE creates real packets it needs and IP address.

While doing an attach UE will include a PCO which gives the dhcp information. So PGW queries dhcp for IP and the returned IP address is sent back to UE in attach response.

Unknown said...

Could you please tell about, how MME selects P-GW? I have a confusion about the statement "MME select first P-GW and then S-GW"

Santosh Dornal said...

MME selects PGW based on the APN. Refer to 3GPP TS 23.401 section 4.3.8 for details

Anonymous said...

Great posts in your blog!
Few questions about multiple PDN connectivity. Assuming I have an enterprise network and I wish to be a PDN connectivity:
* How does the UE differentiate between applications and PDN? Is it through TFT?
* How the apps know the PDN they are connected to?
* Does the application level request the lower layers to attach to the PDN?
* Having the enterprise network as a PDN connection requires some additional network entities in the network? Or does it only requires a DHCP server?
* AFAIK IMS is a PDN connectivity, so how VoLTE works in terms of PDN attachment (concurrently with regular internet)?

Thanks.

Saurabh said...

Hi all,

I also have some doubts.

At the time of default bearer creation, UE sends PCO with DHCPv4 option enabled. PGW sends create session response with PAA value 0.0.0.0 (UE IP). UE initiates DHCP procedure by sending DHCPDISCOVER towards eNB-SGW-PGW. my doubts ..
* what will be the dhcp server IP ?
* If PGW is acting like DHCP server then how UE knows PGW IP address for DHCP procedure?
* If UE dont know DHCP server IP then it will send DHCPDISCOVER to broadcast address 255.255.255.255?

Thanks in advance !!

KR said...

What is the maximum number of PDN connections a UE can have?

Santosh Dornal said...

11

KR said...

Hi Santosh, do you say that because there are a maximum of 11 bearers? Why do you think a UE would need more than three (v4, v6, v4/v6) PDNs in the first place?

Santosh Dornal said...

Hi

From EBI point, you can have a maximum of 11 bearers, including both default and dedicated. What UE will do with bearers is its choice, but technology doesnt limit you. Why 11 bearers..because EBI is 4 bit value and EBI 0 to 4 are reserved. Hence 11 bearers. Why EBI is 4 bit ...because NSAPI is 4 bit..why NSAPI is 4 bit..no clue. :)

Dominator said...

hi...i know this question may sound silly...but is sgw selected first or pgw selected first for initial attach ?

Santosh Dornal said...

Which is *selected* is implementation specific...but always PGW will be first found.

vikas said...

Hi Santosh,

Can MME handle the "wrong APN" provided by the UE and if yes then how.

Sandeep said...

Hi Santosh,
I have a doubt on SGi interface.
How do IPWorld/Application Server/PDN Know the perfect time of data packet sent? i.e is there an messege (Signalling/Bearer) communication over SGi Interface? Please Help me.

Anonymous said...

Hi Santosh,

I believe the DHCP options for the UE are fetched from the P-GW by the S-GW and then forwarded to the UE. Considering the DHCP lease time being, say 60mins, what happens to the GTP-U tunnel when the UE does a DHCP request for IP renewal, is it torn down and re-created using fresh GTP-C Create session request etc.?