pppoe--chap实验
pppoe试验

pppoe试验试验拓扑图:家庭端虚拟机描述:家庭端用虚拟机代替,企业端用真机代替;两边都是通过pppoe拨号上网. 服务器配置:srv(config)#vpdn enablesrv(config)#bba-group pppoe globalsrv(config-bba-group)#virtual-template 1srv(config-bba-group)#exitsrv(config)#int e1/0srv(config-if)#pppoe enable group globalsrv(config-if)#no shutsrv(config-if)#exitsrv(config)#int virtual-template 1srv(config-if)#ip add 172.16.1.38 255.255.255.0srv(config-if)#peer default ip add pool testsrv(config-if)#ppp authentication chapsrv(config-if)#ppp ipcp dns 61.187.98.3srv(config-if)#no shutsrv(config-if)#exitsrv(config)#int lo1srv(config-if)#ip ad 100.0.0.1 255.255.255.0srv(config-if)#no shutsrv(config-if)#exitsrv(config)#ip local pool test 172.16.1.100 172.16.1.200srv(config)#username bt51 password 0 bt51客户端配置:client(config)#int f0/0client(config-if)#pppoe enable group globalclient(config-if)#pppoe-client dial-pool-number 1client(config-if)#no shutclient(config-if)#exitclient(config)#int e1/0client(config-if)#ip add 172.16.1.238 255.255.255.0(配好地址后要确定ping通真机) client(config-if)#pppoe enable group globalclient(config-if)#ip nat insideclient(config-if)#no shutclient(config-if)#exitclient(config)#int dialer 1client(config-if)#ip add negotiatedclient(config-if)#ip nat outsideclient(config-if)#encapsulation pppclient(config-if)#dialer pool 1client(config-if)#ppp authentication chap callinclient(config-if)#ppp chap hostname bt51client(config-if)#ppp chap password 0 bt51client(config-if)#no shutclient(config-if)#exitclient(config)#access-list 1 permit 172.16.1.0 0.0.0.255client(config)#ip nat inside source list 1 interface dialer 1 overloadclient(config)#ip route 0.0.0.0 0.0.0.0 dialer 1最后分别在虚拟机和真机上建立拨号连接,在虚拟机上不用配置ip地址,如果都能ping通loopback地址100.0.0.1,试验就成功了!。
PPPoE用户上线交互过程

PPPoE用户上线交互过程PPPoE用户上线要经过PPPoE协商、LCP协商、PAP/CHAP认证、NCP协商几个阶段。
PPPoE协商PPPoE协商是ME设备为用户分配PPPoE接入用的Session ID,该Session ID在每ME设备上唯一,用来唯一标识一条用户与ME设备之间的PPPoE虚拟链路。
PPPoE的协商流程见下图。
图1 PPPoE的协商流程1.用户广播一个PADI包,在此包中包含用户想要得到的服务类型信息。
2.以太网内的所有接入集中器(如上图中的ME设备)在收到这个初始化包后,将其中请求的服务与自己能提供的服务进行比较,其中可以为此用户提供此服务的接入集中器发回PADO包。
3.用户可能会收到多个集中器返回的PADO包。
用户根据一定的条件从返回PADO包的接入集中器中选定符合条件的接入集中器,并向它返回一个会话请求包PADR(非广播),在PADR包中封装所需的服务信息。
4.被选定的接入集中器在收到PADR包后开始进入PPP会话阶段。
它会产生一个会话标识以唯一的标识它和主机的这段PPPoE会话。
并把这个特定的会话标识包含在会话确认包PADS中发回给用户,如果没有错误发生就进入到PPP会话阶段,而主机在收到会话确认包后如果没有错误发生也进入到PPP会话阶段。
LCP协商LCP协商的过程如下:协商双方互相发送一个LCP Config-Request报文,确认收到的Config-Request报文中的协商选项,根据这些选项的支持与接受情况,做出适当的回应。
若两端都回应了Config-ACK,则标志LCP链路建立成功,否则会继续发送Request报文,直到对端回应了ACK报文为止。
说明:∙Config-ACK:若完全支持对端的LCP选项,则回应Config-ACK报文,报文中必须完全协带对端Request报文中的选项。
∙Config-NAK:若支持对端的协商选项,但不认可该项协商的内容,则回应Config-NAK 报文,在Config-NAK的选项中填上自己期望的内容,如:对端MRU值为1500,而自己期望MRU值为1492,则在Config-NAK报文中埴上自己的期望值1492。
PPPOE拨号上网实验案例

