网络通信 频道

PPPoE + NAT 配置方案

version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname 2621
!
enable secret cisco
!
ip subnet-zero
ip name-server 202.1 06.196.115
!
vpdn enable
!
vpdn-group PPPoE
 request-dialin
 protocol pppoe
!
interface FastEthernet0/0
 ip address 10.0.0.1 255.255.255.0
 ip nat inside
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 speed 10
 half-duplex
 pppoe enable
 pppoe-client dial-pool-number 1
!
interface Dialer1
 mtu 1492
 ip address negotiated
 ip nat outside
 encapsulation ppp
 no ip mroute-cache
 dialer pool 1
 dialer-group 1
 no cdp enable
 ppp authentication pap callin
 ppp pap sent-username Y.LIU password CCIE
!
ip nat inside source list 1 interface Dialer1 overload
ip classless
ip route 0.0.0.0 0.0.0.0 Dialer1 permanent
no ip http server
ip pim bidir-enable
!
access-list 1 permit any
dialer-list 1 protocol ip permit
!
line con 0
line aux 0
line vty 0 4
 password cisco
 login
!
end

值得注意的是有的地区需要用chap认证方式,这时相应的指令为:

 

ppp authentication chap callin

ppp chap hostname Y.LIU

ppp chap password CCIE

相关调试命令:

no vpdn logging           关闭连接中的提示

debug vpdn pppoe-events    检查PPPoE连接建立过程

show vpdn                检查建立的PPPoE连接

debug ppp negotiation       检查PPP参数协商情况

debug ppp authentication     检查PPP用户认证情况

 

转载地址:http://www.net130.com/CMS/Pub/Tech/tech_instance/211741.htm

0
相关文章