ARM 템플릿을 사용하여 서비스 및 SIM 정책 구성

서비스SIM 정책은 유연한 트래픽 처리를 제공할 수 있는 Azure Private 5G Core의 사용자 지정 가능한 정책 제어의 핵심 구성 요소입니다. 배포 요구 사항을 충족하기 위해 패킷 코어 인스턴스가 QoS(서비스 품질) 특성을 SDF(서비스 데이터 흐름)에 적용하는 방법을 정확히 결정할 수 있습니다. 자세한 내용은 정책 제어를 참조하세요. 이 방법 가이드에서는 ARM 템플릿(Azure Resource Manager 템플릿)을 사용하여 간단한 서비스 및 SIM 정책을 만드는 방법을 알아봅니다.

Azure Resource Manager 템플릿은 프로젝트의 인프라 및 구성을 정의하는 JSON(JavaScript Object Notation) 파일입니다. 이 템플릿은 선언적 구문을 사용합니다. 배포를 만들기 위한 프로그래밍 명령 시퀀스를 작성하지 않고 의도한 배포를 설명합니다.

환경이 필수 구성 요소를 충족하고 ARM 템플릿 사용에 익숙한 경우 Azure에 배포 단추를 선택합니다. 그러면 Azure Portal에서 템플릿이 열립니다.

Button to deploy the Resource Manager template to Azure.

필수 조건

  • Private Mobile Network를 만드는 데 사용한 활성 구독에 대한 액세스 권한이 있는 계정을 사용하여 Azure Portal에 로그인할 수 있는지 확인합니다. 이 계정에는 구독 범위에서 기본 제공 기여자 또는 소유자 역할이 있어야 합니다.

  • 프라이빗 모바일 네트워크에 해당하는 모바일 네트워크 리소스의 이름과 이를 포함하는 리소스 그룹을 식별합니다.

  • 프라이빗 모바일 네트워크를 배포한 Azure 지역을 식별합니다.

  • SIM 정책을 할당하려는 네트워크 조각의 이름을 식별합니다.

  • 새 정책을 할당하려는 데이터 네트워크의 이름을 식별합니다.

  • ARM 템플릿은 양방향으로 모든 트래픽을 허용하는 기본 서비스 및 SIM 정책을 구성하는 값으로 채워집니다.

    다른 목적으로 서비스 및 SIM 정책을 만들려는 경우 서비스에 필요한 정보 수집SIM 정책에 필요한 정보 수집의 정보를 사용하여 요구 사항에 맞는 서비스 및 SIM 정책을 설계합니다. ARM 템플릿 배포의 일부로 이러한 새 값을 입력합니다.

템플릿 검토

이 방법 가이드에 사용된 템플릿은 Azure 빠른 시작 템플릿에서 가져온 것입니다.

