尧图网络科技YAOTU DIGITAL 获取报价
获取报价
首页 / 资讯中心 / 文章详情

Cisco路由-静态路由

发布时间:2026/9/19 4:46:03

资讯中心
01
ARTICLE

Cisco路由-静态路由

Cisco路由-静态路由
# 概述静态路由(Static Routing)是由网络管理员手动配置的固定路由用于指定数据包传输路径不会自动更新或学习网络变化。适用于网络规模小、拓扑稳定。优点简单、可靠、安全不占用路由器CPU计算路径没有协议开销。缺点缺乏灵活性链路或设备故障时必须由管理员手动修改无法自动绕过。# 架构图# 配置命令一、基础信息配置R1配置R1#conf t Enter configuration commands, one per line. End with CNTL/Z. R1(config)#int s0/0 R1(config-if)#no sh R1(config-if)#ip add 12.1.1.1 255.255.255.0 R1(config-if)#int f1/0 R1(config-if)#no sh R1(config-if)#ip add 192.168.1.254 255.255.255.0 R1(config-if)#endR2配置R2#conf t Enter configuration commands, one per line. End with CNTL/Z. R2(config)#int s0/0 R2(config-if)#no sh R2(config-if)#ip add 12.1.1.2 255.255.255.0 R2(config-if)#int f1/0 R2(config-if)#no sh R2(config-if)#ip add 192.168.2.254 255.255.255.0 R2(config-if)#endPC1配置PC1#conf t Enter configuration commands, one per line. End with CNTL/Z. PC1(config)#int f0/0 PC1(config-if)#no shu PC1(config-if)#ip add 192.168.1.1 255.255.255.0 PC1(config-if)#end PC1(config)#no ip routing PC1(config)#ip default-gateway 192.168.1.254 PC1(config)#endPC2配置PC2#conf t Enter configuration commands, one per line. End with CNTL/Z. PC2(config)#int f0/0 PC2(config-if)#ip add 192.168.2.1 255.255.255.0 PC2(config-if)#no shu PC2(config-if)#end PC2(config)#no ip routing PC2(config)#ip default-gateway 192.168.2.254 PC2(config)#end二、配置静态路由方式一R1#conf t Enter configuration commands, one per line. End with CNTL/Z. R1(config)#ip route 192.168.2.0 255.255.255.0 s0/0 R1(config)#end --- R2#conf t Enter configuration commands, one per line. End with CNTL/Z. R2(config)#ip route 192.168.1.0 255.255.255.0 s0/0 R2(config)#end方式二R1#conf t Enter configuration commands, one per line. End with CNTL/Z. R1(config)#no ip route 192.168.2.0 255.255.255.0 s0/0 R1(config)#end --- R2#conf t Enter configuration commands, one per line. End with CNTL/Z. R2(config)#no ip route 192.168.1.0 255.255.255.0 s0/0 R2(config)#end三、测试PC1#ping 192.168.2.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds: ..!!! Success rate is 60 percent (3/5), round-trip min/avg/max 132/160/184 ms
02
RELATED NEWS

相关资讯

更多网站建设与数字化升级内容

03
WHY YAOTU

想打造同款高转化官网?

懂行业、懂生意,从建站到增长一站式陪跑

场景化定制

不做模板站,围绕你的业务场景量身设计,小众不撞款。

营销型架构

以转化目标组织内容与路径,让官网真正带来询盘。

全周期服务

设计、开发、运营、运维一体,上线只是开始。

免费获取你的建站方案

留下需求,专属顾问 24 小时内为你输出方案建议。