配置IP地址和路由协议
R1(config)#interface f0/0
R1(config-if)#ip address 192.168.13.1 255.255.255.0
R1(config-if)#no shutdown
R1(config)#interface s1/1
R1(config-if)#ip address 192.168.12.1 255.255.255.0
R1(config-if)#no shutdown
R1(config)#router rip
R1(config-router)#network 192.168.12.0
R1(config-router)#network 192.168.13.0
R1(config-router)#passive-interface f0/0
//之所以把f0/0接口设为被动接口,是为了防止从该口向R3发送RIP信息。
R2(config)#interface f0/0
R2(config-if)#ip address 192.168.2.254 255.255.255.0
R2(config-if)#no shutdown
R2(config)#interface s1/1
R2(config-if)#clock 128000
R2(config-if)#ip address 192.168.12.2 255.255.255.0
R2(config-if)#no shutdown
R2(config)#interface s1/3
R2(config-if)#clock 128000
R2(config-if)#ip address 192.168.23.2 255.255.255.0
R2(config-if)#no shutdown
R2(config)#router rip
R2(config-router)#network 192.168.2.0
R2(config-router)#network 192.168.12.0
R2(config-router)#network 192.168.23.0
R2(config-router)#passive-interface f0/0
R3(config)#interface f0/0
R3(config-if)#ip address 192.168.13.3 255.255.255.0
R3(config-if)#no shutdown
R3(config)#interface s1/3
R3(config-if)#ip address 192.168.23.3 255.255.255.0
R3(config-if)#no shutdown
R3(config)#router rip
R3(config-router)#network 192.168.13.0
R3(config-router)#network 192.168.23.0
R3(config-router)#passive-interface f0/0
PC2(config)#no ip routing
PC2(config)#interface f0/0
PC2(config-if)#ip address 192.168.2.2 255.255.255.0
PC2(config-if)#no shutdown
PC2(config)#ip default-gateway 192.168.2.254