当前位置:文档之家› PPP协议配置实例

PPP协议配置实例

PPP协议配置

这是一个PPP配置-cisco协议的一个实例,在我的博客上首次发表原创教程,进入话题吧,先看拓扑图:

目标:AB能正常通讯,BC不能正常通讯

主要命令:config)#username Router-A password homehui

Router-A是对方的名字(hostname),homehui是密码,互相验证的双方密码要相同.

一、配置路由

Router-A:

Router>

Router>en

Router#conf t

Router(config)#hostname Router-A

Router-A(config)#int s0/0

Router-A(config-if)#ip add 10.10.1.2 255.255.255.0

Router-A(config-if)#encap ppp

Router-A(config-if)#ppp authentication chap

Router-A(config-if)#no shut

Router-A(config-if)#exit

Router-A(config)#username Router-B password homehui Router-A(config)#end

Router-A#

Router-B:

Press RETURN to get started!

Router>

Router>en

Router#conf t

Router(config)#hostname Router-B

Router-B(config)#int s0/0

Router-B(config-if)#ip add 10.10.1.1 255.255.255.0 Router-B(config-if)#encapsulation ppp

Router-B(config-if)#ppp authentication chap

Router-B(config-if)#no shut

Router-B(config-if)#

Router-B(config)#username Router-A password homehui Router-B(config)#int s0/1

Router-B(config-if)#ip add 172.16.1.1 255.255.0.0 Router-B(config-if)#encapsulation ppp

Router-B(config-if)#ppp authentication chap

Router-B(config-if)#no shut

Router-B(config-if)#exit

Router-B(config)#username Router-C password netemu

Router-B(config)#end

Router-C:

Router>en

Router#conf t

Router(config)#hostname Router-C

Router-C(config)#int s0/1

Router-C(config-if)#ip add 172.16.1.2 255.255.0.0

Router-C(config-if)#encapsulation ppp

Router-C(config-if)#ppp authentication chap

Router-C(config-if)#no shut

Router-C(config-if)#exit

Router-C(config)#username Router-D password netemu //用户名故意配置Router-D. Router-C(config)#end

二、测试路由

Router-A:

Router-A#ping 10.10.1.1

Type escape sequence to abort.

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

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 72/88/120 ms Router-B:

Router-B#ping 10.10.1.2 (通)

Type escape sequence to abort.

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

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 28/77/120 ms Router-C#ping 172.16.1.2 (不通)

Type escape sequence to abort.

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

Success rate is 0 percent (0/5)

Router-C:

Router-C#ping 172.16.1.1(不通)

Type escape sequence to abort.

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

Success rate is 0 percent (0/5)

相关主题