Example for Configuring an Enterprise to Use a G.SHDSL Interface as the Primary Interface and a 3G Interface as the Backup Interface to Access the Internet
Networking Requirements
As shown in Figure 11-9, the enterprise branch uses a G.SHDSL interface as the primary interface to access the Internet.
The branch requires high network connectivity. A very short network disconnection may affect services of the branch, so a backup network solution is necessary for the branch. Wired links can be used as backup links; however, it takes a long time and costs too much to deploy wired links. As 3G links are easy to deploy and more flexible than wired links, the branch uses 3G links as backup links to connect to the Internet. When the primary link fails, traffic is immediately switched to the backup link, enhancing the reliability of Internet access.
The branch has 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 the enterprise intranet and configure the Router to assign IP addresses to enterprise intranet users.
- Configure a G.SHDSL interface as the primary interface and configure the G.SHDSL interface to use point-to-point protocol over ATM (PPPoA) to connect to the Internet.
- Configure a 3G interface as the backup interface and configure the 3G interface to connect to the WCDMA network using C-DCC.
- Configure a default route for the primary interface and backup interface respectively so that traffic from the enterprise intranet is forwarded to the Internet through the G.SHDSL interface and 3G interface.
Procedure
- Configure the enterprise intranet.
# Create VLAN 10 and add Ethernet2/0/0 to VLAN 10.
<Huawei> system-view
[Huawei] sysname Router
[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 an ACL to define the data flows that are allowed to pass through.
[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
- Configure the G.SHDSL interface as the primary interface to connect to the Internet.
[Router] interface virtual-template 10 [Router-Virtual-Template10] ip address ppp-negotiate [Router-Virtual-Template10] nat outbound 3002 [Router-Virtual-Template10] quit [Router] interface atm 1/0/0 [Router-Atm1/0/0] pvc voip 1/35 [Router-atm-pvc-Atm1/0/0-1/35-voip] map ppp virtual-template 10 [Router-atm-pvc-Atm1/0/0-1/35-voip] quit [Router-Atm1/0/0] standby interface cellular 0/0/0 [Router-Atm1/0/0] quit
- Configure the 3G interface as backup interface to connect to the Internet.
# Create an APN profile.
[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
# Configure NAT.
[Router-Cellular0/0/0] nat outbound 3002
# Bind the APN profile to the 3G 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 a default route.
[Router] ip route-static 0.0.0.0 0.0.0.0 virtual-template 10 preference 40 [Router] ip route-static 0.0.0.0 0.0.0.0 cellular 0/0/0 preference 80
- Verify the configuration.
# After the configuration is completed, run the display standby state command on the Router to check the status of the primary and backup interfaces. The command output shows that ATM1/0/0 is in UP state and Cellular0/0/0 is in STANDBY state.
[Router] display standby state Interface Interfacestate Backupstate Backupflag Pri Loadstate ATM1/0/0 UP MUP MU Cellular0/0/0 STANDBY STANDBY BU 0 Backup-flag meaning: M---MAIN B---BACKUP V---MOVED U---USED D---LOAD P---PULLED ---------------------------------------------------------------------------- Below is track BFD information: Bfd-Name Bfd-State BackupInterface State ---------------------------------------------------------------------------- Below is track IP route information: Destination/Mask Route-State BackupInterface State ---------------------------------------------------------------------------- Below is track NQA Information: Instance Name BackupInterface State ---------------------------------------------------------------------------- Below is track NQA group Information: Group Name BackupInterface State
# Run the shutdown command on ATM1/0/0 to simulate a link fault. Run the display standby state command on the Router to check the status of the primary and backup interfaces. The command output shows that ATM1/0/0 is in Down state and Cellular0/0/0 is in UP state, indicating that the backup interface has been used.
[Router] display standby state Interface Interfacestate Backupstate Backupflag Pri Loadstate ATM1/0/0 DOWN MDOWN MU Cellular0/0/0 UP UP BU 0 Backup-flag meaning: M---MAIN B---BACKUP V---MOVED U---USED D---LOAD P---PULLED ---------------------------------------------------------------------------- Below is track BFD information: Bfd-Name Bfd-State BackupInterface State ---------------------------------------------------------------------------- Below is track IP route information: Destination/Mask Route-State BackupInterface State ---------------------------------------------------------------------------- Below is track NQA Information: Instance Name BackupInterface State ---------------------------------------------------------------------------- Below is track NQA group Information: Group Name BackupInterface State
Configuration Files
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 # interface Atm1/0/0 pvc voip 1/35 map ppp Virtual-Template10 standby interface Cellular0/0/0 # interface Virtual-Template10 ip address ppp-negotiate nat outbound 3002 # apn profile 3gprofile user name 3guser password cipher %@%@}7g|@uc0bBQM%]VMM28)3U".%@%@ authentication-mode auto apn 3GNET # ip route-static 0.0.0.0 0.0.0.0 virtual-template 10 preference 40 ip route-static 0.0.0.0 0.0.0.0 cellular 0/0/0 preference 80 # return