在配置方面,PPPoE协议总是有很多可圈可点之处。下面我们就来了解一下PPPOE server 和Cisco PPPOE的配置内容。首先在自己的电脑上创建一个宽带连接,名为libin password libin,然后在ATM1上做配置 。
先在 R1上配,pppoe客户端
- R1(config)# vpdn enable 开启虚拟拨号网VPDN
- R1(config)#vpdn-group CISCO 定义组 名为CISCO
- R1(config-vpdn)#request-dialin 请求接入
- R1(config-vpdn-req-in)#PROtocol pppoe
- % PPPoE config from vpdn-group is converted to pppoe-profile based config.
- % Continue PPPoE configuration under 'bba-group pppoe global'
- R1(config-vpdn-req-in)#exit
- R1(config-vpdn)#exit
- R1(config-if)#no ip address
- R1(config-if)#pppoe enable
- R1(config-if)#pppoe-client dia
- R1(config-if)#pppoe-client dial-pool-number 1
- R1(config-if)#^Z
- R1#conf t
- R1(config-if)#ip add ?
- A.B.C.D IP address
- dhcp IP Address negotiated via DHCP
- negotiated IP Address negotiated over PPP
- pool IP Address autoconfigured from a local DHCP pool
- R1(config-if)#ip add negotiated
- R1(config-if)#ip nat outside
- R1(config-if)#encapsulation ppp
- R1(config-if)#dialer pool 1
- R1(config-if)#ppp chap hostname
- R1(config-if)#ppp chap hostname cisco
- R1(config-if)#ppp chap password 0 cisco
- R1(config-if)#ip route 0.0.0.0 0.0.0.0 dialer0
在R2上配置aggregation路由
- R2(config)#vpdn enable
- R2(config)#vpdn-group 1
- R2(config-vpdn)#accept-dialin
- R2(config-vpdn-acc-in)#protocol pppoe
- R2(config-vpdn-acc-in)#exit
- R2(config-vpdn)#exit
- R2(config)#username cisco password 0 cisco
- R2(config)#bba-group pppoe global
- R2(config-bba-group)#vir
- R2(config-bba-group)#virtual-template 1
- R2(config-bba-group)#int loo 0
- R2(config-if)#ip add 1.1.1.1 255.0.0.0
- R2(config-if)#int fastethernet 0/0
- R2(config-if)#no ip address
- R2(config-if)#pppoe enable
- R2(config)#interface virtual-template 1
- R2(config-if)#ip unnumbered loopback 0
- R2(config-if)#peer default ip address pool cisco
- R2(config-if)#ppp authentication chap
- R2(config-if)#exit
- R2(config)#ip local pool cisco 1.1.1.2 1.1.1.10
配置ATM1
- ATM1#conf t
- ATM1(config)#no ip routing
- ATM1(config)#int fast0/0
- ATM1(config-if)#no ip address
- ATM1(config-if)#bridge-group 1
- ATM1(config-if)#int atm1/0
- ATM1(config-if)#no ip add
- ATM1(config-if)#bri
- ATM1(config-if)#bridge-group 1
- ATM1(config-if)#pvc 1/100
- ATM1(config-if-atm-vc)#encapsulation aal5snap
- ATM1(config-if-atm-vc)#bridge 1 protocol ieee
配置BBA-Group
- ATM1(config)#bba-group pppoe global
- ATM1(config-bba-group)#virtual-template 1 虚拟摸版定义为1
- ATM1(config-bba-group)#exit
配置Virtual-Template
- ATM1(config)#interface virtual-template 1 进入
- ATM1(config-if)#ip unnumbered loopback 0 借用loopback 0上的ip
- ATM1(config-if)#encapsulation ppp 封状成ppp
- ATM1(config-if)#ppp authentication chap 认证为 chap
- ATM1(config-if)#peer de
- ATM1(config-if)#peer default ip add pool cisco 从名为cisco 里分配ip 地址
现在开始检查是否成功
- 在 PC ping 1.1.1.1 和ping 1.1.1.2
- R1(config-vpdn-req-in)#PROtocol pppoe
- R1(config-vpdn-req-in)#exit
- R1(config-vpdn)#exit
- ATM1 初始配置
- ATM1(config)#username libin password libin 配置用户名和密码,必须和ATM1的相同
- ATM1(config)#interface loopback 0
- ATM1(config-if)#ip add 1.1.1.1 255.0.0.0
- 配置 VPDN
- ATM1(config-if)#EXIT
- ATM1(config)#vpdn enable 开启虚拟拨号网VPDN
- ATM1(config)#vpdn-group ADSL 定义组 名为ADSL
- ATM1(config-vpdn)#request-dialin 请求接入
- ATM1(config-vpdn-req-in)#proto
- ATM1(config-vpdn-req-in)#protocol pppoe 协议配成 pppoe
- % PPPoE config from vpdn-group is converted to pppoe-profile based config.
- % Continue PPPoE configuration under 'bba-group pppoe global'
- ATM1(config-vpdn-req-in)#exit
- ATM1(config-vpdn)#exit
- ATM1(config)#
- 配置BBA-Group
- ATM1(config)#bba-group pppoe global
- ATM1(config-bba-group)#virtual-template 1 虚拟摸版定义为1
- ATM1(config-bba-group)#exit
- 配置Virtual-Template
- ATM1(config)#interface virtual-template 1 进入
- ATM1(config-if)#ip unnumbered loopback 0 借用loopback 0上的ip
- ATM1(config-if)#encapsulation ppp 封状成ppp
- ATM1(config-if)#ppp authentication chap 认证为 chap
- ATM1(config-if)#peer de
- ATM1(config-if)#peer default ip add pool cisco 从名为cisco 里分配ip 地址
现在开始检查是否成功#p#
在 PC ping 1.1.1.1 和ping 1.1.1.2
- C:\Documents and Settings\norvel>ping 1.1.1.1
- Pinging 1.1.1.1 with 32 bytes of data:
- Reply from 1.1.1.1: bytes=32 time=2046ms TTL=255
- Reply from 1.1.1.1: bytes=32 time=1220ms TTL=255
- Reply from 1.1.1.1: bytes=32 time=2342ms TTL=255
- Reply from 1.1.1.1: bytes=32 time=2760ms TTL=255
- Ping statistics for 1.1.1.1:
- Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
- Approximate round trip times in milli-seconds:
- Minimum = 1220ms, Maximum = 2760ms, Average = 2092ms
- C:\Documents and Settings\norvel>ping 1.1.1.2
- Pinging 1.1.1.4 with 32 bytes of data:
- Reply from 1.1.1.2: bytes=32 time<1ms TTL=128
- Reply from 1.1.1.2: bytes=32 time<1ms TTL=128
- Reply from 1.1.1.2: bytes=32 time<1ms TTL=128
- Reply from 1.1.1.2: bytes=32 time<1ms TTL=128
- Ping statistics for 1.1.1.4:
- Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
- Approximate round trip times in milli-seconds:
- Minimum = 0ms, Maximum = 0ms, Average = 0ms
好了!可以看到,可以通了
然后PC上在ipconfig/all
- C:\Documents and Settings\norvel>ipconfig/all
- Windows IP Configuration
- Host Name . . . . . . . . . . . . : AC713A0BC024420
- Primary Dns Suffix . . . . . . . :
- Node Type . . . . . . . . . . . . : Unknown
- IP Routing Enabled. . . . . . . . : No
- WINS Proxy Enabled. . . . . . . . : No
- DNS Suffix Search List. . . . . . : Testbed
Ethernet adapter 本地连接:
- Connection-specific DNS Suffix . : Testbed
- Description . . . . . . . . . . . : Realtek RTL8139/810x Family Fast Et
- ernet NIC
- Physical Address. . . . . . . . . : 00-80-45-29-91-0D
- Dhcp Enabled. . . . . . . . . . . : Yes
- Autoconfiguration Enabled . . . . : Yes
- IP Address. . . . . . . . . . . . : 172.16.0.12
- Subnet Mask . . . . . . . . . . . : 255.255.0.0
- Default Gateway . . . . . . . . . : 172.16.0.1
- DHCP Server . . . . . . . . . . . : 172.16.0.1
- DNS Servers . . . . . . . . . . . : 218.30.19.40
- 61.134.1.4
- NetBIOS over Tcpip. . . . . . . . : Disabled
- Lease Obtained. . . . . . . . . . : 2008年3月21日 星期五 17:00:29
- Lease Expires . . . . . . . . . . : 2008年3月22日 星期六 17:00:29
PPP adapter 宽带连接 2:
- Connection-specific DNS Suffix . :
- Description . . . . . . . . . . . : WAN (PPP/SLIP) Interface
- Physical Address. . . . . . . . . : 00-53-45-00-00-00
- Dhcp Enabled. . . . . . . . . . . : No
- IP Address. . . . . . . . . . . . : 1.1.1.2 可以看到已经分配到了
- Subnet Mask . . . . . . . . . . . : 255.255.255.255
- Default Gateway . . . . . . . . . : 1.1.1.2 默认网关也成了次ip
- NetBIOS over Tcpip. . . . . . . . : Disabled