1.拓扑图
2.需求分析
- 路由器上分别配置环回
- 连接路由器的线路网段为12.1.1.0/24、23.1.1.0/24
- R1和R3连接的网络地址分别为192.168.1.0/24、192.168.2.0/24
- 整个网络使用RIP达到全网可达
3.所有配置内容
[r1]interface GigabitEthernet 0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 24
May 2 2023 20:26:12-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r1-GigabitEthernet0/0/0]q
[r1]interface GigabitEthernet 0/0/1
[r1-GigabitEthernet0/0/1]ip address 12.1.1.1 24
May 2 2023 20:26:59-08:00 r1 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r1-GigabitEthernet0/0/1]q
[r1]interface loopback 1
[r1-LoopBack1]ip address 1.1.1.1 32
[r1-LoopBack1]q
[r1]rip 1
[r1-rip-1]version 1
[r1-rip-1]network 1.0.0.0
[r1-rip-1]network 12.0.0.0
[r1-rip-1]network 192.168.1.0
[r1-rip-1]q
[r1]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[r1]ip pool 1
Info: It's successful to create an IP address pool.
[r1-ip-pool-1]network 192.168.1.0 mask 24
[r1-ip-pool-1]gateway-list 192.168.1.1
[r1-ip-pool-1]dns-list 8.8.8.8
[r1-ip-pool-1]q
[r1]interface GigabitEthernet 0/0/0
[r1-GigabitEthernet0/0/0]dhcp select global
[r1-GigabitEthernet0/0/0]q
[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]
[r2-GigabitEthernet0/0/0]ip address 12.1.1.2 24
May 2 2023 20:35:54-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r2-GigabitEthernet0/0/0]q
[r2]interface GigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/1]ip address 23.1.1.1 24
May 2 2023 20:36:16-08:00 r2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r2-GigabitEthernet0/0/1]q
[r2]interface loopback 1
[r2-LoopBack1]ip address 2.2.2.2 32
[r2-LoopBack1]q
[r2]rip 1
[r2-rip-1]version 1
[r2-rip-1]network 2.0.0.0
[r2-rip-1]network 12.0.0.0
[r2-rip-1]network 23.0.0.0
[r2-rip-1]q
[r3]interface GigabitEthernet 0/0/0
[r3-GigabitEthernet0/0/0]
[r3-GigabitEthernet0/0/0]ip address 23.1.1.2 24
May 2 2023 20:40:03-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r3-GigabitEthernet0/0/0]q
[r3]interface GigabitEthernet 0/0/1
[r3-GigabitEthernet0/0/1]ip address 192.168.2.1 24
May 2 2023 20:40:28-08:00 r3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r3-GigabitEthernet0/0/1]q
[r3]interface loopback 1
[r3-LoopBack1]ip address 3.3.3.3 32
[r3-LoopBack1]q
[r3]rip 1
[r3-rip-1]version 1
[r3-rip-1]network 3.0.0.0
[r3-rip-1]network 23.0.0.0
[r3-rip-1]network 192.168.2.0
[r3-rip-1]q
[r3]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[r3]ip pool 1
Info: It's successful to create an IP address pool.
[r3-ip-pool-1]network 192.168.2.0 mask 24
[r3-ip-pool-1]gateway-list 192.168.2.1
[r3-ip-pool-1]dns-list 8.8.8.8
[r3-ip-pool-1]q
[r3]interface GigabitEthernet 0/0/1
[r3-GigabitEthernet0/0/1]
[r3-GigabitEthernet0/0/1]dhcp select global
[r3-GigabitEthernet0/0/1]q
4.测试结果