首先看图
两个路由器两个网段已经配置好
R1
interface GigabitEthernet0/0/0
ip address 12.1.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 192.168.1.1 255.255.255.0
#
R2
#
interface GigabitEthernet0/0/0
ip address 12.1.1.2 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 192.168.2.1 255.255.255.0
每个路由器连接一个pc,(路由器连接设备注意事项请看我另一篇文章)
此时PC1可以PING通192.168.1.1 12.1.1.1但无法PING通12.1.1.2和pc2.
原因是路由表没有相关记录,对路由器继续rip配置即可
R1
#
rip 1
version 2
network 12.0.0.0
network 192.168.1.0
network 192.168.2.0
#
R2
#
rip 1
version 2
network 12.0.0.0
network 192.168.1.0
network 192.168.2.0
#
配置后pc1和pc2互通。