{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "metadata": {
    "_generator": {
      "name": "bicep",
      "version": "0.22.6.54827",
      "templateHash": "7793736700363560682"
    }
  },
  "parameters": {
    "location": {
      "type": "string",
      "metadata": {
        "description": "Region where the Mobile Network will be deployed (must match the resource group region)"
      }
    },
    "existingMobileNetworkName": {
      "type": "string",
      "metadata": {
        "description": "Name of the Mobile Network to add a SIM policy to"
      }
    },
    "existingSliceName": {
      "type": "string",
      "metadata": {
        "description": "Name of the existing slice to use for the SIM policy"
      }
    },
    "existingDataNetworkName": {
      "type": "string",
      "metadata": {
        "description": "Name of the existing data network to use for the SIM policy"
      }
    },
    "serviceName": {
      "type": "string",
      "defaultValue": "Allow_all_traffic",
      "metadata": {
        "description": "The name of the service"
      }
    },
    "serviceMaximumBitRateUplink": {
      "type": "string",
      "defaultValue": "2 Gbps",
      "metadata": {
        "description": "The maximum bit rate (MBR) for uploads across all service data flows that match data flow policy rules configured on the generic service"
      }
    },
    "serviceMaximumBitRateDownlink": {
      "type": "string",
      "defaultValue": "2 Gbps",
      "metadata": {
        "description": "The maximum bit rate (MBR) for downloads across all service data flows that match data flow policy rules configured on the generic service"
      }
    },
    "servicePrecedence": {
      "type": "int",
      "defaultValue": 253,
      "minValue": 0,
      "maxValue": 255,
      "metadata": {
        "description": "The precedence value for the service being deployed."
      }
    },
    "dataFlowPolicyRuleName": {
      "type": "string",
      "defaultValue": "All_traffic",
      "metadata": {
        "description": "The name of the data flow policy rule that will be created for this service."
      }
    },
    "dataFlowPolicyRulePrecedence": {
      "type": "int",
      "defaultValue": 253,
      "minValue": 0,
      "maxValue": 255,
      "metadata": {
        "description": "The precedence value for the data flow policy rule being created."
      }
    },
    "dataFlowPolicyRuleTrafficControl": {
      "type": "string",
      "defaultValue": "Enabled",
      "allowedValues": [
        "Enabled",
        "Blocked"
      ],
      "metadata": {
        "description": "Whether flows matching this data flow policy rule are permitted or blocked."
      }
    },
    "dataFlowTemplateProtocols": {
      "type": "array",
      "defaultValue": [
        "ip"
      ],
      "metadata": {
        "description": "Which protocols match this data flow policy rule. This should be either a list of IANA protocol numbers or the special value \"ip\""
      }
    },
    "dataFlowTemplateName": {
      "type": "string",
      "defaultValue": "ip_traffic",
      "metadata": {
        "description": "The name of the data flow template that will be created for this service."
      }
    },
    "dataFlowTemplateDirection": {
      "type": "string",
      "defaultValue": "Bidirectional",
      "allowedValues": [
        "Uplink",
        "Downlink",
        "Bidirectional"
      ],
      "metadata": {
        "description": "The direction of the flow to match with this data flow policy rule."
      }
    },
    "dataFlowTemplateRemoteIps": {
      "type": "array",
      "defaultValue": [
        "any"
      ],
      "metadata": {
        "description": "The remote IP addresses that UEs will connect to for this flow. This should be either a list of IP addresses or the special value \"any\""
      }
    },
    "simPolicyName": {
      "type": "string",
      "defaultValue": "Default-policy",
      "metadata": {
        "description": "The name of the SIM policy"
      }
    },
    "totalBandwidthAllowedUplink": {
      "type": "string",
      "defaultValue": "2 Gbps",
      "metadata": {
        "description": "The UE aggregated maximum bit rate (UE-AMBR) for uploads across all non-GBR QoS flows for a particular UE"
      }
    },
    "totalBandwidthAllowedDownlink": {
      "type": "string",
      "defaultValue": "2 Gbps",
      "metadata": {
        "description": "The UE aggregated maximum bit rate (UE-AMBR) for downloads across all non-GBR QoS flows for a particular UE"
      }
    },
    "sessionAggregateMaximumBitRateUplink": {
      "type": "string",
      "defaultValue": "2 Gbps",
      "metadata": {
        "description": "The session aggregated maximum bit rate (Session-AMBR) for uploads across all non-GBR QoS flows of an individual PDU session involving a particular UE"
      }
    },
    "sessionAggregateMaximumBitRateDownlink": {
      "type": "string",
      "defaultValue": "2 Gbps",
      "metadata": {
        "description": "The session aggregated maximum bit rate (Session-AMBR) for downloads across all non-GBR QoS flows of an individual PDU session involving a particular UE"
      }
    }
  },
  "resources": [
    {
      "type": "Microsoft.MobileNetwork/mobileNetworks/services",
      "apiVersion": "2023-09-01",
      "name": "[format('{0}/{1}', parameters('existingMobileNetworkName'), parameters('serviceName'))]",
      "location": "[parameters('location')]",
      "properties": {
        "servicePrecedence": "[parameters('servicePrecedence')]",
        "serviceQosPolicy": {
          "maximumBitRate": {
            "uplink": "[parameters('serviceMaximumBitRateUplink')]",
            "downlink": "[parameters('serviceMaximumBitRateDownlink')]"
          }
        },
        "pccRules": [
          {
            "ruleName": "[parameters('dataFlowPolicyRuleName')]",
            "rulePrecedence": "[parameters('dataFlowPolicyRulePrecedence')]",
            "trafficControl": "[parameters('dataFlowPolicyRuleTrafficControl')]",
            "serviceDataFlowTemplates": [
              {
                "templateName": "[parameters('dataFlowTemplateName')]",
                "protocol": "[parameters('dataFlowTemplateProtocols')]",
                "direction": "[parameters('dataFlowTemplateDirection')]",
                "remoteIpList": "[parameters('dataFlowTemplateRemoteIps')]"
              }
            ]
          }
        ]
      }
    },
    {
      "type": "Microsoft.MobileNetwork/mobileNetworks/simPolicies",
      "apiVersion": "2023-09-01",
      "name": "[format('{0}/{1}', parameters('existingMobileNetworkName'), parameters('simPolicyName'))]",
      "location": "[parameters('location')]",
      "properties": {
        "ueAmbr": {
          "uplink": "[parameters('totalBandwidthAllowedUplink')]",
          "downlink": "[parameters('totalBandwidthAllowedDownlink')]"
        },
        "defaultSlice": {
          "id": "[resourceId('Microsoft.MobileNetwork/mobileNetworks/slices', parameters('existingMobileNetworkName'), parameters('existingSliceName'))]"
        },
        "sliceConfigurations": [
          {
            "slice": {
              "id": "[resourceId('Microsoft.MobileNetwork/mobileNetworks/slices', parameters('existingMobileNetworkName'), parameters('existingSliceName'))]"
            },
            "defaultDataNetwork": {
              "id": "[resourceId('Microsoft.MobileNetwork/mobileNetworks/dataNetworks', parameters('existingMobileNetworkName'), parameters('existingDataNetworkName'))]"
            },
            "dataNetworkConfigurations": [
              {
                "dataNetwork": {
                  "id": "[resourceId('Microsoft.MobileNetwork/mobileNetworks/dataNetworks', parameters('existingMobileNetworkName'), parameters('existingDataNetworkName'))]"
                },
                "sessionAmbr": {
                  "uplink": "[parameters('sessionAggregateMaximumBitRateUplink')]",
                  "downlink": "[parameters('sessionAggregateMaximumBitRateDownlink')]"
                },
                "allowedServices": [
                  {
                    "id": "[resourceId('Microsoft.MobileNetwork/mobileNetworks/services', parameters('existingMobileNetworkName'), parameters('serviceName'))]"
                  }
                ]
              }
            ]
          }
        ]
      },
      "dependsOn": [
        "[resourceId('Microsoft.MobileNetwork/mobileNetworks/services', parameters('existingMobileNetworkName'), parameters('serviceName'))]"
      ]
    }
  ]
}

템플릿에는 두 개의 Azure 리소스가 정의되어 있습니다.

템플릿 배포

  1. 다음 링크를 선택하여 Azure에 로그인하고 템플릿을 엽니다.

    Button to deploy the Resource Manager template to Azure.

  2. 필수 조건에서 검색한 정보를 사용하여 다음 값을 선택하거나 입력합니다.

    • 구독: 프라이빗 모바일 네트워크를 만드는 데 사용한 Azure 구독을 선택합니다.
    • 리소스 그룹: 프라이빗 모바일 네트워크를 나타내는 모바일 네트워크 리소스가 포함된 리소스 그룹을 선택합니다.
    • 지역: 프라이빗 모바일 네트워크를 배포한 지역을 선택합니다.
    • 위치: 프라이빗 모바일 네트워크를 배포한 지역의 코드 이름을 입력합니다.
    • 기존 모바일 네트워크 이름: 프라이빗 모바일 네트워크를 나타내는 모바일 네트워크 리소스의 이름을 입력합니다.
    • 기존 조각 이름: 네트워크 조각을 나타내는 조각 리소스의 이름을 입력합니다.
    • 기존 데이터 네트워크 이름: 데이터 네트워크의 이름을 입력합니다. 이 값은 데이터 네트워크를 만들 때 사용한 이름과 일치해야 합니다.
  3. 기본 서비스 및 SIM 정책을 사용하려면 나머지 필드를 변경하지 않고 그대로 둡니다. 그렇지 않으면 서비스에 필요한 정보 수집SIM 정책에 필요한 정보 수집에서 수집한 정보를 사용하여 구성하려는 서비스 및 SIM 정책과 일치하도록 나머지 필드를 작성합니다.

  4. 검토 + 만들기를 선택합니다.

  5. Azure는 이제 입력한 구성 값의 유효성을 검사합니다. 값이 유효성 검사를 통과했음을 나타내는 메시지가 표시되어야 합니다.

    유효성 검사에 실패하면 오류 메시지가 표시되고 잘못된 구성이 포함된 구성 탭에 플래그가 지정됩니다. 검토 + 만들기 탭으로 돌아가기 전에 신고된 탭을 선택하고 오류 메시지를 사용하여 잘못된 구성을 수정합니다.

  6. 구성이 유효성 검사되면 만들기를 선택하여 서비스 및 SIM 정책을 만들 수 있습니다. 배포가 완료되면 Azure Portal에 확인 화면이 표시됩니다.

배포된 리소스 검토

  1. 확인 화면에서 리소스 그룹으로 이동을 선택합니다.

    Screenshot of the Azure portal showing a deployment confirmation for the ARM template.

  2. 서비스 및 SIM 정책이 리소스 그룹에 만들어졌는지 확인합니다.

    Screenshot of the Azure portal showing a resource group containing newly provisioned SIMs.

다음 단계

이제 SIM 정책을 SIM에 할당하여 서비스를 시작할 수 있습니다.