Example for Configuring a Link of a 3G Cellular Interface as the Primary Link to Connect to the Internet (WCDMA Network)
Networking Requirements
Because some branches are located in remote areas, it is difficult to deploy fixed networks. As shown in Figure 11-7, to meet service transmission requirements, the branch uses the Router as the egress gateway and uses a 3G cellular interface to connect to the Internet through the WCDMA network.
The branch intranet is on the network segment 10.10.10.0/24 and all hosts join VLAN 10. The branch requires that the Router assign IP addresses to intranet users and that the users access the Internet.
The branch has subscribed to the yearly-package service and obtained the following information from the carrier:
- User name and password: 3guser and YsHsjx_202206
- APN: 3GNET
- Dialer number: *99#
Configuration Roadmap
The configuration roadmap is as follows:
- Configure C-DCC for a dial-up connection so that the 3G cellular interface connects to the WCDMA network.
- Configure the enterprise intranet and configure the Router to assign IP addresses to intranet users.
- Configure NAT to allow branch users to access the Internet.
- Configure a default route and specify the 3G cellular interface as the outbound interface so that traffic from the branch intranet is forwarded to the Internet through the 3G cellular interface.
Procedure
- Configure C-DCC for a dial-up connection.
# Create an APN profile.
<Huawei> system-view
[Huawei] sysname Router
[Router] apn profile 3gprofile
[Router-apn-profile-3gprofile] apn 3GNET
[Router-apn-profile-3gprofile] user name 3guser password cipher YsHsjx_202206 authentication-mode auto
[Router-apn-profile-3gprofile] quit
# Obtain an IP address dynamically.
[Router] interface cellular 0/0/0
[Router-Cellular0/0/0] ip address negotiate
# Configure a DNS server address through PPP negotiation.
[Router-Cellular0/0/0] ppp ipcp dns request
# Enable C-DCC.
[Router-Cellular0/0/0] dialer enable-circular
# Configure a dialer number.
[Router-Cellular0/0/0] dialer number *99# autodial
# Configure a network connection mode.
[Router-Cellular0/0/0] mode wcdma wcdma-precedence
# Bind the APN profile to the 3G cellular interface.
[Router-Cellular0/0/0] apn-profile 3gprofile
[Router-Cellular0/0/0] shutdown
[Router-Cellular0/0/0] undo shutdown
[Router-Cellular0/0/0] quit
- Configure the enterprise intranet.
# Create VLAN 10 and add Ethernet2/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 3gpool
[Router-ip-pool-3gpool] network 10.10.10.0 mask 255.255.255.0
[Router-ip-pool-3gpool] gateway-list 10.10.10.254
[Router-ip-pool-3gpool] quit
# Configure the interface to use the global address pool to allocate IP addresses to users.
[Router] interface vlanif 10
[Router-Vlanif10] ip address 10.10.10.1 255.255.255.0
[Router-Vlanif10] dhcp select global
[Router-Vlanif10] quit
- Configure NAT.
[Router] acl number 3002 [Router-acl-adv-3002] rule 5 permit ip source 10.10.10.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.
# Run the display interface cellular command to check information about the cellular interface. In the command output, traffic is forwarded through the cellular interface, both the physical layer status and link layer status of the interface are Up and the IP address dynamically obtained is 10.1.1.2/24.
[Router] display interface cellular 0/0/0 Cellular0/0/0 current state : UP Line protocol current state : UP (spoofing) 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 Link layer protocol is PPP LCP opened, IPCP opened Current system time: 2011-06-08 11:35:23 Modem State: Present Model = MC509 Current Network Connection = WCDMA(WCDMA) Current RSSI = -69 dBm Current SINR = 6 dB (weak) Last 300 seconds input rate 555 bytes/sec 4440 bits/sec 12 packets/sec Last 300 seconds output rate 11230 bytes/sec 89840 bits/sec 311 packets/sec Input: 210 packets, 87205 bytes Unicast: 200, Ununicast: 10 Output:225340 packets, 6760917 bytes Unicast: 225300, Ununicast: 40 Input bandwidth utilization : 0.01% Output bandwidth utilization : 0.01%
# Run the display cellular command to check call session information on the 3G modem. You can see that the APN is 3GNET, the network type is WCDMA, and the network connection mode is WCDMA precedence.
[Router] display cellular 0/0/0 all Modem State: Hardware Information. ===================== Model = MC509 Modem Type = WCDMA USB modem Modem Firmware Version = 11.106.15.17.000 Hardware Version = CP12TCPU Integrate circuit card identity (ICCID) = 98681011274300909893 International Mobile Subscriber Identity (IMSI) = 460016002707237 International Mobile Equipment Identity (IMEI) = 354661034412719 Factory Serial Number (FSN) = MLA7NA1093003693 Modem Status = Online Profile Information. ==================== Profile 1 = ACTIVE -------- PDP Type = IPv4, Header Compression = OFF Data Compression = OFF Access Point Name (APN) = 3GNET 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 = WCDMA precedence Current Network Connection = WCDMA(WCDMA) Mobile Country Code (MCC) = 460 Mobile Network Code (MNC) = 01 Mobile Operator Information = "CHN-CUGSM" Location Area Code (LAC) = 53505 Cell ID = 6012 Upstream Bandwidth = 5.7mbps Downstream Bandwidth = 384kbps Radio Information. ================== Current Band = ANY Current RSSI = -69 dBm (good) Bands supported : GSM: GSM850 GSM900 GSM1800 GSM1900 WCDMA: WCDMA850 WCDMA900 WCDMA2100 WCDMA1900 Modem Security Information. =========================== 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 10.10.10.0 0.0.0.255 # ip pool 3gpool gateway-list 10.10.10.254 network 10.10.10.0 mask 255.255.255.0 # interface Vlanif10 ip address 10.10.10.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 link-protocol ppp ppp ipcp dns request dialer enable-circular apn-profile 3gprofile dialer timer autodial 10 dialer number *99# autodial nat outbound 3002 ip address negotiate # apn profile 3gprofile user name 3guser password cipher %@%@Gy-Z:-sDMYJ`qiLe/gJG)}hP%@%@ apn 3GNET # ip route-static 0.0.0.0 0.0.0.0 Cellular0/0/0 # return