PPPoE拨号上网实验案例实际需求:PC能够通过拨号实现PC与运营商通信1、AR2为pppoe服务器,使用ppp中chap认证,用户名为user1,密码为Huawei@123,地址池如图提供IP地址2、AR1为pppoe客户端,客户端拨号进行认证,认证通过,获取服务器提供的IP地址信息3、实现PC端与ISP的通信配置实验命令行:R1为客户端:配置访问控制列表,使用Easy-ip允许进行NAT转换acl number 2000rule 5 permit source 10.1.0.0 0.0.0.255创建配置虚拟拨号接口interface Dialer1link-protocol pppppp chap user user1ppp chap password cipher Huawei@123ip address ppp-negotiatedialer user user1dialer bundle 1nat outbound 2000配置启用PPPoE客户端功能interface GigabitEthernet0/0/0pppoe-client dial-bundle-number 1内网为静态配置IP地址interface GigabitEthernet0/0/1ip address 10.1.0.1 255.255.255.0配置一条缺省静态路由协议,能够实现内外网的互通ip route-static 0.0.0.0 0.0.0.0 Dialer1R2:配置PPPoE服务器地址池ip pool aaagateway-list 12.1.1.2network 12.1.1.0 mask 255.255.255.252配置服务器虚拟模板interface Virtual-Template1ppp authentication-mode chapremote address pool aaaip address 12.1.1.2 255.255.255.252配置开启PPPoeE服务器功能interface GigabitEthernet0/0/0pppoe-server bind Virtual-Template 1配置需要验证的用户名和密码aaalocal-user user1 password cipher Huawei@123locla-user user1 service-type ppp所有配置完成后进行测试验证测试1:display ip interface brief dialer 1 进行测试R1接口是否获取到IP地址<R1>display ip interface brief dialer 1*down: administratively down^down: standby(l): loopback(s): spoofingInterface IP Address/Mask Physical Protocol Dialer1 12.1.1.1/32 up up(s)验证测试2:PC1配置好IP地址10.1.0.100,子网掩码255.255.255.0,网关地址10.1.0.1 ping 12.1.1.2能够通信PC>ping 12.1.1.2Ping 12.1.1.2: 32 data bytes, Press Ctrl_C to breakFrom 12.1.1.2: bytes=32 seq=1 ttl=254 time=47 msFrom 12.1.1.2: bytes=32 seq=2 ttl=254 time=31 msFrom 12.1.1.2: bytes=32 seq=3 ttl=254 time=16 msFrom 12.1.1.2: bytes=32 seq=4 ttl=254 time=16 msFrom 12.1.1.2: bytes=32 seq=5 ttl=254 time=16 ms--- 12.1.1.2 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 16/25/47 ms实验拓展:现网中内网使用DHCP服务器提供相应的IP地址,实现DHCP与PPPoE的联动,思考让路由器R1实现DHCP服务器的功能命令行如下:<R1>system-view[R1]dhcp enable[R1]ip pool aaa[R1-ip-pool-aaa]network 10.1.0.0 mask 24[R1-ip-pool-aaa]gateway-list 10.1.0.1[R1-ip-pool-aaa]dns-list 192.168.4.6 202.102.152.3[R1-ip-pool-aaa]quit[R1]interface g0/0/1[R1-GigabitEthernet0/0/1]ip address 10.1.0.1 24[R1-GigabitEthernet0/0/1]dhcp select global验证:步骤一、点开PC,选择基础设置--DHCP--应用--命令行--ipconfig能够正常获取到相应的IP地址步骤二PC>ipconfigLink local IPv6 address...........: fe80::5689:98ff:fe31:6ba3 IPv6 address......................: :: / 128IPv6 gateway......................: ::IPv4 address......................: 10.1.0.254Subnet mask.......................: 255.255.255.0 Gateway...........................: 10.1.0.1Physical address..................: 54-89-98-31-6B-A3DNS server........................: 192.168.4.6 202.102.152.3步骤三ping 12.1.1.2能够通信。
思科、华为、神州数码PPPOE拨号实验

方法一:PPPoE配置命令dcr路由器实现了pppoe client功能,pppoe配置命令:1 pppoe-client dialer2 show pppoe3 debug pppoe3.2.2.1 pppoe-client dialer命令:pppoe-client dialer [dialer-number]no pppoe-client dialer功能:启动以太网接口的pppoe client功能,同时指定对应的拨号口;本命令的no操作为关闭pppoe client功能。
参数:[dialer-number]为pppoe client建立session时使用的拨号口,取值范围为0~255。
缺省情况:以太网不打开pppoe client功能。
命令模式:以太网接口配置模式使用指南:本命令在打开以太网接口的pppoe client功能的同时,还指定了对应的拨号口,其中拨号口的号码为命令interface dialer [number]中设置的号码之一。
举例:配置以太网接口0为pppoe client,并且对应拨号口1。
router(config)#interface dialer 1router(config-dialer1)#en ppprouter(config-dialer1)#exitrouter(config)#interface ethernet 0router(config-ethernet0)#pppoe-client dialer 1相关命令:interface dialer3.2.2.2 show pppoe命令:show pppoe功能:显示pppoe两端的mac地址、session id、连接建立时间、持续时间等。
命令模式:特权用户配置模式举例:router#show pppoeethernet0 pppoe information:sid locmac remmac intf status oinft0x0061 0003.0f00.8012 0050.baf2.8b46 ethernet0 4 dialer1create session time : 0:03:31 duration : 00:56:173.2.2.3 debug pppoe命令:debug pppoe { event| packet }no debug pppoe { event| packet }功能:打开pppoe的调试开关。
无线路由器的组网及桥接(实验报告)

实验报告院系:__________________ 专业:__________________ 成绩:__________________姓名:__________________ 学号:__________________ 日期:__________________ 实验名称:无线路由器的组网实验一、实验目的和要求无线路由器及其下PC机和手机的无线互联实验。
二、实验内容和原理1.了解无线路由器的工作模式2.了解无线路由器的Bridge(桥接)模式3.巩固和熟悉无线路由器的配置与应用三、操作方法和实验步骤1.无线路由器与PC机组网。
(1)打开网上邻居→本地连接→属性→TCP/IP协议→自动获取IP和DNS服务器。
(2)打开IE浏览器,在浏览器地址中输入192.168.1.1,按回车。
输入用户名:admin 密码:admin。
(初始用户名和密码一般都是这样的)(3)进入路由界面:主要设置以下内容:IP地址:10.170.49.xxx子网掩码:255.255.255.0网关:10.170.49.1DNS:202.103.224.68SSID: 自定义名称。
(4)利用手机通过无线路由器上网2.路由器桥接实验(小组1作为PC1,小组2作为PC2)(1)主路由器通过LAN口与PC1小组电脑用直通线相连。
(2)打开IE,输入主路由器的配置网站的IP地址(192.168.1.1),进入路由器的Web配置界面,修改主路由器的Lan口IP地址为192.168.1.1,修改主路由器的SSID为P1,地址池192.168.1.100-192.168.1.149,保存,重启。
(3)副路由器通过LAN口与PC2小组电脑用直通线相连。
(4)打开IE|,输入副路由器的配置网站的IP地址(192.168.1.1),进入路由器的Web配置界面,改副路由器的Lan口IP地址为192.168.1.2,修改副路由器的SSID为P2,地址池192.168.1.150-192.168.1.199,保存,重启。
PPPOE拨号上网实验

