CCNA实验(2) -- Static Route

本文详细介绍了静态路由的基本配置方法,包括普通静态路由、静态汇总路由、默认静态路由、选择静态路由及浮动静态路由等五种类型,并通过具体实例展示了不同场景下的配置步骤。

1.静态路由
R1:ip route 22.1.1.0 255.255.255.0 12.1.1.2

2.静态汇总路由
R1:ip route 22.1.0.0 255.255.0.0 12.1.1.2

3.默认静态路由
R1:ip route 0.0.0.0 0.0.0.0 12.1.1.2

4.选择静态路由
R1:
ip route 33.1.1.0 255.255.255.0 12.1.1.2
ip route 33.1.1.1 255.255.255.255 13.1.1.3

5.浮动静态路由
R1:ip route 33.1.1.0 255.255.255.0 13.1.1.3 10

enable
conf t
no ip do lo
enable pass cisco
line con 0
logg sync
exec-t 0 0
line vty 0 4
pass cisco
logg sync
exit
host


1.静态路由
-------------------------------------------------------------------------

-------------------------------------------------------------------------
R1:
int f0/0
ip add 12.1.1.1 255.255.255.0
no shut
exit
int l0
ip add 11.1.1.1 255.255.255.0
no shut
exit

R2:
int f0/0
ip add 12.1.1.2 255.255.255.0
no shut
exit
int f1/0
ip add 23.1.1.2 255.255.255.0
no shut
exit
int l0
ip add 22.1.1.1 255.255.255.0
no shut
exit

R3:
int f0/0
ip add 23.1.1.3 255.255.255.0
no shut
exit
int l0
ip add 33.1.1.1 255.255.255.0
no shut
exit

-------------------------------------------------------------------
R1:
ip route 22.1.1.0 255.255.255.0 12.1.1.2
ip route 23.1.1.0 255.255.255.0 12.1.1.2
ip route 33.1.1.0 255.255.255.0 12.1.1.2

R2:
ip route 11.1.1.0 255.255.255.0 12.1.1.1
ip route 33.1.1.0 255.255.255.0 23.1.1.3

R3:
ip route 11.1.1.0 255.255.255.0 23.1.1.2
ip route 22.1.1.0 255.255.255.0 23.1.1.2
ip route 12.1.1.0 255.255.255.0 23.1.1.2

2.静态汇总路由
-----------------------------------------------------
R2:
int l1
ip add 22.1.0.1 255.255.255.0
no shut
exit
int l2
ip add 22.1.2.1 255.255.255.0
no shut
exit
int l3
ip add 22.1.3.1 255.255.255.0
no shut
exit

R1:
ip route 22.1.0.0 255.255.0.0 12.1.1.2

R3:
ip route 22.1.0.0 255.255.0.0 23.1.1.2

3.默认静态路由
----------------------------------------------------
R1:
no ip route 22.1.0.0 255.255.0.0 12.1.1.2
ip route 0.0.0.0 0.0.0.0 12.1.1.2

R3:
no ip route 22.1.0.0 255.255.0.0 23.1.1.2
ip route 0.0.0.0 0.0.0.0 23.1.1.2

4.选择静态路由
----------------------------------------------------------------------

-----------------------------------------------------------------------
R1:
int f0/0
ip add 13.1.1.1 255.255.255.0
no shut
exit
int f1/0
ip add 12.1.1.1 255.255.255.0
no shut
exit

R2:
int f0/0
ip add 12.1.1.2 255.255.255.0
no shut
exit
int f1/0
ip add 23.1.1.2 255.255.255.0
no shut
exit

R3:
int f0/0
ip add 23.1.1.3 255.255.255.0
no shut
exit
int f1/0
ip add 13.1.1.3 255.255.255.0
no shut
exit

int l0
ip add 33.1.1.1 255.255.255.0
ip add 33.1.1.2 255.255.255.0 secondary
ip add 33.1.1.3 255.255.255.0 secondary
ip add 33.1.1.4 255.255.255.0 secondary
exit

----------------------------------------------------
R1:
ip route 33.1.1.0 255.255.255.0 12.1.1.2
ip route 33.1.1.1 255.255.255.255 13.1.1.3

R2:
ip route 33.1.1.0 255.255.255.0 23.1.1.3

R3:
ip route 12.1.1.0 255.255.255.0 23.1.1.2

R1:
end
show ip route
trace 33.1.1.1
trace 33.1.1.2

5.浮动静态路由
-----------------------------------------------------
R1:
ip route 33.1.1.0 255.255.255.0 13.1.1.3 10

end
show ip route
conf t

int f1/0
shut
exit

end
show ip route
conf t

转载于:https://www.cnblogs.com/thlzhf/p/3144468.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值