学习-PPPOE拨号

     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

 

你可能感兴趣的:(职场,路由,休闲,pppoe,PPPoA)