1、 网络拓扑图
2、 实验环境1) 路由器R1的f0/0端口上接交换机S1,S1接主机PC1、PC2。 2) 路由器R3的f0/0端口上接主机PC3. 3) 路由器R4的f0/0端口上接主机PC4
3、各设备的IP地址等参数如下所示
4、 路由器R1配置Router>enableRouter#config terEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname r1r1(config)#int s0/0/0r1(config-if)#ip address 192.168.11.1 255.255.255.0r1(config-if)#no shutr1(config-if)#exitr1(config)#interface f0/0r1(config-if)#ip address 192.168.10.1 255.255.255.0r1(config-if)#no shutdownr1(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upr1(config-if)#exitr1(config)#ip route 0.0.0.0 0.0.0.0 s0/0/0r1(config)#exitr1#
5、路由器R2配置:Router#conf terEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname r2r2(config)#int s0/0/0r2(config-if)#ip address 192.168.13.1 255.255.255.0r2(config-if)#clock rate64000r2(config-if)#no shutr2(config)#int s0/0/1r2(config-if)#ip address 192.168.12.1 255.255.255.0r2(config-if)#clock rate64000r2(config-if)#no shutr2(config-if)#exitr2(config)#int s0/2/0r2(config-if)#ip address 192.168.11.2 255.255.255.0r2(config-if)#clock rate64000r2(config-if)#no shutr2(config-if)#%LINK-5-CHANGED: Interface Serial0/2/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/2/0, changed state to upr2(config-if)#exitr2(config)#ip route 192.168.10.0 255.255.255.0 s0/2/0r2(config)#ip route 192.168.14.0 255.255.255.0 s0/0/1r2(config)#ip route 192.168.15.0 255.255.255.0 s0/0/0r2(config)#endr2#%SYS-5-CONFIG_I: Configured from console by console
6、路由器R3配置:Router>ENABLERouter#conf terEnter configuration commands, one per line. End with CNTL/Z.Router(config)#interface s0/0/0Router(config-if)#ip address 192.168.12.2 255.255.255.0Router(config-if)#no shutRouter(config-if)#%LINK-5-CHANGED: Interface Serial0/0/0, changed state to upi%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to upRouter(config-if)#int f0/0Router(config-if)#ip address 192.168.14.5 255.255.255.0Router(config-if)#no shutRouter(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up%IP-4-DUPADDR: Duplicate address 192.168.14.2 on FastEthernet0/0, sourced by 0060.2F8A.32ACRouter(config-if)#exitRouter#config terEnter configuration commands, one per line. End with CNTL/Z.Router(config)#ip route 192.168.10.0 255.255.255.0 s0/0/0Router(config)#ip route 192.168.15.0 255.255.255.0 s0/0/0Router(config)#ip route 192.168.13.0 255.255.255.0 s0/0/0Router(config)#ip route 192.168.11.0 255.255.255.0 s0/0/0Router(config)#exitRouter#
7、路由器R4配置:Router>enableRouter#config terEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname r4r4(config)#interface s0/0/0r4(config-if)#ip address 192.168.13.2 255.255.255.0r4(config-if)#no shutr4(config-if)#%LINK-5-CHANGED: Interface Serial0/0/0, changed state to upr4(config-if)#i%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up% Ambiguous command: "i"r4(config-if)#int f0/0r4(config-if)#ip address 192.168.15.3 255.255.255.0r4(config-if)#no shutr4(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upr4(config-if)#endr4#r4#config terEnter configuration commands, one per line. End with CNTL/Z.r4(config)#ip route 192.168.10.0 255.255.255.0 s0/0/0r4(config)#ip route 192.168.11.0 255.255.255.0 s0/0/0r4(config)#ip route 192.168.12.0 255.255.255.0 s0/0/0r4(config)#ip route 192.168.14.0 255.255.255.0 s0/0/0r4(config)#exitr4#
8、测试并验证网络