# free5GC:第五代行動網路之核心網路開發及架構
## 1G Wireless Networks
- Early 1980s
- Analog radio technologies and ==circuit-switched== transmission and networking technologies.
- Main service: circuit-switched voice
- ==Lack the ability to support roaming(漫遊)between different network operators.==
- Three main 1G radio system standards:
- **Advanced Mobile Phone Systems** (AMPS)
- 類比式行動電話系統,北美貝爾實驗室
- **Total Access Communications Services** (TACS)
- **Nordic Mobile Telephone** (NMT)
- 北歐行動電話服務
### Circuit Switching
- **Dedicated communication path** between two stations.
- 當一個人在使用某個線路時,其他人就無法使用該線路。
- A channel on each physical link.
- Most common example is the **telephone network**.
### Operation
1. Circuit establishment
- Channel capacity must be **reserved between each pair of node**.
2. Information transfer
3. Circuit disconnect
Example:
- Public telephone
- **Private Branch Exchange**(PBX,專用交換機)
## 2G Wireless Networks
- Emerged in the early 1990s.
- Digital signal processing and transmission technologies.
- increased **radio capacity** and **spectrum utilization**, enhanced voice quality, reduced power consumption, etc.
- **Standards for core networks**
- In addition to circuit-switched voice, enabled the first waves of mobile data and mobile Internet services.
### 2G Systems in North America
- RAN (Radio Access Network)
- IS-136: **Time Division** Multiple Access (TDMA)
- IS-95: **Code Division** Multiple Access (CDMA)
- ==Core Network== (CN)
- IS-41: support **roaming** between different network operators.
### 2G Systems in Europe
- **GSM** (Global System for Mobile communications)
- RAN and core network
- Radio frequencies
- 900 MHz and 1800 MHz in Europe
- 800 MHz and 1900 MHz in the United States
- Services
- **circuit-switched** voice
- 9.6 Kbps circuit-switched **symmetric channel** as a data connection to access the Internet
### 2G Systems in Japan
- PDC (Personal Digital Cellular) network
- Services
- **circuit-switched** voice
- data services over 9.6 Kbps radio channels
### Generic 2G Architecture

- PSTN: Public Switched Telephone Network,公用交換電話網路
- MSC: Mobile Switching Center,移動交換中心
- VLR: Visitor Location Register,拜訪位置暫存器
- HLR: Home Location Register,歸屬位置暫存器
- BS: Base Station,基站
### 2.5G Wireless Networks
- Provide **higher radio system capabilities and per-user data** rates than 2G systems, but do not yet achieve all the capabilities promised by 3G systems
- General Packet Radio Services (GPRS)
- provide a packet-switched core network as an extension to GSM core networks
- provides data rates of 56–114 kbit/sec
- Enhanced Data Rates for Global GSM Evolution (EDGE)
- provide advanced modulation and channel coding techniques to increase the data rates of GSM radio systems
## 3G Wireless Networks
- Significantly increase radio system capacities and per-user **data rates** over 2G systems
- Support ==IP-based data==, voice and multimedia services
- Enhance quality-of-service (QoS) support
- Improve **interoperability**
### Packet Switching
- Data are transmitted in **blocks**, called **packets**.
- Long message is broken up into a series packets.
- Packet (1518 byte)
- header (18 byte): control information
- payload (1500 byte): data
- 乙太網路的標準 MTU (Maximum Transmission Unit) 為 1500 bytes。
- At each **switching node**, the packet is received, stored, and passed on to the next node.
### Use for Packets

### Third-Generation Partnership Project (3GPP)
- 3G core networks will evolve the **GSM** core network platform to support **circuit-switched** mobile services and to evolve the GPRS core network platform to support **packet-switched** services.
- 3G radio access technologies will be based on the Universal Terrestrial Radio Access Networks (UTRANs) that use Wideband-CDMA (WCDMA) radio technologies.
### Third-Generation Partnership Project 2 (3GPP2)
- 3G core networks will evolve the IS-41 core network to support **circuit-switched** mobile services and define a new **packet core network** architecture that leverages capabilities provided by the IS-41 core network to support IP services.
- 3G radio access technologies will be based on cdma2000 radio technologies.
### 3GPP Specifications
- 從 3G 時代創立,但直到現在還持續制定標準(即將邁入 6G)
- **Release**: a set of **Technical Specifications** (TS) and **Technical Reports** (TR)
- **Freeze**: content can only be revised in case a correction is needed
- 將標準確定下來,只接受一些必要的修正
- ==Release 99 (R99) – 3G==
- Freeze March 2000
- focus on a **new RAN** based on **WCDMA**
- emphasize the interworking and backward compatibility with **GSM**
- Release 4 (R4)
- freeze March 2001
- a minor release with some enhancements to R99
- **IP transport** was introduced into the core network
- Release 5 (R5)
- freeze June 2002
- major changes in the ==core network== based on IP protocols
- phase 1 of the **IP Multimedia Subsystem** (IMS)
- IP transport in the UTRAN

