cisco路由器基本实验之一 静态路由的配置(Boson NetSim)

简介:
       花了快一个月的时间之后,我的Linux服务器建设学习算是小告了一个段落了。现在开始要回到windows里面利用Boson NetSim这个cisco实验模拟器来加深对路由交换的配置学习了。好在上学期上课的时候学了一些路由器的知识,在实验室也做过一些实验,但大都比较简单,反正我觉得没学到什么高深的网络配置知识。趁着暑假,自己来做做模拟实验,也可以学到很多东西,今天是第一个比较简单的实验,但由于以前没涉及到某些方面,这样一个简单的实验还是花了我不少的时间的,呵呵,下面来看这个实验:
       如上的拓扑所示,(IP地址是我自己确定的,并且用ps写上的,这样看得比较清楚),现在需要完成的就是让HostA能和HostB互相ping通,我在配置过程中遇到了一些问题,我都把容易出错的地方注释在下面的配置语句后面了,希望那些跟我一样在网络配置方面还处于初步的朋友一些帮助,还希望高手们不要见笑,并且给我多加指教,先谢谢了,好了,看我的具体配置如下:
router1的配置:
 
Press Enter to Start

Router>
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname router1
router1(config)#interface e0
router1(config-if)#ip address 192.168.1.2 255.255.255.0 
router1(config-if)#no shut
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up
router1(config-if)#interface s0
router1(config-if)#ip address 192.168.2.1 255.255.255.0
router1(config-if)#clock rate 6400                   //clock rate是dce设备给dte设备提供时钟频率的,需要在dce里面设置,而另外的一个路由器里面则不用设置
router1(config-if)#no shut
%LINK-3-UPDOWN: Interface Serial0, changed state to up
router1(config-if)#end
%LINK-3-UPDOWN: Interface Serial0, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down
router1#config t
Enter configuration commands, one per line.  End with CNTL/Z.
router1(config)#ip route 192.168.3.0 255.255.255.0 192.168.2.1   //设定静态路由
router1(config)#ip route 192.168.2.0 255.255.255.0 192.168.2.1
router1(config)#end
router1#copy running startup
Destination filename [startup-config]?
Building configuration...
[OK]
%LINK-3-UPDOWN: Interface Serial0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to up
 
router2的配置:
 
Press Enter to Start

Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#interface e0
Router(config-if)#end
Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname router2
router2(config)#interface s0
router2(config-if)#ip address 192.168.2.2 255.255.255.0
router2(config-if)#no shut
%LINK-3-UPDOWN: Interface Serial0, changed state to up
router2(config-if)#interface s0
router2(config-if)#interface e0
router2(config-if)#ip address 192.168.3.1 255.255.255.0
router2(config-if)#no shut
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up
router2(config-if)#end
router2#config t
Enter configuration commands, one per line.  End with CNTL/Z.
router2(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.2
router2(config)#ip route 192.168.2.0 255.255.255.0 192.168.2.2
router2(config)#end
router2#copy running startup
Destination filename [startup-config]?
Building configuration...
[OK]
router2#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 = 1/2/4 ms
router2#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 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
router2#ping 192.168.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms       //路由器之间试ping了一下,可以ping通,接下来配pc
 
pc1的配置如下:
 
Boson BOSS 5.0
Copyright 1998-2003 Boson Software, Inc.
Use the command help to get started
Press Enter to begin
C:>ipconfig /ip 192.168.1.1 255.255.255.0                     //此时尚未指定网关
C:>ping 192.168.2.1
Pinging 192.168.2.1 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.2.1:
     Packets: Sent = 5, Received = 0, Lost = 5 (100% loss),  //未指定网关时不能ping通router1的s0,我理解为找不到出口,不知准确否
Approximate round trip times in milli-seconds:
     Minimum = 0ms, Maximum =  0ms, Average =  0ms
C:>ipconfig /dg 192.168.1.2                                  //指定网关为与本机直连的router1的e0口
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
C:>ping 192.168.2.1
Pinging 192.168.2.1 with 32 bytes of data:
Reply from 192.168.2.1: bytes=32 time=60ms TTL=241
Reply from 192.168.2.1: bytes=32 time=60ms TTL=241
Reply from 192.168.2.1: bytes=32 time=60ms TTL=241
Reply from 192.168.2.1: bytes=32 time=60ms TTL=241
Reply from 192.168.2.1: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.2.1:     Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),      //指定网关后可以ping通s0口了
Approximate round trip times in milli-seconds:
     Minimum = 50ms, Maximum =  60ms, Average =  55ms
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
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
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                                       //可以ping通任意一台设备的IP地址,实验成功
C:>
 
pc2 的配置如下:
 
Boson BOSS 5.0
Copyright 1998-2003 Boson Software, Inc.
Use the command help to get started
Press Enter to begin
C:>
C:>ipconfig /ip 192.168.3.2 255.255.255.0
C:>ipconfig /dg 192.168.3.1                          //把IP和网关设好
C:>ping 192.168.1.1
Pinging 192.168.1.1 with 32 bytes of data:
Reply from 192.168.1.1: bytes=32 time=60ms TTL=241
Reply from 192.168.1.1: bytes=32 time=60ms TTL=241
Reply from 192.168.1.1: bytes=32 time=60ms TTL=241
Reply from 192.168.1.1: bytes=32 time=60ms TTL=241
Reply from 192.168.1.1: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.1.1:     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.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
C:>ping 192.168.2.1
Pinging 192.168.2.1 with 32 bytes of data:
Reply from 192.168.2.1: bytes=32 time=60ms TTL=241
Reply from 192.168.2.1: bytes=32 time=60ms TTL=241
Reply from 192.168.2.1: bytes=32 time=60ms TTL=241
Reply from 192.168.2.1: bytes=32 time=60ms TTL=241
Reply from 192.168.2.1: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.2.1:     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.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
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  //可以ping通任意一台设备的IP地址,实验成功

本文转自 victoryan 51CTO博客,原文链接:http://blog.51cto.com/victoryan/38510
相关文章
|
网络虚拟化 iOS开发
计算机网络实验(思科模拟器Cisco Packet Tracer)——交换机配置以及虚拟局域网VLAN
计算机网络实验(思科模拟器Cisco Packet Tracer)——交换机配置以及虚拟局域网VLAN
计算机网络实验(思科模拟器Cisco Packet Tracer)——交换机配置以及虚拟局域网VLAN
|
安全 网络安全 网络架构
Cisco—静态路由小实验
Cisco—静态路由小实验
134 0
Cisco—静态路由小实验
|
安全 网络安全 数据中心
华为USG防火墙配置DHCP及单臂路由小实验
华为USG防火墙配置DHCP及单臂路由小实验
902 0
华为USG防火墙配置DHCP及单臂路由小实验
|
网络协议 网络架构
Cisco-路由器配置DHCP小实验
Cisco-路由器配置DHCP小实验
334 0
Cisco-路由器配置DHCP小实验
|
网络协议 网络架构 数据安全/隐私保护