PPPOE拨号上网实验ZLS制作QQ:1773747527 实验结构图:下面我给大家配置一下简单PPPOE拨号实验,讲的不好请各位见谅!下半部分有Internet的配置1、实验思路一、GS路由器做Pppoe的路由器,主机向GS路由器申请拨号二、用户1为admin密码为admin用户2为pzxyszl密码为pzxyszl三、拨号实验成功后可以ping 218.198.8.8四、下发IP为192.168.2.0/242、IP规划GS路由器F0/0接口123.1.1.1/24F0/1接口192.168.1.1/24Server-PTIp:218.198.8.8/24GW:218.198.8.13、配置过程GS:!hostname GS!aaa new-model /开启AAA服务aaa authentication ppp default local /PPP认证使用AAA本地认证aaa authentication login default local /登录认证使用AAA本地认证aaa authorization network default local /网络认证实验AAA本地认证!vpdn enable /开启vpdnvpdn-group pppoe_server /配置vpdn-group名为pppoe_server accept-dialin /允许接入protocol pppoe /接入协议为PPPOEvirtual-template 1 /与虚拟接口绑定!username admin password 0 admin /用户名和密码username pzxyszl password 0 pzxyszl!interface Virtual-Template1 /进入接口ip unnumbered FastEthernet0/1 /使用无编号,调用fa 0/0的IP作为自己的IP peer default ip address pool pppoepool /下发的IP从本地地址池找ppp authentication chap /使用chap认证!interface FastEthernet0/0ip address 123.1.1.1 255.255.255.0!interface FastEthernet0/1ip address 192.168.1.1 255.255.255.0pppoe enable /接口开启PPPOE!ip local pool pppoepool 192.168.2.1 192.168.2.254 /本地地址池pppoepoolip classlessip route 0.0.0.0 0.0.0.0 123.1.1.2 /默认路由指向网关4、拨号测试效果详解Internet部分Internet分解图:Internet1配置Internet1#sho running-configBuilding configuration...Current configuration : 730 bytes!no service timestamps log datetime msecno service timestamps debug datetime msecno service password-encryption!hostname Internet1!!!!!!!!!!!!!!spanning-tree mode pvst!!!!interface FastEthernet0/0ip address 123.1.1.2 255.255.255.0duplex autospeed auto!interface FastEthernet0/1no ip addressduplex autospeed autoshutdown!interface Serial0/1/0ip address 10.0.0.1 255.255.255.0clock rate 9600 /时钟!interface Vlan1no ip addressshutdown!log-adjacency-changesredistribute connectednetwork 10.0.0.0 0.0.0.255 area 0default-information originate /下发静态路由!ip classlessip route 0.0.0.0 0.0.0.0 123.1.1.1!!!!!!!line con 0line vty 0 4login!!!EndInternet2配置Internet2#sho running-configBuilding configuration...Current configuration : 661 bytes!version 12.4no service timestamps log datetime msecno service timestamps debug datetime msecno service password-encryption!hostname Internet2!!!!!!!!!!!!!spanning-tree mode pvst!!!!interface FastEthernet0/0ip address 218.198.8.1 255.255.255.0 duplex autospeed auto!interface FastEthernet0/1no ip addressduplex autospeed autoshutdown!interface Serial0/1/0ip address 10.0.0.2 255.255.255.0!interface Vlan1no ip addressshutdown!router ospf 1log-adjacency-changesnetwork 218.198.8.0 0.0.0.255 area 0 network 10.0.0.0 0.0.0.255 area 0!ip classless!!!!!!!line con 0line vty 0 4login!! End。
pppoe实验

沈阳工程学院
学生实验报告
实验室名称:信息学院网络实验室
实验课程名称:计算机网络管理
实验项目名称:PPPoe协议分析
批阅教师(签字):成绩:
一.实验目的
掌握pppoe协议的配置过程与运行原理,了解实际的网络拓扑,并学会配置使用海蜘蛛服务器。
二.实验内容
1.配置海蜘蛛服务器。
2.建立pppoe连接并登陆管理用户。
三.实验前的准备
●了解网络的相关知识。
●学习海蜘蛛服务器相关知识。
●掌握pppoe的运行机制。
四.实验要求及实验软硬件环境
【基本要求】
●设计网络拓扑图并深刻理解内网与外网的配置。
●对海蜘蛛服务器的功能与作用予以理解并掌握,消化课程的内容。
●完成此项实验,完成实验报告。
【实验组织方式】
●小组实验
【实验条件】
●局域网环境,海蜘蛛软件,虚拟机。
五.实验步骤
1、按照实验拓扑图连接实验环境。
实验拓扑图如下所示。
图1 实验拓扑图
2、在虚拟机中建立一个linux的系统,并在其里安装海蜘蛛软件,
如下图所示。
图2 建立linux系统
图3 配置网卡连接
图4 安装海蜘蛛软件
图 5 安装ISP 3、登陆服务器界面进行配置。
图6 登陆服务器界面
图7 网卡配置信息
图8 启动pppoe服务
图9 局域网配置信息
4、建立pppoe用户并进行连接通讯
图11 在本地连接建立ppp协议
图12 建立名为aa的ppp通信
图13 在服务器界面查看用户列表。
Ensp软件实验之ppp实验

