路由技术 交换技术
   无线技术 综合技术 解决方案
   网络管理 网络协议 网络设备
   考试认证 juniper专题
3G纵览 数据通信
   光通信 智能网 WIMAX VOIP
   IPTV NGN
安全产品 病毒防治
    防火墙 安全方案 IDS/IPS    DOS/DDOS
存储技术 存储设备
   存储方案 服务器专区

Google
 
作者: 发布时间:2007-09-29 10:47:55 来源:ciscohuawei.com
 

环境:两台 2500 系列路由器通过串口相连。

要求:在 R1 和 R2 上启用静态路由,使两端网络能够互通。

b1d77b891eec00ac482e936c5cb08e2d.jpg

步骤一、基本配置

Router>

Router>enable

Router#config terminal

Router(config)#hostname R1

R1(config)# no ip domain-lookup

R1(config)#line console 0

R1(config-line)# logging synchronous

R1(config-line)# exec-timeout 0 0

R1(config-line)#exit

步骤二 : 接口配置

R1 的配置:

R1(config)#interface s0

R1(config-if)# ip address 30.1.1.1 255.255.255.0

R1(config-if)# clock rate 64000 à 时钟速率端

R1(config-if)#no shutdown

R1(config-if)#interface loopback 0

R1(config-if)#ip address 10.1.1.1 255.255.255.0

R1(config-if)#

R2 的配置:

Router(config)#hostname R2

R2(config)#interface s1

R2(config-if)#ip address 30.1.1.2 255.255.255.0

R2(config-if)#no shutdown

R2(config-if)#interface loopback 0

R2(config-if)#ip address 20.1.1.1 255.255.255.0

R2(config-if)#exit

R2(config)#

步骤三、指定静态路由

R1(config)#

R1(config)# ip route 20.1.1.0 255.255.255.0 serial 0 à 指定静态路由

R2(config)#

R2(config)# ip route 10.1.1.0 255.255.255.0 30.1.1.1 à 指定静态路由

步骤四、作 ping 测试

R1#ping

Protocol [ip]:

Target IP address: 20.1.1.1 à 目的地址

Extended commands [n]: y à 是否用扩展命令

Source address or interface: 10.1.1.1 à 源地址

!!!!! à 显示已通

步骤五、显示静态路由条目

R1# show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

* - candidate default, U - per-user static route, o - ODR

P - periodic downloaded static route

Gateway of last resort is not set

20.0.0.0/24 is subnetted, 1 subnets

S 20.1.1.0 is directly connected, Serial0 à 静态路由条目

10.0.0.0/24 is subnetted, 1 subnets

C 10.1.1.0 is directly connected, Loopback0

30.0.0.0/24 is subnetted, 1 subnets

C 30.1.1.0 is directly connected, Serial0

步骤六、显示当前配置

R1 的配置结果:

R1#show running-config

!

hostname R1

no ip domain-lookup

!

interface Loopback0

ip address 10.1.1.1 255.255.255.0

!

interface Serial0

ip address 30.1.1.1 255.255.255.0

clockrate 64000

!

ip route 20.1.1.0 255.255.255.0 Serial0

!

line con 0

exec-timeout 0 0

logging synchronous

transport input none

end

R2 的配置结果:

R2#show running-config

!

hostname R2

!

no ip domain-lookup

!

interface Loopback0

ip address 20.1.1.1 255.255.255.0

!

interface Serial1

ip address 30.1.1.2 255.255.255.0

!

ip route 10.1.1.0 255.255.255.0 30.1.1.1

!

line con 0

exec-timeout 0 0

logging synchronous

!

end

※ 相关信息
无相关信息
 

  最新文章

·CCNA认证英文词汇中文解析
·CCNA640-802考试大纲
·CCNA管理手册:路由基础知
·CCNA——我的学习和考试感
·ccna实验—配置ISDN DDR
·ccna实验—背对背帧中继
·ccna实验—帧中继链路上运
·ccna实验—静态、动态NAT
·ccna实验—访问列表与tel
·ccna实验—RIPv1与EIGRP在
 

  热门文章

·CCNA最新考题 12.17
·Cisco常用单词(3)
·ccna实验—静态、动态NAT
·Cisco常用单词(2)
·ccna实验—配置STP与VTP
·CCNA学习:OSPF从入门到精
·CCNA常用学习书籍
·ccna实验—访问列表与tel
·ccna实验—帧中继链路上运
·ccna实验—RIP路由协议
 
 

 

Copyright ? 2006 All rights reserved