Quickstart: Deploy a private mobile network and site - Azure CLI

Azure Private 5G Core is an Azure cloud service for deploying and managing 5G core network functions on an Azure Stack Edge device, as part of an on-premises private mobile network for enterprises. This quickstart describes how to use an Azure CLI to deploy the following resources in the East US Azure region. See Products available by region for the Azure regions where Azure Private 5G Core is available.

Prerequisite: Prepare to deploy a private mobile network and site

Azure CLI commands used in this article

Launch Azure Cloud Shell

The Azure Cloud Shell is a free interactive shell that you can use to run the steps in this article. It has common Azure tools preinstalled and configured to use with your account.

To open the Cloud Shell, just select Try it from the upper right corner of a code block. You can also launch Cloud Shell in a separate browser tab by going to https://shell.azure.com.

When Cloud Shell opens, verify that Bash is selected for your environment. Subsequent sessions will use Azure CLI in a Bash environment, Select Copy to copy the blocks of code, paste it into the Cloud Shell, and press Enter to run it.

Sign in to Azure

Cloud Shell is automatically authenticated under the initial account signed-in with. Use the following script to sign in using a different subscription, replacing <Subscription ID> with your Azure Subscription ID. If you don't have an Azure subscription, create an Azure free account before you begin.

subscription="<subscriptionId>" # add subscription here

az account set -s $subscription # ...or use 'az login'

For more information, see set active subscription or log in interactively

Deploy a private mobile network, site and SIM

You must complete the following steps in order to successfully deploy a private mobile network, site and SIM. Each step must be fully complete before proceeding to the next.

Create a Mobile Network resource

Use az mobile-network create to create a new Mobile Network resource. The example command uses the following placeholder values, replace them with the information gathered in Prerequisite: Prepare to deploy a private mobile network and site.

Placeholder Value
<MOBILENETWORK> Enter a name for the private mobile network.
<RESOURCEGROUP> Enter the name of the resource group.
az mobile-network create --location eastus -n <MOBILENETWORK> -g <RESOURCEGROUP> --identifier mcc=001 mnc=01

Create a Site resource

Use az mobile-network site to create a new Site resource. The example command uses the following placeholder values, replace them with the information gathered in Prerequisite: Prepare to deploy a private mobile network and site.

Placeholder Value
<MOBILENETWORK> Enter the name of the private mobile network you created.
<SITE> Enter the name for the site.
<RESOURCEGROUP> Enter the name of the resource group.
az mobile-network site create --mobile-network-name <MOBILENETWORK> -n <SITE> -g <RESOURCEGROUP>

Create a Packet Core Control Plane resource

Use az mobile-network pccp create to create a new Packet Core Control Plane resource. The example command uses the following placeholder values, replace them with the information gathered in Prerequisite: Prepare to deploy a private mobile network and site.

Placeholder Value
<ASE> Enter the name of the ASE.
<CUSTOMLOCATION> Enter the name of the custom location.
<MOBILENETWORK> Enter the name of the mobile network.
<RESOURCEGROUP> Enter the name of the resource group.
<CONTROLPLANE> Enter the name for the packet core control plane.
<SITE> Enter the name of the site.
<IPV4ADDRESS> Enter the IPv4 address of the site.

Obtain the ASE ID and assign it to a variable.

ASE_ID=$(databoxedge device show --device-name <ASE> -g <RESOURCEGROUP> --query "id")

Obtain the custom location ID and assign it to a variable.

CUSTOM_LOCATION_ID=$(customlocation show --name <CUSTOMLOCATION> -g <RESOURCEGROUP> --query "id")

Obtain the site ID and assign it to a variable.

SITE_ID=$(mobile-network site show --mobile-network-name <MOBILENETWORK> -g <RESOURCEGROUP> -n <SITE> --query "id")

Create the packet core control plane.

az mobile-network pccp create -n <CONTROLPLANE> -g <RESOURCEGROUP> --access-interface name=N2 ipv4Address=<IPV4ADDRESS> --local-diagnostics authentication-type=Password --platform type=AKS-HCI azure-stack-edge-device="{id:$ASE_ID}"  customLocation="{id:$CUSTOM_LOCATION_ID}" --sites "[{id:$SITE_ID}]" --sku G0 --location eastus

Create a Packet Core Data Plane resource

Use az mobile-network pcdp create to create a new Packet Core Data Plane resource. The example command uses the following placeholder values, replace them with the information gathered in Prerequisite: Prepare to deploy a private mobile network and site.

Placeholder Value
<DATAPLANE> Enter the name for the data plane.
<RESOURCEGROUP> Enter the name of the resource group.
<CONTROLPLANE> Enter the name of the packet core control plane.
az mobile-network pcdp create -n <DATAPLANE> -g <RESOURCEGROUP> --pccp-name <CONTROLPLANE> --access-interface name=N3

Create a Data Network

Use az mobile-network data-network create to create a new Data Network resource. The example command uses the following placeholder values, replace them with the information gathered in Prerequisite: Prepare to deploy a private mobile network and site.

Placeholder Value
<DATANETWORK> Enter the name for the data network.
<RESOURCEGROUP> Enter the name of the resource group.
<MOBILENETWORK> Enter the name of the private mobile network.
az mobile-network data-network create -n <DATANETWORK> -g <RESOURCEGROUP> --mobile-network-name <MOBILENETWORK> --location eastus

Create a SIM Group

