1. 程式人生 > >華為pppoe配置實戰演練

華為pppoe配置實戰演練

work 靜態路由 brief emp all 指定 face pass perm

技術分享圖片

一、 配置pppoe服務器

  • 1.將AR2配置為pppoe服務器
<Huawei> sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysn  SERVER
[SERVER]ip pool pool1      //配置一個地址池pool1
Info: It‘s successful to create an IP address pool.
[SERVER-ip-pool-pool1]network  10.1.12.0  mask 255.255.255.0
[SERVER-ip-pool-pool1]gateway-list 10.1.12.254
[SERVER-ip-pool-pool1]quit
[SERVER]interface Virtual-Template 1    //配置一個虛擬接口
Jul 29 2018 23:44:49-08:00 SERVER %%01IFPDT/4/IF_STATE(l)[0]:Interface Virtual-T
emplate1 has turned into UP state.
[SERVER-Virtual-Template1]ppp authentication-mode chap    //配置認證模式為chap
[SERVER-Virtual-Template1]ip add 10.1.12.254 24
[SERVER-Virtual-Template1]remote address pool pool1          //分配ip地址
[SERVER-Virtual-Template1]quit
  • 2.在AR2上的g0/0/0接口綁定虛擬模板
[SERVER]int g0/0/0
[SERVER-GigabitEthernet0/0/0]pppoe-server bind virtual-template 1  //綁定virtual-template 1
[SERVER-GigabitEthernet0/0/0]quit
  • 3.為pppoE被認證方創建賬戶和密碼
[SERVER]aaa
[SERVER-aaa]local-user zh password cipher huawei    
Info: Add a new user.
[SERVER-aaa]local-user zh service-type ppp
[SERVER-aaa]quit

二、配置pppoe客戶端

  • 4.將AR1配置為pppoe客戶端
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR1
[AR1]dialer-rule             //進入dialer-rule視圖
[AR1-dialer-rule]dialer-rule 1 ip permit     //允許ip流量觸發撥號
[AR1-dialer-rule]quit
[AR1]interface dialer 1                 //創建並進入dialer 1接口
[AR1-Dialer1]
Jul 29 2018 23:47:33-08:00 AR1 %%01IFPDT/4/IF_STATE(l)[0]:Interface Dialer1 has 
turned into UP state.
[AR1-Dialer1]dialer user zh          //配置用戶對端用戶名,這個用戶名需與服務器端的ppp用戶名相同
[AR1-Dialer1]dialer-group 1         //將接口置於一個撥號訪問組
[AR1-Dialer1]dialer bundle 1      
[AR1-Dialer1]ppp chap user zh      //指定dialer 1 接口的編號(用於和物理接口綁定)
[AR1-Dialer1]ppp chap password  cipher huawei
[AR1-Dialer1]dialer timer idle 300        //設置按需pppoe撥號的空閑時間(300s沒有流量就斷開)
INFO:  The configuration will become effective after link reset.
[AR1-Dialer1]ip address ppp-negotiate    //ip地址協商
  • 5.將pppoe撥號接口綁定到出接口
[AR1-Dialer1]interface g0/0/0
[AR1-GigabitEthernet0/0/0]pppoe-client dial-bundle-number 1  
[AR1-GigabitEthernet0/0/0]quit
  • 6.配置本端到服務器的缺省靜態路由
    [AR1]ip route-static 0.0.0.0 0.0.0.0 Dialer 1

三、驗證

  • 7.在SERVER上執行display pppoe-server session all和display virtual-access命令,查看PPPoE會話的狀態和配置信息。

技術分享圖片

  • 8.查看AR1上的撥號接口的信息,並確認撥號接口能夠從PPPoE服務器獲得IP地址。

<AR1>display ip interface brief

技術分享圖片

華為pppoe配置實戰演練