Ensp软件实验之ppp实验PPPoE(Point-to-Point Protocol over Ethernet)是一种在以太网上建立点对点连接的协议。
它允许用户通过以太网接入ADSL等宽带网络,成为一种常见的上网方式。
PPPoE协议允许用户使用宽带拨号方式进行上网,提供了更高的可靠性、灵活性和安全性。
在本篇文章中,我将介绍PPPoE协议的实验过程和结果。
实验目的:本次实验的目的是通过搭建PPPoE服务器和客户端,实现在以太网上建立点对点连接的功能。
通过实践,了解PPPoE协议的工作原理和实现过程,掌握其配置和使用方法。
实验准备:1.一台支持PPPoE的路由器(作为服务器)和一台支持PPPoE的电脑(作为客户端)。
2.PPPoE服务器和客户端软件。
实验步骤:1.在路由器上配置PPPoE服务器的参数,包括服务器IP地址、子网掩码、网关和DNS地址等。
2.安装并配置PPPoE服务器软件,在软件中设置用户账号和密码,配置服务器运行参数。
3.在客户端电脑上安装PPPoE客户端软件。
4.在客户端电脑上,配置PPPoE客户端的参数,包括服务器IP地址、用户名和密码等。
5.通过网线将路由器和客户端电脑连接起来。
6.启动PPPoE服务器,并在客户端电脑上启动PPPoE客户端。
7.在客户端电脑上,通过PPPoE客户端输入用户名和密码,尝试建立连接。
8.如果连接成功,即可在客户端电脑上通过PPP协议上网。
如果连接失败,检查配置和网络设置,并重新尝试建立连接。
实验注意事项:1.在设置PPPoE服务器和客户端参数时,保证两者的配置一致性,包括IP地址、用户名和密码等。
2.检查网络连接和线缆是否正常,确保路由器和客户端电脑之间的连接畅通。
3.在配置和使用过程中,注意保护账号和密码的安全性,避免被他人恶意使用。
实验结果:通过以上实验步骤,我成功搭建了PPPoE服务器和客户端,在以太网上建立了点对点连接。
在客户端电脑上,通过PPPoE客户端成功连接到服务器,并成功上网。
PPPoE拨号流程

PPPoE拨号流程PPPoE(Point to Point Protocol over Ethernet,基于以太网的点对点协议)的工作流程包含发现(Discovery)和会话(Session)两个阶段,发现阶段是无状态的,目的是获得PPPoE终端(在局端的ADSL设备上)的以太网MAC地址,并建立一个惟一的PPPoE SESSION-ID。
发现阶段结束后,就进入标准的PPP会话阶段。
1.发现阶段(PPPoED:PPPoE Discovery)1.1 PADI(PPPoE Active Discovery Initiation)主机广播发起分组,分组的目的地址为以太网的广播地址0xffffffffffff,CODE(代码)字段值为0×09(PADI Code),SESSION-ID(会话ID)字段值为0x0000。
PADI分组必须至少包含一个服务名称类型的标签(Service Name Tag,字段值为0x0101),向接入集中器提出所要求提供的服务。
1.2 PADO(PPPoE Active Discovery Offer)接入集中器收到在服务范围内的PADI分组,发送PPPoE有效发现提供包分组,以响应请求。
其中CODE字段值为0×07(PADO Code),SESSION-ID字段值仍为0x0000。
PADO 分组必须包含一个接入集中器名称类型的标签(Access Concentrator Name Tag,字段值为0x0102),以及一个或多个服务名称类型标签,表明可向主机提供的服务种类。
PADO 和PADI的Host-Uniq Tag值相同。
1.3 PADR(PPPoE Active Discovery Request)主机在可能收到的多个PADO分组中选择一个合适的PADO分组,然后向所选择的接入集中器发送PPPoE有效发现请求分组。
其中CODE字段为0x19(PADR Code),SESSION_ID 字段值仍为0x0000。
实验14.3PPP之CHAP认证

实验14.3PPP之CHAP认证实验14.3 PPP之CHAP认证⼀、实验需求(1)路由器串⼝通过PPP进⾏地址协商获取IP地址;(2)路由器之间改成CHAP认证,以建⽴PPP链路。
⼆、实验拓扑图1 配置CHAP单向认证实验三、实验步骤(1)请根据实验拓扑图,配置各个路由器的主机名(主机名格式:如R1-zhangsan)和接⼝IP地址,R2的接⼝IP采⽤PPP协商获取,请给出R1、R2的配置截图。
与实验14.2配置相同,图略(2)在R2上查看接⼝是否获取到IP地址,并观察接⼝状态,再截图。
与实验14.2配置相同,图略(3)在当前未做认证的情况下,通过R1 ping R2,检验PPP链路是否能正常通信,请给出ping结果的截图。
与实验14.2配置相同,图略//能通则正常,反之则不正常。
(4)在R1上配置论证数据库,并在R1的串⼝启⽤chap认证,然后在R2的串⼝配置⽤于验证的⽤户名和需要发送的密码,请给出R1和R2的配置截图。
(5)在R1上对PPP链路进⾏抓包,启动wireshark后,shutdown R1的串⼝,然后执⾏undo shutdown命令启⽤R1的串⼝,再到wireshark上查看抓到的CHAP包,找出并标识出⽤于CHAP认证的⽤户名和密码,最后对包含CHAP认证账号信息的包进⾏截图。
(6)在当前已做CHAP认证的情况下,通过R1 ping R2,检验PPP链路是否能正常通信,请给出ping结果的截图。
//能通则说明CHAP认证成功,反之则说明PPP链路认证失败。
说明:本实验是CHAP单向认证,如果要作CHAP双向认证,则每个路由器既作为主认证⽅,⼜作为被认证⽅。
在本实验的基础上对R2配置AAA认证账户,并在串⼝下启⽤CHAP认证;在R1的串⼝下配置⽤于认证的账号信息即可。
Ensp做PPPoE实验

PPPoE服务器上的配置sysname PPPoE-Server#ip pool pool1//创建地址池用来为客户端分配地址network 192.168.10.10 mask 255.255.255.0gateway-list 192.168.10.1#aaa //在AAA下配置认证方案和创建用于认证的账号 authentication-scheme system_adomain systemauthentication-scheme system_alocal-user user1@system password cipher huawei local-user user1@system service-type ppp#interface Virtual-Template1//配置认证虚模板ppp authentication-mode chap domain system remote address pool pool1ip address 192.168.10.10 255.255.255.0#interface g0/0/0 //接口上开启PPPOE服务器的功能 pppoe-server bind Virtual-Template 1#interface LoopBack100 //模拟公网的地址ip address 100.100.100.100 255.255.255.0PPPoE客户端的配置#sysname PPPoE-Client#dialer-rule //配置拨号规则,IP流量触发PPP拨号dialer-rule 1 ip permit#interface Dialer0 //配置拨号接口0link-protocol ppp //协议是PPPppp chap user user1@system //配置被认证方的chap账号ppp chap password simple huawei //配置chap密码mtu 1492 //修改MTU为1500-8=1492 ,1500是以太网最大传输单元,8是PPP头部长度ip address ppp-negotiate //配置IP地址采用PPP协商方式获取,即通过服务器的地址池分配dialer user user1@system //配置拨号用户,这个是非按需拨号时要配置dialer bundle 1//配置拨号捆绑的编号1,1要和下面接口的的配置对应#interface g0/0/0pppoe-client dial-bundle-number 1#ip route-static 0.0.0.0 0.0.0.0 Dialer0 //配置用于上网的默认路由,注意出口是拨号接口Dialer0,不用也没法指定下一跳IPreturn如果路由器下面还有PC要上网,还要配置NATacl 3000rule permit ipinter dialer 0nat outbound 3000在客户端测试PPPoE的配置[PPPoE-Client]dis ip inter briInterface IP Address/Mask Physical ProtocolDialer0 192.168.10.254/32 up up(s)GigabitEthernet0/0/0 unassigned up down GigabitEthernet0/0/1 unassigned down downNULL0 unassigned up up(s)[PPPoE-Client]ping 100.100.100.100PING 100.100.100.100: 56 data bytes, press CTRL_C to breakReply from 100.100.100.100: bytes=56 Sequence=1 ttl=255 time=100 ms Reply from 100.100.100.100: bytes=56 Sequence=2 ttl=255 time=10 msReply from 100.100.100.100: bytes=56 Sequence=3 ttl=255 time=10 msReply from 100.100.100.100: bytes=56 Sequence=4 ttl=255 time=10 msReply from 100.100.100.100: bytes=56 Sequence=5 ttl=255 time=10 ms--- 100.100.100.100 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 10/28/100 ms[PPPoE-Client]dis pppoe-client session summaryPPPoE Client Session:ID Bundle Dialer Intf Client-MAC Server-MAC State1 1 0 GE0/0/0 00e0fc03c38b 00e0fc033c76 UP在服务器上测试PPPoE的配置<PPPoE-Server>dis ip routing-tableRoute Flags: R - relay, D - download to fib------------------------------------------------------------------------------Routing Tables: PublicDestinations : 11 Routes : 11Destination/Mask Proto Pre Cost Flags NextHop Interface100.100.100.0/24 Direct 0 0 D 100.100.100.100 LoopBack100 100.100.100.100/32 Direct 0 0 D 127.0.0.1 LoopBack100 100.100.100.255/32 Direct 0 0 D 127.0.0.1 LoopBack100 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0 192.168.10.0/24 Direct 0 0 D 192.168.10.10 Virtual-Template1 192.168.10.10/32 Direct 0 0 D 127.0.0.1 Virtual-Template1 192.168.10.254/32 Direct 0 0 D 192.168.10.254 Virtual-Template1 192.168.10.255/32 Direct 0 0 D 127.0.0.1 Virtual-Template1 255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0<PPPoE-Server>dis pppoe-server session allSID Intf State OIntf RemMAC LocMAC1 Virtual-Template1:0 UP GE0/0/0 00e0.fc03.c38b 00e0.fc03.3c76<PPPoE-Server>dis access-user------------------------------------------------------------------------------UserID Username IP address MAC------------------------------------------------------------------------------145 user1@system - 00e0-fc03-c38b------------------------------------------------------------------------------Total 1,1 printed<PPPoE-Server>。
任务10: CHAP认证

任务10 CHAP认证一、【技术原理】CHAP全称是PPP(点对点协议)询问握手认证协议(Challenge Handshake Authentication Protocol)。
该协议可通过三次握手周期性的校验对端的身份,可在初始链路建立时完成时,在链路建立之后重复进行。
通过递增改变的标识符和可变的询问值,可防止来自端点的重放攻击,限制暴露于单个攻击的时间。
二、【任务描述】1、为路由器指定唯一主机名2、列出认证路由器时所使用的远端主机名称和口令,密码为CCNA.3、WAN接口上完成PPP协议的封装和CHAP认证的配置三、【任务实现】1、规划拓扑结构2、配置过程:1)配置R1Router(config)#hostname R1R1(config)#username R2 password ccna注:用于验证对端发送过来的用户名和口令,用户名必须是对端的hostname,而口令在两段必须要一样。
R1(config)#interface serial 0R1(config-if)#ip address 192.168.12.1 255.255.255.0R1(config-if)#encapsulation pppR1(config-if)#ppp authentication chapR1(config-if)#no shutdown注:启用CHAP认证协议。
CHAP是双向验证协议。
并使用hostname作为用户名去被验证,用本地用户列表来验证对端。
2)配置R2Router(config)#hostname R2R2(config)#interface serial 0R2(config-if)#ip address 192.168.12.2 255.255.255.0R2(config-if)#clock rate 64000R2(config-if)#encapsulation pppR2(config-if)#ppp authentication chapRr2(config-if)#no shutdownR2(config-if)#exit注:在对端需要配置相同的,CHAP是双向认证。
华赛防火墙PPPOE拨号配置实例

通过PPPoE拨号接入设备作为Client,通过PPPoE协议向Server(运营商设备)拨号后获得IP地址,实现接入Internet。
组网需求如图1所示,USG作为出口网关,为局域网内PC提供接入Internet出口。
公司网络规划如下:•局域网内所有PC都部署在10.1.1.0/24网段,均通过DHCP动态获得IP 地址。
•下行链路:使用LAN以太网接口,通过交换机连接公司内的所有PC。
•上行链路:使用WAN以太网接口接入Internet。
同时,向运营商申请Internet接入服务(用户名和密码均为:user)。
运营商提供的Internet接入服务使用PPPoE协议。
根据以上情况,需要将USG作为PPPoE Client,向PPPoE Server(运营商设备)拨号获得IP地址、DNS地址后,实现接入Internet。
项目数据说明(1) 接口号:GigabitEthernet6/0/2安全区域:Untrust通过拨号(Dialer 1接口)向PPPoE Server(运营商设备)拨号获得IP地址、DNS地址。
(2) 接口号:Ethernet 6/0/0(VLAN 1)LAN以太网接口,缺省属于VLAN 1。
配置思路1.配置下行链路。
在Vlanif 1上开启DHCP Server服务,为PC动态分配IP地址,指定PC 获得的网关和DNS服务器地址均为Vlanif 1接口。
PC上网通常需要解析域名,这就需要为其指定DNS服务器地址。
本例中采用USG作为DNS中继设备。
2.配置上行链路。
3.将接口加入到安全区域,并在域间配置NAT和包过滤。
将连接公司局域网的接口加入到高安全等级的区域(Trust),将连接Internet的上行接口加入到低安全等级的区域(Untrust)。
局域网内通常使用私网地址,访问Internet时,必须配置NAT。
本例中,因为上行接口通过拨号获得IP地址,每次拨号获得的IP地址可能不一样,所以采用Easy IP。
CHAP验证

CHAP单向,双向认证一、实验目标:区分CHAP和PAP认证的机制,特别是CHAP的双向认证二、网络拓扑图:三、配置:CHAP单向认证r1(config)#interface s1r1(config-if)#clock rate 64000r1(config-if)#ip add 1.1.1.1 255.255.255.0r1(config-if)#encapsulation ppp 封装PPPr1(config-if)#ppp authentication chap 要求进行CHAP验证r1(config)#username 222 password 0 cisco 配置本地数据库,用户名是对端的,而密码是本地数据库的密码r2(config)#inter s0/2r2(config-if)#ip add 2.2.2.2 255.255.255.0r2(config-if)#encapsulation pppr2(config-if)#ppp chap hostname 222 要发送的CHAP用户名和密码r2(config-if)#ppp chap password 0 ciscor1#show runBuilding configuration...username 222 password 0 cisco!interface Serial0/1ip address 1.1.1.1 255.255.255.0encapsulation pppshutdownserial restart-delay 0clock rate 64000ppp authentication chap!r2#show runBuilding configuration...interface Serial0/2ip address 2.2.2.2 255.255.255.0encapsulation pppshutdownserial restart-delay 0ppp chap hostname 222ppp chap password 0 cisco!r1#ping 2.2.2.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 48/330/716 msr2#debug ppp authentication*Mar 1 00:16:49.547: %LINK-3-UPDOWN: Interface Serial0/2, changed state to up*Mar 1 00:16:49.551: Se0/2 PPP: Using default call direction*Mar 1 00:16:49.551: Se0/2 PPP: Treating connection as a dedicated line*Mar 1 00:16:49.551: Se0/2 PPP: Session handle[46000002] Session id[2]*Mar 1 00:16:49.555: Se0/2 PPP: Authorization required*Mar 1 00:16:50.055: Se0/2 PPP: No authorization without authentication*Mar 1 00:16:50.155: Se0/2 CHAP: I CHALLENGE id 2 len 23 from "r1" 收到挑战*Mar 1 00:16:50.159: Se0/2 CHAP: Using hostname from interface CHAP*Mar 1 00:16:50.159: Se0/2 CHAP: Using password from interface CHAP*Mar 1 00:16:50.163: Se0/2 CHAP: O RESPONSE id 2 len 24 from "222" 发送MD5加密值*Mar 1 00:16:50.527: Se0/2 CHAP: I SUCCESS id 2 len 4 认证成功*Mar 1 00:16:51.527: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/2, changed state to upr1#debug ppp authenticationPPP authentication debugging is onr1#*Mar 1 00:16:54.191: Se0/1 PPP: Authorization required*Mar 1 00:16:54.203: Se0/1 CHAP: O CHALLENGE id 2 len 23 from "r1" 发送挑战信息*Mar 1 00:16:54.391: Se0/1 CHAP: I RESPONSE id 2 len 24 from "222" 接收哈希值*Mar 1 00:16:54.395: Se0/1 PPP: Sent CHAP LOGIN Request*Mar 1 00:16:54.399: Se0/1 PPP: Received LOGIN Response PASS*Mar 1 00:16:54.403: Se0/1 PPP: Sent LCP AUTHOR Request*Mar 1 00:16:54.407: Se0/1 PPP: Sent IPCP AUTHOR Request*Mar 1 00:16:54.411: Se0/1 LCP: Received AAA AUTHOR Response PASS*Mar 1 00:16:54.411: Se0/1 IPCP: Received AAA AUTHOR Response PASS*Mar 1 00:16:54.415: Se0/1 CHAP: O SUCCESS id 2 len 4 认证成功*Mar 1 00:16:54.419: Se0/1 PPP: Sent CDPCP AUTHOR Request*Mar 1 00:16:54.423: Se0/1 CDPCP: Received AAA AUTHOR Response PASS*Mar 1 00:16:54.511: Se0/1 PPP: Sent IPCP AUTHOR RequestCHAP双向认证r1#show runusername 222 password 0 666!interface Serial0/1ip address 1.1.1.1 255.255.255.0encapsulation pppserial restart-delay 0clock rate 64000ppp authentication chapppp chap hostname 111!r2#show runusername 111 password 0 666 两台路由器上的密码必须要一样!interface Serial0/2ip address 2.2.2.2 255.255.255.0encapsulation pppserial restart-delay 0ppp authentication chapppp chap hostname 222!r2#debug ppp authentication*Mar 1 00:46:30.691: %LINK-3-UPDOWN: Interface Serial0/2, changed state to up*Mar 1 00:46:30.695: Se0/2 PPP: Using default call direction*Mar 1 00:46:30.695: Se0/2 PPP: Treating connection as a dedicated line*Mar 1 00:46:30.695: Se0/2 PPP: Session handle[1A00011E] Session id[305]*Mar 1 00:46:30.699: Se0/2 PPP: Authorization required*Mar 1 00:46:31.039: Se0/2 CHAP: O CHALLENGE id 49 len 24 from "222"*Mar 1 00:46:31.279: Se0/2 CHAP: I CHALLENGE id 48 len 24 from "111"*Mar 1 00:46:31.287: Se0/2 CHAP: Using hostname from interface CHAP*Mar 1 00:46:31.287: Se0/2 CHAP: Using password from AAA*Mar 1 00:46:31.287: Se0/2 CHAP: O RESPONSE id 48 len 24 from "222"*Mar 1 00:46:31.399: Se0/2 CHAP: I RESPONSE id 49 len 24 from "111"*Mar 1 00:46:31.403: Se0/2 PPP: Sent CHAP LOGIN Request*Mar 1 00:46:31.407: Se0/2 PPP: Received LOGIN Response PASS*Mar 1 00:46:31.411: Se0/2 PPP: Sent LCP AUTHOR Request*Mar 1 00:46:31.415: Se0/2 PPP: Sent IPCP AUTHOR Request*Mar 1 00:46:31.419: Se0/2 LCP: Received AAA AUTHOR Response PASS*Mar 1 00:46:31.423: Se0/2 IPCP: Received AAA AUTHOR Response PASS*Mar 1 00:46:31.423: Se0/2 CHAP: O SUCCESS id 49 len 4*Mar 1 00:46:31.427: Se0/2 CHAP: I SUCCESS id 48 len 4*Mar 1 00:46:31.431: Se0/2 PPP: Sent CDPCP AUTHOR Request*Mar 1 00:46:31.435: Se0/2 CDPCP: Received AAA AUTHOR Response PASS*Mar 1 00:46:31.531: Se0/2 PPP: Sent IPCP AUTHOR Request*Mar 1 00:46:32.427: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/2, changed state to upr1#debug ppp authenticationPPP authentication debugging is onr1#*Mar 1 00:46:02.335: Se0/1 PPP: Authorization required*Mar 1 00:46:02.439: Se0/1 CHAP: O CHALLENGE id 48 len 24 from "111"*Mar 1 00:46:02.439: Se0/1 CHAP: I CHALLENGE id 49 len 24 from "222"*Mar 1 00:46:02.447: Se0/1 CHAP: Using hostname from interface CHAP*Mar 1 00:46:02.451: Se0/1 CHAP: Using password from AAA*Mar 1 00:46:02.451: Se0/1 CHAP: O RESPONSE id 49 len 24 from "111"*Mar 1 00:46:02.543: Se0/1 CHAP: I RESPONSE id 48 len 24 from "222"*Mar 1 00:46:02.551: Se0/1 PPP: Sent CHAP LOGIN Request*Mar 1 00:46:02.555: Se0/1 PPP: Received LOGIN Response PASS*Mar 1 00:46:02.559: Se0/1 PPP: Sent LCP AUTHOR Request*Mar 1 00:46:02.559: Se0/1 PPP: Sent IPCP AUTHOR Request*Mar 1 00:46:02.567: Se0/1 LCP: Received AAA AUTHOR Response PASS*Mar 1 00:46:02.567: Se0/1 IPCP: Received AAA AUTHOR Response PASS*Mar 1 00:46:02.571: Se0/1 CHAP: O SUCCESS id 48 len 4*Mar 1 00:46:02.663: Se0/1 CHAP: I SUCCESS id 49 len 4*Mar 1 00:46:02.667: Se0/1 PPP: Sent CDPCP AUTHOR Request*Mar 1 00:46:02.671: Se0/1 PPP: Sent IPCP AUTHOR Request*Mar 1 00:46:02.679: Se0/1 CDPCP: Received AAA AUTHOR Response PASS四、总结:碰到2个问题一、单向基础上做第一次CHAP双向可以通在单向的基础上做双向,可是有一边忘了打ppp authentication chap居然通了。
26实验二十六路由器广域网PPP封装CHAP验证配置

