简介
本文档介绍5G蜂窝网关和PIM模块上的APN。本章还介绍如何在这两台不同设备上配置配置文件。
先决条件
要求
建议您使用运营商提供的订户识别模块(SIM)卡和运营商提供的正确接入点名称(APN)。
使用的组件
本文档中的信息基于以下软件和硬件版本:
- 思科IOS® XE 17.6.4上的思科蜂窝网关CG522
- 插入到Cisco IOS® XE 17.15.1a上的Cisco IR1101路由器的Cisco P-5GS6-R16SA-GL PIM
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您的网络处于活动状态,请确保您了解所有命令的潜在影响。
背景信息
本文档的范围仅限于定义配置文件和APN,以及描述在5G Cisco设备(包括CG522和PIM模块P-5GS6-R16SA-GL和P-5GS6-GL)上配置配置文件和APN的过程。
基本概念
每个5G Cisco设备都需要一个配置文件供嵌入式调制解调器使用,以连接到运营商的网络。此配置文件包括以下元素:
配置文件ID
这是一个介于1和16之间的整数值,用于标识和区分不同的配置文件。每个5G思科设备最多可创建16个配置文件。大多数运营商只需要一个配置文件,但少数特定运营商需要多个配置文件。5G设备允许您将配置文件与SIM卡插槽关联。配置文件有两种类型:附加配置文件和数据配置文件。通常,运营商使用一个配置文件进行配售和数据,但某些特定运营商将其分为不同的配置文件:
- 附加配置文件:用户设备(UE)使用它向蜂窝网络注册。连接过程是允许设备访问网络服务的初始步骤。数据包数据网络(PDN)类型必须为IPv6。请注意,此配置文件状态仍处于“非活动”状态,它仅用于完成连接过程,这一点非常重要。它确保只有经过授权的设备才能连接到运营商的网络。运营商的网络用它来管理和控制设备访问其网络的方式。
- 数据配置文件:也称为默认配置文件,是指设备完全连接到运营商的网络后,处于活动状态的配置文件。这是从蜂窝网提供商接收IP地址的配置文件。它规定设备如何处理数据连接,并定义建立和维护数据连接所需的参数。
APN
表示接入点名称。它是移动设备用于连接到蜂窝运营商的数据网络以及随后连接到互联网的接入点的名称。使用正确的APN可确保您的设备提供建立成功连接所必需的设置、接收正确的IP地址以及其他技术详细信息。必须配置由运营商分配给SIM卡的正确APN;否则,它将导致无法访问运营商的网络。APN特定于运营商。一个运营商可能具有不同的APN,具体取决于要使用的IP类型,包括动态或静态IP。
PDP类型
PDP代表数据包数据协议。此协议控制和管理通过蜂窝网络的数据通信。此关键字指定用于数据连接的地址类型:
- IPv4:指较旧但最常用的Internet协议第4版。
- IPv6:指较新版本6的Internet协议。
- 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
在本示例中,您将使用APN apn.test、PDN类型IPv4和IPv6创建配置文件ID编号4,且没有身份验证。
步骤4.检验配置文件是否已按需要配置:
CellularGateway# show cellular 1 profile
PROFILE ID APN PDP TYPE STATE AUTHENTICATION USERNAME PASSWORD
--------------------------------------------------------------------------------------
4 apn.test IPv4v6 INACTIVE None - -
注意:配置文件状态将一直保持非活动状态,直到收到来自运营商的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地址并转发流量。