1)R1的静态路由配置
Router>
Router> en
Router# con
Router(config)# hostname R1
R1(config)# interface s0
R1(config-if)# ip address 190.1.0.1 255.255.0.0
R1(config-if)# no shutdown
R1(config-if)# clock rate 64000
R1(config-if)# interface e0
R1(config-if)# ip address 200.200.1.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)# ip route 200.200.2.0 255.255.255.0190.1.0.2
R1(config)# ip route 200.200.3.0 255.255.255.0190.1.0.2
R1(config)# ip route 200.200.4.0 255.255.255.0190.1.0.2
R1(config)# ip route 190.2.0.0 255.255.0.0190.1.0.2
R1(config)# end
查看R1的路由表:
R1# show ip route
C 200.200.1.0 is directly connected, Ethernet0
S 190.2.0.0 [1/0] via 190.1.0.2
C 190.1.0.0 is directly connected, Serial0
S 200.200.4.0 [1/0] via 190.1.0.2
S 200.200.3.0 [1/0] via 190.1.0.2
S 200.200.2.0 [1/0] via 190.1.0.2
(2)R2的静态路由配置
Router>
Router> en
Router# con
Router(config)# hostnameR2
R2 (config)# interface s0
R2 (config-if)# ip address 190.1.0.2 255.255.0.0
R2(config-if)# no shutdown
R2 (config-if)# exit
R2 (config)# interface s1
R2 (config-if)#ip address 190.2.0.1 255.255.0.0
R2(config-if)# no shutdown
R2 (config-if)#clock rate 64000
R2(config-if)#exit
R2 (config)#interface e0
R2(config-if)# ip address 200.200.2.1 255.255.255.0
R2 (config-if)# no shutdown
R2 (config-if)#exit
R2 (config)#ip route 200.200.1.0 255.255.255.0190.1.0.1
R2(config)# ip route 200.200.3.0 255.255.255.0190.2.0.2
R2 (config)# ip route 200.200.4.0 255.255.255.0190.2.0.2
R2(config)# end
(2)R2的静态路由配置
R2# show ip route
C 190.1.0.0 is directly connected, Serial0
S 200.200.1.0 [1/0] via 190.1.0.1
S 200.200.3.0 [1/0] via 190.2.0.2
S 200.200.4.0 [1/0] via 190.2.0.2
C 200.200.2.0 is directly connected, Ethernet0
C 190.2.0.0 is directly connected, Serial1
(3)R3的静态路由配置
Router>
Router>en
Router#con
Router(config)# hostname R3
R3(config)#interface s0
R3(config-if)#ip address 190.2.0.2 255.255.0.0
R3(config-if)# no shutdown
R3(config-if)# exit
R3(config)# interface e0
R3(config-if)# ip address 200.200.3.1 255.255.255.0
R3 (config-if)# no shutdown
R3 (config-if)# interface e1
R3(config-if)# ip address 200.200.4.1 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)# ip route 190.1.0.0 255.255.0.0190.2.0.1
R3(config)#ip route 200.200.1.0 255.255.255.0190.2.0.1
R3(config)#ip route 200.200.2.0 255.255.255.0190.2.0.1
R3(config)# end
R3# show ip route
C 190.2.0.0 is directly connected, Serial0
C 200.200.3.0 is directly connected, Ethernet0
C 200.200.4.0 is directly connected, Ethernet
S 190.1.0.0 [1/0] via 190.2.0.1
S 200.200.1.0 [1/0] via 190.2.0.1
S 200.200.2.0 [1/0] via 190.2.0.1
PC机的配置略,但要注意
PC1的网关为200.200.1.1
PC2的网关为200.200.2.1
PC3的网关为200.200.3.1
PC4的网关为200.200.4.1