注册 | 登录 忘记密码? 51cto首页 | 博客 | 论坛 | 招聘
热点文章 利用手机和电池实现反地心..
 帮助

学习-PPPOE拨号


2007-06-17 18:16:04
 标签:路由 PPPOE PPPOA   [推送到技术圈]

版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://skyyue.blog.51cto.com/159530/30507
     PPPOE拨号主要用于ADSL的拨号,但在终端用户的拨号中又有三种方式,一个是采用透明桥接,两是采用PPPOE,三是采用PPPOA。
 
    在如上图中,最上面的就是透明桥接的接入方式
                             在下面的图中采用的PPPOE拨号方式,中间的采用MODEM+路由器
                             而在最下面图中,采用PC做为客户端,在系统下采用软件PPPOE拨号
 
 
    这样方式是采用PPPOA 即PPP over ATM.  在路由器上安装DSL模块来实现拨号功能
 
 
一。实验目的
       了解PPPOE的拨号过程和PPPOE的工作原理
 
二。实验配置
R1#sh run
Building configuration...
Current configuration : 955 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
!
!
!
ip cef
interface FastEthernet0/0
 no ip address
 duplex half
 pppoe enable
 pppoe-client dial-pool-number 1
!
interface Dialer1
 ip address negotiated
 ip mtu 1492
 encapsulation ppp
 dialer pool 1
 dialer-group 1
 ppp chap hostname R1
 ppp chap password 0 cisco!
!
省……
end
      
R2#sh run
Building configuration...
Current configuration : 1175 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
!
!
!
ip cef
vpdn-group 1
 accept-dialin
  protocol pppoe
  virtual-template 1
!
username R1 password 0 cisco

interface Loopback0
 ip address 10.1.1.1 255.255.255.0
!        
interface Loopback1
 no ip address
!
interface FastEthernet0/0
 no ip address
 duplex half
 pppoe enable
!
interface Serial1/0
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
!        
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
interface Virtual-Template1
 ip unnumbered Loopback0
 peer default ip address pool cisco
 ppp authentication chap
!
interface Virtual-TokenRing1
 no ip address
 ring-speed 16
!
ip local pool cisco 10.1.1.10 10.1.1.20
ip classless
no ip http server
no ip http secure-server
//以上配置不用解释了吧
 
三。监视和配置测试
1。R1拨号的过程
R1(config-if)#
*Jun 17 17:44:13.491: %LINK-3-UPDOWN: Interface Dialer1, changed state to up
R1(config-if)#
*Jun 17 17:44:22.727:  Sending PADI: Interface = FastEthernet0/0
*Jun 17 17:44:22.795: PPPoE 0: I PADO  R:ca01.0498.0000 L:ca00.0498.0000 Fa0/0
*Jun 17 17:44:24.807:  PPPOE: we've got our pado and the pado timer went off
*Jun 17 17:44:24.807: OUT PADR from PPPoE Session
*Jun 17 17:44:24.863: PPPoE 29: I PADS  R:ca01.0498.0000 L:ca00.0498.0000 Fa0/0
*Jun 17 17:44:24.863: IN PADS from PPPoE Session
*Jun 17 17:44:24.879: %DIALER-6-BIND: Interface Vi1 bound to profile Di1
*Jun 17 17:44:24.879: PPPoE: Virtual Access interface obtained.
*Jun 17 17:44:24.883: PPPoE : encap string prepared
*Jun 17 17:44:24.883: [0]PPPoE 29: data path set to Virtual Acess
*Jun 17 17:44:24.883: Vi1 PPP: Using dialer call direction
*Jun 17 17:44:24.887: Vi1 PPP: Treating connection as a callout
*Jun 17 17:44:24.887: Vi1 PPP: Session handle[6700005A] Session id[0]
*Jun 17 17:44:24.891: Vi1 PPP: Authorization required
*Jun 17 17:44:24.891: Vi1 PPP: No remote authentication for call-out //采用单向认证
*Jun 17 17:44:24.895: %LINK-3-UPDOWN: Interface Virtual-Access1, changed state to up
*Jun 17 17:44:26.939: Vi1 PPP: No authorization without authentication
*Jun 17 17:44:27.039: Vi1 CHAP: I CHALLENGE id 1 len 23 from "R2"
*Jun 17 17:44:27.047: Vi1 CHAP: Using hostname from interface CHAP
*Jun 17 17:44:27.047: Vi1 CHAP: Using password from interface CHAP
*Jun 17 17:44:27.047: Vi1 CHAP: O RESPONSE id 1 len 23 from "R1"
*Jun 17 17:44:27.359: Vi1 CHAP: I SUCCESS id 1 len 4
*Jun 17 17:44:28.363: %LINEPROTO-5-UPDOWN: Line protocol on Interface Virtual-Access1, changed state to up
R1(config-if)#do sh ip int brie
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES unset  up                    up     
Serial1/0                  unassigned      YES unset  administratively down down   
Serial1/1                  unassigned      YES unset  administratively down down   
Serial1/2                  unassigned      YES unset  administratively down down   
Serial1/3                  unassigned      YES unset  administratively down down   
Virtual-Access1            unassigned      YES unset  up                    up     
Dialer1                    10.1.1.10       YES IPCP   up                    up
可以看出R1从R2上获取到了IP地址
R1(config-line)#do sh int dia 1
Dialer1 is up, line protocol is up (spoofing)
  Hardware is Unknown
  Internet address is 10.1.1.10/32
  MTU 1500 bytes, BW 56 Kbit, DLY 20000 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation PPP, loopback not set
  Keepalive set (10 sec)
  DTR is pulsed for 1 seconds on reset
  Interface is bound to Vi1
  Last input never, output never, output hang never
            省……