26实验二十六路由器广域网PPP封装CHAP验证配置实训十三、路由器广域网PPP 封装CHAP 验证配置一、实验目的1. 掌握CHAP 验证配置2. 理解验证过程二、应用环境基于安全的考虑,需要路由器双方经过验证后才能建立连接三、实验设备1. DCR-2611 两台2. CR-V35MT 一条3. CR-V35FC 一条四、实验拓扑五、实验要求配置要求六、实验步骤第一步Router-A 的配置Router>enable !进入特权模式Router #config !进入全局配置模式Router _config#hostname Router-A !修改机器名Router-A_config#aaa authentication ppp testRouter-A_config#username RouterB password digitalchina !设置帐号密码Router-A_config#interface s0/3 !进入接口模式Router-A_config_s1/0#ip address 192.168.1.1 255.255.255.0 !配置IP 地址Router-A_config_s1/1#encapsulation PPP !封装PPP 协议Router-A_config_s1/0#ppp authentication chap test!设置验证方式Router-A_config_s1/0#ppp chap hostname RouterA !设置发送给对方验证的帐号Router-A_config_s1/0#physical-layer speed 64000 !配置DCE 时钟频率Router-A_config_s1/0#no shutdownRouter-A_config_s1/0#^Z !按ctrl + z 进入特权模式第二步:查看配置Router-A#show int s0/3 !查看接口状态Serial0/3 is up, line protocol is down!对端没有配置,所以协议是DOWNMode=Sync DCE Speed=64000 !查看DCEDTR=UP,DSR=UP,RTS=UP,CTS=UP,DCD=UPMTU 1500 bytes, BW 64 kbit, DLY 2000 usecInterface address is 192.168.1.1/24!查看IP 地址Encapsulation PPP, loopback not set !查看封装协议Keepalive set(10 sec)LCP Starting configuration exchangeCHAP Closed, Message: 'none'IPCP Listening -- waiting for remote host to attempt open local IP address: 192.168.1.1 remote IP address: 0.0.0.060 second input rate 81 bits/sec, 0 packets/sec!60 second output rate 81 bits/sec, 0 packets/sec!15 packets input, 690 bytes, 5 unused_rx, 0 no buffer0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort25 packets output, 928 bytes, 8 unused_tx, 0 underrunserror:0 clock, 0 gracePowerQUICC SCC specific errors:0 recv allocb mblk fail 0 recv no buffer0 transmitter queue full 0 transmitter hwqueue_full第三步:Router-B 的配置Router>enable !进入特权模式Router #config !进入全局配置模式Router _config#hostname Router-B !修改机器名Router-B_config#aaa authentication ppp test localRouter-B_config#username RouterA password digitalchina !设置帐号密码Router-B_config#interface s0/3 !进入接口模式Router-B_config_s1/0#ip address 192.168.1.2 255.255.255.0 !配置IP 地址Router-B_config_s1/1#encapsulation PPP !封装PPP 协议Router-B_config_s1/0#ppp authentication chap test!设置验证方式Router-B_config_s1/0#ppp chap hostname RouterB !设置发送给对方验证的帐号Router-B_config_s1/0#no shutdown Router-B_config_s1/0#^Z !按ctrl + z 进入特权模式第四步:查看配置Router-B#show int s0/3 !查看接口状态Serial0/3 is up, line protocol is up !接口和协议都是upMode=Sync DTE!查看DTEDTR=UP,DSR=UP,RTS=UP,CTS=UP,DCD=UPMTU 1500 bytes, BW 64 kbit, DLY 2000 usecInterface address is 192.168.1.2/24 !查看IP 地址Encapsulation PPP, loopback not set !查看封装协议Keepalive set(10 sec)LCP OpenedCHAP Opened, Message: ' Welcome to Digital China Networks Limited Router' IPCP Openedlocal IP address: 192.168.1.2 remote IP address: 192.168.1.160 second input rate 67 bits/sec, 0 packets/sec!60 second output rate 20 bits/sec, 0 packets/sec!140 packets input, 3893 bytes, 6 unused_rx, 0 no buffer0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort67 packets output, 2035 bytes, 8 unused_tx, 0 underrunserror:0 clock, 0 gracePowerQUICC SCC specific errors:0 recv allocb mblk fail 0 recv no buffer0 transmitter queue full 0 transmitter hwqueue_full第五步:测试连通性Router-A#ping 192.168.1.2PING 192.168.1.2 (192.168.1.2): 56 data bytes--- 192.168.1.2 ping statistics ---5 packets transmitted, 5 packets received, 0% packet lossround-trip min/avg/max = 20/22/30 ms七、注意事项和排错1. 双方密码一定要一致,发送的帐号要和对方帐号数据库中的帐号对应2. 不要忘记配置DCE 的时钟频率八、共同思考1. CHAP 和PAP 这两种验证有什么不同?2. CHAP 验证是否非常安全?九、课后练习尝试配置不同的密码,观察是否还能建立连接。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
PPPOE 实验
实验说明:看了不少文档,结合百度的例子才弄出结果来,不晓得具体K4里面怎么样的,就是觉得以后说不定有用就做了下。
试过将qinq结合起来,可是先配pppoe再起qinq的话就会发现pppoe立马down了,准确的说一起子接口就会挂掉,我也不晓得为什么求指导!
实验设备:3725 2台3640 2台
注意点:要先配vpdn enable → vpdn-group XXX→ protocol pppoe 要是在服务端f0/0口先开了pppoe enable 会发现在protocol下没有了pppoe这个条目,我也不晓得为什么。
直接看配置:
R1:
R1#show run
Building configuration...
Current configuration : 1232 bytes
!
version 12.4
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
memory-size iomem 5
ip cef
!
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
multilink bundle-name authenticated
!
!
archive
log config
hidekeys
!
interface Loopback0 // 这个模拟的现实环境的内网可以不用敲的,包括下面的outside ip address 1.1.1.1 255.255.255.255
ip nat inside
ip virtual-reassembly
!
interface FastEthernet0/0
no ip address //不用打地址
speed 100
full-duplex
pppoe enable group global
pppoe-client dial-pool-number 1 //拨号采用的接口配置号(我觉得跟虚模板差不多理解吧)!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Dialer1
mtu 1492
ip address negotiated //从server端获取地址用
ip nat outside
ip virtual-reassembly
encapsulation ppp
dialer pool 1 //跟上面f0/0关联上
ppp chap hostname ccie
ppp chap password 0 ccie
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 Dialer1
!
!
no ip http server
no ip http secure-server
ip nat inside source list 1 interface Dialer1 overload
!
access-list 1 permit any
!
control-plane
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
R1#
SW1、SW2 全部trunk
R2:
"
R2#show run
Building configuration...
Current configuration : 1229 bytes
!
version 12.4
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
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
multilink bundle-name authenticated
!
vpdn enable
!
vpdn-group pppoe // pppoe 是name
! Default L2TP VPDN group
accept-dialin
protocol pppoe //如注意点提到了要先打不然可能?没有pppoe 是有any 跟其他2个virtual-template 1
!
!
!
username ccie password 0 ccie
archive
log config
hidekeys
!
!
bba-group pppoe global //自动生成,应该在配置了pro pppoe后就会出提示了要用这
条命令来配置pppoe 我们不用配置什么东西
virtual-template 1
!
!
interface FastEthernet0/0
no ip address
speed 100
full-duplex
pppoe enable group global
!
interface FastEthernet0/1
ip address 12.0.0.1 255.0.0.0 //用来测试用
duplex auto
speed auto
!
interface Virtual-Template1 //最好改下ip mtu 1492 不然会分片
ip address 10.0.0.1 255.0.0.0
peer default ip address pool pppoe
ppp authentication chap
!
ip local pool pppoe 10.0.0.2 10.0.0.20
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
!
control-plane
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
password cisco
!
!
end
R2#
测试:。