静态路由实验

     一、实验拓

 二、实验需求

1.除了R7的环回地址固定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与R7之间,正常1000M链路通讯,故障时自动改为100M;  

三、实验思路

1.划分192.168.1.0/24
方法一(不节约ip地址):因为共有14个网段,骨干链路有6个网段,四个路由器又有两个环回口,共八个网段
所以要划分14个网段,故借4位主机位,划分16个子网,用前14个子网
192.168.1.0/24    ==  192.168.1.0000 0000 
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 
方法二(节约IP地址):骨干链路一个大网段,四个环回口四个大网段
借3位主机位,划分8个网段,取前五个网段
192.168.1.0000 0000--骨干链路
再划分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.0001 1100
 环回口:分别借一位主机位,每个环回口划分两个子网
192.168.1.0010 0000--R1环回口--192.168.1.32/27
192.168.1.0010 0000--L0--192.168.1.32/28
192.168.1.0011 0000--L1--192.168.1.48/28
192.168.1.0100 0000--R2环回口--192.168.1.64/27
192.168.1.0100 0000--L0--192.168.1.64/28
192.168.1.0101 0000--L1--192.168.1.80/28
192.168.1.0110 0000--R3环回口--192.168.1.96/27
192.168.1.0110 0000--L0--192.168.1.96/28
192.168.1.0111 0000--L1--192.168.1.112/28
192.168.1.1000 0000--R4环回口--192.168.1.128/27
192.168.1.1000 0000--L0--192.168.1.128/28
192.168.1.1001 0000--L1--192.168.1.144/28
2.编写除了到达5.5.5.0/24之外,到达其他网段的静态路由

3.配置缺省路由,实现5.5.5.0/24互通,至此实现全网通测试

4配置黑洞路由,防环

5.配置备份线路,改变路由条目优先级

6.测试,观察1000Mb/s的线路故障时,数据能否走100Mb/s线路

四、实验步骤

1.给路由器命名,并配置IP地址

R1:interface GigabitEthernet0/0/0  ip address 192.168.1.1 255.255.255.252 
        interface GigabitEthernet0/0/1 ip address 192.168.1.5 255.255.255.252 
        interface LoopBack0  ip address 192.168.1.33 255.255.255.240 
        interface LoopBack1  ip address 192.168.1.49 255.255.255.240 

R2:interface GigabitEthernet0/0/0  ip address 192.168.1.2 255.255.255.252 
        interface GigabitEthernet0/0/1ip address 192.168.1.9 255.255.255.252 
        interface LoopBack0  ip address 192.168.1.65 255.255.255.240 
        interface LoopBack1  ip address 192.168.1.81 255.255.255.240 
R3:interface GigabitEthernet0/0/0 ip address 192.168.1.13 255.255.255.252 
        interface GigabitEthernet0/0/1 ip address 192.168.1.6 255.255.255.252 
        interface LoopBack0   ip address 192.168.1.97 255.255.255.240 
        interface LoopBack1   ip address 192.168.1.113 255.255.255.240 
R4:interface GigabitEthernet0/0/0 ip address 192.168.1.10 255.255.255.252 
        interface GigabitEthernet0/0/1ip address 192.168.1.14 255.255.255.252 
        interface GigabitEthernet0/0/2ip address 192.168.1.17 255.255.255.252 
        interface GigabitEthernet4/0/0 ip address 192.168.1.21 255.255.255.252

        interface LoopBack0 ip address 192.168.1.129 255.255.255.240 

        interface LoopBack1  ip address 192.168.1.145 255.255.255.240 

R7:interface GigabitEthernet0/0/0 ip address 192.168.1.18 255.255.255.252 
        interface GigabitEthernet0/0/1  ip address 192.168.1.22 255.255.255.252 
        interface LoopBack0  ip address 5.5.5.5 255.255.255.0 

2.配置静态路由,且除5.5.5.0/24 ,全网可达

R1:

ip route-static 192.168.1.8 255.255.255.252 192.168.1.2
ip route-static 192.168.1.12 255.255.255.252 192.168.1.6
ip route-static 192.168.1.16 255.255.255.252 192.168.1.2
ip route-static 192.168.1.16 255.255.255.252 192.168.1.6
ip route-static 192.168.1.20 255.255.255.252 192.168.1.2
ip route-static 192.168.1.20 255.255.255.252 192.168.1.6
ip route-static 192.168.1.64 255.255.255.224 192.168.1.2
ip route-static 192.168.1.96 255.255.255.224 192.168.1.6
ip route-static 192.168.1.128 255.255.255.224 192.168.1.2
ip route-static 192.168.1.128 255.255.255.224 192.168.1.6

R2:

ip route-static 192.168.1.4 255.255.255.252 192.168.1.1
ip route-static 192.168.1.12 255.255.255.252 192.168.1.10
ip route-static 192.168.1.16 255.255.255.252 192.168.1.10
ip route-static 192.168.1.20 255.255.255.252 192.168.1.10
ip route-static 192.168.1.32 255.255.255.224 192.168.1.1
ip route-static 192.168.1.96 255.255.255.224 192.168.1.10
ip route-static 192.168.1.96 255.255.255.224 192.168.1.1
ip route-static 192.168.1.128 255.255.255.224 192.168.1.10

R3:

ip route-static 192.168.1.0 255.255.255.252 192.168.1.5
ip route-static 192.168.1.8 255.255.255.252 192.168.1.14
ip route-static 192.168.1.16 255.255.255.252 192.168.1.14
ip route-static 192.168.1.20 255.255.255.252 192.168.1.14
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
ip route-static 192.168.1.128 255.255.255.224 192.168.1.14
R4:

ip route-static 192.168.1.0 255.255.255.252 196.168.1.9
ip route-static 192.168.1.0 255.255.255.252 192.168.1.9
ip route-static 192.168.1.4 255.255.255.252 196.168.1.13
ip route-static 192.168.1.4 255.255.255.252 192.168.1.13
ip route-static 192.168.1.32 255.255.255.224 196.168.1.13
ip route-static 192.168.1.32 255.255.255.224 196.168.1.9
ip route-static 192.168.1.32 255.255.255.224 192.168.1.13
ip route-static 192.168.1.32 255.255.255.224 192.168.1.9
ip route-static 192.168.1.64 255.255.255.224 196.168.1.9
ip route-static 192.168.1.64 255.255.255.224 192.168.1.9
ip route-static 192.168.1.96 255.255.255.224 196.168.1.13
ip route-static 192.168.1.96 255.255.255.224 192.168.1.13
R7:

ip route-static 192.168.1.0 255.255.255.252 192.168.1.17
ip route-static 192.168.1.0 255.255.255.252 192.168.1.21 
ip route-static 192.168.1.4 255.255.255.252 192.168.1.17
ip route-static 192.168.1.4 255.255.255.252 192.168.1.21 
ip route-static 192.168.1.8 255.255.255.252 192.168.1.17
ip route-static 192.168.1.8 255.255.255.252 192.168.1.21 
ip route-static 192.168.1.12 255.255.255.252 192.168.1.17
ip route-static 192.168.1.12 255.255.255.252 192.168.1.21
ip route-static 192.168.1.32 255.255.255.224 192.168.1.17
ip route-static 192.168.1.32 255.255.255.224 192.168.1.21 
ip route-static 192.168.1.64 255.255.255.224 192.168.1.17
ip route-static 192.168.1.64 255.255.255.224 192.168.1.21 
ip route-static 192.168.1.96 255.255.255.224 192.168.1.17
ip route-static 192.168.1.96 255.255.255.224 192.168.1.21 
ip route-static 192.168.1.128 255.255.255.224 192.168.1.17
ip route-static 192.168.1.128 255.255.255.224 192.168.1.21

3、配置缺省路由,实现5.5.5.0/24互通

R1:

ip route-static 0.0.0.0 0.0.0.0 192.168.1.2
ip route-static 0.0.0.0 0.0.0.0 192.168.1.6
R2

ip route-static 0.0.0.0 0.0.0.0 192.168.1.10
 

R3

ip route-static 0.0.0.0 0.0.0.0 192.168.1.14

R4

ip route-static 0.0.0.0 0.0.0.0 192.168.1.18
ip route-static 0.0.0.0 0.0.0.0 192.168.1.22

4、防环,做黑洞路由配置

R1:ip route-static 192.168.1.32 255.255.255.224 NULL0

R2:ip route-static 192.168.1.64 255.255.255.224 NULL0

R3:ip route-static 192.168.1.96 255.255.255.224 NULL0

R4:ip route-static 192.168.1.128 255.255.255.224 NULL0

5、做备份

ip route-static 192.168.1.0 255.255.255.252 192.168.1.21 preference 61
ip route-static 192.168.1.4 255.255.255.252 192.168.1.21 preference 61
ip route-static 192.168.1.8 255.255.255.252 192.168.1.21 preference 61
ip route-static 192.168.1.12 255.255.255.252 192.168.1.21 preference 61
ip route-static 192.168.1.32 255.255.255.224 192.168.1.21 preference 61
ip route-static 192.168.1.64 255.255.255.224 192.168.1.21 preference 61 

ip route-static 192.168.1.96 255.255.255.224 192.168.1.21 preference 61

ip route-static 192.168.1.128 255.255.255.224 192.168.1.21 preference 61

六、测试

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值