静态路由实验

 

要求:

1、全网用192.168.1.0/24进行IP地址分配

2、R5作为DHCP服务器为PC分配ip地址

3、路由上均具有两个环回地址

4、R6与R7之间正常走1000M,备份走100M

5、全网尽量负载均衡

6、减少路由表数量,并避免环路产生

7、全网可达

 

首先根据上图有5台路由器、7个广播域、10个环回地址===共17个广播域
我和可以将这张图堪称一个整体,5台路由器分别为一个,这样我们就可以之分成6个就行
根据划分的IP 我们在去细化每一个广播域

192.168.1.0/24
192.168.1.000 00000  27----骨干
    192.168.1.000 000 00 30--192.168.1.0/30---    R1R2
    192.168.1.000 001 00 30--192.168.1.4/30---R1R3
    192.168.1.000 010 00 30--192.168.1.8/30---R2R4
    192.168.1.000 011 00 30--192.168.1.12/30---R3R4
    192.168.1.000 100 00 30--192.168.1.16/30---R4R5-1000
    192.168.1.000 101 00 30--192.168.1.20/30---R4R5-100
    192.168.1.000 110 00 30--192.168.1.24/30---12
    192.168.1.000 111 00 30--192.168.1.28/30---12
    因为A5到两台PC之间需要3个IP,上面划分的IP段不够用,那么我们需要汇总将 
    192.168.1.24/30---12   192.168.1.28/30---12 进行汇总
          192.168.1.00011000----192.168.1.24/29  ----R5-PC
因为环回只有两个
192.168.1.001 00000  27---- R1环回 
    192.168.1.001 0  0000 28---192.168.1.32/28
    192.168.1.001 1  0000 28---192.168.1.48/28      
192.168.1.010 00000  27---- R2环回 
    192.168.1.010 0  0000 28---192.168.1.64/28
    192.168.1.010 1  0000 28---192.168.1.80/28
168.1.011 00000  27---- R3环回 
    192.168.1.011 0  0000 28---192.168.1.96/28
    192.168.1.011 1  0000 28---192.168.1.112/28    
192.168.1.100 00000  27---- R4环回
    192.168.1.100 0  0000 28---192.168.1.128/28
    192.168.1.100 1  0000 28---192.168.1.144/28
192.168.1.101 00000  27---- R5环回
    192.168.1.101 0  0000 28---192.168.1.160/28
    192.168.1.101 1  0000 28---192.168.1.176/28
192.168.1.110 00000  27----保留 
192.168.1.111 00000  27----保留 


R1配置

int g 0/0/0
 ip add 192.168.1.1 30
int g 0/0/1
 ip add 192.168.1.5 30   
int LoopBack 0
 ip add 192.168.1.33 28  
int LoopBack 1
 ip add 192.168.1.49 28  

R2配置
int g 0/0/0
 ip add 192.168.1.2 30
int g 0/0/1
 ip add 192.168.1.9 30   
int LoopBack 0
 ip add 192.168.1.65 28  
int LoopBack 1
 ip add 192.168.1.81 28  
 
R3配置
int g 0/0/0
 ip add 192.168.1.6 30
int g 0/0/1
 ip add 192.168.1.13 30   
int LoopBack 0
 ip add 192.168.1.97 28  
int LoopBack 1
 ip add 192.168.1.113 28
 
R4配置
int g 0/0/0
 ip add 192.168.1.10 30
int g 0/0/1
 ip add 192.168.1.14 30   
int g 0/0/2
 ip add 192.168.1.17 30
int g 4/0/0
 ip add 192.168.1.21 30   
int LoopBack 0
 ip add 192.168.1.129 28  
int LoopBack 1
 ip add 192.168.1.145 28

R5配置
int g 0/0/0
 ip add 192.168.1.18 30
int g 0/0/1
 ip add 192.168.1.22 30 
int g 0/0/2
 ip add 192.168.1.25 29    
int LoopBack 0
 ip add 192.168.1.161 28  
int LoopBack 1
 ip add 192.168.1.177 28
  
配置完所有路由器的IP后,首先检查端口是不是双UP,ip是否配置正确,然后互ping 测试
这样我们的要求1、全网可达 3、两个环回地址就配置完成

下来R5作为DHCP服务器
R5上配置DHCP地址池

[R5]dhcp enable     开启DHCP服务
[R5]ip pool huawei 创建名叫huawei的地址池
[R5-ip-pool-huawei]network 192.168.1.24 mask 29    配置ip地址及掩码
[R5-ip-pool-huawei]gateway-list 192.168.1.25    配置网关
[R5-ip-pool-huawei]dns-list 8.8.8.8      配置DNS
[R5-ip-pool-huawei]q
[R5]int g 0/0/2    
[R5-GigabitEthernet0/0/2]dhcp select global  激活地址池

R1路由配置
[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
[R1]ip route-static 192.168.1.96 27 192.168.1.6
[R1]ip route-static 192.168.1.96 27 192.168.1.2

R2路由配置
[R2]ip route-static 0.0.0.0 0 192.168.1.10 
[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]ip route-static 192.168.1.96 27 192.168.1.1
[R2]ip route-static 192.168.1.96 27 192.168.1.10

R3路由配置
ip route-static 0.0.0.0 0.0.0.0 192.168.1.14
ip route-static 192.168.1.0 255.255.255.252 192.168.1.5
ip route-static 192.168.1.32 255.255.255.224 192.168.1.5
ip route-static 192.168.1.64 255.255.255.224 192.168.1.5
ip route-static 192.168.1.64 255.255.255.224 192.168.1.14

R4路由配置
[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 preference 70
[R4]ip route-static 192.168.1.0 30 192.168.1.9 
[R4]ip route-static 192.168.1.4 30 192.168.1.13
[R4]ip route-static 192.168.1.64 27 192.168.1.9
[R4]ip route-static 192.168.1.96 27 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

R5路由配置
[R5]ip route-static 192.168.1.0 24 192.168.1.17    
[R5]ip route-static 192.168.1.0 24 192.168.1.21 preference 70

所有配置完成后ping 测试 
为何防止他们会因为某一条链路断开后会环路,我没给每一个路由器加上空接口防环

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
R5
ip route-static 192.168.1.160 27 NULL 0
ip route-static 192.168.1.196 27 NULL 0
ip route-static 192.168.1.224 27 NULL 0

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值