Bound to:
Virtual-Access1 is up, line protocol is up
  Hardware is Virtual Access interface
  MTU 1500 bytes, BW 56 Kbit, DLY 20000 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation PPP, LCP Open
  Listen: CDPCP
  Open: IPCP
  PPPoE vaccess, cloned from Dialer1
  Vaccess status 0x44, loopback not set
  Keepalive set (10 sec)
  Interface is bound to Di1 (Encapsulation PPP)
  Last input 00:07:00, output never, output hang never
  Last clearing of "show interface" counters 00:07:24
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
              省……
//从上面可以看出,我们能正常用运行商那里获得公网IP地址
 
2。PPPOE上的认证过程
服务端:
R2(config-line)#do debug ppp authe
PPP authentication debugging is on
*Jun 17 18:00:24.243: ppp32 PPP: Using default call direction
*Jun 17 18:00:24.247: ppp32 PPP: Treating connection as a dedicated line
*Jun 17 18:00:24.247: ppp32 PPP: Session handle[F4000020] Session id[32]
*Jun 17 18:00:24.251: ppp32 PPP: Authorization required
*Jun 17 18:00:26.355: ppp32 CHAP: O CHALLENGE id 1 len 23 from "R2"
*Jun 17 18:00:26.435: ppp32 CHAP: I RESPONSE id 1 len 23 from "R1"
*Jun 17 18:00:26.439: ppp32 PPP: Sent CHAP LOGIN Request
*Jun 17 18:00:26.447: ppp32 PPP: Received LOGIN Response PASS
*Jun 17 18:00:26.471: Vi1.1 PPP: Sent LCP AUTHOR Request
*Jun 17 18:00:26.475: Vi1.1 PPP: Sent IPCP AUTHOR Request
*Jun 17 18:00:26.483: Vi1.1 LCP: Received AAA AUTHOR Response PASS
*Jun 17 18:00:26.483: Vi1.1 IPCP: Received AAA AUTHOR Response PASS
*Jun 17 18:00:26.487: Vi1.1 CHAP: O SUCCESS id 1 len 4
R2(config-line)#
客户端:
R1(config-if)#
*Jun 17 18:00:27.251: %DIALER-6-BIND: Interface Vi1 bound to profile Di1
*Jun 17 18:00:27.255: Vi1 PPP: Using dialer call direction
*Jun 17 18:00:27.255: Vi1 PPP: Treating connection as a callout
*Jun 17 18:00:27.259: Vi1 PPP: Session handle[87000063] Session id[0]
*Jun 17 18:00:27.259: Vi1 PPP: Authorization required
*Jun 17 18:00:27.259: Vi1 PPP: No remote authentication for call-out
*Jun 17 18:00:27.263: %LINK-3-UPDOWN: Interface Virtual-Access1, changed state to up
*Jun 17 18:00:29.295: Vi1 PPP: No authorization without authentication
*Jun 17 18:00:29.315: Vi1 CHAP: I CHALLENGE id 1 len 23 from "R2"
*Jun 17 18:00:29.319: Vi1 CHAP: Using hostname from interface CHAP
*Jun 17 18:00:29.323: Vi1 CHAP: Using password from interface CHAP
*Jun 17 18:00:29.323: Vi1 CHAP: O RESPONSE id 1 len 23 from "R1"
*Jun 17 18:00:29.759: Vi1 CHAP: I SUCCESS id 1 len 4

 

本文出自 “skyyue” 博客,请务必保留此出处http://skyyue.blog.51cto.com/159530/30507



上一篇 学习-OSPF综合实验  下一篇 PPPOE配置



    文章评论
 
2007-06-17 21:22:05
头一次听说这么详细拔号方式,真没有听说过PPPOE和PPPOA,学到了不少东西。

2007-06-18 15:11:06
能否再详细些?比如电话线路的问题

2007-06-18 15:15:17
thanks!

2007-06-18 22:23:24
电话线路是通过ADSL MODEM拨号,采用一个信息分频器将电话线路由的数据与语音分离。
在服务端,能过DSLAM 将语音与数据分离到独立的线路,模拟线路用于电话服务,数字线路用于Internet网络通信

2007-06-18 22:25:22
可以参考:
http://skyyue.bokee.com/viewdiary.16150559.html

2007-06-19 08:12:18
挺详细的, 谢谢分享!!!
do sh ip int brie  

? show ip interface brief ,其中 do 是什么缩写?

2007-06-19 20:06:03
do是一个动词,在IOS 12.3以上的版本里面,可在其它模式下通过do 来调用权特模式下的命令
如:R1#show int f0/0
我们可以使用 R1(config)#do show int f0/0
都一样的结果,但不用返回到特权模式下,省去了敲命令的时间

2008-01-08 16:00:43
运营商pppoe的帐号和密码是保存在什么地方?是路由器还是验证主机上啊?

 

发表评论

昵   称:
验证码:  点击图片可刷新验证码  博客过2级,无需填写验证码
内   容: