1、实验拓扑
二、实验要求
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间,正常1000Mb/s链路通信,故障时自动改为100Mb/s。
三、实验步骤
1、划分网段
192.168.1.0/24-----主机位借4位
192.168.1.0000 0000
192.168.1.0001 0000
192.168.1.0010 0000
192.168.1.0011 0000
192.168.1.0100 0000
192.168.1.0101 0000
192.168.1.0110 0000
192.168.1.0111 0000
192.168.1.1000 0000
192.168.1.1001 0000
192.168.1.1010 0000
192.168.1.1011 0000
192.168.1.1100 0000
192.168.1.1101 0000
192.168.1.1110 0000
192.168.1.1111 0000
2、将192.168.1.0/24划分出五个需要用到的网段:
192.168.1.0000 0000-----192.168.1.0/27-----6条骨干链路
192.168.1.0000 0000---192.168.1.0/30
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
192.168.1.0001 1000---192.168.1.24/30
192.168.1.0001 1100---192.168.1.28/30
(2)192.168.1.0010 0000-----192.168.1.32/27---R1环回
192.168.1.0010 0000---192.168.1.32/28----L0
192.168.1.0011 0000---192.168.1.48/28---L1
(3)192.168.1.0100 0000-----192.168.1.64/27---R2环回
192.168.1.0100 0000----192.168.1.64/28----L0
192.168.1.0101 0000---192.168.1.80/28-----L1(4)192.168.1.0110 0000-----192.168.1.96/27---R3环回
192.168.1.0110 0000----192.168.1.96/28----L0
192.168.1.0111 0000----192.168.1.112/28----L1(5)192.168.1.1000 0000-----192.168.1.128/27---R4环回
192.168.1.1000 0000----192.168.1.128/28---L0
192.168.1.1001 0000----192.168.1.144/28---L1
(6)192.168.1.1010 0000(无)
(7)192.168.1.1100 0000(无)
(8)192.168.1.1110 0000(无)
3、配置接口和环回IP地址:
R1:
<Huawei>sys
[Huawei]sysname R1
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]
[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]
[R1-GigabitEthernet0/0/1]ip address 192.168.1.5 30
[R1-GigabitEthernet0/0/1]interface loopback 0
[R1-LoopBack0]ip address 192.168.1.33.28
[R1-LoopBack0]interface loopback 1
[R1-LoopBack1]ip address 192.168.1.49 28
[R1-LoopBack1]quit
[R1]display ip int brief
以此类推得:
R2:
R3:
R4:
R5:
四、静态路由
R1:
[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.12 30 192.168.1.6
[R1]ip route-static 192.168.1.96 27 192.168.1.6
[R1]dis ip routing-table protocol static
R2:
[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.12 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.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
[R2]dis ip rou p s
R3:
[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
[R3]dis ip rou p s
R4:
[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
[R4]dis ip rou p s
R5:
[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.168.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
[R5]dis ip rou p s
五、防环
1.R1
[R1]ip route-static 192.168.1.32 27 NULL 0
2.R2
[R2]ip route-static 192.168.1.64 27 NULL 0
3.R3
[R3]ip route-static 192.168.1.96 27 NULL 0
4.R4
[R4]ip route-static 192.168.1.128 27 NULL 0
六、修改接口优先级
[R5]ip route-static 192.168.1.0 30 192.168.1.21 pre 61
[R5]ip route-static 192.168.1.4 30 192.168.1.21 pre 61
[R5]ip route-static 192.168.1.8 30 192.168.1.21 pre 61
[R5]ip route-static 192.168.1.12 30 192.168.1.21 pre 61
[R5]ip route-static 192.168.1.32 27 192.168.1.21 pre 61
[R5]ip route-static 192.168.1.64 27 192.168.1.21 pre 61
[R5]ip route-static 192.168.1.96 27 192.168.1.21 pre 61