您的位置:首页 > 其它

CCNP课堂练习一:连接两个不同的路由器

2011-10-19 14:56 495 查看
我们知道两个不同产品的路由器,正常情况下是不能通讯的。今天我就不自量力了,小做一下这个实验,让两个路由器之间采用PPP协议、chap加密验证,实现路由器之间的连接。我这样举例吧!有两个路由器,都是思科的,第一个路由的IP是192.168.1.1 子网掩码为255.255.255.0,第二个路由的IP为192.168.1.2 子网掩码为255.255.255.0



我们在第一个cisco路由中输入以下命令:
Router>en
Router#conf t
Router(config)#host cisco-----------定义路由器名称
cisco(config)#enable secret ccnp----定义加密口令,我们把口令定义为CCNP
cisco(config)#username hw password ccnp---------发送对方的用户名与口令
cisco(config)#int s0/1---------端口号
cisco(config-if)#ip addr 192.168.1.1 255.255.255.0
cisco(config-if)#clock rate 64000-------配置时钟频率
cisco(config-if)#no shut
cisco(config-if)#encapsulation ppp---------封装点对点协议
cisco(config-if)#ppp authen chap----------采用chap加密验证
cisco(config-if)#ppp chap password cisco
cisco(config-if)#ppp chap password ccnp
cisco(config-if)#ppp pap sent-username cisco password ccnp---发送本地的用户名与口令
cisco(config-if)#exit
cisco(config)#exit

命令输入完成后,我们再在第二个路由中输入以下的命令:
Router>en
Router#conf t
Router(config)#host hw-----定义路由器名称
hw(config)#enable secret ccnp------定义加密口令,还定义为CCNP
hw(config)#username cisco password ccnp发送对方的用户名与口令
hw(config)#int s0/1------端口号
hw(config-if)#ip addr 192.168.1.2 255.255.255.0
hw(config-if)#clock rate 64000-----配置时钟频率
hw(config-if)#no shut
hw(config-if)#encapsulation ppp------封装点对点协议
hw(config-if)#ppp authen chap
hw(config-if)#ppp chap password hw
hw(config-if)#ppp chap password ccnp
hw(config-if)#ppp pap sent-username hw password ccnp------发送本地的用户名与口令
hw(config-if)#exit
hw(config)#exit

路由器配置完成后我们在Cisco路由器中输入“show ip interface”命令来验证一下是否成功。
cisco#show ip interface
Serial0/0 is administratively down, line protocol is down
Internet protocol processing disabled
Serial0/1 is up, line protocol is up
Internet address is 192.168.1.1/24
Broadcast address is 255.255.255.255
Address determined by setup command
Peer address is 192.168.1.2
MTU is 1500 bytes
Helper address is not set
Directed broadcast forwarding is disabled
Outgoing access list is not set
Inbound access list is not set
Proxy ARP is enabled
Local Proxy ARP is disabled
Security level is default
Split horizon is enabled
ICMP redirects are always sent
ICMP unreachables are always sent
ICMP mask replies are never sent
IP fast switching is enabled
IP fast switching . the same interface is enabled
IP Flow switching is disabled
IP CEF switching is enabled
--More—
Ok!没有问题,在路由二中输入我们可以看见第二路由的IP以及相关的信息。下面我们在相互PING一下,看看能不能PING通呢?首先用思科路由来ping华为,如图可以ping通



再用华为路由ping一下cisco路由,也没有问题。Ping通了



很简单,这个实验就这样完成了。完成了两个不同路由之间的连接。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: