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通了
很简单,这个实验就这样完成了。完成了两个不同路由之间的连接。
我们在第一个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通了
很简单,这个实验就这样完成了。完成了两个不同路由之间的连接。
相关文章推荐
- CCNP课堂练习一:连接两个不同的路由器
- CCNP课堂练习六:路由器热备份(HSRP)
- CCNP课堂练习三:vlan简单介绍及通过单交换机实现不同vlan间通讯
- CCNP课堂练习六:路由器热备份(HSRP) 推荐
- CCNP课堂练习三:vlan简单介绍及通过单交换机实现不同vlan间通讯 推荐
- 连接两个不同电脑上的oracle数据库
- CCNP课堂练习二:OSpf配置路由的虚拟链路
- 两个路由器连接 静态路由设置 共享上网图解
- 位运算笔试练习——判断两个整数(32位)的二进制表达有多少个位不同?
- ★实验9-3 1. 用不同的方案实现两个命令的连接,例如 “who|sort”、“ps aux | grep init” 源程序: #include <stdio.h> #include <sys
- ytu 1052: 写一函数,将两个字符串连接(水题,指针练习)
- linux 通过两个网卡,连接不同的不同的网段
- 两个路由器连接的连接方法
- 702 - 连接两个字符串中的不同字符
- 两个路由器无线连接教程
- CCNA课堂练习一:路由器链路备份功能
- 使用全外连接比较两个数据表中的不同记录
- TOMCAT下配置两个端口连接到两个不同目录
- CCNP课堂练习四:frame-relay traffic-shaping(帧中继流量整形)