18.2 PPPoE client端配置

1.创建拨号规则

[R1]dialer-rule 
[R1-dialer-rule]dialer-rule 1 ip permit 
//允许ip流量触发拨号
[R1-dialer-rule]quit

2.创建拨号虚拟接口

[R1]interface Dialer 1
[R1-Dialer1]dialer user dsrw
//配置用户对端用户名,这个用户名需与服务器端的ppp用户名相同
[R1-Dialer1]dialer-group 1
//将接口置于一个拨号访问组
[R1-Dialer1]dialer bundle 1
//指定dialer 1 接口的编号(用于和物理接口绑定)
[R1-Dialer1]ppp chap user dsrw
//账号需要与ISP端设置的账号密码一致
[R1-Dialer1]ppp chap password cipher dsrw.com
//密码需要与ISP端设置的账号密码一致
[R1-Dialer1]dialer timer idle 150
//设置按需pppoe拨号的空闲时间
[R1-Dialer1]ip address ppp-negotiate 
//ip地址协商
[R1-Dialer1]link-protocol ppp
[R1-Dialer1]quit
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]pppoe-client dial-bundle-number 1
//dial-bundle-number 1 序号为绑定序号
[R1-GigabitEthernet0/0/0]quit
[R1]ip route-static 0.0.0.0 0.0.0.0 Dialer 1
//配置客户端到公网的缺省静态路由

3.客户端配置DHCP

[R1]dhcp enable
[R1]ip pool dsrw
[R1-ip-pool-dsrw]gateway-list 192.168.1.254
[R1-ip-pool-dsrw]network 192.168.1.0 mask 255.255.255.0
[R1-ip-pool-dsrw]lease day 8 hour 0 minute 0
[R1-ip-pool-dsrw]dns-list 8.8.8.8 114.114.114.114
[R1-ip-pool-dsrw]quit
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]ip address 192.168.1.254 24
[R1-GigabitEthernet0/0/1]dhcp select global
[R1-GigabitEthernet0/0/1]quit

4.NAT配置,acl绑定到dialer 1

[R1]acl number 2000
[R1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[R1-acl-basic-2000]quit
[R1]interface dialer 1
[R1-Dialer1]nat outbound 2000
//NAT采用EASY IP方式
[R1-Dialer1]quit

5.PC1配置成自动获取IP地址,连通性测试LoopBack0

图片[1]-18.2 PPPoE client端配置-大赛人网
图18-2 PC配置自动获取IP地址网络拓扑
PC>ping 2.2.2.2
Ping 2.2.2.2: 32 data bytes, Press Ctrl_C to break
From 2.2.2.2: bytes=32 seq=1 ttl=254 time=16 ms
© 版权声明
THE END
喜欢就支持一下吧
点赞10 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称

    请登录后查看评论内容