【无标题】

发布于:2025-07-15 ⋅ 阅读:(11) ⋅ 点赞:(0)

实验需求
1.除了R5的环回地址固定5.5.5.0/24,其他网段基于192.168.1.0/24进行合理划分;
2.R1-R4每个路由器存在两个环回接口,模拟PC,地址也在192.168.1.0/24网络内;
3.R1-R4不能直接编写到达5.5.5.0/24的静态路由,但依然可以访问;
4.全网可达,尽量减少每台路由器路由条目数量,避免环路;
5.R4与R5间,正常1000M链路通信,故障时自动改为100M;

1.网段划分,192.168.1.0/24划分5个网段
(1)192.168.1.0000 0000----192.168.1.0/27----骨干链路
192.168.1.0000 0000--192.168.1.0/30---255.255.255.252
192.168.1.0000 0100--192.168.1.4/30
192.168.1.0000 1000--192.168.1.8/30
192.168.1.0000 1100--192.168.1.12/30
192.168.1.0001 0000--192.168.1.16/30
192.168.1.0001 0100--192.168.1.20/30


(2)192.168.1.0010 0000----192.168.1.32/27----R1环回
192.168.1.0010 0000---192.168.1.32/28
192.168.1.0011 0000---192.168.1.48/28

(3)192.168.1.0100 0000----192.168.1.64/27---R2环回
192.168.1.0100 0000---192.168.1.64/28
192.168.1.0101 0000---192.168.1.80/28

(4)192.168.1.0110 0000----192.168.1.96/27--R3环回
192.168.1.0110 0000---192.168.1.96/28
192.168.1.0111 0000--192.168.1.112/28

(5)192.168.1.1000 0000----192.168.1.128/27--R4环回
192.168.1.1000 0000---192.168.1.128/28
192.168.1.1001 0000--192.168.1.144/28
2.配置ip

