Configuring the CPE as the PPPoE Client

http://www.591kaoshi.com/lab-49-configuring-the-cpe-as-the-pppoe-client.html
 
虽然这个CPE和无线中的CPE不是一码事,但组网有点类似
 
 
Lab 49. Configuring the CPE as the PPPoE Client

实验目的:

1、掌握PPPoE的客户端配置方法.

实验拓扑图:

 

49

 

实验步骤及要求:

1、由于本实验需要模拟ADSL的ISP端的配置。而ISP端的配置并不需要NP学员掌握。因此,本处仅给出配置和简单的解释。

2、拓扑中的R4路由器配置。

R4(config)#interface loopback 0[stanley1]

R4(config-if)#ip address 202.102.48.140 255.255.255.0

R4(config-if)#ip address 64.35.136.33 255.255.255.0 secondary

R4(config-if)#exit

R4(config)#

R4(config)#interface fastEthernet 0/0

R4(config-if)#pppoe enable

R4(config-if)#no shutdown

[stanley2] R4(config-if)#exit

R4(config)#

R4(config)#ip dhcp pool cisco[stanley3]

R4(dhcp-config)#network 211.95.36.0 /24[stanley4]

R4(dhcp-config)#dns-server 211.95.36.1[stanley5]

R4(dhcp-config)#exit

R4(config)#

R4(config)#ip dhcp excluded-address 211.95.36.1[stanley6]

R4(config)#

R4(config)#interface virtual-template 1

R4(config-if)#encapsulation ppp

R4(config-if)#ppp authentication chap

R4(config-if)#peer default ip address dhcp-pool cisco

R4(config-if)#ip address 211.95.36.1 255.255.255.0

R4(config-if)#no shutdown

R4(config-if)#exit

[stanley7] R4(config)#

R4(config)#vpdn enable

R4(config)#vpdn-group 1

R4(config-vpdn)#accept-dialin

R4(config-vpdn-acc-in)#protocol pppoe

R4(config-vpdn-acc-in)#virtual-template 1

[stanley8] R4(config-vpdn-acc-in)#exit

R4(config-vpdn)#exit

R4(config)#

R4(config)#username adsl password cisco[stanley9]

R4(config)#

3、拓扑中R1路由器配置。由于Dynamips目前使用的ATM接口不支持PPPOE,所以只能将R1作为桥接设备,将数据帧桥接给R4,由R4的以太口来处理PPPOE数据帧,下面是R1的桥接配置:

R1(config)#no ip routing [stanley10]

R1(config)#

R1(config)#interface fastEthernet 0/0

R1(config-if)#bridge-group 1 [stanley11]

R1(config-if)#no shutdown

R1(config-if)#exit

R1(config)#

R1(config)#interface atM 1/0

R1(config-if)#bridge-group 1[stanley12]

R1(config-if)#pvc 1/100

R1(config-if-atm-vc)#encapsulation aal5snap

R1(config-if-atm-vc)#exit

[stanley13] R1(config-if)#no shutdown

R1(config-if)#exit

R1(config)#

R1(config)#bridge 1 protocol ieee [stanley14]

R1(config)#exit

R1#

4、配置拓扑中的CPE设备R2路由器:

R2(config)#no ip routing [stanley15]

R2(config)#

R2(config)#interface fastEthernet 0/0

R2(config-if)#bridge-group 1

R2(config-if)#no shutdown

R2(config-if)#exit

R2(config)#

R2(config)#interface atM 1/0

R2(config-if)#bridge-group 1

R2(config-if)#pvc 2/200

R2(config-if-atm-vc)#encapsulation aal5snap

R2(config-if-atm-vc)#exit

R2(config-if)#no shutdown

R2(config-if)#exit

R2(config)#

R2(config)#bridge 1 protocol ieee

R2(config)#exit

R2#

5、在R2与R1路由器上检测ATM接口,确认ATM可以正常工作:

R2#ping atm interface atM 1/0 2 200

Type escape sequence to abort.

Sending 5, 53-byte end-to-end OAM echoes, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 32/92/240 ms

R2#

R1#ping atm interface aTM 1/0 1 100

Type escape sequence to abort.

Sending 5, 53-byte end-to-end OAM echoes, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 44/100/252 ms

R1#

6、当完成上面ISP端的配置后,则可以在PC2主机上进行测试了,此处的PC2为本地网络里任一主机。PC2的操作系统为Windows XP。

7、在PC2上新建一个网络连接。在连接向导中,点击下一步。如下面所示:

clip_image001

8、选择“连接到Internet”,如下图所示:

clip_image002

9、选择“手动设置我的连接” ,点击下一步,如下图所示:

clip_image003

10、选择“用要求用户我和密码的宽带连接来连接” ,点击下一步,如图所示:

clip_image004

11、填写ISP名称,此外可以任意填写,如下图所示:

clip_image005

12、填写相应的PPPoE帐号和密码,如下图所示:

clip_image006

13、完成新建连接配置。

clip_image007

14、双击新建的ADSL的PPPoE连接,进行拨号测试,如下图所示:

clip_image008

15、点击拨号会出现如下信息,指出配置成功,XP的PPPoE客户端可以正确的连接到ADSL的网络。

clip_image009

16、查看XP客户端的IP配置信息:

C:\>ipconfig /all

PPP adapter NP ADSL:

Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : WAN (PPP/SLIP) Interface

Physical Address. . . . . . . . . : 00-53-45-00-00-00

Dhcp Enabled. . . . . . . . . . . : No

IP Address. . . . . . . . . . . . : 211.95.36.4[stanley16]

Subnet Mask . . . . . . . . . . . : 255.255.255.255

