Chinaunix首页 | 论坛 | 博客
  • 博客访问: 23798
  • 博文数量: 10
  • 博客积分: 27
  • 博客等级: 民兵
  • 技术积分: 60
  • 用 户 组: 普通用户
  • 注册时间: 2011-07-14 13:31
文章分类
文章存档

2012年(10)

我的朋友
最近访客

分类:

2012-07-28 14:20:08

 

实验目的:

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

 

实验拓扑图:

 


实验步骤及要求:

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

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

R4(config)#[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

R4(config-if)#pppoe enable

R4(config-if)#no shutdown

[stanley2] R4(config-if)#exit

R4(config)#

R4(config)#[stanley3] 

R4(dhcp-config)#[stanley4] 

R4(dhcp-config)#[stanley5] 

R4(dhcp-config)#exit

R4(config)#

R4(config)#[stanley6] 

R4(config)#

R4

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-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)#[stanley9] 

R4(config)#

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

R1(config)#[stanley10] 

R1(config)#

R1(config)#interface fastEthernet 0/0

R1(config-if)#[stanley11]  

R1(config-if)#no shutdown

R1(config-if)#exit

R1(config)#

R1(config)#interface atM 1/0

R1(config-if)#[stanley12] 

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)#[stanley14] 

R1(config)#exit

R1#

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

R2(config)#[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、在R2R1路由器上检测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上新建一个网络连接。在连接向导中,点击下一步。如下面所示:

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

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

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

    

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

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

13、完成新建连接配置。

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

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

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

        [stanley16] 

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

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

        [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的环境中完成,其主要的优点,就是能够使用XPPPPoE客户端软件,快速的测试骨干网络的配置的正确性。下面给出了R3路由器的PPPoE客户端以及相关的NATDHCP的配置。

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)#[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#

[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   

[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)#[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)#[stanley22] 

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

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

R3(config-vpdn)#exit

R3(config)#[stanley23] 

R3(config-if)#

[stanley24] 

R3(config-if)#

R3(config-if)#ppp chap hostname adsl

R3(config-if)#ppp chap password cisco

[stanley25] R3(config-if)#[stanley26] 

R3(config-if)#[stanley27] 

R3(config-if)#[stanley28] 

R3(config-if)#[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)#0.0.0.0 0.0.0.0 dialer 1[stanley30] 

26、在R5上测试,是否可以PINGInternet网络的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、查看R3DHCP地址分配信息:

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、实验完成。

阅读(884) | 评论(0) | 转发(0) |
0

上一篇:Linux内核驱动之一些重要数据结构

下一篇:没有了

给主人留下些什么吧!~~