码迷,mamicode.com
首页 > 其他好文 > 详细

静态路由

时间:2015-03-01 13:17:48      阅读:128      评论:0      收藏:0      [点我收藏+]

标签:

静态路由:R1 ip地址192.168.1.1,R2 ip地址192.168.1.2,R2回环接口2.2.2.2
R2#conf t
R2(config)#int s0/0
R2(config-if)#ip add 192.168.1.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#int loopback 0
R2(config-if)#ip add 2.2.2.2 255.255.255.0
R2(config-if)#no shut

R1#conf t
R1(config)#int s0/0
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#no shut
R1#ping 2.2.2.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R1#ping 192.168.1.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/70/132 ms
R1(config)#ip route 2.2.2.0 255.255.255.0 s0/0(本路由器的出接口)
或者R1(config)#ip route 2.2.2.0(目的网段地址) 255.255.255.0(目的网段掩码)192.168.1.2(下一跳路由地址)
R1(config)#end
R1#ping 2.2.2.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/88/128 ms

静态路由

标签:

原文地址:http://blog.csdn.net/shienquan/article/details/44001707

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!