- 论坛徽章:
- 0
|
配置PPP链路
实验环境:BENET上海办事处需要使用专线方式连入公司总部。办事处和总部之间个有一台路由器,之间通过PPP专线连接。总部采用CHAP人证方式对办事处进行认证,认证的用户名为benet,密码为best。总部办事处分配动态IP地址。
拓扑:
![]()
公司总部路由器配置:
R-bj(config)#inter s0/0
R-bj(config-if)#ip add 192.168.1.1 255.255.255.0
R-bj(config-if)#no shu
R-bj(config-if)#encapsulation ppp //设定封装协议为PPP
R-bj(config-if)#ppp authentication chap //设置认证方式为CHAP
R-bj(config-if)#ppp chap hostname pppserver //指定这个作为用户名发送
R-bj(config-if)#peer default ip add 192.168.1.2 //指定办事处动态分配所得的IP
R-bj(config-if)#exit
R-bj(config)#username benet password 0 best //添加被认证的用户名和密码
上海办事处路由配置:
R-sh(config)#interface s0/0
R-sh(config-if)#no shu
R-sh(config-if)#encapsulation ppp
R-sh(config-if)#
R-sh(config-if)#ppp authentication chap
R-sh(config-if)#ppp chap hostname benet //这里设置的用户名为总部添加的用户
R-sh(config-if)#ip add negotiated //设置为自动获取IP
R-sh(config-if)#exit
R-sh(config)#username pppserver password 0 best //这里没懂为什么要这样设置,只知道这样才会通
验证:
R-sh#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: //可以PING通
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/56/88 ms
R-sh#show inter s0/0
Serial0/0 is up, line protocol is up
Hardware is M4T
Internet address is 192.168.1.2/32
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation PPP, LCP Open
Open: CDPCP, IPCP, crc 16, loopback not set
Keepalive set (10 sec)
Restart-Delay is 0 secs
Last input 00:00:34, output 00:00:01, output hang never
Last clearing of "show interface" counters 00:16:03
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: weighted fair
Output queue: 0/1000/64/0 (size/max total/threshold/drops)
Conversations 0/1/256 (active/max active/max total)
Reserved Conversations 0/0 (allocated/max allocated)
Available Bandwidth 1158 kilobits/sec
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
372 packets input, 13151 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
341 packets output, 12133 bytes, 0 underruns
0 output errors, 0 collisions, 41 interface resets
0 output buffer failures, 0 output buffers swapped out
41 carrier transitions DCD=up DSR=up DTR=up RTS=up CTS=up
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/45419/showart_358545.html |
|