Week 5: Management of the Sporadic Nature of Data Flows 1 - Attachment and Detachment Procedures R...

mac2022-06-30  24

What happens when I turn my 4G terminal on or off?当我打开或关闭4G终端时会发生什么?

That is the question we are going to answer in this video.这是我们将在本视频中回答的问题。

A 4G terminal has a permanent IP connectivity as longas we don’t, for example, turn on flight/airplane mode.只要我们不打开飞行/飞行模式,4G终端就具有永久IP连接。

As soon as it is powered up, theterminal requests the establishment of bearers for thevarious tunnels for its IP connectivity.一旦通电,终端就请求为各种隧道建立承载以实现其IP连接。

The default bearer is then maintained independentlyof how the terminal is used.然后,独立于终端的使用方式维护默认承载。

To establish connectivity, an EPS Connectivity Requestmessage is sent by the terminal.为了建立连接,终端发送EPS连接请求消息。

In reality, as we will see,this message is included in theattachment message, in other words, the attachmentand the establishment of connectivity are made at thesame time.实际上,正如我们将看到的,此消息包含在附件消息中,换句话说,附件和连接的建立是同时进行的。

First, let’s lookat how things are when we consider a powered down terminal.首先,让我们看看当我们考虑断电终端时的情况。

It’s important for the network to know whether a terminalcan be reached or not.网络知道是否可以到达终端是很重要的。

Therefore, we have the notion of “state”, which ismemorized for each terminal.因此,我们有“状态”的概念,它被记忆为每个终端。

This state, when attachment has not been made, is calledEMM deregistered, which means that the cell phone isnot reachable; it could be powered down or inflight/airplane mode.当没有进行连接时,这种状态被称为EMM注销,这意味着手机无法访问; 它可以断电或飞行/飞行模式。

We can imagine that the terminal has already been usedand that it already has a security association and atemporary identity, here GUTI 1.我们可以想象终端已经被使用,并且它已经具有安全关联和临时标识,这里是GUTI 1。

The MME memorizesthe state of the terminal and the context elements.MME记忆终端的状态和上下文元素。

To attach to the network and request a connection,we’ll have the following messages: the terminal sendsan EMM attach request with GUTI 1 and putsin the same message an ESM PDN Connectivity Requestmessage which has a different meaning.为了连接到网络并请求连接,我们将有以下消息:终端发送带有GUTI 1的EMM附着请求,并在同一消息中放入具有不同含义的ESM PDN连接请求消息。

That means: the UE requests connectivity to the externalIP network. It will indicate in the messagethe type of connectivityit wants, IPv4 or IPv6.这意味着:UE请求连接到外部IP网络。 它将在消息中指示它想要的连接类型,IPv4或IPv6。

We will have, inside this procedure,the establishment of the S1-AP connection.在此过程中,我们将建立S1-AP连接。

We’re not going to go into detail here and we’re going toassume that the terminal communicates with the MME.我们不打算详细说明,我们假设终端与MME通信。

Of course, all messages gothrough the eNodeB.当然,所有消息都通过eNodeB。

What the MME will does is:analyze the type of connectivity requested, IPv4 orIPv6, find the defaultAPN, Access Point Name, which is stored in the subscriberprofile, and select the Serving Gateway and the P-Gateway.MME将做的是:分析所请求的连接类型,IPv4或IPv6,找到存储在用户配置文件中的默认APN,接入点名称,然后选择服务网关和P网关。

The MME then creates a control tunnel with the SGW usingthe Create Session Request message.然后,MME使用创建会话请求消息与SGW创建控制隧道。

Inside, the subscriber IMSI,the type of IP requested and the APN are indicated.在内部,指示订户IMSI,所请求的IP类型和APN。

The S-Gateway passes on the request tothe P-Gateway and we can imagine here that thereis a DHCP-type mechanism to automaticallyallocate the IP address, DHCPmeaning Dynamic Host Configuration Protocol.S-Gateway将请求传递给P-Gateway,我们可以想象这里有一种自动分配IP地址的DHCP类型机制,DHCP意味着动态主机配置协议。

 

The message we see and thefollowing messages include the TEIDsto establish the tunnels.我们看到的消息和以下消息包括用于建立隧道的TEID。

The P-Gateway indicates the IPaddress in its response to the request for a tunnel.P-Gateway在其对隧道请求的响应中指示IP地址。

As soon as this message is received,the two pieces of equipment know the TEIDs of theopposite end and the S5/S8 beareris established.一旦接收到该消息,两个设备就知道对端的TEID,并建立S5 / S8承载。

The S-Gateway sends a response, stilltransporting the allocated IP address, this IP addresswill be memorized by the MME.S-Gateway发送响应,仍然传输分配的IP地址,该IP地址将由MME存储。

The MME will probably renew the temporary identity,choosing a different GUTI and will send the following messages.MME可能会更新临时身份,选择不同的GUTI并发送以下消息。

