访问手机版  

网络工程师培训选超级网工

招聘|合作 登陆|注册

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

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

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

    <aCCNP课堂练习一:连接两个不同的路由器 src="http://www.wangluopx.cn/tech/UploadFiles_7749/200909/20090928120721438.jpeg">

      我们在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通

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

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

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

      很简单,这个实验就这样完成了。完成了两个不同路由之间的连接。