拓扑图:
要求:
1、路由器上分别配置环回
2、连接路由器的网段分别为12.1.1.0/24、23.1.1.0/24
3、R1和R3分别连接的网段为192.168.1.0/24、192.168.2.0/24
4、整个网络使用RIP达到全网可达
分析:
1、环回的配置
2、IP地址的添加
3、RIP的配置
IP地址的添加:
[r1]interface GigabitEthernet 0/0/0
[r1-GigabitEthernet0/0/0]ip address 12.1.1.1 24
[r1-GigabitEthernet0/0/0]interface GigabitEthernet 0/0/1
[r1-GigabitEthernet0/0/1]ip address 192.168.1.1 24
[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]ip address 12.1.1.2 24
[r2-GigabitEthernet0/0/0]interface GigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/1]ip address 23.1.1.1 24
[r3]interface GigabitEthernet 0/0/0
[r3-GigabitEthernet0/0/0]ip address 23.1.1.1 24
[r3-GigabitEthernet0/0/0]interface GigabitEthernet 0/0/1
[r3-GigabitEthernet0/0/1]ip address 192.168.2.1 24
环回地址的添加:
[r1]interface LoopBack 0
[r1-LoopBack0]ip ad
[r1-LoopBack0]ip address 1.1.1.1 32
[r2]interface LoopBack 0
[r2-LoopBack0]ip ad
[r2-LoopBack0]ip address 2.2.2.2 32
[r3]interface LoopBack 0
[r3-LoopBack0]ip ad
[r3-LoopBack0]ip address 3.3.3.3 32
RIP配置:
[r1]rip 1
[r1-rip-1]version 1[r1-rip-1]network 192.168.1.0
[r2]rip 1
[r2-rip-1]version 1
[r2-rip-1]network 2.2.2.2
[r3]rip 1
[r3-rip-1]version 1
[r3-rip-1]network 192.168.2.0
结果: