找回密码
 请使用中文注册

手机号码,快捷登录

手机号码,快捷登录

查看: 99|回复: 0

静态路由配置实战,一分钟了解下

[复制链接]
阅读字号:

1374

主题

50

回帖

2万

积分

超级版主

积分
27551
发表于 2023-5-12 18:39:23 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?请使用中文注册

×
一、静态路由
静态路由是这样的一种路由,它通过人工输入到路由选择表中。二、静态路由优点
1、不需要动态路由选择协议,这减少了路由器的日常开销。
2、在小型互连网络上很容易配置。
3、可以控制路由选择。三、静态路由配置 182917f06rfjwaqg66hez8.png
五台路由器,划分成三个网段;要求使用静态路由协议,使得路由器之间能够互相通信
帧中继仅了解即可,不作为掌握技术。重点掌握静态路由配置。
1、R1配置:
R1#sh run
Building configuration...
Current configuration : 743 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R1
!
!
ip subnet-zero
no ip domain-lookup
!
!
!
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Ethernet0
ip address 172.16.1.1 255.255.255.0
!
interface Ethernet1
no ip address
shutdown
!
interface Serial0
no ip address
shutdown
!
interface Serial1
ip address 172.16.2.1 255.255.255.0
encapsulation frame-relay
frame-relay map ip 172.16.2.3 103 broadcast
frame-relay map ip 172.16.2.5 105 broadcast
no frame-relay inverse-arp
!
ip classless
ip route 172.16.3.0 255.255.255.0 172.16.2.3
no ip http server
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
End
R2#sh run
Building configuration...
Current configuration:
!
version 12.0
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R2
!
!
ip subnet-zero
no ip domain-lookup
!
!
!
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
no ip directed-broadcast
!
interface Ethernet0
ip address 172.16.1.2 255.255.255.0
no ip directed-broadcast
!
interface Ethernet1
no ip address
no ip directed-broadcast
shutdown
!
interface Serial0
no ip address
no ip directed-broadcast
shutdown
!
interface Serial1
no ip address
no ip directed-broadcast
shutdown
!
no ip http server
ip classless
ip route 172.16.2.0 255.255.255.0 172.16.1.1
ip route 172.16.3.0 255.255.255.0 172.16.1.1
!
!
line con 0
exec-timeout 0 0
logging synchronous
transport input none
line aux 0
line vty 0 4
!
End
R3#sh run
Building configuration...
Current configuration:
!
version 12.0
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R3
!
!
!
!
!
!
ip subnet-zero
no ip domain-lookup
!
cns event-service server
!
!
!
!
!
interface Loopback0
ip address 3.3.3.3 255.255.255.255
no ip directed-broadcast
!
interface Ethernet0
no ip address
no ip directed-broadcast
shutdown
!
interface Serial0
ip address 172.16.3.3 255.255.255.0
no ip directed-broadcast
encapsulation ppp
!
interface Serial1
ip address 172.16.2.3 255.255.255.0
no ip directed-broadcast
encapsulation frame-relay
frame-relay map ip 172.16.2.5 301 broadcast
frame-relay map ip 172.16.2.1 301 broadcast
no frame-relay inverse-arp
!
ip classless
ip route 172.16.1.0 255.255.255.0 172.16.2.1
no ip http server
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
transport input none
line aux 0
line vty 0 4
!
End
R4#sh run
Building configuration...
Current configuration : 798 bytes
!
version 12.1
no service single-slot-reload-enable
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R4
!
logging rate-limit console 10 except errors
!
ip subnet-zero
no ip finger
no ip domain-lookup
!
cns event-service server
!
!
!
!
!
interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
interface Ethernet0
no ip address
shutdown
!
interface Serial0
no ip address
shutdown
!
interface Serial1
ip address 172.16.3.4 255.255.255.0
encapsulation ppp
clockrate 64000
!
ip kerberos source-interface any
ip classless
ip route 172.16.1.0 255.255.255.0 172.16.3.3
ip route 172.16.2.0 255.255.255.0 172.16.3.3
no ip http server
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
transport input none
line aux 0
line vty 0 4
!
End
R5#sh run
Building configuration...
Current configuration:
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R5
!
!
!
!
!
!
ip subnet-zero
no ip domain-lookup
!
cns event-service server
!
!
!
interface Loopback0
ip address 5.5.5.5 255.255.255.255
!
interface Ethernet0
no ip address
shutdown
!
interface Serial0
no ip address
shutdown
!
interface Serial1
ip address 172.16.2.5 255.255.255.0
encapsulation frame-relay
frame-relay map ip 172.16.2.3 501 broadcast
frame-relay map ip 172.16.2.1 501 broadcast
no frame-relay inverse-arp
!
ip classless
ip route 172.16.1.0 255.255.255.0 172.16.2.1
ip route 172.16.3.0 255.255.255.0 172.16.2.3
no ip http server
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
transport input none
line aux 0
line vty 0 4
总结:静态路由配置非常简单,就像地图一样需要管理员手动进行绘制,路由目的地及下一跳,可以理解为到达目的地就必须要到达下一站才能逐跳达到。经过的每一跳路由器都都必须有到达目标的路由和下一跳地址。
您需要登录后才可以回帖 登录 | 请使用中文注册

本版积分规则

QQ|Archiver|手机版|家电维修论坛 ( 蜀ICP备19011473号-4 川公网安备51102502000164号 )

GMT+8, 2025-6-24 14:43 , Processed in 0.205562 second(s), 24 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表