[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.1.1 30
[r1-GigabitEthernet0/0/0]int g 0/0/1
[r1-GigabitEthernet0/0/1]ip add 192.168.1.5 30
[r1-GigabitEthernet0/0/1]int l0
[r1-LoopBack0]ip add 192.168.1.33 28
[r1-LoopBack0]int l1
[r1-LoopBack1]ip add 192.168.1.49 28

[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]ip add 192.168.1.2 30
[r2-GigabitEthernet0/0/0]int g 0/0/1
[r2-GigabitEthernet0/0/1]ip add 192.168.1.9 30
[r2-GigabitEthernet0/0/1]int l0
[r2-LoopBack0]ip add 192.168.1.65 28
[r2-LoopBack0]int l1
[r2-LoopBack1]ip add 192.168.1.81 28

[r3]int g 0/0/1
[r3-GigabitEthernet0/0/1]ip add 192.168.1.6 30
[r3-GigabitEthernet0/0/1]
[r3-GigabitEthernet0/0/1]int g 0/0/0
[r3-GigabitEthernet0/0/0]ip add 192.168.1.13 30
[r3-GigabitEthernet0/0/0]int l0
[r3-LoopBack0]ip add 192.168.1.97 28
[r3-LoopBack0]int l1
[r3-LoopBack1]ip add 192.168.1.113 28
 

[r4]int g 0/0/0
[r4-GigabitEthernet0/0/0]ip add 192.168.1.10 30
[r4-GigabitEthernet0/0/0]int g 0/0/1
[r4-GigabitEthernet0/0/1]ip add 192.168.1.14 30
[r4-GigabitEthernet0/0/1]int l0
[r4-LoopBack0]ip add 192.168.1.129 28
[r4-LoopBack0]int l1
[r4-LoopBack1]ip add 192.168.1.145 28

[r4]int g 0/0/2
[r4-GigabitEthernet0/0/2]ip add 192.168.1.17 30
[r4-GigabitEthernet0/0/2]int g 4/0/0
[r4-GigabitEthernet4/0/0]ip add 192.168.1.21 30

[r5]int g 0/0/0
[r5-GigabitEthernet0/0/0]ip add 192.168.1.18 30
[r5-GigabitEthernet0/0/0]
[r5-GigabitEthernet0/0/0]int g 0/0/1
[r5-GigabitEthernet0/0/1]ip add 192.168.1.22 30
[r5-GigabitEthernet0/0/1]int l0
[r5-LoopBack0]ip add 5.5.5.1 24

 

2.静态路由

[r1]ip route-static 192.168.1.64 27 192.168.1.2
[r1]ip route-static 192.168.1.8 30 192.168.1.2
[r1]ip route-static 192.168.1.128 27 192.168.1.2
[r1]ip route-static 192.168.1.128 27 192.168.1.6
[r1]ip route-static 192.168.1.16 30 192.168.1.2
[r1]ip route-static 192.168.1.16 30 192.168.1.6
[r1]ip route-static 192.168.1.20 30 192.168.1.2
[r1]ip route-static 192.168.1.20 30 192.168.1.6
[r1]ip route-static 192.168.1.12 30 192.168.1.6
[r1]ip route-static 192.168.1.96 27 192.168.1.6

[r2]ip route-static 192.168.1.128 27 192.168.1.10
[r2]ip route-static 192.168.1.16 30 192.168.1.10
[r2]ip route-static 192.168.1.20 30 192.168.1.10
[r2]ip route-static 192.168.1.12 30 192.168.1.10
[r2]ip route-static 192.168.1.96 27 192.168.1.10
[r2]ip route-static 192.168.1.96 27 192.168.1.1
[r2]ip route-static 192.168.1.4 30 192.168.1.1

[r2]ip route-static 192.168.1.32 27 192.168.1.1

[r3]ip route-static 192.168.1.32 27 192.168.1.5
[r3]ip route-static 192.168.1.0 30 192.168.1.5
[r3]ip route-static 192.168.1.64 27 192.168.1.5
[r3]ip route-static 192.168.1.64 27 192.168.1.14
[r3]ip route-static 192.168.1.8 30 192.168.1.14
[r3]ip route-static 192.168.1.128 27 192.168.1.14
[r3]ip route-static 192.168.1.16 30 192.168.1.14
[r3]ip route-static 192.168.1.20 30 192.168.1.14

[r4]ip route-static 192.168.1.96 27 192.168.1.13
[r4]ip route-static 192.168.1.4 30 192.168.1.13
[r4]ip route-static 192.168.1.32 27 192.168.1.13
[r4]ip route-static 192.168.1.32 27 192.168.1.9
[r4]ip route-static 192.168.1.0 30 192.168.1.9
[r4]ip route-static 192.168.1.64 27 192.168.1.9

[r5]ip route-static 192.168.1.128 27 192.168.1.17
[r5]ip route-static 192.168.1.128 27 192.168.1.21
[r5]ip route-static 192.168.1.12 30 192.168.1.17
[r5]ip route-static 192.168.1.12 30 192.168.1.21
[r5]ip route-static 192.168.1.96 27 192.168.1.17
[r5]ip route-static 192.168.1.96 27 192.168.1.21
[r5]ip route-static 192.168.1.4 30 192.168.1.17
[r5]ip route-static 192.168.1.4 30 192.168.1.21
[r5]ip route-static 192.168.1.32 27 192.168.1.17
[r5]ip route-static 192.168.1.32 27 192.168.1.21
[r5]ip route-static 192.168.1.0 30 192.168.1.17
[r5]ip route-static 192.168.1.0 30 192.16879.1.21
[r5]ip route-static 192.168.1.64 27 192.168.1.17
[r5]ip route-static 192.168.1.64 27 192.168.1.21
[r5]ip route-static 192.168.1.8 30 192.168.1.17
[r5]ip route-static 192.168.1.8 30 192.168.1.21

 

3..R1-R4不能直接编写到达5.5.5.0/24的静态路由,但依然可以访问,配置缺省路由

[r1]ip route-static 0.0.0.0 0 192.168.1.2
[r1]ip route-static 0.0.0.0 0 192.168.1.6

[r2]ip route-static 0.0.0.0 0 192.168.1.10

[r3]ip route-static 0.0.0.0 0 192.168.1.14

[r4]ip route-static 0.0.0.0 0 192.168.1.18
[r4]ip route-static 0.0.0.0 0 192.168.1.22

4.避免环路黑洞配置

[r1]ip route-static 192.168.1.32 27 NULL 0

[r2]ip route-static 192.168.1.64 27 NULL 0

[r3]ip route-static 192.168.1.96 27 NULL 0

[r4]ip route-static 192.168.1.128 27 NULL 0
 


网站公告

今日签到

点亮在社区的每一天
去签到