目录
一、实验目的
1、掌握路由器的配置
2、 学会配置静态路由
3、 实现静态路由的不同网络间的互通
二、实验内容
1、搭建拓扑图
2、网络拓扑节点IP配置
3、静态路由配置实现不同网络的通信
要求:
1、除R5的环回地址固定以外,整个其他所有网段基于192.168.1.0/24进行合理的ip地址划分
2、R1-R4每个路由器存在两个环回接口,用于模拟连接Pc网段;地址也在192.168.1.0/24这个网络范围内
3、R1-R4上不能直接编写到达5.5.5.0/24的静态路由,但依然可以访问
4、全网可达,尽量减少每台路由器,路由表条甘数量,避免环路出现
5、R4与R5间,正常1000M链路通信,故障时自动改为100M
三、实验步骤
1、搭建拓扑图、分配合理的ip地址:
如下图:
划分子网:
主网段:
192.168.1.0/28
92.168.1.16/28
192.168.1.32/28
192.168.1.48/28
192.168.1.64/28
192.168.1.80/28
192.168.1.96/28
192.168.1.112/28
环回(两个环回接口,用于模拟连接Pc网段):
AR1(a):192.168.1.128/28 192.168.1.144/28
AR2(b):192.168.1.160/28 192.168.1.176/28
AR3(c):192.168.1.192/28 192.168.1.208/28
AR4(d):192.168.1.224/28 192.168.1.240/28
2、网络拓扑节点IP配置
(1) 进入系统视图,改变路由器名称,如下AR1:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys a
[a]
(2)配置IP地址以及环回
AR1接口IP:
[a]int g 0/0/0
[a-GigabitEthernet0/0/0]ip add 192.168.1.1 28
[a-GigabitEthernet0/0/0]int g 0/0/1
[a-GigabitEthernet0/0/1]ip add 192.168.1.33 28
环回:
[a-LoopBack0]ip add 192.168.1.129 28
[a-LoopBack0]int l1
[a-LoopBack1]ip add 192.168.1.145 28
AR2:
[b]int g 0/0/0
[b-GigabitEthernet0/0/0] ip add 192.168.1.2 28
[b-GigabitEthernet0/0/0]int g 0/0/1
[b-GigabitEthernet0/0/1]ip add 192.168.1.17 28
环回:
[b]int l0
[b-LoopBack0]ip add 192.168.1.161 28
[b-LoopBack0]int l1
[b-LoopBack1]ip add 192.168.1.177 28
AR3:
[c]int g 0/0/0
[c-GigabitEthernet0/0/0]ip add 192.168.1.34 28
[c-GigabitEthernet0/0/0]int g 0/0/1
[c-GigabitEthernet0/0/1]ip add 192.168.1.49 28
环回:
[c-GigabitEthernet0/0/1]int l0
[c-LoopBack0]ip add 192.168.1.193 28
[c-LoopBack0]int l1
[c-LoopBack1]ip add 192.168.1.209 28
AR4:
[d]int g 0/0/0
[d-GigabitEthernet0/0/0]ip add 192.168.1.18 28
[d-GigabitEthernet0/0/0]int g 0/0/1
[d-GigabitEthernet0/0/1]ip add 192.168.1.50 28
[d-GigabitEthernet0/0/0]int g 0/0/2
[d-GigabitEthernet0/0/2]ip add 192.168.1.65 28
[d-GigabitEthernet0/0/2]int g 4/0/0
[d-GigabitEthernet4/0/0]ip add 192.168.1.81 28
环回:
[d-GigabitEthernet0/0/1]int l0
[d-LoopBack0]ip add 192.168.1.225 28
[d-LoopBack0]int l1
[d-LoopBack1]ip add 192.168.1.241 28
AR5:
[e]int g 0/0/0
[e-GigabitEthernet0/0/0]ip add 192.168.1.66 28
[e-GigabitEthernet0/0/0]int g 0/0/1
[e-GigabitEthernet0/0/1]ip add 192.168.1.82 28
[e-GigabitEthernet0/0/1]int l0
[e-LoopBack0]ip add 5.5.5.1 24
(3)静态路由配置
AR1:
[a]ip route-static 192.168.1.16 28 192.168.1.2
[a]ip route-static 192.168.1.48 28 192.168.1.34
[a]ip route-static 192.168.1.80 28 192.168.1.34
[a]ip route-static 192.168.1.64 28 192.168.1.2
[a]ip route-static 192.168.1.160 28 192.168.1.2
[a]ip route-static 192.168.1.176 28 192.168.1.2
[a]ip route-static 192.168.1.192 28 192.168.1.34
[a]ip route-static 192.168.1.208 28 192.168.1.34
[a]ip route-static 192.168.1.224 28 192.168.1.34
[a]ip route-static 192.168.1.240 28 192.168.1.34
[a]ip route-static 192.168.1.240 28 192.168.1.2
[a]ip route-static 192.168.1.224 28 192.168.1.2
AR2:
[b]ip route-static 192.168.1.32 28 192.168.1.1
[b]ip route-static 192.168.1.48 28 192.168.1.18
[b]ip route-static 192.168.1.64 28 192.168.1.18
[b]ip route-static 192.168.1.80 28 192.168.1.18
[b]ip route-static 192.168.1.192 28 192.168.1.1
[b]ip route-static 192.168.1.208 28 192.168.1.1
[b]ip route-static 192.168.1.128 28 192.168.1.1
[b]ip route-static 192.168.1.144 28 192.168.1.1
[b]ip route-static 192.168.1.224 28 192.168.1.18
[b]ip route-static 192.168.1.240 28 192.168.1.18
AR3:
[c]ip route-static 192.168.1.0 28 192.168.1.33
[c]ip route-static 192.168.1.16 28 192.168.1.50
[c]ip route-static 192.168.1.64 28 192.168.1.50
[c]ip route-static 192.168.1.80 28 192.168.1.50
[c]ip route-static 192.168.1.128 28 192.168.1.50
[c]ip route-static 192.168.1.144 28 192.168.1.50
[c]ip route-static 192.168.1.160 28 192.168.1.50
[c]ip route-static 192.168.1.176 28 192.168.1.50
[c]ip route-static 192.168.1.224 28 192.168.1.33
[c]ip route-static 192.168.1.240 28 192.168.1.3
AR4:
[d]ip route-static 192.168.1.0 28 192.168.1.17
[d]ip route-static 192.168.1.32 28 192.168.1.49
[d]ip route-static 192.168.1.160 28 192.168.1.17
[d]ip route-static 192.168.1.176 28 192.168.1.17
[d]ip route-static 192.168.1.128 28 192.168.1.49
[d]ip route-static 192.168.1.144 28 192.168.1.49
[d]ip route-static 192.168.1.192 28 192.168.1.49
[d]ip route-static 192.168.1.208 28 192.168.1.49
AR5:
[e]ip route-static 192.168.1.0 28 192.168.1.65
[e]ip route-static 192.168.1.16 28 192.168.1.65
[e]ip route-static 192.168.1.32 28 192.168.1.65
[e]ip route-static 192.168.1.48 28 192.168.1.65
[e]ip route-static 192.168.1.128 28 192.168.1.65
[e]ip route-static 192.168.1.144 28 192.168.1.65
[e]ip route-static 192.168.1.160 28 192.168.1.65
[e]ip route-static 192.168.1.176 28 192.168.1.65
[e]ip route-static 192.168.1.192 28 192.168.1.65
[e]ip route-static 192.168.1.208 28 192.168.1.65
[e]ip route-static 192.168.1.224 28 192.168.1.65
[e]ip route-static 192.168.1.240 28 192.168.1.65
4.配置缺省路由
[a]ip route-static 0.0.0.0 0 192.168.1.2
[a]ip route-static 0.0.0.0 0 192.168.1.34
[b]ip route-static 0.0.0.0 0 192.168.1.18
[c]ip route-static 0.0.0.0 0 192.168.1.50
[d]ip route-static 0.0.0.0 0 192.168.1.66
[d]ip route-static 0.0.0.0 0 192.168.1.82
5.浮动静态路由
[d]ip route-static 5.5.5.0 24 192.168.1.66 preference 61