静态路由(综合)

 要求:

        对于静态路由的配置,首先我们借助华为的eNSP或者Cisco Packet Tracer或者 H3C H3C Cloud Lab网络模拟软件进行网络拓扑图的构建及使用。并对其中的路由器,交换机,PC机有一定的知晓能力和进行有必要的文本字段说明,当然,使用合理的设备和熟练掌握要求将会使你完成的轻松一点。

1.确定广播域的总个数(计算网段的总个数)

总个数:15(14+1(5.5.5.0))

2.根据要求进行合理的IP地址划分

192.168.1.0/24 划分16个网段

192.168.1.0000 0000----192.168.1.0/28

192.168.1.0001 0000----192.168.1.16/28

192.168.1.0010 0000----192.168.1.32/28

192.168.1.0011 0000----192.168.1.48/28

192.168.1.0100 0000----192.168.1.64/28

192.168.1.0101 0000----192.168.1.80/28

192.168.1.0110 0000----192.168.1.96/28

192.168.1.0111 0000----192.168.1.112/28

192.168.1.1000 0000----192.168.1.128/28

192.168.1.1001 0000----192.168.1.144/28

192.168.1.1010 0000----192.168.1.160/28

192.168.1.1011 0000----192.168.1.176/28

192.168.1.1100 0000----192.168.1.192/28

192.168.1.1101 0000----192.168.1.208/28

192.168.1.1110 0000----192.168.1.224/28

192.168.1.1111 0000----192.168.1.240/28

3.将从头到尾数相邻两个网段一组作为路由器的环回接口,在汇总和拆分时能够减少路由条目,提高转发效率的目的,且这样能减少路由黑洞的产生。并将网段信息注明在拓扑图上,方便自身查找IP地址或网段信息。

4.对所有的路由器的接口IP地址进行配置,使全网能够实现可以到达。

<r1>sys    
<r1>system-view ----进入系统视图

R1-R5:

1.配置直连路由接口
[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.129 28

[r1]int g 0/0/1
[r1-GigabitEthernet0/0/1]ip address 192.168.1.177 28

[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.1.130 28

[r2]int g 0/0/1
[r1-GigabitEthernet0/0/1]ip address 192.168.1.145 28

[r3]int g 0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.1.146 28

[r3]int g 0/0/1
[r3-GigabitEthernet0/0/1]ip address 192.168.1.161 28

[r4]int g 0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.1.178 28

[r4]int g 0/0/1
[r4-GigabitEthernet0/0/1]ip address 192.168.1.162 28

[r4]int g 3/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.1.193 28

[r4]int g 0/0/2
[r4-GigabitEthernet0/0/1]ip address 192.168.1.209 28

[r5]int g 0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.1.1210 28

[r5]int g 0/0/1
[r4-GigabitEthernet0/0/1]ip address 192.168.1.194 28

2.配置环回接口

[r1]int LoopBack 0
[r1-LoopBack0]ip address 192.168.1.1 28                                                                  

[r1]int LoopBack 1
[r1-LoopBack1]ip address 192.168.1.17 28  

[r2]int LoopBack 0
[r2-LoopBack0]ip address 192.168.1.32 28                                                                                 

[r2]int LoopBack 1
[r2-LoopBack1]ip address 192.168.1.48 28  

[r3]int LoopBack 0
[r3-LoopBack0]ip address 192.168.1.64 28                                                                                       

[r3]int LoopBack 1
[r3-LoopBack1]ip address 192.168.1.80 28  

[r4]int LoopBack 0
[r4-LoopBack0]ip address 192.168.1. 96 28                                                                                     

[r4]int LoopBack 1
[r4-LoopBack1]ip address 192.168.1.112 28  

display ip interface brief   ----  查看路由接口IP

 

 3.配置静态路由

R1:

ip route-static 192.168.1.32 27 192.168.1.130

ip route-static 192.168.1.96 27 192.168.1.130

ip route-static 192.168.1.64 27 192.168.1.130

ip route-static 192.168.1.64 27 192.168.1.178

ip route-static 192.168.1.144 28 192.168.1.130

ip route-static 192.168.1.168 28 192.168.1.178

ip route-static 192.168.1.192 28 192.168.1.178

ip route-static 192.168.1.208 28 192.168.1.178

R2:

ip route-static 192.168.1.0 27 192.168.1.129

ip route-static 192.168.1.64 27 192.168.1.146

ip route-static 192.168.1.176 28 192.168.1.129

ip route-static 192.168.1.160 28 192.168.1.146

ip route-static 192.168.1.96 27 192.168.1.129

ip route-static 192.168.1.96 27 192.168.1.146

ip route-static 192.168.1.192 27 192.168.1.129

R3:

ip route-static 192.168.1.32 27 192.168.1.145

ip route-static 192.168.1.96 27 192.168.1.162

ip route-static 192.168.1.0 27 192.168.1.145

ip route-static 192.168.1.0 27 192.168.1.162

ip route-static 192.168.1.128 28 192.168.1.145

ip route-static 192.168.1.176 28 192.168.1.162

ip route-static 192.168.1.192 28 192.168.1.162

ip route-static 192.168.1.208 28 192.168.1.162

R4:

ip route-static 192.168.1.0 27 192.168.1.177

ip route-static 192.168.1.64 27 192.168.1.161

ip route-static 192.168.1.128 28 192.168.1.177

ip route-static 192.168.1.144 28 192.168.1.161

ip route-static 192.168.1.32 27 192.168.1.177

ip route-static 192.168.1.32 27 192.168.1.145

R5:

ip route-static 192.168.1.0 27 192.168.1.193

ip route-static 192.168.1.64 27 192.168.1.193

ip route-static 192.168.1.128 28 192.168.1.193

ip route-static 192.168.1.144 28 192.168.1.193

ip route-static 192.168.1.160 28 192.168.1.193

ip route-static 192.168.1.176 28 192.168.1.193

ip route-static 192.168.1.32 27 192.168.1.193

ip route-static 192.168.1.32 27 192.168.1.193

4.要求R1-R4上不能直接编写到达5.5.5.0/24网段的静态路由,但依然可以访问.这里我们可以使用缺省路由对R1-R4进行配置。

R1

ip route-static 0.0.0.0 0.0.0.0 192.168.1.178

R2

ip route-static 0.0.0.0 0.0.0.0 192.168.1.146
R3

ip route-static 0.0.0.0 0.0.0.0 192.168.1.162

 R4

ip route-static 0.0.0.0 0.0.0.0 192.168.1.194

5.对R4-R5有两条传输线路,上面网段的传输速度为1000Mbit/s,下面的网段的传输速度为100Mbit/s,两个的传输速率不相同,显然上面的传输速率大于下面。所以我们使用负载均衡。路由器默认的静态路由的优先级为60,这样我们可以通过修改路由的优先级,来达到实现路由的备份效果。

对于AR4:

ip route-static 5.5.5.0 24 192.168.1.210 preference 61

对于AR5:

ip route-static 192.168.1.96 27 192.168.1.209 preference 61

测试:

 

 

 

 

 

 

 

 

  • 4
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值