Lab2.Route&静态路由

Lab2.Route&静态路由


前言

提示: 本次实验需要掌握的主要知识是静态路由的工作原理,以及其配置命令,还有需要熟练最少路由条目的汇总。 以下是本篇文章正文内容,下面案例可供参考~

一、Requirements要求

在这里插入图片描述1、某网络整体结构如果所示,在Router1上有3个回环口,IP地址如图,Router3连接两台主机使用路由器模拟,整个网络存在不连续子网问题。现要求通过使用路由协议实现全网互联。
2、在各路由器上配置静态路由,要求使用详尽路由条目实现全网互联。分析静态路由工作原理。
3、删除之前静态路由配置,使用尽可能少的路由条目实现全网互联,分析是否存在路由风险。
4、将R1当成电信路由器,R3当做联通路由器,R2作为企业访问互联网的出口路由器,采用浮动静态路由,实现动态切换。
5、通过show ip route 分析路由表各项信息。

二、实现步骤

※实验拓扑

在这里插入图片描述

1.要求通过使用路由协议实现全网互联

接口规划如下:

在这里插入图片描述注意:
1、配置完Router的IP地址,必须no shutdown ;
2、PC机配置IP地址,必须关闭Router路由功能no ip routing。

接口查看如下:

R1
在这里插入图片描述R2在这里插入图片描述R3
在这里插入图片描述R4(PC1)
在这里插入图片描述R5(PC2)
在这里插入图片描述

2.在各路由器上配置静态路由,要求使用详尽路由条目实现全网互联

分析静态路由工作原理:
1.静态路由的工作原理:静态路由是网络管理员在路由器上手工添加路由信息以实现路由的手工配置, 无开销,配置简单,需人工维护,适合简单拓扑结构的网络。
2.静态路由的工作场合:适合小型到中型的网络,而且没有或只有较小的扩充计划时。 静态路由要手工输入,手工管理;管理开销对于动态路由来说是一个大大的负担。
3.静态路由的优点:带宽优良,安全性好。

配置静态路由思路:
命令:ip route 目的网段 子网掩码 数据包出端口或者是下一跳IP地址

第一台R1
R1(config)#ip route 172.16.4.0 255.255.255.0 172.17.1.2
R1(config)#ip route 172.16.5.0 255.255.255.0 172.17.1.2
R1(config)#ip route 172.16.6.0 255.255.255.240 172.17.1.2
在这里插入图片描述第二台R2
R2(config)#ip route 172.16.1.0 255.255.255.0 172.17.1.1
R2(config)#ip route 172.16.2.0 255.255.255.0 172.17.1.1
R2(config)#ip route 172.16.3.0 255.255.255.0 172.17.1.1
R2(config)#ip route 172.16.5.0 255.255.255.0 172.16.4.3
R2(config)#ip route 172.16.6.0 255.255.255.240 172.16.4.3
在这里插入图片描述第三台R3
R3(config)#ip route 172.16.1.0 255.255.255.0 172.16.4.2
R3(config)#ip route 172.16.2.0 255.255.255.0 172.16.4.2
R3(config)#ip route 172.16.3.0 255.255.255.0 172.16.4.2
R3(config)#ip route 172.17.1.0 255.255.255.0 172.16.4.2
在这里插入图片描述

3.删除之前静态路由配置,使用尽可能少的路由条目实现全网互联,分析是否存在路由风险

删除之前静态路由配置:
R1(config)#no ip route 172.16.4.0 255.255.255.0 172.17.1.2
R1(config)#no ip route 172.16.5.0 255.255.255.0 172.17.1.2
R1(config)#no ip route 172.16.6.0 255.255.255.240 172.17.1.2

R2(config)#no ip route 172.16.1.0 255.255.255.0 172.17.1.1
R2(config)#no ip route 172.16.2.0 255.255.255.0 172.17.1.1
R2(config)#no ip route 172.16.3.0 255.255.255.0 172.17.1.1
R2(config)#no ip route 172.16.5.0 255.255.255.0 172.16.4.3
R2(config)#no ip route 172.16.6.0 255.255.255.240 172.16.4.3

R3(config)#no ip route 172.16.1.0 255.255.255.0 172.16.4.2
R3(config)#no ip route 172.16.2.0 255.255.255.0 172.16.4.2
R3(config)#no ip route 172.16.3.0 255.255.255.0 172.16.4.2
R3(config)#no ip route 172.17.1.0 255.255.255.0 172.16.4.2

使用尽可能少的路由条目实现全网互联:
**该知识点要求能熟练最少路由条目汇总(IP地址汇总)(相同置0,不同置1)
R1(config)#ip route 172.16.4.0 255.255.252.0 172.17.1.2

R2(config)#ip route 172.16.0.0 255.255.252.0 172.17.1.1
R2(config)#ip route 172.16.4.0 255.255.252.0 172.16.4.3

R3(config)#ip route 172.16.0.0 255.255.252.0 172.16.4.2
R3(config)#ip route 172.17.1.0 255.255.255.0 172.16.4.2

4.将R1当成电信路由器,R3当做联通路由器,R2作为企业访问互联网的出口路由器,采用浮动静态路由,实现动态切换。

R1(config)#ip route 172.16.4.0 255.255.252.0 172.17.1.2 100
R1(config)#ip route 172.16.4.0 255.255.252.0 172.17.1.2
R1(config)#end

R3(config)#ip route 172.16.0.0 255.255.252.0 172.16.4.2 100
R3(config)#ip route 172.16.0.0 255.255.252.0 172.16.4.2
R3(config)#end

***分析:静态路由的用处是当以太链路优先选择,当以太链路出现故障的时候,选用串行链路,而在以太链路恢复后,再优先选以太链路。因此只要改变串行链路的管理距离。

5.通过show ip route 分析路由表各项信息

R1:
在这里插入图片描述R2:
在这里插入图片描述R3:
在这里插入图片描述

查看是否能够全网互联

R1#ping 172.16.4.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.4.3, timeout is 2 seconds:
!!!
R1#ping 172.16.5.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.5.5, timeout is 2 seconds:
!!!
R1#ping 172.16.6.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.6.4, timeout is 2 seconds:
!!!
R2#ping 172.16.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
!!!
R2#ping 172.16.2.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.2.1, timeout is 2 seconds:
!!!
R2#ping 172.16.3.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.3.1, timeout is 2 seconds:
!!!
R2#ping 172.16.5.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.5.5, timeout is 2 seconds:
.!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 84/114/128 ms
R2#ping 172.16.6.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.6.4, timeout is 2 seconds:
.!!!
R3#ping 172.16.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
!!!
R3#ping 172.16.2.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.2.1, timeout is 2 seconds:
!!!
R3#ping 172.16.3.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.3.1, timeout is 2 seconds:
!!!
R3#ping 172.17.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.17.1.1, timeout is 2 seconds:
!!!

总结

本次实验需要掌握的主要知识是静态路由的工作原理,以及其配置命令,还有需要熟练最少路由条目的汇总。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值