拓扑图
1.在企业路由器AR2上配置虚拟拨号口
<Huawei> system-view
[Huawei] sysname AR2
[AR2] dialer-rule
[AR2-dialer-rule] dialer-rule 1 ip permit
[AR2-dialer-rule] quit
[AR2] interface dialer 1
[AR2-Dialer1] dialer user XXX //user名称
[AR2-Dialer1] dialer-group 1
[AR2-Dialer1] dialer bundle 1
[AR2-Dialer1] dialer timer idle 300
INFO: The configuration will become effective after link reset.
[AR2-Dialer1] dialer queue-length 8
[AR2-Dialer1] ppp chap user XXX //XXX指的是用户名
[AR2-Dialer1] ppp chap password cipher XXX //XXX指的是密码
[AR2-Dialer1] ip address ppp-negotiate
[AR2-Dialer1] quit
2.AR2和运营商路由器AR3建立建立PPPoE会话
[AR2] interface gigabitethernet 0/0/0
[AR2-GigabitEthernet1/0/0] pppoe-client dial-bundle-number 1 on-demand //注意这里的1要和第一步的拨号口 1对应
[AR2-GigabitEthernet1/0/0] quit
3.AR2上配置路由器的静态路由
ip route-static 0.0.0.0 0 dialer 1 //配置默认路由,下一跳指向拨号口1
4.在AR2拨号口上配置Easy IP方式的NAT Outbound
[AR2] acl 2000
[AR2-acl-basic-2000] rule 5 permit source 192.168.0.0 0.0.0.255
[AR2-acl-basic-2000] quit
[AR2] interface dialer 1
[AR2-Dialer1] nat outbound 2000
[AR2-Dialer1] quit