Default Gateway . . . . . . . . . : 211.95.36.4

DNS Servers . . . . . . . . . . . : 211.95.36.1[stanley17]

NetBIOS over Tcpip. . . . . . . . : Disabled

C:\>

17、使用XP主机使用ping命令确认可以连接到Internet网络:

C:\>ping 64.35.136.33

Pinging 64.35.136.33 with 32 bytes of data:

Reply from 64.35.136.33: bytes=32 time=148ms TTL=255

Reply from 64.35.136.33: bytes=32 time=15ms TTL=255

Reply from 64.35.136.33: bytes=32 time=31ms TTL=255

Reply from 64.35.136.33: bytes=32 time=265ms TTL=255

Ping statistics for 64.35.136.33:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 15ms, Maximum = 265ms, Average = 72ms

C:\ >

18、上面的配置是在XP的环境中完成,其主要的优点,就是能够使用XP的PPPoE客户端软件,快速的测试骨干网络的配置的正确性。下面给出了R3路由器的PPPoE客户端以及相关的NAT与DHCP的配置。

19、在R3上配置DHCP用于向客户端分配IP。

R3(config)#

R3(config)#ip dhcp pool local_net

R3(dhcp-config)#network 192.168.1.0 /24

R3(dhcp-config)#default-router 192.168.1.1

R3(dhcp-config)#import all[stanley18]

R3(dhcp-config)#exit

R3(config)#

R3(config)#interface fastEthernet 1/0

R3(config-if)#ip address 192.168.1.1 255.255.255.0

R3(config-if)#no shutdown

R3(config-if)#exit

20、在R5上配置接口为自动获取IP方式:

R5(config)#interface fastEthernet 1/0

R5(config-if)#ip address dhcp

R5(config-if)#no shutdown

R5(config-if)#exit

R5(config)#exit

21、配置完R5后,稍等片刻,会得到如下IOS提示:

R5#

*Jul 7 18:53:50.639: %DHCP-6-ADDRESS_ASSIGN: Interface FastEthernet1/0 assigned DHCP address 192.168.1.2, mask 255.255.255.0, hostname R5[stanley19]

R5#

22、查看R5路由器的IP信息:

R5#show ip interface brief

Interface IP-Address OK? Method Status Protocol

FastEthernet0/0 unassigned YES unset administratively down down

FastEthernet1/0 192.168.1.2 YES DHCP up up [stanley20]

R5#

23、使用PING命令测试网络连接:

R5#ping 192.168.1.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:

.!!!!

Success rate is 80 percent (4/5), round-trip min/avg/max = 12/28/56 ms

R5#

24、配置R3路由器的PPPoE客户端,具体配置如下:

R3(config)#interface fastEthernet 0/0

R3(config-if)#pppoe enable

R3(config-if)#pppoe-client dial-pool-number 1[stanley21]

R3(config-if)#no shutdown

R3(config-if)#exit

R3(config)#

R3(config)#vpdn enable

R3(config)#

R3(config)#vpdn-group 1

R3(config-vpdn)#request-dialin [stanley22]

R3(config-vpdn-req-in)#protocol pppoe

R3(config-vpdn-req-in)#exit

R3(config-vpdn)#exit

R3(config)#dialer-list 1 protocol ip permit[stanley23]

R3(config-if)#

R3(config)#interface dialer 1[stanley24]

R3(config-if)#

R3(config-if)#encapsulation ppp

R3(config-if)#ppp chap hostname adsl

R3(config-if)#ppp chap password cisco

[stanley25] R3(config-if)#ip address negotiated[stanley26]

R3(config-if)#dialer pool 1[stanley27]

R3(config-if)#dialer-group 1[stanley28]

R3(config-if)#ip mtu 1496[stanley29]

R3(config-if)#exit

R3(config)#

25、配置R3路由器的PAT:

R3(config)#interface fastEthernet 1/0

R3(config-if)#ip nat inside

R3(config-if)#exit

R3(config)#

R3(config)#interface dialer 1

R3(config-if)#ip nat outside

R3(config-if)#exit

R3(config)#

R3(config)#access-list 1 permit any

R3(config)#

R3(config)#ip nat inside source list 1 interface dialer 1 overload

R3(config)#

R3(config)#ip route 0.0.0.0 0.0.0.0 dialer 1[stanley30]

26、在R5上测试,是否可以PING通Internet网络的IP:

R5#ping 202.102.48.140

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 202.102.48.140, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 64/96/128 ms

R5#

R5#ping 64.35.136.33

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 64.35.136.33, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 68/112/148 ms

R5#

27、查看R3路由器的NAT转换表:

R3#show ip nat translations

Pro Inside global Inside local Outside local Outside global

icmp 211.95.36.3:2 192.168.1.2:2 202.102.48.140:2 202.102.48.140:2

icmp 211.95.36.3:3 192.168.1.2:3 64.35.136.33:3 64.35.136.33:3

R3#

28、查看R3的DHCP地址分配信息:

R3#show ip dhcp binding

Bindings from all pools not associated with VRF:

IP address Client-ID/ Lease expiration Type

Hardware address/

User name

192.168.1.2 0063.6973.636f.2d63. Jul 08 2007 06:53 PM Automatic

6130.342e.3066.6563.

2e30.3031.632d.4661.

312f.30

R3#

29、查看PPPoE会话信息:

R3#show pppoe session

Total PPPoE sessions 1

PPPoE Session Information

UID SID RemMAC OIntf Intf Session

LocMAC VASt state

0 2 ca03.0fec.0000 Fa0/0 Vi1 N/A

ca02.0fec.0000 UP

R3#

 

30、实验完成。

 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值