示例:将 MX 路由器配置为 SAEGW-U
此示例说明如何将 MX 系列路由器配置为 Junos 多接入用户平面解决方案的 SAEGW-U。
此示例也可用于将 MX 系列路由器配置为 5G 会话的 UPF。Junos 多接入用户平面可同时支持 4G 和 5G 会话。
要求
此示例使用以下硬件和软件组件:
MX480(也可以是 MX240、MX960)路由器,具有:
两个 MPC7 用作锚点数据包转发引擎 (PFE),用于处理 GTP-U 处理
两个 MPC2(也可以是 MPC3、MPC5、MPC7、MPC10)用作入口和出口 PFE
-
Junos OS 21.3R1 或更高版本
下方图 1 显示了此示例的硬件。
入口线卡(插槽 0)提供连接到无线电接入网络 (RAN) 的 S1-U 接口,以及连接到 SAEGW-C 的 Sxa/Sxb 组合接口。
锚点 PFE 线卡(插槽 1 和 2)通过内部
pfe-接口提供数据流量的核心处理。至少需要一个锚点 PFE 卡,但建议提供两个冗余卡。出口线卡(插槽 3)提供 SGi 接口,连接到核心互联网。
将 MX 系列路由器配置为 Junos 多接入用户平面解决方案的 SAEGW-U 之前,请确保您已:
至少一个您提供的已配置 SAEGW-C
租用一个 eNodeB
访问数据包数据网络 (PDN)
概述
拓扑
在此示例中(请参阅 图 2):
MPC2 位于插槽 0 中,具有 ge-0/0/0.1,提供 Sxa/Sxb 组合接口和 ge-0/0/0.2,用于提供 S1-U 接口。
MPC7 位于插槽 1 和 2 中,用于提供锚点 PFE 接口。
MPC2 位于插槽 3 中,提供 sGi 接口,而 ge-3/0/0.1 和 ge-3/0/0.2 则提供 SGi 接口。
配置
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,然后将命令复制并粘贴到层次结构级别的 CLI 中 [edit] 。
set system ddos-protection protocols pfcp aggregate bandwidth 20000 set system ddos-protection protocols pfcp aggregate burst 9000 set system ddos-protection protocols pfcp aggregate recover-time 30 set system ddos-protection protocols gtp-path-mgmt aggregate bandwidth 8400 set system ddos-protection protocols gtp-path-mgmt aggregate burst 8400 set system ddos-protection protocols gtp-path-mgmt aggregate recover-time 30 set chassis redundancy graceful-switchover set chassis fpc 1 pfe 0 forwarding-packages mobility user-plane set chassis fpc 2 pfe 1 forwarding-packages mobility user-plane set chassis network-services enhanced-ip set interfaces ge-0/0/0 vlan-tagging set interfaces ge-0/0/0 unit 1 vlan-id 101 set interfaces ge-0/0/0 unit 2 vlan-id 102 set interfaces ge-0/0/0 unit 1 family inet address 10.0.0.1/24 set interfaces ge-0/0/0 unit 2 family inet address 20.0.0.1/24 set interfaces ge-3/0/0 vlan-tagging set interfaces ge-3/0/0 unit 1 vlan-id 101 set interfaces ge-3/0/0 unit 2 vlan-id 102 set interfaces ge-3/0/0 unit 1 family inet address 30.0.1.1/24 set interfaces ge-3/0/0 unit 2 family inet address 30.0.2.1/24 set interfaces lo0 unit 0 family inet address 100.0.0.1/32 set interfaces mif unit 0 family inet set interfaces mif unit 1 family inet set interfaces apfe0 anchoring-options primary-list pfe-1/0/0 set interfaces apfe0 anchoring-options secondary pfe-2/1/0 set services mobile-edge gateways saegw juniper-upf1 control-plane-peers local-address 10.0.0.1 set services mobile-edge gateways saegw juniper-upf1 control-plane-peers path-management enable set services mobile-edge gateways saegw juniper-upf1 control-plane-peers heartbeat-interval 60 set services mobile-edge gateways saegw juniper-upf1 control-plane-peers apn-services apns apn-default mobile-interface mif.0 set services mobile-edge gateways saegw juniper-upf1 control-plane-peers apn-services apns apn-vrf1 mobile-interface mif.1 set services mobile-edge gateways saegw juniper-upf1 access-network-peers local-address 20.0.0.1 set services mobile-edge gateways saegw juniper-upf1 system anchor-pfes interface apfe0 set routing-instances vrf1 instance-type virtual-router set routing-instances vrf1 interface mif.1 set routing-instances vrf1 interface ge-3/0/0.2 set routing-instances vrf1 routing-options static route 0.0.0.0/0 next-table inet.0
程序
逐步过程
以下示例要求您在配置层次结构中的各个级别上导航。有关导航 CLI 的信息,请参阅 在配置模式下使用 CLI 编辑器。
将 MX 路由器配置为 SAEGW-U:
-
为 PFCP 协议流量启用 DDoS 攻击防护。
[edit system ddos-protection protocols] user@host# set pfcp aggregate bandwidth 20000 user@host# set pfcp aggregate burst 9000 user@host# set pfcp aggregate recover-time 30 user@host# set gtp-path-mgmt aggregate bandwidth 8400 user@host# set gtp-path-mgmt aggregate burst 8400 user@host# set gtp-path-mgmt aggregate recover-time 30
-
配置平滑重启 (GRES)。
[edit chassis] user@host# set redundancy graceful-switchover
-
配置插槽 1 和插槽 2 以实现锚点 PFE 处理。
[edit chassis] user@host# set fpc 1 pfe 0 forwarding-packages mobility user-plane user@host# set fpc 2 pfe 1 forwarding-packages mobility user-plane
-
启用增强型 IP 网络服务。
[edit chassis] user@host# set network-services enhanced-ip
-
使用 vlan 配置入口逻辑接口。
[edit interfaces ge-0/0/0] user@host# set vlan-tagging user@host# set unit 1 vlan-id 101 user@host# set unit 2 vlan-id 102 user@host# set unit 1 family inet address 10.0.0.1/24 user@host# set unit 2 family inet address 20.0.0.1/24
-
配置出口 PFE,以便为 VRF 默认 (apn1) 中的订阅者路由到核心/互联网。
[edit interfaces ge-3/0/0] user@host# set vlan-tagging user@host# set unit 1 vlan-id 101 user@host# set unit 2 vlan-id 102 user@host# set unit 1 family inet address 30.0.1.1/24 user@host# set unit 2 family inet address 30.0.2.1/24
-
为订阅者 VRF 配置环路地址和移动接口。
[edit interfaces lo0] user@host# set unit 0 family inet address 100.0.0.1/32 [edit interfaces mif] user@host# set unit 0 family inet user@host# set unit 1 family inet
-
定义冗余锚点 PFE 接口。
[edit interfaces] user@host# set apfe0 anchoring-options primary-list pfe-1/0/0 user@host# set apfe0 anchoring-options secondary pfe-2/1/0
-
命名 SAEGW-U 网关
juniper-upf1并配置 PFCP 对等方连接到 SAEGW-U 的地址。此外,请为 SAEGW-U 配置两个 APN(apn-default将会话放在默认路由实例中,并将apn-vrf1会话放入)。VRF1[edit services mobile-edge gateways] user@host# set saegw juniper-upf1 control-plane-peers local-address 10.0.0.1 [edit services mobile-edge gateways saegw juniper-upf1 control-plane-peers] user@host# set path-management enable user@host# set heartbeat-interval 60 user@host# set apn-services apns apn-default mobile-interface mif.0 user@host# set apn-services apns apn-vrf1 mobile-interface mif.1
-
配置 GTP-U 对等方连接到 SAEGW-U 的地址。
注意:这是在与上一步不同的命令层次结构中完成的。
[edit services mobile-edge gateways saegw juniper-upf1 access-network-peers] user@host# set local-address 20.0.0.1
-
配置聚合接口
apfe0进行 PFCP 处理。[edit services mobile-edge gateways saegw juniper-upf1 system] user@host# set anchor-pfes interface apfe0
-
配置出口 PFE,以便为 VRF vrf1 (apn2) 中的订阅者路由到核心/互联网。
[edit routing-instances vrf1] user@host# set instance-type virtual-router user@host# set interface mif.1 user@host# set interface ge-3/0/0.2 user@host# set routing-options static route 0.0.0.0/0 next-table inet.0
结果
在配置模式下,输入 、 show chassisshow interfaces、 show services、 show routing-instances和show unified-edge命令,以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明,以更正配置。
user@host# show system
ddos-protection {
protocols {
gtp-path-mgmt {
aggregate {
bandwidth 8400;
burst 8400;
recover-time 30;
}
}
pfcp {
aggregate {
bandwidth 20000;
burst 9000;
recover-time 30;
}
}
}
}
user@host# show chassis
redundancy {
graceful-switchover;
}
fpc 1 {
pfe 0 {
forwarding-packages {
mobility {
user-plane;
}
}
}
}
fpc 2 {
pfe 1 {
forwarding-packages {
mobility {
user-plane;
}
}
}
}
network-services {
enhanced-ip;
}
user@host# show interfaces
ge-0/0/0 {
vlan-tagging {
unit 1 {
vlan-id 101;
}
unit 2 {
vlan-id 102;
}
}
unit 1 {
family inet {
address 10.0.0.1/24;
}
}
unit 2 {
family inet { address 20.0.0.1/24;
}
}
}
ge-3/0/0 {
vlan-tagging {
unit 1 {
vlan-id 101;
}
unit 2 {
vlan-id 102;
}
}
unit 1 {
family inet {
address 30.0.1.1/24;
}
}
unit 2 {
family inet {
address 30.0.2.1/24;
}
}
}
apfe0 {
anchoring-options {
primary-list {
pfe-1/0/0;
}
secondary pfe-2/1/0;
}
}
lo0 {
unit 0 {
family inet {
address 100.0.0.1/32;
}
}
}
mif {
unit 0 {
family inet;
}
unit 1 {
family inet;
}
}
user@host# show services
mobile-edge {
gateways {
saegw juniper-upf1 {
system {
anchor-pfes {
interface apfe0;
}
}
control-plane-peers {
local-address 10.0.0.1;
path-management enable;
heartbeat-interval 60;
apn-services {
apns apn-default {
mobile-interface mif.0;
}
apns apn-vrf1 {
mobile-interface mif.1;
}
}
}
access-network-peers {
local-address 20.0.0.1;
}
}
}
}
完成设备配置后,请从配置模式进入 commit 。
验证
使用各种 show 命令验证 SAEGW-U 是否正常运行。
验证 SAEGW-U 状态
目的
验证 SAEGW-U 正在运行以及是否启用了 GRES。
行动
user@host> show services mobile-edge summary Graceful-Restart Enabled Mastership Master State Running Bulk Sync Synchronized
验证 SAEGW-U 对等方
目的
验证 SAEGW-U 是否已连接并正在与 SAEGW-Cs(控制对等方)和 eNodeB(接入对等方)进行通信。
行动
user@host> show services mobile-edge peers statistics
Peers Summary:
Total control peers: 1
Total access peers: 1
Total association setup request rejects: 0
Control Peer Statistics:
IP address: 10.0.0.0
Hostname: saegw-c1
Routing-Instance: default
Heartbeat Requests Received: 11
Heartbeat Responses Sent: 11
Heartbeat Requests Sent: 2
Heartbeat Responses Received: 2
Association Setup Requests Received: 1
Association Setup Responses Sent: 1
Association Release Requests Received: 0
Association Release Responses Sent: 0
Session Establishment Requests Received: 30000
Session Establishment Responses Sent (Accepted): 30000
Session Establishment Responses Sent (Rejected): 0
Session Modification Requests Received: 30000
Session Modification Responses Sent (Accepted): 30000
Session Modification Responses Sent (Rejected): 0
Session Deletion Requests Received: 23169
Session Deletion Responses Sent (Accepted): 22968
Session Deletion Responses Sent (Rejected): 0
Access Peer Statistics:
IP address: 20.0.0.0
Routing-Instance: default
Echo Requests Received: 0
Echo Responses Sent: 0
Echo Requests Sent: 0
Echo Responses Received: 0
验证 SAEGW-U 会话
目的
验证 SAEGW-U 是否具有活动数据会话。
行动
user@host> show services mobile-edge sessions summary
Sessions by State:
SESSION_WAIT: 35
ESTABLISHED: 18561
Total: 18596
Bearers by State:
BEARER_WAIT: 30
ESTABLISHED: 18561
Total: 18591
user@host> show services mobile-edge sessions
Session-address: 23.0.21.163 State: ESTABLISHED Num-bearers: 1
VRF-ID: 0x0 APN: default
CPF-peer: 10.0.0.2 Access-peer: 20.0.0.2
Anchor-PFE: apfe0:pfe-1/0/0 Secondary-anchor-PFE: apfe0:pfe-2/1/0
Local-SEID: 0x20015a2 Remote-SEID: 0x3cb2
Session-address: 23.0.47.237 State: ESTABLISHED Num-bearers: 1
VRF-ID: 0x0 APN: default
CPF-peer: 10.0.0.2 Access-peer: 20.0.0.2
Anchor-PFE: apfe0:pfe-1/0/0 Secondary-anchor-PFE: apfe0:pfe-2/1/0
Local-SEID: 0x2fec Remote-SEID: 0x56fc
Session-address: 23.0.21.49 State: ESTABLISHED Num-bearers: 1
VRF-ID: 0x0 APN: default
CPF-peer: 10.0.0.2 Access-peer: 20.0.0.2
Anchor-PFE: apfe0:pfe-1/0/0 Secondary-anchor-PFE: apfe0:pfe-2/1/0
Local-SEID: 0x1531 Remote-SEID: 0x3c40
Session-address: 23.0.29.83 State: ESTABLISHED Num-bearers: 1
VRF-ID: 0x0 APN: default
CPF-peer: 10.0.0.2 Access-peer: 20.0.0.2
Anchor-PFE: apfe0:pfe-1/0/0 Secondary-anchor-PFE: apfe0:pfe-2/1/0
Local-SEID: 0x2001d53 Remote-SEID: 0x4462
....