Example for Configuring an LTE Cellular Interface as the Primary Interface to Connect to the Internet
Networking Requirements
A remote branch of the enterprise needs to exchange large volumes of service traffic with external networks, but it cannot obtain the wired WAN access service. As shown in Figure 12-11, the branch uses the Router as the egress gateway and uses an LTE cellular interface to connect to the Internet through the LTE network, meeting service transmission requirements.
The branch intranet is on the network segment 192.168.100.0/24 and all hosts join VLAN 10. The branch requires that the Router should assign IP addresses to branch intranet users and the users access external networks.
The branch has subscribed to a yearly-package service and connects to the Internet in dial-automatic mode. The branch obtains the following information from the carrier:
- APN: ltenet
- Dialer number: *99#
Configuration Roadmap
The configuration roadmap is as follows:
- Set the connection parameters of the LTE cellular interface.
- Configure C-DCC for dial-up connection so that the LTE cellular interface can connect to the LTE network.
- Configure the enterprise intranet and configure the Router to assign IP addresses to branch intranet users.
- Configure the NAT function to allow branch intranet users to access external networks.
- Configure a default route and specify the LTE cellular interface as the outbound interface so that traffic from the branch intranet is forwarded to the Internet through the LTE cellular interface.
After the dialer enable-circular command is executed, the device automatically configures the dialer number and IP address negotiation, without the need to configure a dialer control list.
Procedure
- Set the connection parameters of the LTE cellular interface.
# Create an APN profile.
<Huawei> system-view [Huawei] sysname Router [Router] apn profile lteprofile [Router-apn-profile-lteprofile] apn ltenet [Router-apn-profile-lteprofile] quit
# Configure a network connection mode.
[Router] interface cellular 0/0/0 [Router-Cellular0/0/0] mode lte auto
# Bind the APN profile to the LTE cellular interface.
[Router-Cellular0/0/0] dialer enable-circular [Router-Cellular0/0/0] apn-profile lteprofile [Router-Cellular0/0/0] shutdown [Router-Cellular0/0/0] undo shutdown [Router-Cellular0/0/0] quit
- Configure C-DCC for dial-up connection.
# Configure a dialer control list.
[Router] dialer-rule [Router-dialer-rule] dialer-rule 1 ip permit [Router-dialer-rule] quit
# Obtain IP addresses dynamically.
[Router] interface cellular 0/0/0 [Router-Cellular0/0/0] ip address negotiate
# Associate Cellular0/0/0 to the dialer control list.
[Router-Cellular0/0/0] dialer-group 1
Ensure that the group-number value in the dialer-group command is the same as the dialer-rule-number value in the dialer-rule command.
# Configure the dialer number.
[Router-Cellular0/0/0] dialer number *99# autodial [Router-Cellular0/0/0] quit
- Configure the enterprise intranet.
# Create VLAN 10 and add Ethernet 2/0/0 to VLAN 10.
[Router] vlan 10 [Router-vlan10] quit [Router] interface ethernet 2/0/0 [Router-Ethernet2/0/0] port link-type trunk [Router-Ethernet2/0/0] port trunk allow-pass vlan 10 [Router-Ethernet2/0/0] quit
# Enable DHCP.
[Router] dhcp enable
# Create a global address pool.
[Router] ip pool 4gpool [Router-ip-pool-4gpool] network 192.168.100.0 mask 255.255.255.0 [Router-ip-pool-4gpool] gateway-list 192.168.100.1 [Router-ip-pool-4gpool] quit
# Configure the interface to work in global address pool mode.
[Router] interface vlanif 10 [Router-Vlanif10] ip address 192.168.100.1 255.255.255.0 [Router-Vlanif10] dhcp select global [Router-Vlanif10] quit
- Configure the NAT function.
[Router] acl number 3002 [Router-acl-adv-3002] rule 5 permit ip source 192.168.100.0 0.0.0.255 [Router-acl-adv-3002] quit [Router] interface cellular 0/0/0 [Router-Cellular0/0/0] nat outbound 3002 [Router-Cellular0/0/0] quit
- Configure a default route and specify Cellular0/0/0 as the outbound interface.
[Router] ip route-static 0.0.0.0 0 cellular 0/0/0
- Verify the configuration.
# View the interface status and traffic statistics. The command output shows that if traffic is forwarded through the interface, both the physical layer status and link layer status of the interface are Up and the IP address dynamically obtained by the interface is 10.1.1.2/24.
[Router] display interface cellular 0/0/0 Cellular0/0/0 current state : UP Line protocol current state : UP Last line protocol up time : 2020-05-25 17:17:43 Description:HUAWEI, AR Series, Cellular0/0/0 Interface Route Port,The Maximum Transmit Unit is 1500, Hold timer is 10(sec) Internet Address is negotiated, 10.1.1.2/24 Last physical up time : 2020-05-25 17:17:37 Last physical down time : 2020-05-25 17:17:20 Current system time: 2020-05-25 18:22:46 Modem State: Present Model = ME909s-821a Current Network Connection = LTE(LTE) Current RSSI = -91 dBm Current SINR = 3 dB (weak) Last 300 seconds input rate 0 bytes/sec 0 bits/sec 0 packets/sec Last 300 seconds output rate 64 bytes/sec 512 bits/sec 0 packets/sec Input: 6 packets, 1408 bytes Unicast: 6, Ununicast: 0 Output: 1276 packets, 246815 bytes Unicast: 1276, Ununicast: 0 Input bandwidth utilization : 0% Output bandwidth utilization : 0.01%
# View information about all call sessions on the LTE data card. The following command output shows that the APN is ltenet, the network type is Automatic, and the network connection mode is LTE(LTE).
<Huawei> display cellular 0/0/0 all Modem State: Hardware Information. ===================== Model = ME909s-821a Modem Type = LTE module Modem Firmware Version = 11.617.12.00.00 Hardware Version = RM2ME909ASM Integrate circuit card identity (ICCID) = 89860118802660040386 International Mobile Subscriber Identity (IMSI) = 460017585014815 Mobile Station International ISDN Number (MSISDN) = None International Mobile Equipment Identity (IMEI) = 868441041994267 Factory Serial Number (FSN) = EDV7S19613001393 Modem Status = Online Profile Information. ==================== Profile 1 = ACTIVE -------- PDP Type = IPv4, Header Compression = OFF Data Compression = OFF Access Point Name (APN) = ltenet Packet Session Status = Active * - Default profile Network Information. ==================== Current Service Status = Service available Service Domain = Combined Current Service = Combined Packet Service = Attached Packet Session Status = Active Current Roaming Status = Home Network Selection Mode = Automatic Network Connection Mode = Automatic Current Network Connection = LTE(LTE) Mobile Country Code (MCC) = 460 Mobile Network Code (MNC) = 01 Mobile Operator Information = CHN-UNICOM Cell ID = 84730137 Radio Information. ================== Current Bands : AUTO Current RSSI = -91 dBm Current RSRP = -117 dBm Current RSRQ = -7 dB Current SINR = 3 dB (weak) Bands supported : GSM: GSM900 GSM1800 WCDMA: WCDMA850 WCDMA900 WCDMA2100 WCDMA1700 FDD LTE: B1 B3 B5 B8 TDD LTE: B38 B39 B40 B41 Modem Security Information. =========================== SIM ID = 1 PIN Verification = Disabled PIN Status = Ready Number of Retries remaining = 3 SIM Status = OK
Example
Configuration file of the Router
# sysname Router # vlan batch 10 # dhcp enable # acl number 3002 rule 5 permit ip source 192.168.100.0 0.0.0.255 # ip pool 4gpool gateway-list 192.168.100.1 network 192.168.100.0 mask 255.255.255.0 # interface Vlanif10 ip address 192.168.100.1 255.255.255.0 dhcp select global # interface Ethernet2/0/0 port link-type trunk port trunk allow-pass vlan 10 # interface Cellular0/0/0 dialer enable-circular dialer-group 1 apn-profile lteprofile dialer number *99# autodial nat outbound 3002 modem auto-recovery dial action modem-rebootfail-times 128 modem auto-recovery services-unavailable action modem-reboot test-times 0 interval 3600 ip address negotiate # dialer-rule dialer-rule 1 ip permit # apn profile lteprofile apn ltenet # ip route-static 0.0.0.0 0.0.0.0 Cellular0/0/0 # return