---
title: 5G Interface Configuration Guide
slug: routing/5g-interface-configuration-guide
description: 5G Interface Configuration Guide
createdAt: 2026-04-03T07:33:20.277Z
---

## <font color="#1d50a2">Introduction</font>

The device supports communication via cellular networks after a SIM card is inserted. The module supports 3G/4G/5G networks and dual SIM cards. For Slot 1 (the upper slot), insert the SIM card with the chip facing down and the notch facing inward. For Slot 2 (the lower slot), insert the SIM card with the chip facing up and the notch facing inward.

## <font color="#1d50a2">5G Interface Configuraton</font>

### <font color="#1d50a2">Create a 5G Interface</font>

| **Operation**                       | **Command**              | **Description** |
| ----------------------------------- | ------------------------ | --------------- |
| Enter the system configuration view | **configure**            |                 |
| Create a 5G interface               | **interface cellular 1** |                 |
| Configure dial-up                   | **dial-up apn** *string* |                 |
| Enable nat translation              | **nat-zone** 1           |                 |

### <font color="#1d50a2">Create a route</font>

| **Operation**                       | **Command**                             | **Description** |
| ----------------------------------- | --------------------------------------- | --------------- |
| Enter the system configuration view | **configure**                           |                 |
| Create a route                      | **ip route** *A.B.C.D/M* **cellular 1** |                 |

## <font color="#1d50a2">Example of 5G Interface Configuration</font>

**Network requirements**

The company requires that the internal network be able to translate private IP addresses to public IP addresses and connect to the wide area network via a cellular network.

![](https://api.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/QWuJBFmgvxIc5TiJwkhLc-20260403-073838.png)

**Procedure**

```plaintext
sonic(config)# vlan 100
sonic(config)# dhcp pool test
sonic(config-dhcp-pool-test)# network 100.0.0.1 255.255.255.0
sonic(config-dhcp-pool-test)# address-pool 100.0.0.100 100.0.0.200
sonic(config-dhcp-pool-test)# dns 114.114.114.114
sonic(config-dhcp-pool-test)# routers 100.0.0.1
sonic(config)# nat enable
sonic(config)# interface ethernet 1
sonic(config-if-1)# switchport access vlan 100
sonic(config)# interface vlan 100
sonic(config-vlanif-100)# dhcp select server
sonic(config-vlanif-100)# ip address 100.0.0.1/24
sonic(config)# interface cellular 1
sonic(config-cellular-1)# dial-up apn 3gnet
sonic(config-cellular-1)# nat-zone 1
sonic(config)# ip route 0.0.0.0/0 cellular 1
```

## <font color="#1d50a2">Example of 5G Interface as a backup port</font>

**Network requirements**

The company requires that the internal network be able to translate private IP addresses to public IP addresses, connect to the wide area network via physical ports, and use the 5G interface as a backup exit.

![](https://api.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/KB2sOftOgUDINOlRyHnEv-20260403-073911.png)

**Procedure**

```plaintext
sonic(config)# vlan 100
sonic(config)# dhcp pool test
sonic(config-dhcp-pool-test)# network 100.0.0.1 255.255.255.0
sonic(config-dhcp-pool-test)# address-pool 100.0.0.100 100.0.0.200
sonic(config-dhcp-pool-test)# dns 114.114.114.114
sonic(config-dhcp-pool-test)# routers 100.0.0.1
sonic(config)# interface ethernet 1
sonic(config-if-1)# switchport access vlan 100
sonic(config)# interface vlan 100
sonic(config-vlanif-100)# dhcp select server
sonic(config-vlanif-100)# ip address 100.0.0.1/24
sonic(config)# nat enable
sonic(config)# nat pool test 10.0.0.100
sonic(config)# nat binding test test
sonic(config)# interface ethernet 2
sonic(config-if-2)# ip address 10.0.0.100/24
sonic(config-if-2)# nat-zone 1
sonic(config)# interface cellular 1
sonic(config-cellular-1)# dial-up apn 3gnet
sonic(config-cellular-1)# nat-zone 1
sonic(config)# sla 1 icmp-echo dst-ip 10.0.0.1
sonic(config)# track 1
sonic(config-track-1)# route 0.0.0.0/0 10.0.0.1
sonic(config-track-1)# sla 1
sonic(config)# ip route 0.0.0.0/0 cellular 1 10
```

