练习要求
1.R3环回地址为3.3.3.0/24 —— 环回接口
2.其他网段基于192.168.1.0/24合理划分 —— VLSM、手工汇总
3.R1/R2均存在两个环回 —— 环回接口
4.整个网络运行RIPV2 —— 配置 RIP,但不能直接宣告R3的环回地址 —— 缺省
5.全网可达,保障更新安全 —— 手工认证,减少路由条目数量 —— 手工汇总,避免环路
图片
练习过程
创建R1/R2/R3的环回接口
[a3]interface LoopBack 1
[a3-LoopBack1]
[a1]interface LoopBack 1
[a1-LoopBack1]
[a1-LoopBack1]qu
[a1]interface LoopBack 2
[a1-LoopBack2]
[a2]interface LoopBack 1
[a2-LoopBack1]
[a2-LoopBack1]qu
[a2]interface LoopBack 2
[a2-LoopBack2]
配置R3环回接口及其他网段的 IP地址
配置R3环回接口的IP地址
[a3-LoopBack1]ip address 3.3.3.1 24
分析其他网段如何配IP
1.两个骨干链路需要2个网段,R1/R2各两个环回接口需要4个网段,共需要6个网段
2.环回接口的每个网段可以先找一个汇总网段,再划分成两个子网段
3.骨干链路的每个网段也可以先找一个汇总网段,在划分成两个子网段,划分后的子网段只需要两个IP地址
4.所以只需要找三个网段,然后再划分子网段
划分网段
- 192.168.1.00000000/24
- 192.168.1.00 000000/26
- 192.168.1.01 000000/26 —— 骨干链路 192.168.1.64/26
- 192.168.1.01 0 00000/27 —— 192.168.1.64/27
- 192.168.1.01 1 00000/27 —— 192.168.1.96/27
- 192.168.1.10 000000/26 —— R1汇总 192.168.1.128/26
- 192.168.1.10 0 00000/27 —— 192.168.1.128/27
- 192.168.1.10 1 00000/27 —— 192.168.1.160/27
- 192.168.1.11 000000/26 —— R2汇总 192.168.1.192/26
- 192.168.1.11 0 00000/27 —— 192.168.1.192/27
- 192.168.1.11 1 00000/27 —— 192.168.1.224/27
配IP
R1
[a1]interface GigabitEthernet 0/0/0
[a1-GigabitEthernet0/0/0]ip ad
[a1-GigabitEthernet0/0/0]ip address 192.168.1.65 27
[a1-GigabitEthernet0/0/0]qu
[a1]interface LoopBack 1
[a1-LoopBack1]ip address 192.168.1.129 27
[a1-LoopBack1]qu
[a1]interface LoopBack 2
[a1-LoopBack2]ip address 192.168.1.169 27
R2
[a2]interface GigabitEthernet 0/0/0
[a2-GigabitEthernet0/0/0]ip address 192.168.1.66 27
[a2-GigabitEthernet0/0/0]qu
[a2]interface GigabitEthernet 0/0/1
[a2-GigabitEthernet0/0/1]ip address 192.168.1.97 27
[a2-GigabitEthernet0/0/1]qu
[a2]interface LoopBack 1
[a2-LoopBack1]ip address 192.168.1.193 27
[a2-LoopBack1]qu
[a2]interface LoopBack 2
[a2-LoopBack2]ip address 192.168.1.225 27
R3
[a3]interface GigabitEthernet 0/0/0
[a3-GigabitEthernet0/0/0]ip address 192.168.1.98 27
配置RIP
[a1]rip 1
[a1-rip-1]version 2
[a1-rip-1]network 192.168.1.0
[a2]rip 1
[a2-rip-1]version 2
[a2-rip-1]network 192.168.1.0
[a3]rip 1
[a3-rip-1]version 2
[a3-rip-1]network 192.168.1.0
配置缺省
将R3设置成缺省源
[a3]rip 1
[a3-rip-1]default-route originate
配置R3到其他网段的缺省
[a3]ip route-static 0.0.0.0 0 192.168.1.97
配置R1/R2/R3的手工认证
R1
[a1]interface GigabitEthernet 0/0/0
[a1-GigabitEthernet0/0/0]rip authentication-mode simple cipher 123456
R2
[a2]interface GigabitEthernet 0/0/0
[a2-GigabitEthernet0/0/0]rip authentication-mode simple cipher 123456
[a2]interface GigabitEthernet 0/0/1
[a2-GigabitEthernet0/0/1]rip authentication-mode simple cipher 123456
R3
[a3]interface GigabitEthernet 0/0/0
[a3-GigabitEthernet0/0/0]rip authentication-mode simple cipher 123456
验证全网可达
[a1]ping 192.168.1.224
PING 192.168.1.224: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.225: bytes=56 Sequence=1 ttl=255 time=30 ms
Reply from 192.168.1.225: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 192.168.1.225: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 192.168.1.225: bytes=56 Sequence=4 ttl=255 time=30 ms
Reply from 192.168.1.225: bytes=56 Sequence=5 ttl=255 time=20 ms
--- 192.168.1.224 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/24/30 ms
[a2]ping 3.3.3.1
PING 3.3.3.1: 56 data bytes, press CTRL_C to break
Reply from 3.3.3.1: bytes=56 Sequence=1 ttl=255 time=30 ms
Reply from 3.3.3.1: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 3.3.3.1: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 3.3.3.1: bytes=56 Sequence=4 ttl=255 time=30 ms
Reply from 3.3.3.1: bytes=56 Sequence=5 ttl=255 time=20 ms
--- 3.3.3.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/24/30 ms
[a3]ping 192.168.1.128
PING 192.168.1.128: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.129: bytes=56 Sequence=1 ttl=254 time=30 ms
Reply from 192.168.1.129: bytes=56 Sequence=2 ttl=254 time=40 ms
Reply from 192.168.1.129: bytes=56 Sequence=3 ttl=254 time=20 ms
Reply from 192.168.1.129: bytes=56 Sequence=4 ttl=254 time=20 ms
Reply from 192.168.1.129: bytes=56 Sequence=5 ttl=254 time=30 ms
--- 192.168.1.128 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/28/40 ms