[re-post] IP address allocation

Posted: August 8, 2012 in technical
Tags: , , , ,

To my great surprise IP address distribution to the UEs proves to be quite tricky in 4G. First of all there are 2 types of addresses supported: IPv4 addresses and IPv6 addresses. Each PDN connection needs at least one IP address associated with it, IPv4 or IP6, but it may have one IPv4 and one IPv6 address associated with it. All UEs and PDNs need to support at least IPv4 address allocation during default bearer activation and IPv6 prefix allocation via IPv6 stateless autoconfiguration, but may also support IPv4 and IPv6 address allocation via DHCPv4 and DHCPv6. Also there is the possibility of using static addresses/prefixes, but this is transparent to the UE (23.401 “It is transparent to the UE whether the PLMN or the external PDN allocates the IP address and whether the IP address is static or dynamic. It is transparent to the UE whether the PLMN or the external PDN allocates the IP address and whether the IP address is static or dynamic.”). If a static address/ prefix is to be used this needs to be configured in the HSS or in a DHCP/Radius/Diameter server.

I will not talk about the IPv4 address allocation as it seems to be quite simple. The PGW is allocating or obtaining an IPv4 address for the UE and forwards this address to the SGW and the SGW in turn to the MME in the Create Session Response message (PAA IE). The MME will store it and send it the UE. The address will be released upon the release of the entire session.

IPv6 prefix allocation
– Each UE and PDN connection is allocated a globally unique /64 prefix (23.401 |IPv6 Stateless Address autoconfiguration specified in RFC 4862 [18] is the basic mechanism to allocate /64 IPv6 prefix to the UE.”)
During default bearer activation the PGW sends to the SGW (and MME) a complete IPv6 address that contains a /64 prefix and an interface identifier. This address is included in the Create Session Response message in the PAA IE. The MME will forward only the interface identifier to the UE and it will store the prefix. Upon activation of the default bearer the UE may send a Router Solicitation message to the PGW. This message will travel encapsulated in GTP-U over the S1-U and S5/S8 interfaces. So, this RS message will be received by the PGW accompanied by a GTP-U header that contains the PGW-U TEID allocated to the UE for the default bearer. After the default bearer activation the PGW will send a Router Advertisement message to the UE containing the same IPv6 prefix as the one allocated during default bearer activation and sent to the SGW and MME. This RA message is sent on the GTP-U tunnel associated with the default bearer and can be sent solicited or unsolicited. Using the prefix received in the RA message and any interface identifier other than the one received the UE creates globally unique IPv6 address (23.401 “For stateless address autoconfiguration however, the UE can choose any interface identifier to generate IPv6 addresses, other than link-local, without involving the network. “).

Note: The RS message uses the following source and destination IPv6 addresses:
– Source IP address: a link local address formed using the interface identifier received by the UE during the activation of the default bearer (FE80::received prefix)
– Destination IP address: IPv6 all routers (FF01::2)
The RA message uses the following source and destination IPv6 addresses:
– Source IP address: a link local address of the PGW
– Destination IP address can be either:
– IPv6 all nodes: FF01::1
– The source IPv6 address of the RS message.
Source: RFC 4861.

Details on the IP address allocation can be found in:
– 23.401 section 5.3.1
– 29.061 section 11.2.1.3.2a IPv6 Stateless Address Autoconfiguration for EPC

Update:
There are 2 questions that I couldn’t find an answer for yet:
1. Why was the stateless autoconfiguration mechanism chosen? Why not just pass the prefix to the UE?
2. In Create Session Request for handover and sometimes for attach the MME includes the UE’s IPv6 address. What IPv6 address is included, considering that the MME and HSS only keep the prefix in the information storage databases? (per 23.401 Information Storage section)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s