簡介
本文檔介紹5G蜂窩網關和PIM模組上的APN。還介紹了如何在這兩種不同裝置上配置配置檔案。
必要條件
需求
建議您使用運營商提供的訂戶識別模組(SIM)卡,以及運營商提供的正確接入點名稱(APN)。
採用元件
本文中的資訊係根據以下軟體和硬體版本:
- Cisco IOS® XE 17.6.4上的Cisco蜂窩網關CG522
- 插入Cisco IOS® XE 17.15.1a上的Cisco IR1101路由器的Cisco P-5GS6-R16SA-GL PIM
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路運作中,請確保您瞭解任何指令可能造成的影響。
背景資訊
本文檔的範圍僅限於定義配置檔案和APN,以及描述在5G思科裝置(包括CG522和PIM模組P-5GS6-R16SA-GL和P-5GS6-GL)上配置這些配置檔案和APN的過程。
基本概念
每個5G思科裝置都需要嵌入式數據機使用的配置檔案來連線到運營商的網路。此配置檔案包含以下元素:
設定檔 ID
這是一個範圍從1到16的整數值,用於標識和區分各種配置檔案。每個5G思科裝置最多可建立16個配置檔案。大多數運營商只需要一個配置檔案,但一些特定的運營商需要多個配置檔案。5G裝置允許您將配置檔案與SIM卡插槽相關聯。配置檔案有兩種型別:Attach profile和Data profile。通常,運營商會同時使用一個配置檔案進行配接和資料處理,但某些特定的運營商會將其劃分為不同的配置檔案:
- Attach profile:使用者裝置(UE)使用它來向蜂窩網路註冊。連線過程是允許裝置訪問網路服務的初始步驟。資料包資料網路(PDN)型別必須為IPv6。必須注意此配置檔案狀態仍處於「非活動」狀態,它僅用於完成連線過程。它確保只有經過授權的裝置才能連線到運營商的網路。運營商網路使用它來管理和控制裝置訪問其網路的方式。
- 資料配置檔案:也稱為預設配置檔案,是裝置完全連線到運營商網路後處於活動狀態的配置檔案。這是從蜂窩運營商接收IP地址的配置檔案。它規定裝置如何處理資料連線,並定義建立和維護資料連線所需的引數。
APN
表示接入點名稱。它是流動裝置用於連線到蜂窩運營商的資料網路以及隨後連線到網際網路的接入點的名稱。使用正確的APN可確保您的裝置提供建立成功連線、接收正確的IP地址和其他技術詳細資訊所需的設定。必須配置由運營商分配給SIM卡的正確APN;否則會導致無法訪問運營商的網路。APN特定於運營商。一個運營商可以有不同的APN,這取決於要使用的IP型別,無論是動態還是靜態。
PDP型別
PDP代表資料包資料協定。該協定控制和管理通過蜂窩網路的資料通訊。指定用於資料連線的地址型別:
- IPv4:指較舊但最常用的Internet協定版本4。
- IPv6:指的是Internet協定的更新版本6。
- IPv4v6:設定此值時,表示5G數據機同時處理IP版本4和6。
驗證型別
這是用於對裝置進行身份驗證以訪問網路的方法。它直接與APN相關。運營商必須提供正確的身份驗證型別及其相應的使用者名稱和密碼。選項包括:
- 密碼驗證通訊協定(PAP):以純文字檔案形式傳送使用者名稱和密碼的基本身份驗證方法。
- 詢問交握驗證通訊協定(CAP):是一種更安全的方法,因為它使用質詢 — 響應機制。加密身份驗證過程。
- 無:常用:大多數5G運營商不需要身份驗證機制。
設定
分析APN配置流程
行動閘道CG522
步驟 1:進入控制器蜂窩1配置模式:
CellularGateway#conf terminal
CellularGateway(config)#controller cellular 1
步驟2.選擇要配置的SIM插槽0或1。在此示例中選擇了SIM 0。如果要選擇SIM 1,請將0更改為1:
CellularGateway(config-cellular-1)#sim slot 0
步驟3.輸入命令配置檔案,後跟配置檔案ID號、APN、PDN型別和身份驗證(如果適用):
CellularGateway(config-slot-0)# profile id 4 apn apn.test pdn-type ipv4v6 authentication none
在本示例中,您將建立配置檔案ID號4,使用APN apn.test、PDN型別IPv4和IPv6,並且沒有身份驗證。
步驟4.驗證是否已根據需要配置配置檔案:
CellularGateway# show cellular 1 profile
PROFILE ID APN PDP TYPE STATE AUTHENTICATION USERNAME PASSWORD
--------------------------------------------------------------------------------------
4 apn.test IPv4v6 INACTIVE None - -
附註:配置檔案狀態將一直保持為INACTIVE狀態,直到它收到來自運營商的IP地址,此時狀態更改為ACTIVE。
步驟5.確保配置檔案處於活動狀態並從運營商處收到IP地址:
CellularGateway# show cellular 1 profile
PROFILE ID APN PDP TYPE STATE AUTHENTICATION USERNAME PASSWORD
-------------------------------------------------------------------------------------------
4 apn.test IPv4v6 ACTIVE none - -
CellularGateway#
CellularGateway# show cellular 1 connections
Profile ID = 4
---------------------------
APN = apn.test
Connectivity = Attach and Data
Session Status = Connected
IPv4 Address = 10.xxx.xxx.xxx
IPv4 Gateway Address = 10.xxx.xxx.xxx
IPv4 Primary DNS = 200.xxx.xxx.xxx
IPv4 Secondary DNS = 200.xxx.xxx.xxx
Tx Packets = 9481, Rx Packets = 0
Tx Bytes = 1809884, Rx Bytes = 0
Tx Drops = 0, Rx Drops = 0
Tx Overflow Count = 0, Rx Overflow Count = 0
CellularGateway#
5G PIM模組P-5GS6-GL和5GS6-R16SA-GL
步驟1.使用show命令標識介面編號。在本示例中,介面為Cellular 0/1/0:
Router#show ip interface brief
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0/0 unassigned YES NVRAM down down
FastEthernet0/0/1 unassigned YES unset down down
FastEthernet0/0/2 unassigned YES unset down down
FastEthernet0/0/3 unassigned YES unset down down
FastEthernet0/0/4 unassigned YES unset down down
GigabitEthernet0/0/5 unassigned YES unset down down
GigabitEthernet0/0/6 unassigned YES unset down down
Cellular0/1/0 unassigned YES IPCP up up
Cellular0/1/1 unassigned YES NVRAM down down
Async0/2/0 unassigned YES unset up down
Async0/3/0 unassigned YES unset up down
Async0/3/1 unassigned YES unset up down
Async0/3/2 unassigned YES unset up down
Async0/3/3 unassigned YES unset up down
Vlan1 192.xx.xx.x YES NVRAM up down
附註:對於PIM模組,unit引數標識以斜槓分隔的路由器插槽、子插槽和埠,例如0/1/0。
步驟2.輸入控制器級配置:
Router#config t
Router(config)#controller cellular 0/1/0
步驟3.輸入cli命令配置檔案,然後輸入配置檔案ID號、APN、PDN型別和身份驗證(如果需要)。通過進入插槽,然後輸入相應的號碼,確保指定要配置的SIM插槽:
Router(config-controller)# profile id 1 apn apn.test pdn-type ipv4v6 authentication none slot 0
步驟4.驗證是否已根據需要配置配置檔案:
Router#show cellular 0/1/0 profile
Profile 1 = INACTIVE **
--------
PDP Type = IPv4v6
Access Point Name (APN) = apn.test
Authentication = None
步驟5.確保配置檔案處於活動狀態並從運營商處收到IP地址:
Router#show cellular 0/1/0 profile
Profile Information
====================
Profile 1 = ACTIVE* **
--------
PDP Type = IPv4v6
PDP address = 10.xxx.xxx.xxx
IPv4 PDP Connection is successful
Access Point Name (APN) = apn.test
Authentication = None
Router#show ip interface brief
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0/0 unassigned YES NVRAM down down
FastEthernet0/0/1 unassigned YES unset down down
FastEthernet0/0/2 unassigned YES unset down down
FastEthernet0/0/3 unassigned YES unset down down
FastEthernet0/0/4 unassigned YES unset down down
GigabitEthernet0/0/5 unassigned YES unset down down
GigabitEthernet0/0/6 unassigned YES unset down down
Cellular0/1/0 10.xxx.xxx.xxx YES IPCP up up
Cellular0/1/1 unassigned YES NVRAM down down
Async0/2/0 unassigned YES unset up down
Async0/3/0 unassigned YES unset up down
Async0/3/1 unassigned YES unset up down
Async0/3/2 unassigned YES unset up down
Async0/3/3 unassigned YES unset up down
Vlan1 192.xxx.x.x YES NVRAM up down
配置檔案關聯
某些運營商需要多個配置檔案,其中一個是附加配置檔案,而另一個充當資料或預設配置檔案。如果是這種情況,您可以建立兩個配置檔案,如前所述,然後相應地關聯這些配置檔案。您的運營商必須確認是否需要為連線和資料配置單獨的配置檔案,或者單個配置檔案是否足夠。如果配置單獨的配置式,則只要它們正確關聯,選定的配置式編號就無關緊要。
行動閘道CG522
步驟1.輸入控制器蜂窩級別配置:
CellularGateway#conf terminal
CellularGateway(config)#controller cellular 1
步驟2.選擇要配置的SIM插槽0或1。在此示例中選擇了SIM 0。如果要選擇SIM 1,請將0更改為1:
CellularGateway(config-cellular-1)#sim slot 0
步驟3.配置連線配置檔案。在此示例中,配置檔案4關聯為附加配置檔案:
CellularGateway(config-slot-0)#attach-profile 4
步驟4.配置資料或預設配置檔案。在此示例中,配置檔案4與資料配置檔案相關聯:
CellularGateway(config-slot-0)#cellular 1/1 4
步驟5.根據需要驗證配置檔案是否已關聯:
CellularGateway#show cellular 1 connections
Profile ID = 4
---------------------------
APN = apn.test
Connectivity = Attach and Data
Session Status = Connected
IPv4 Address = 10.xxx.xxx.xxx
IPv4 Gateway Address = 10.xxx.xxx.xxx
IPv4 Primary DNS = 200.xxx.xxx.xxx
IPv4 Secondary DNS = 200.xxx.xxx.xxx
Tx Packets = 803, Rx Packets = 0
Tx Bytes = 153362, Rx Bytes = 0
Tx Drops = 0, Rx Drops = 0
Tx Overflow Count = 0, Rx Overflow Count = 0
5G PIM模組P-5GS6-GL和5GS6-R16SA-GL
步驟1.進入控制器配置級別:
Router#config t
Router(config)#controller cellular 0/1/0
步驟2.根據需要關聯配置檔案。在本示例中,配置檔案1關聯為連線配置檔案,而配置檔案3關聯為SIM插槽1的資料配置檔案:
Router(config-controller)# lte sim data-profile 3 attach-profile 1 slot 1
步驟3.驗證配置檔案是否已根據需要進行關聯,以及資料配置檔案是否處於已分配IP地址的「活動」狀態:
Router#show cellular 0/1/0 profile
Profile Information
====================
Profile 1 = INACTIVE **
--------
PDP Type = IPv4v6
Access Point Name (APN) = ims
Authentication = None
Profile 3 = ACTIVE*
--------
PDP Type = IPv4v6
PDP address = 10.xxx.xxx.xxx
IPv4 PDP Connection is successful
Access Point Name (APN) = apn.test
Authentication = None
* - Default profile
** - LTE attach profile
Configured default profile for active SIM 0 is profile 3.
附註:在5G PIM模組中,一個星號放在資料/預設配置檔案前面,而兩個星號放在連線配置檔案前面。
這將完成APN配置和關聯,此時5G鏈路必須處於up/up狀態,並分配IP地址並轉發流量。