静态路由的实现
来源:互联网 发布:淘宝国际版叫什么名字 编辑:程序博客网 时间:2024/04/29 18:14
静态路由的实现
如下图:
配置Router1的fa口ip如下:
Router>en
Router#
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int f0/0
Router(config-if)#ip add 192.168.1.100 255.255.255.0
Router(config-if)#no sh
%LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up ^
Router(config-if)#end
下面配置S口的ip如下:
Router(config)#int s0/0
Router(config-if)# ip add 192.168.3.1 255.255.255.0
Router(config-if)#no sh
%LINK-3-UPDOWN: Interface Serial0/0, changed state to up
%LINK-3-UPDOWN: Interface Serial0/0, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to down
Router(config-if)#clock rate 6400
%LINK-3-UPDOWN: Interface Serial0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
Router(config-if)#end
同理按照上面的方法配置Router2的相应fa口和s口,相应的ip改一下就可以了
完成以后pc1可以ping 通Router1的fa口和s口
C:>ping 192.168.1.100
Pinging 192.168.1.100 with 32 bytes of data:
Reply from 192.168.1.100: bytes=32 time=60ms TTL=241
Reply from 192.168.1.100: bytes=32 time=60ms TTL=241
Reply from 192.168.1.100: bytes=32 time=60ms TTL=241
Reply from 192.168.1.100: bytes=32 time=60ms TTL=241
Reply from 192.168.1.100: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.1.100: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 50ms, Maximum = 60ms, Average = 55ms
C:>ping 192.168.3.1
Pinging 192.168.3.1 with 32 bytes of data:
Reply from 192.168.3.1: bytes=32 time=60ms TTL=241
Reply from 192.168.3.1: bytes=32 time=60ms TTL=241
Reply from 192.168.3.1: bytes=32 time=60ms TTL=241
Reply from 192.168.3.1: bytes=32 time=60ms TTL=241
Reply from 192.168.3.1: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.3.1: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 50ms, Maximum = 60ms, Average = 55ms
Pc2可以ping 通Router2的fa口和s口:
C:>ping 192.168.2.100
Pinging 192.168.2.100 with 32 bytes of data:
Reply from 192.168.2.100: bytes=32 time=60ms TTL=241
Reply from 192.168.2.100: bytes=32 time=60ms TTL=241
Reply from 192.168.2.100: bytes=32 time=60ms TTL=241
Reply from 192.168.2.100: bytes=32 time=60ms TTL=241
Reply from 192.168.2.100: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.2.100: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 50ms, Maximum = 60ms, Average = 55ms
C:>ping 192.168.3.2
Pinging 192.168.3.2 with 32 bytes of data:
Reply from 192.168.3.2: bytes=32 time=60ms TTL=241
Reply from 192.168.3.2: bytes=32 time=60ms TTL=241
Reply from 192.168.3.2: bytes=32 time=60ms TTL=241
Reply from 192.168.3.2: bytes=32 time=60ms TTL=241
Reply from 192.168.3.2: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.3.2: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 50ms, Maximum = 60ms, Average = 55ms
但是pc1 ping不通pc2
C:>ping 192.168.1.2
Pinging 192.168.1.2 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 192.168.1.2:
Packets: Sent = 5, Received = 0, Lost = 5 (100% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
现在实现PC1 PING PC2的设置
选中Router1,把pc2的ip加到router1的路由表中 Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int s0/0
Router(config-if)#ip route 192.168.2.0 255.255.255.0 192.168.3.1
Router(config)#end
选中Router2,把pc1的ip加到router2的路由表中
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int s0/0
Router(config-if)#ip route 192.168.1.0 255.255.255.0 192.168.3.2
Router(config)#end
Pc1 ping router2的s口
C:>ping 192.168.3.2
Pinging 192.168.3.2 with 32 bytes of data:
Reply from 192.168.3.2: bytes=32 time=60ms TTL=241
Reply from 192.168.3.2: bytes=32 time=60ms TTL=241
Reply from 192.168.3.2: bytes=32 time=60ms TTL=241
Reply from 192.168.3.2: bytes=32 time=60ms TTL=241
Reply from 192.168.3.2: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.3.2: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 50ms, Maximum = 60ms, Average = 55ms
Pc1 ping pc2成功
C:>ping 192.168.2.2
Pinging 192.168.2.2 with 32 bytes of data:
Reply from 192.168.2.2: bytes=32 time=60ms TTL=241
Reply from 192.168.2.2: bytes=32 time=60ms TTL=241
Reply from 192.168.2.2: bytes=32 time=60ms TTL=241
Reply from 192.168.2.2: bytes=32 time=60ms TTL=241
Reply from 192.168.2.2: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.2.2: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 50ms, Maximum = 60ms, Average = 55ms
Pc2 ping pc1 成功
C:>ping 192.168.1.2
Pinging 192.168.1.2 with 32 bytes of data:
Reply from 192.168.1.2: bytes=32 time=60ms TTL=241
Reply from 192.168.1.2: bytes=32 time=60ms TTL=241
Reply from 192.168.1.2: bytes=32 time=60ms TTL=241
Reply from 192.168.1.2: bytes=32 time=60ms TTL=241
Reply from 192.168.1.2: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.1.2: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 50ms, Maximum = 60ms, Average = 55ms
实验到此为止结束
- 静态路由的实现
- 小结 路由静态实现
- 静态路由和静态路由的关系
- 静态路由的配置
- 静态路由的配置
- 静态路由的配置
- Windows2000的静态路由
- 静态路由的设置
- 静态路由的配置
- 静态路由的种类
- 静态路由的配置
- 平台SEMQ静态路由实现
- 静态路由解决双外卡,PC做路由器的实现
- route-map实现简单的策略路由+浮动静态路由的概念!
- 静态路由和动态路由的区别
- 静态路由默认路由的配置
- 静态路由与默认路由的配置
- 静态路由及浮动路由的配置
- 学习VC++深入浅出——ADO的使用
- Eclipse的基本使用
- Quartz任务调度快速入门
- 总结JSTL中字符串处理函数
- 解决weblogic9.2下JSP预编译出错停止问题
- 静态路由的实现
- Excel 中如何以多列数据为准则进行查询
- TripleDES加密、解密算法
- C语言中可变参数的用法
- 关于构建RasterPyramids
- 转载一个SAP下载工具代码,仅供学习
- 自己编程请求修改传递
- BASIS--SAP RECOMMANDED SYSTEM MONITORING TASKS
- Cookie对象