Configuration example for router-to-router PPP callback with DCC
Network requirements
As shown in Figure 52:
Router A and Router B are interconnected through serial interfaces across PSTN.
Interface Serial 2/0 on Router A is assigned the IP address of 100.1.1.1/24 and interface Serial 2/0 on Router B is assigned the IP address of 100.1.1.2/24.
Implement PPP callback between Router A and Router B, specifying Router A as the callback client and Router B as the callback server.
Figure 52: Network diagram
![](images/image48.png)
Configuration procedure
Method 1: Use C-DCC to implement PPP callback, allowing the callback server to make callback decisions based on usernames configured in the dialer route commands.
Configure Router A:
# Configure a dial access control rule for dialer access group 1.
<RouterA> system-view [RouterA] dialer-rule 1 ip permit
# Assign an IP address to interface Serial 2/0, configure its physical layer and C-DCC parameters.
[RouterA] interface serial 2/0 [RouterA-Serial2/0] ip address 100.1.1.1 255.255.255.0 [RouterA-Serial2/0] physical-mode async [RouterA-Serial2/0] async mode protocol [RouterA-Serial2/0] dialer enable-circular [RouterA-Serial2/0] dialer-group 1 [RouterA-Serial2/0] dialer route ip 100.1.1.2 8810052 [RouterA-Serial2/0] link-protocol ppp [RouterA-Serial2/0] ppp pap local-user usera password simple usera
# Specify interface Serial 2/0 as the callback client.
[RouterA-Serial2/0] ppp callback client [RouterA-Serial2/0] dialer timer enable 15 [RouterA-Serial2/0] quit
# Configure the user interface to be used and enable modem dial-in and dial-out on it.
[RouterA] user-interface tty1 [RouterA-ui-tty1] modem both
Configure Router B:
# Configure a dial access control rule for dialer access group 2. Create a local user account usera for Router A, and configure PPP authentication for it.
<RouterB> system-view [RouterB] dialer-rule 2 ip permit [RouterB] local-user usera [RouterB-luser-usera] password simple usera [RouterB-luser-usera] service-type ppp [RouterB-luser-usera] quit
# Assign an IP address to interface Serial 2/0 and configure its physical layer and C-DCC parameters.
[RouterB] interface serial 2/0 [RouterB-Serial2/0] ip address 100.1.1.2 255.255.255.0 [RouterB-Serial2/0] physical-mode async [RouterB-Serial2/0] async mode protocol [RouterB-Serial2/0] dialer enable-circular [RouterB-Serial2/0] dialer-group 2 [RouterB-Serial2/0] link-protocol ppp [RouterB-Serial2/0] ppp authentication-mode pap
# Specify the local end as the callback server, and set the callback reference to user. DCC identifies the dial string for callback according to the username configured in the dialer route command.
[RouterB-Serial2/0] dialer callback-center user [RouterB-Serial2/0] dialer route ip 100.1.1.1 user usera 8810048 [RouterB-Serial2/0] ppp callback server [RouterB-Serial2/0] quit
# Configure the user interface to be used and enable modem dial-in and dial-out on it.
[RouterB] user-interface tty2 [RouterB-ui-tty2] modem both
Method 2: Use C-DCC to implement PPP callback, allowing the callback server to identify the dial string for callback by comparing the remote username received in PPP authentication against the local user database for a match.
Configure Router A:
# Configure a dial access control rule for dialer access group 1.
<RouterA> system-view [RouterA] dialer-rule 1 ip permit
# Assign an IP address to interface Serial 2/0 and configure its physical layer and C-DCC parameters.
[RouterA] interface serial 2/0 [RouterA-Serial2/0] ip address 100.1.1.1 255.255.255.0 [RouterA-Serial2/0] physical-mode async [RouterA-Serial2/0] async mode protocol [RouterA-Serial2/0] dialer enable-circular [RouterA-Serial2/0] dialer-group 1 [RouterA-Serial2/0] dialer route ip 100.1.1.2 8810052 [RouterA-Serial2/0] link-protocol ppp [RouterA-Serial2/0] ppp pap local-user usera password simple usera
# Specify interface Serial 2/0 as the callback client.
[RouterA-Serial2/0] ppp callback client [RouterA-Serial2/0] dialer timer enable 15 [RouterA-Serial2/0] quit
# Configure the user interface to be used and enable modem dial-in and dial-out on it.
[RouterA] user-interface tty1 [RouterA-ui-tty1] modem both
Configure Router B:
# Configure a dial access control rule for dialer access group 2. Create a local user account usera for Router A and configure PPP authentication for it, and configure the dial string for callback.
<RouterB> system-view [RouterB] dialer-rule 2 ip permit [RouterB] local-user usera [RouterB-luser-usera] password simple usera [RouterB-luser-usera] service-type ppp [RouterB-luser-usera] authorization-attribute callback-number 8810048 [RouterB-luser-usera] quit
# Assign an IP address to interface Serial 2/0 and configure physical and C-DCC parameters.
[RouterB] interface serial 2/0 [RouterB-Serial2/0] ip address 100.1.1.2 255.255.255.0 [RouterB-Serial2/0] physical-mode async [RouterB-Serial2/0] async mode protocol [RouterB-Serial2/0] dialer enable-circular [RouterB-Serial2/0] dialer-group 2 [RouterB-Serial2/0] dialer route ip 100.1.1.1 user usera 8810048
# Specify the local end as the callback server, and set the callback reference to dial number. DCC identifies the dial string for callback by comparing the remote username obtained through PPP authentication against the local user database for a match.
[RouterB-Serial2/0] dialer callback-center dial-number [RouterB-Serial2/0] link-protocol ppp [RouterB-Serial2/0] ppp authentication-mode pap [RouterB-Serial2/0] ppp callback server [RouterB-Serial2/0] quit
# Configure the user interface to be used and enable modem dial-in and dial-out on it.
[RouterB] user-interface tty2 [RouterB-ui-tty2] modem both