First, an EMM Attach Accept message with theGUTI, for the terminal, thismeans, OK, you’re taken into account by the network.首先,对于终端,带有GUTI的EMM附着接受消息,这意味着,确定,您已被网络考虑在内。

And second, an ESM Activate default EPS bearercontext request message with the IP address,the response to the previous request.第二,ESM激活默认EPS承载上下文请求消息,其中包含IP地址,即对先前请求的响应。

The terminal stores the IP address and the GUTIand will then acknowledge, indicating the attachmentwas successful and that the establishment of the context,in other words, the IP address, has been stored.终端存储IP地址和GUTI,然后将确认,指示附件成功并且已经存储了上下文的建立,换句话说,IP地址已被存储。。

And the MME will thenindicate to the S-Gateway that it must establish theS1 bearer: the data tunnel between the eNodeB and theServing Gateway.然后,MME将向S-Gateway指示它必须建立S1承载:eNodeB和服务网关之间的数据隧道。

At the end of the procedure, we have a terminal in theEMM Registered state,meaning it has been taken into account, it has asecurity association and an IP address.在程序结束时,我们有一个处于EMM Registered状态的终端,这意味着它已被考虑在内,它具有安全关联和IP地址。

The context is updated by theMME, which retains the IP addressand the security association, of course, correspondingto the terminal.上下文由MME更新,MME当然保留对应于终端的IP地址和安全关联。

The S-Gateway and the P-Gateway also have contextelements since they need to storethe TEIDs. S-Gateway和P-Gateway也具有上下文元素,因为它们需要存储TEID。

This is the table we saw last week.这是我们上周看到的表格。

Tunnels and connections are established and we have this diagramthat we will see in a lot of the videos.我们建立了隧道和连接,我们将在很多视频中看到这个图表。

The radio bearer, with the signaling bearerbetween the UE and the eNodeB,the S1-AP connection, the tunnel for control, only adata tunnel, called a bearer, between the eNodeBand the S-Gateway.无线承载,具有UE和eNodeB之间的信令承载,S1-AP连接,用于控制的隧道,仅eNodeB和S-网关之间的称为承载的数据隧道。

Another bearer between SGW and PGW and thetunnel for control.SGW和PGW之间的另一个承载和控制隧道。

We must also consider the detach procedure: if, forexample, I activate flight/airplane mode, or if Ipower down, the terminal makes a detach request.我们还必须考虑分离程序:例如,如果我激活飞行/飞行模式,或者如果我断电,则终端发出分离请求。

All the connections and tunnels will be released.所有连接和隧道都将被释放。

And the MME, as well as the terminal, with its SIM card,will keep the security associations and the GUTI in memory.MME以及具有SIM卡的终端将使安全关联和GUTI保持在内存中。

The procedure works like this: here,we have the entire set of bearers that havebeen established.程序的工作原理如下:在这里,我们已经建立了一整套承载。

The terminal sends a detach request,indicating its GUTI and assoon as there’s an acknowledgment on the radio channel,as soon as it is sure that the base station has taken themessage into account, it can power down.终端发送分离请求,指示其GUTI,并且一旦无线电信道上有确认,一旦确定基站已将该消息考虑在内,它就可以断电。

The radio bearer has now been released, there isno longer a radio connection.无线电承载现已释放,不再有无线电连接。

But all the resources in thenetwork must be released.但是必须释放网络中的所有资源。

So, the eNodeB sends a message to the MMEindicating the disconnection.因此,eNodeB向MME发送指示断开连接的消息。

The MME will, for that subscriber, identified by hisGUTI, take the subscriber’s data and releasethe part of the context related to the bearer that hadbeen established, but it will retain the GUTIand the security keys.对于该订户,MME将通过其GUTI识别,获取订户的数据并释放与已建立的承载相关的上下文部分,但它将保留GUTI和安全密钥。

The MME now notifies the SGW: it asks it to eraseeverything in its memory, I mean the TEID of the various tunnels.And the SGW also sendsa delete session request message to releasethe S5/S8 bearer.MME现在通知SGW:它要求它擦除其内存中的所有内容,我的意思是各种隧道的TEID。并且SGW还发送删除会话请求消息以释放S5 / S8承载。

The S-Gateway, when it receives theresponse from the PGW, when it has released thecontext, notifies the MME which requeststhat the eNodeB releases the bearer between the S-Gatewayand the eNodeB.当S-Gateway从PGW接收到响应时,当它已经释放上下文时,通知MME请求eNodeB释放S-Gateway和eNodeB之间的承载。

So, all the bearershave been released.所以,所有的承担者都已被释放。

At the end, the MME notifies theHSS that the subscriber is no longer reachable.最后,MME通知HSS订户不再可达。

 

转载于:https://www.cnblogs.com/sec875/articles/10038339.html

相关资源:JAVA上百实例源码以及开源项目
最新回复(0)