- Release 6 (R6)
- freeze March 2005
- IMS phase 2
- **harmonization** of IMS in **3GPP** and **3GPP2**
- **interoperability** of UMTS and WLAN
- session continuity
- multimedia broadcast and multicast
- Release 7 (R7)
- Functional freeze date including stable protocols: March 2008 (closed: September 2014)
- ==Release 8 (R8) – 4G==
- Functional freeze date including stable protocols: March 2009
- Introduction of **LTE**

### Gateway GPRS Support Node (GGSN)
:::info
GGSN 與 SGSN 相當於網際網路中網路層的 IP(負責 routing)。
:::
- GPRS (**General Packet Radio Service**)
- **Packet routing and forwarding center**: all user packets to and from a mobile in a PLMN will be sent first to a GGSN (refer to as the mobile’s serving GGSN)
- **Route and mobility management**: maintain a route to the SGSN that is currently serving a mobile and uses the route to exchange the user traffic with the SGSN
### Serving GPRS Support Node (SGSN)
- Access control
- **Location management**: track the locations of mobiles; may report the location information to the HLR
- **Route management**: maintain and relay user traffic between the mobile and the GGSN
- **Paging**: initiating paging to idle mobiles
- Interface with service control platforms: contact point with **CAMEL** (Customized Applications for Mobile Enhanced Logic)
### Information Servers
- 3G
- Shared by CS and PS domains
- **Home Subscriber Server** (HSS)
- master logical database
- maintain user subscription information to control network services
- **Home Location Registrar** (HLR): main component of HSS which maintains users’ identities, locations, and service subscription information
- Authentication Center (AuC)
- maintain information to authenticate each user and to encrypt the communication
- accessed by the HSS
- Equipment Identity Register (EIR)
- maintain IMEIs of the subscribers
### User Packet Routing and Transport
- Inside the PS CN domain, IP is the main protocol for **transporting user packets** between network nods.
- IP is used for routing between GGSNs.
- Routing of user packets between SGSN and GGSN is based on GPRS-specific protocols and procedures.
### IP Address
- IP address represents both ID and location of a host
- A specific IP address can only be used in a specific IP subnet
- IP routing can be done by just looking at the netid
- A router does not need to maintain a table for all hosts
### Tunneling Protocols in IP
[IP隧道 - 維基百科](https://zh.wikipedia.org/zh-tw/IP隧道)
- **IP in IP**, RFC 1853, RFC 2003
- Minimal Encapsulation within IP, RFC 2004
- **Generic Routing Encapsulation** (GRE), RFC 2784, RFC 2890

:::info
不同組織制定標準的格式範例
- **IETF** (Internet Engineering Task Force):RFC 791 (IP)、RFC 2460 (IPv6)
- **IEEE** (Internet Engineering Task Force):802.11
:::
### Package Routing
- **GGSN** acts as a **central point** for routing of all user packets.
- User packets are tunneled between **RNC** (Radio Network Controller) and **SGSN**, between SGSN and GGSN, and between two SGSNs.
- **GPRS Tunneling Protocol (GTP)**: routing and mobility management
- Host-specific routes are used to forward user packets between a mobile and a GGSN.
- maintain an individual routing entry as part of a PDP context for every mobile terminal that has an active PDP context

### 3GPP packet-switched domain

### Evolution of standards for wide-area radio systems

## 3.5G
- 3GPP High-Speed Packet Access (HSPA)
- 3GPP2 Evolution - Data Optimized (EV-DO)
### High-Speed Packet Access (HSPA)
- High-Speed Downlink Packet Access (HSDPA)
- down-link speeds of 1.8, 3.6, 7.2 and 14.4 Mbits/s
- High-Speed Uplink Packet Access (HSUPA)
- up-link speeds up to 5.76 Mbit/s
- HSPA+
- up to 84 Mbit/s on the downlink
- up to 22 Mbit/s on the uplink
- MIMO
### 3GPP2 EV-DO
- **Evolution - Data Optimized** (EV-DO) is a marketing term that is used when referring to the 3GPP2 **“HRPD” (High Rate Packet Data)** standards, and **“eHRPD” (Evolved High rate Packet Data)** standards.
- HRPD is the cdma2000 technology for packet transmission as specified in the 3GPP2 C.S0024-A v3.0 cdma2000 High Rate Packet Data (HRPD) Air Interface Specification (also published as the TIA/EIA 856 standard)
- The eHRPD network provides a Radio Access Network (RAN) that supports an evolved mode of operation and provides an IP environment that supports attachment to multiple Packet Data Networks (PDNs) **via the 3GPP Evolved Packet Core (EPC)**.
- 3GPP2 X.S0057, 3GPP2 A.S0022, 3GPP2 C.P0087
## 4G
- Two 4G candidate systems are commercially deployed:
- the Mobile WiMAX standard
- first used in South Korea in 2007
- the first-release ==Long Term Evolution== (LTE) standard
- in Oslo, Norway and Stockholm, Sweden since 2009

### 3GPP Architecture (Release 8)
- 3GPP **Evolved Packet System** (EPS)
- **Radio Side** (LTE – Long Term Evolution)
- **Evolved-UTRAN** (E-UTRAN)
- Network Side (SAE – System Architecture Evolution)
- ==Evolved Packet Core== (EPC)
- 3GPP Release 8 is the first release of the **SAE**
- **Packet-switched** core network only for voice, data, video, and other multimedia traffic
- Roaming between 3GPP, non-3GPP (trusted and non-trusted), and fixed access networks
- Designed to optimize network performance
### Comparison with 3G
- **Packet-switched only core network**
- **Simplified architecture/Flat architecture**
- **Separation of control plane and user plane**
- Packets are routed through S-GW for intra E-UTRAN mobility
- Roaming between 3GPP, non-3GPP (trusted and non-trusted), and fixed access networks
### EPS Architecture
[1-5G基站是如何起名的?NR,gNB,en-gNB,ng-eNB,EN-DC,NE-DC,NGEN-DC,NG-RAN......_nr基站是什么意思-CSDN博客](https://blog.csdn.net/ChenBinBini/article/details/109458841)

- UE (user equipment)
- eNodeB (Evolved Node B, E-UTRAN Node B)
- MME (Mobility Management Entity)
- HSS (Home Subscriber Server)
- S-GW (Serving Gateway)
- P-GW (PDN Gateway)
- PDN (Packet Data Network)
- PCRF (Policy and Charging Rule Function)
### 3GPP SAE Architecture – R8
(simplified)

### Home Subscriber Server (HSS)
- A central database that contains information about all the network operator’s subscribers
- The components of LTE carried forward from UMTS and GSM
### Policy and Charging Rules Function (PCRF)
- PCRF is the policy and charging control element.
- See TS 23.203 for details.
- The PCRF terminates the Rx interface and the Gx interface.
### Mobility Management Entity (MME)
- In control plane
- **Subscriber** management
- **Session** management
- Security procedures
- **Location management**: location tracking, location update
### Serving Gateway (S-GW)
- Interface between E-UTRAN and core network
- Packets are **routed through S-GW** for **intra E-UTRAN mobility**
### Packet Data Network (PDN) Gateway (P-GW)
- Anchor point for packets to **external PDN**
- Policy enforcement
- **Packet filtering**
- Charging
### E-UTRAN Architecture – R8

### E-UTRAN
- Only eNodeB in E-UTRAN: support all L1 and L2 features
- The functions of RNC are distributed between eNodeB, MME, S-GW.
- X2 interface: minimize packet loss due to mobility
### eNodeB
- Modulation and de-modulation
- Channel coding and de-coding
- Radio resource control
- Radio mobility management
- L2 protocol
### Architecture Migration



## 5G
- More and more applications
- Lower and lower latency
- End-to-End (E2E) latency < 5ms
- Air latency < 1ms
- More and more data transmitted
- Not just smartphones anymore
### 1G to 4G
Mainly used by human beings:
- 1G and 2G were about **voice**
- 3G was about **data**
- 4G is about **video**
- 5G will be about **intelligent networks** that can handle **billions** of connected devices while remaining **stable and operational**.

### Next Generation Mobile Networks (NGMN) Alliance
- Mobile telecommunications association of mobile **operators**, **vendors**, **manufacturers** and **research institutes**.
- Its objective is to ensure the successful commercial launch of future **mobile broadband networks**.
- It complements and supports standards organizations (ex: 3GPP, IEEE) by providing a coherent view of what mobile operators require.
<!-- Massive IoT -->
### NGMN 5G Requirements

### White paper by NGMN (Next Generation Mobile Networks)

### NGMN 5G vision
- Faster data rate: **1 ~ 10 Gbps**
- Download HD videos in seconds, **AR, VR**
- Lower end-to end latency: **1 ~ 10ms**
- **Autonomous driving**, **Tactile Internet**(觸覺互聯網), Interactive applications
- **Higher user mobility**: > 500km/h
- High Speed Train
- Broadband access in dense areas
- **HD video/photo** sharing in stadium
- Ultra-reliable communications
- E-health, **Remote surgery**, **Drones**
- Massive machine type communications
- Smart grid, Smart transportation, Industrial 4.0 (Internet of Things)
### What’s wrong with the current 4G core network?
==功能與硬體綁定==
- High cost
- Not flexible
- Limit innovation
解決方法:==**Softwarization and Virtualization**==
### Network Function Virtualization (NFV)
把功能虛擬化,不會受到硬體限制
- Virtualized Network Functions (VNFs)

### Network Slicing

### Benefits of Softwarization
- **Rapid innovation**
- Innovation at software speed
- Can do experiments
- Standards will follow software deployments
- Open up network innovation to great minds around the world
- **Flexibility**
- Deploy services according to geography
- Deploy services according to user characteristics
- Dynamically route packets to its particular network slice
### Evolution of Cellular Networks
- 1G to 4G: linear evolution
- 4G to 5G: ==**disruptive evolution**==
### Features of 3GPP releases
- ==R8: 4G==
- All IP core network, the System Architecture Evolution (SAE)
- Support of **LTE and other 3GPP accesses**, support of non-3GPP accesses, inter-system mobility, Single Radio Voice Call Continuity (SRVCC), CS fallback.
- **Earthquake and Tsunami Warning System** (ETWS).
- Support of **Home Node B / Home eNode B**.
- R9:
- **LCS** (location services) control plane for EPS.
- Support of **IMS emergency calls** over GPRS and EPS
- Enhancements to Home Node B / Home eNode B
- **Public Warning System** (PWS)
- R10:
- Network improvements for **machine-type** communications.
- Various **offload mechanisms** (LIPA, SIPTO, IFOM)
- R11:
- Further improvements for machine-type communications.
- Further improvements to LIPA and SIPTO.
- Single Radio Video Call Continuity (vSRVCC)
- R12:
- LIPA Mobility and SIPTO at the Local Network
- R13:
- a **Dedicated Core** (DECOR)
- R14:
- **Control and User Plane Separation of EPC nodes** (CUPS)
- **Enhancements of Dedicated Core Networks selection mechanism** (eDecor)
### Dedicated Core Networks (DCNs)
- One or more DCNs within a PLMN, with **each core network dedicated for specific type of subscriber**
- DCN selection is based on subscription information and operator configuration
- Don’t need to modify UEs
### eDECOR
- UE assistance information that facilitates the DCN Selection
- to reduce the need for DECOR reroute
- **DCN-ID**
- The UE provides the DCN-ID to RAN at registration to a new location in the network
- RAN selects serving node (MME or SGSN) based on the DCN-ID
### (e)DECOR Specs
- 3GPP TS 23.707 - Architecture enhancements for dedicated core networks; Stage 2
- 3GPP TS 23.711 - Enhancements of Dedicated Core Networks selection mechanism
### Control and User Plane Separation (CUPS)
- Control and User Plane Separation of EPC nodes (CUPS)
- Aligned with the **MEC, Mobile Edge Computing** ETSI ISG (Industry Specification Group)
- The **user plane** functions can be placed flexibly (e.g. **centrally or closer to the RAN**) while the control plane functions could still **remain centralized** and continue to support the interfaces to the other network entities (like MME, PCRF, **Charging Systems**).
### Benefits of CUPS
- **Reducing latency** on application service
- e.g. by **selecting User Plane nodes** which are **closer to the RAN** or more appropriate for the intended UE usage type without increasing the number of control plane nodes
- Supporting **increase of data traffic**
- by enabling to add user plane nodes **without changing the number of SGW-C, PGW-C and TDF-C** in the network
- Locating and **Scaling** the CP (Control Plan) and UP (User Plan) resources of the EPC nodes independently
- **Independent evolution** of the CP and UP functions
- **Enabling Software Defined Networking (SDN)** to deliver user plane data more efficiently

CUPS introduces 3 new interfaces, **Sxa, Sxb and Sxc** between the CP and UP functions of the **SGW, PGW and TDF** respectively.
### Protocol Stack

### Packet Forwarding Control Protocol (PFCP)
- 3GPP assessed candidate protocols such as OpenFlow, FoRCES, Diameter, IETF DMM FPC and 3GPP native protocol.
- 3GPP decided to **define a 3GPP native protocol** with **TLV**(type-length-value/tag-length-value) encoded messages over UDP/IP, called **Packet Forwarding Control Plane** (PFCP) protocol, for the Sxa, Sxb and Sxc interfaces.
### 3GPP specifications for 5G
- ==R15: - 5G==
- the **first set of 5G standards** - including new work as well as the maturing of the LTE-Advanced Pro specifications.
- R16:
- an initial full 3GPP 5G system to its completion; still on going …
### 5G Architecture – R15
- **Non-Standalone** (NSA)
- Use ==**4G EPC**== as the core network
- Use 4G EPC as the core network
- the first set of 5G standards
- Service Based Architecture (SBA)
### Non-Standalone Type 3/3a

- 5G UE 連到 gNB,控制訊息透過 Xx 傳到 eNB
- 3a 的 gNB 連到 EPC,可以減少 gNB 的負擔
### System Architecture of 5G Phase 1 - Standalone
- Specifications
- TS 23.501: System Architecture for the 5G System; Stage 2
- TS 23.502: Procedures for the 5G System; Stage 2
- TS 23.503: Policy and Charging Control Framework for the 5G System; Stage 2
- Features
- **Service Based Architecture** (SBA)
- **Network Slicing**
### Service Based Architecture (SBA)
- Elements are defined as **network functions** that offer their services via interfaces of a common framework.
- **Network repository functions** (NRF) allows every network function to discover the services offered by other network functions.
### 3GPP R15 SBA (1/2)

- UPF 聽 SMF 指揮

### EPC vs. 5GC

- EPC
- **PCRF** (Policy and Charging Rules Function)
- **HSS** (Home Subscriber Server)
- **MME** (Mobility Management Entity)
- **S/PGW** (Serving Gateway/PDN Gateway)
### 5G NF (Network Function)
- Authentication Server Function (**AUSF**)
- With a fronted interface, AUSF is dedicated to authentication processing.
- Access and Mobility Management Function (**AMF**)
- AMF the node that manages all UE related functions.
- THE EPC functionally of MME, S-GW-C & P-GW-C has been allocated sothat all access and mobility functionality is done by AMF.
- Data Network (**DN**), e.g. operator services, Internet access or 3rd party services
- Unstructured Data Storage Function (**UDSF**)
- Network Exposure Function (**NEF**)
- Network Repository Function (**NRF**)
- Network Slice Selection Function (**NSSF**)
- Policy Control Function (**PCF**)
- With a fronted interface, PCF supports unified policy framework to govern network behavior.
- Session Management Function (**SMF**)
- SMF provides the functionalities of MME, S-GW-C & P-GW-C in EPC that are not covered by AMF.
- It takes care of session management such as session establishment, modify and release, including tunnel maintain between UPF and AN node, UE IP address allocation & management.
- Unified Data Management (**UDM**)
- Unified Data Repository (**UDR**)
- User Plane Function (**UPF**)
- Application Function (**AF**)
- User Equipment (**UE**)
- (Radio) Access Network (**(R\)AN**)
- 5G-Equipment Identity Register (**5G-EIR**)
- Security Edge Protection Proxy (**SEPP**)
- Network Data Analytics Function (**NWDAF**)
### Access and Mobility Management Function (AMF)
- 主要大腦
- Termination of **RAN** CP interface (N2).
- Termination of NAS (N1), NAS **ciphering and integrity protection**.
- **Registration** (login) management.
- **Connection** management.
- **Reachability** management.
- **Mobility** Management.
- 透過與基地台的訊號強度來計算移動距離
- Provide transport for SM messages between UE and SMF.
- Access **Authentication**.
- Access **Authorization**.
- Access **Accounting**.
- 上面三個稱作 3A
- It interacts with the **AUSF** and the UE, **receives the intermediate key** that was established as a result of the **UE authentication** process.
### Session Management Function (SMF)
- **Session Management** e.g. Session establishment, modify and **release**, including tunnel maintain **between UPF and AN node**.
- UE IP address **allocation & management** (including optional Authorization).
- DHCP**v4** (server and client) and DHCP**v6** (server and client) functions.
- **Configures traffic steering** at **UPF** to route traffic to proper destination.
- Termination of interfaces towards **Policy control functions**.
- **Charging data collection** and support of charging interfaces.
- **Control and coordination** of charging data collection at UPF.
- Termination of SM parts of NAS messages.
- **Downlink Data Notification**.
- Initiator of **AN specific SM information**, sent via **AMF** over N2 to AN.
- Determine **SSC mode** of a session.
### Policy Control Function (PCF)
- Supports unified policy framework to govern network behaviour.
- Provides policy rules to Control Plane function(s) to enforce them.
- Accesses subscription information relevant for policy decisions in a Unified Data Repository (UDR).
### Network Repository Function (NRF)
- Service discovery function
- Service Registration/De-Registration
- Service update
- Maintains the NF profile of available NF instances and their supported services
- Support Network slicing
- PLMN-level
- Shared-slice level
- Slice-specific level
- NF profile of a NF instance (refer to Clause 6.2.6 of TS 23.501)
- NF instance ID
- NF type
- PLMN ID
- Network slice related Identifier(s), e.g. S-NSSAI, NSI ID
- FQDN or IP address of NF
- NF capacity information
- ...
### 5G SBI

- Namf: Service-based interface exhibited by AMF.
- Nsmf: Service-based interface exhibited by SMF.
- Nnef: Service-based interface exhibited by NEF.
- Npcf: Service-based interface exhibited by PCF.
- Nudm: Service-based interface exhibited by UDM.
- Naf: Service-based interface exhibited by AF.
- Nnrf: Service-based interface exhibited by NRF.
- Nnssf: Service-based interface exhibited by NSSF.
- Nausf: Service-based interface exhibited by AUSF.
- Nudr: Service-based interface exhibited by UDR.
- Nudsf: Service-based interface exhibited by UDSF.
- N5g-eir: Service-based interface exhibited by 5G-EIR.
- Nnwdaf: Service-based interface exhibited by NWDAF.
---
- Two types of SBI:
- Request – Response
- Subscribe – Notify
- The Implementation is decided:
- OpenAPI
- RestFul API
- HTTP/2
- JSON



### Service-based Behavior among Network Functions
- Request (Consumer)-Response (Producer)
- One to one between NFs
- One-time response from Producer to Consumer within a certain time

- Subscribe (Consumer)-Notify (Producer)
- Multiple NFs may subscribe to the Same CP NF
- Periodic updates/event-trigger update
- Potential implementation
- Separate Request/Response
- Part of another NF service operation
- Registration as notification endpoint to Network Repository Function (NRF)

### Partial Steps Replaced with Service-based Operations in 5G Procedures


### Three Key 5G Use Cases
- eMBB (enhanced Mobile Broadband)
- initial phase of 5G Non-Standalone (NSA) deployments
- URLLC (Ultra Reliable Low Latency Communications)
- mMTC (massive Machine Type Communications)

### Network Slicing in 5G Core Network (5GC)
---
### Transformation of Traditional Networking Paradigms to SDN/NFV/Cloud-enabled 5G

## Network Evolution enabled by SDN/NFV

### Examples of 5G Network Slices
