到今天为止,来北京已经一年了,想到这一点稍微有些感慨哈。今天移动研究院有施工改造,悲剧的要下电,更悲剧的是联网的核心机房也下电导致没网啦。无聊之余,继续写我的学习笔记啦! 今天有一张我用来做实验的网络拓扑图,其余消息都是配置网络时,路由器的打印消息。通过这些打印消息可以看到用于配置网络的基本命令,最终完成整张拓扑图的互联互通。 在下面这幅拓扑图中,路由器wangshan、R1、R2、R3是三层传输设备。PC1、PC2、PC3是用来模拟主机用的。
以下配置都是使用静态路由,以后会对同一网络分别使用默认路由、动态路由分别配置。
1、核心路由器wangshan的静态路由配置wangshan#conf twangshan(config)#ip route 192.168.10.0 255.255.255.0 10.1.2.2wangshan(config)#ip route 192.168.30.0 255.255.255.0 10.1.4.2wangshan(config)#ip route 192.168.50.0 255.255.255.0 10.1.5.2wangshan(config)#end
wangshan#ping 192.168.10.199
Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.10.199, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 32/70/112 mswangshan#ping 192.168.30.199
Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.30.199, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 48/74/128 mswangshan#ping 192.168.50.199
Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.50.199, timeout is 2 seconds:.!!!!Success rate is 80 percent (4/5), round-trip min/avg/max = 20/75/152 mswangshan#从以上打印消息中可以看到从路由器wangshan到每一台PC终端已经可以通信。
2、静态路由配置路由器R1R1#conf tEnter configuration commands, one per line. End with CNTL/Z.R1(config)#ip route 10.1.4.0 255.255.255.0 10.1.2.1R1(config)#ip route 192.168.30.0 255.255.255.0 10.1.2.1R1(config)#ip route 10.1.5.0 255.255.255.0 10.1.2.1 R1(config)#ip route 192.168.50.0 255.255.255.0 10.1.2.1R1(config)#end
3、静态路由配置路由器R2R2#conf tR2(config)#ip route 10.1.2.0 255.255.255.0 10.1.4.1R2(config)#ip route 192.168.10.0 255.255.255.0 10.1.4.1R2(config)#ip route 10.1.5.0 255.255.255.0 10.1.4.1 R2(config)#ip route 192.168.50.0 255.255.255.0 10.1.4.1R2(config)#end
4、静态路由配置路由器R3R3#conf tR3(config)#ip route 10.1.2.0 255.255.255.0 10.1.5.1R3(config)#ip route 192.168.10.0 255.255.255.0 10.1.5.1R3(config)#ip route 10.1.4.0 255.255.255.0 10.1.5.1 R3(config)#ip route 192.168.30.0 255.255.255.0 10.1.5.1R3(config)#end
5、全网互联互通
PC1:PC1#ping 192.168.30.199
Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.30.199, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 44/107/168 msPC1#ping 192.168.50.199
Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.50.199, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 80/114/192 ms
PC2:PC2#ping 192.168.10.199
Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.10.199, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 72/103/172 msPC2#ping 192.168.50.199
Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.50.199, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 48/88/156 ms
PC3:PC3#ping 192.168.10.199
Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.10.199, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 48/182/404 msPC3#ping 192.168.50.199
Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.50.199, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 4/5/8 ms