Use az mobile-network sim group create to create a new Packet Core Data Plane resource. The example command uses the following placeholder values, replace them with the information gathered in Prerequisite: Prepare to deploy a private mobile network and site. Use `` to create a new SIM Group. The example command uses the following placeholder values, replace them with the information gathered in Prerequisite: Prepare to deploy a private mobile network and site.

Variable Placeholder Value
<MOBILENETWORK> Enter the name of the private mobile network.
<SIMGROUP> Enter the name for the sim group.
<RESOURCEGROUP> Enter the name of the resource group.

Obtain the mobile network ID and assign it to a variable.

NETWORK_ID=$(mobile-network show --mobile-network-name <MOBILENETWORK> -g <RESOURCEGROUP> --query "id")

Create the SIM group.

az mobile-network sim group create -n <SIMGROUP> -g <RESOURCEGROUP> --mobile-network "{id:$NETWORK_ID}"

Create a Slice

Use az mobile-network slice create to create a new Slice. The example command uses the following placeholder values, replace them with the information gathered in Prerequisite: Prepare to deploy a private mobile network and site.

Placeholder Value
<MOBILENETWORK> Enter the name for the private mobile network.
<RESOURCEGROUP> Enter the name of the resource group.
<SLICE> Enter the name of the slice.
az mobile-network slice create --mobile-network-name <MOBILENETWORK> -n <SLICE> -g <RESOURCEGROUP> --snssai "{sst:1,sd:123abc}"

Create a Service

Use az mobile-network service create to create a new Service. The example command uses the following placeholder values, replace them with the information gathered in Prerequisite: Prepare to deploy a private mobile network and site.

Placeholder Value
<SERVICE> Enter the name of the service.
<MOBILENETWORK> Enter the name for the private mobile network.
<RESOURCEGROUP> Enter the name of the resource group.
az mobile-network service create -n <SERVICE> -g <RESOURCEGROUP> --mobile-network-name <MOBILENETWORK> --pcc-rules "[{ruleName:default-rule,rulePrecedence:10,serviceDataFlowTemplates:[{templateName:IP-to-server,direction:Uplink,protocol:[ip],remoteIpList:[10.3.4.0/24]}]}]" --service-precedence 10

Create a SIM Policy

Use az mobile-network sim policy create to create a new SIM Policy. The example command uses the following placeholder values, replace them with the information gathered in Prerequisite: Prepare to deploy a private mobile network and site.

Placeholder Value
<SLICE> Enter the name of the slice.
<DATANETWORK> Enter the name of the data network.
<SERVICE> Enter the name of the service.
<RESOURCEGROUP> Enter the name of the resource group.
<SIMPOLICY> Enter the name for the SIM policy.
<MOBILENETWORK> Enter the name for the private mobile network.

Obtain the slice ID and assign it to a variable.

SLICE_ID=$(mobile-network slice show --mobile-network-name <MOBILENETWORK> -g <RESOURCEGROUP> -n <SLICE> --query "id")

Obtain the data network ID and assign it to a variable.

DATANETWORK_ID=$(mobile-network data-network show -n <DATANETWORK> --mobile-network-name <MOBILENETWORK> -g <RESOURCEGROUP> --query "id")

Obtain the service ID and assign it to a variable.

SERVICE_ID=$(mobile-network service show -n <SERVICE> --mobile-network-name <MOBILENETWORK> -g <RESOURCEGROUP> --query "id")

Create the SIM policy.

az mobile-network sim policy create -g <RESOURCEGROUP> -n <SIMPOLICY> --mobile-network-name <MOBILENETWORK> --default-slice '{id:$SLICE_ID}' --slice-config "[{slice:{id:$SLICE_ID},defaultDataNetwork:{id:$DATANETWORK_ID},dataNetworkConfigurations:[{dataNetwork:{id:$DATANETWORK_ID},allowedServices:[{id:$SERVICE_ID}],sessionAmbr:{uplink:'500 Mbps',downlink:'1 Gbps'}}]}]" --ue-ambr "{uplink:'500 Mbps',downlink:'1 Gbps'}" --location eastus

Create a SIM

Use az mobile-network sim create to create a new SIM. The example command uses the following placeholder values, replace them with the information gathered in Prerequisite: Prepare to deploy a private mobile network and site.

Placeholder Value
<SIMGROUP> Enter the name of the SIM group.
<SIM> Enter the name for the SIM.
<RESOURCEGROUP> Enter the name of the resource group.
az mobile-network sim create -g <RESOURCEGROUP> --sim-group-name <SIMGROUP> -n <SIM> --international-msi 0000000000 --operator-key-code 00000000000000000000000000000000 --authentication-key 00000000000000000000000000000000

Attach the Data Network

Use az mobile-network attached-data-network create to attach the Data Network you created. The example command uses the following placeholder values, replace them with the information gathered in Prerequisite: Prepare to deploy a private mobile network and site.

Placeholder Value
<DATANETWORK> Enter the name for the data network.
<CONTROLPLANE> Enter the name of the packet core control plane.
<DATAPLANE> Enter the name of the packet core data plane.
<RESOURCEGROUP> Enter the name of the resource group.
az mobile-network attached-data-network create -n <DATANETWORK> -g <RESOURCEGROUP> --pccp-name <CONTROLPLANE> --pcdp-name <DATAPLANE> --dns-addresses "[1.1.1.1]" --data-interface name=N6 --address-pool 192.168.1.0/24

Clean up resources

If you do not want to keep your deployment, delete the resource group.

Next steps

If you have kept your deployment, you can either begin designing policy control to determine how your private mobile network handles traffic, or you can add more sites to your private mobile network.