MP配置举例Word下载.docx
《MP配置举例Word下载.docx》由会员分享,可在线阅读,更多相关《MP配置举例Word下载.docx(18页珍藏版)》请在冰点文库上搜索。
RouterA>
system-view
[RouterA]local-userrouter-b
[RouterA-luser-router-b]passwordsimplerouter-b
[RouterA-luser-router-b]service-typeppp
[RouterA-luser-router-b]quit
[RouterA]local-userrouter-c
[RouterA-luser-router-c]passwordsimplerouter-c
[RouterA-luser-router-c]service-typeppp
[RouterA-luser-router-c]quit
#为这两个用户指定虚拟接口模板。
[RouterA]pppmpuserrouter-bbindvirtual-template1
[RouterA]pppmpuserrouter-cbindvirtual-template2
#配置虚拟接口模板。
[RouterA]interfacevirtual-template1
[RouterA-Virtual-Template1]ipaddress202.38.166.1255.255.255.0
[RouterA-Virtual-Template1]quit
[RouterA]interfacevirtual-template2
[RouterA-Virtual-Template2]ipaddress202.38.168.1255.255.255.0
[RouterA-Virtual-Template2]quit
#将接口Serial2/0:
4加入MP通道,以Serial2/0:
1为例,其它接口作同样配置。
[RouterA]interfaceserial2/0:
1
[RouterA-Serial2/0:
1]link-protocolppp
1]pppmp
1]pppauthentication-modepapdomainsystem
1]ppppaplocal-userrouter-apasswordsimplerouter-a
1]quit
#在系统缺省的ISP域system下,配置PPP用户使用本地认证方案。
[RouterA]domainsystem
[RouterA-isp-system]authenticationppplocal
(2)配置RouterB
#为RouterA增加一个用户。
RouterB>
[RouterB]local-userrouter-a
[RouterB-luser-router-a]passwordsimplerouter-a
[RouterB-luser-router-a]service-typeppp
[RouterB-luser-router-a]quit
#为这个用户指定虚拟接口模板,将使用该模板的NCP信息进行PPP协商。
[RouterB]pppmpuserrouter-abindvirtual-template1
#配置虚拟接口模板的工作参数。
[RouterB]interfacevirtual-template1
[RouterB-Virtual-Template1]ipaddress202.38.166.2255.255.255.0
[RouterB-Virtual-Template1]quit
2加入MP通道,我们以Serial2/0:
[RouterB]interfaceserial2/0:
[RouterB-Serial2/0:
1]ppppaplocal-userrouter-bpasswordsimplerouter-b
[RouterB]domainsystem
[RouterB-isp-system]authenticationppplocal
(3)配置RouterC
RouterC>
[RouterC]local-userrouter-a
[RouterC-luser-router-a]passwordsimplerouter-a
[RouterC-luser-router-a]service-typeppp
[RouterC-luser-router-a]quit
[RouterC]pppmpuserrouter-abindvirtual-template1
[RouterC]interfacevirtual-template1
[RouterC-Virtual-Template1]ipaddress202.38.168.2255.255.255.0
[RouterC-Virtual-Template1]quit
[RouterC]interfaceserial2/0:
[RouterC-Serial2/0:
1]ppppaplocal-userrouter-cpasswordsimplerouter-c
[RouterC]domainsystem
[RouterC-isp-system]authenticationppplocal
CHAP单向验证举例
在图中,要求设备RouterA用CHAP方式验证设备Router
B。
2.配置方法一(验证方配置用户名时以CHAP方式认证对端)
#为RouterB创建本地用户。
[RouterA]local-useruserb
#设置本地用户的密码。
[RouterA-luser-userb]passwordsimplehello
#设置本地用户的服务类型为PPP。
[RouterA-luser-userb]service-typeppp
[RouterA-luser-userb]quit
#配置接口封装的链路层协议为PPP。
[RouterA]interfaceserial2/0
[RouterA-Serial2/0]link-protocolppp
#配置采用CHAP验证时RouterA的用户名。
[RouterA-Serial2/0]pppchapuserusera
#配置本地验证RouterB的方式为CHAP。
[RouterA-Serial2/0]pppauthentication-modechapdomainsystem
#配置接口的IP地址。
[RouterA-Serial2/0]ipaddress200.1.1.116
[RouterA-Serial2/0]quit
#为RouterA创建本地用户。
[RouterB]local-userusera
[RouterB-luser-usera]passwordsimplehello
[RouterB-luser-usera]service-typeppp
[RouterB-luser-usera]quit
[RouterB]interfaceserial2/0
[RouterB-Serial2/0]link-protocolppp
#配置采用CHAP验证时RouterB的用户名。
[RouterB-Serial2/0]pppchapuseruserb
[RouterB-Serial2/0]ipaddress200.1.1.216
3.配置方法二(验证方没有配置用户名时以CHAP方式认证对端)
#设置缺省的CHAP验证密码。
[RouterB-Serial2/0]pppchappasswordsimplehello
4.验证配置结果
通过查看displayinterfaceserial2/0信息,接口的物理层和链路层的状态都是up状态,并且PPP的LCP和IPCP都是opened状态,说明链路的PPP协商已经成功,并且RouterA和RouterB可以互相ping通对方。
[RouterB-Serial2/0]displayinterfaceserial2/0
Serial2/0currentstate:
UP
Lineprotocolcurrentstate:
Description:
Serial2/0Interface
TheMaximumTransmitUnitis1500,Holdtimeris10(sec)
InternetAddressis200.1.1.2/16Primary
LinklayerprotocolisPPP
LCPopened,IPCPopened
Outputqueue:
(Urgentqueuing:
Size/Length/Discards)0/100/0
(Protocolqueuing:
Size/Length/Discards)0/500/0
(FIFOqueuing:
Size/Length/Discards)0/75/0
InterfaceisV35
206packetsinput,2496bytes
206packetsoutput,2492bytes
[RouterB-Serial2/0]ping200.1.1.1
PING200.1.1.1:
56databytes,pressCTRL_Ctobreak
Replyfrom200.1.1.1:
bytes=56Sequence=1ttl=255time=103ms
bytes=56Sequence=2ttl=255time=1ms
bytes=56Sequence=3ttl=255time=1ms
bytes=56Sequence=4ttl=255time=1ms
bytes=56Sequence=5ttl=255time=10ms
---200.1.1.1pingstatistics---
5packet(s)transmitted
5packet(s)received
0.00%packetloss
round-tripmin/avg/max=1/23/103ms
PAP单向验证举例
如图1-5所示,RouterA和RouterB之间用接口Serial2/0互连,要求RouterA用PAP方式验证RouterB,RouterB不需要对RouterA进行验证。
图1-5PAP验证、CHAP验证举例组网图
[RouterA-luser-userb]passwordsimplepassb
#配置本地验证RouterB的方式为PAP。
[RouterA-Serial2/0]pppauthentication-modepapdomainsystem
#配置本地被RouterA以PAP方式验证时RouterB发送的PAP用户名和密码。
[RouterB-Serial2/0]ppppaplocal-useruserbpasswordsimplepassb
(3)验证配置结果
动态分配地址典型配置举例
●作为DHCP服务器的RouterA为网段10.1.1.0/24中的客户端动态分配IP地址,该地址池网段分为两个子网网段:
10.1.1.0/25和10.1.1.128/25;
●RouterA的两个以太网接口,Ethernet1/1和Ethernet1/2的地址分别为10.1.1.1/25和10.1.1.129/25;
●10.1.1.0/25网段内的地址租用期限为10天12小时,域名后缀为,DNS服务器地址为10.1.1.2/25,WINS服务器地址为10.1.1.4/25,网关的地址为10.1.1.126/25;
●10.1.1.128/25网段内的地址租用期限为5天,域名后缀为,DNS服务器地址为10.1.1.2/25,无WINS服务器地址,网关的地址为10.1.1.254/25。
●10.1.1.0/25网段与10.1.1.128/25网段的域名后缀、DNS服务器地址相同,可以只配置10.1.1.0/24网段的域名后缀和DNS服务器地址,10.1.1.0/25网段与10.1.1.128/25网段继承10.1.1.0/24网段的配置。
图2-2DHCP组网图
(1)配置各接口的IP地址(略)
(2)配置DHCP服务
#使能DHCP服务。
[RouterA]dhcpenable
#配置接口Ethernet1/1和Ethernet1/2工作在DHCP服务器模式。
[RouterA]interfaceethernet1/1
[RouterA-Ethernet1/1]dhcpselectserverglobal-pool
[RouterA-Ethernet1/1]quit
[RouterA]interfaceethernet1/2
[RouterA-Ethernet1/2]dhcpselectserverglobal-pool
[RouterA-Ethernet1/2]quit
#配置不参与自动分配的IP地址(DNS服务器、WINS服务器和网关地址)。
[RouterA]dhcp