打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
静态路由与缺省路由配置

实验04  静态路由与缺省路由配置

1.实验目标

       在本试验,我们将学习如何用静态路由和缺省路由两种方法配置路由器

2.实验拓扑

       图1是本实验用到的拓扑。

图1  静态路由及缺省路由配置图示

 

3.实验要求

       某公司在深圳、上海、北京各有一分公司,为了使得各分公司的网络能够通信,公司在三地分别购买了路由器,为R1、R2、R3,同时申请了DDN线路。现要用静态路由配置各路由器使得三地的网络能够通信。

4.实验步骤

       ⑴ R1路由器配置IP地址和IP路由:

       R1#conf t

       R1(config)#interface f0/0

       R1(config-if)#ip address 10.1.1.254 255.255.255.0

R1(config-if)#no shutdown

R1(config-if)#interface s0/0

R1(config-if)#ip address 10.1.2.1 255.255.255.0

R1(config-if)#no shutdown

R1(config-if)#exit

R1(config)#ip route 10.1.3.0 255.255.255.0 10.1.2.2

R1(config)#ip route 10.1.4.0 255.255.255.0 10.1.2.2

       ⑵ R2路由器配置IP地址和IP路由:

       R2#conf t

       R2(config)#interface s0/0

       R2(config-if)#ip address 10.1.2.2 255.255.255.0

R2(config-if)#clock rate 64000

R2(config-if)#no shutdown

R2(config-if)#interface s0/1

R2(config-if)#ip address 10.1.3.1 255.255.255.0

R2(config-if)#clock rate 64000

R2(config-if)#no shutdown

R2(config-if)#exit

R2(config)#ip route 10.1.1.0 255.255.255.0 10.1.2.1

R2(config)#ip route 10.1.4.0 255.255.255.0 10.1.3.2

       ⑶ R3路由器配置IP地址和IP路由:

       R3#conf t

       R3(config)#interface f0/0

       R3(config-if)#ip address 10.1.4.254 255.255.255.0

R3(config-if)#no shutdown

R3(config-if)#interface s0/0

R3(config-if)#ip address 10.1.3.2 255.255.255.0

R3(config-if)#no shutdown

R3(config-if)#exit

R3(config)#ip route 10.1.1.0 255.255.255.0 10.1.3.1

R3(config)#ip route 10.1.2.0 255.255.255.0 10.1.3.1

⑷ 在R1、R2、R3路由器上检查接口、路由情况:

R1#show ip route

R1#show ip interfaces

R1#show interface

R2#show ip route

R2#show ip interfaces

R2#show interface

R3#show ip route

R3#show ip interfaces

R3#show interface

问题1】:路由器上的路由器表各有几条,分别是什么类型?

⑸ 在各路由器上用“ping”命令测试到各网络的连通性

⑹ 在R1、R3上取消已配置的静态路由,R2保持不变:

R1:

R1(config)#no ip route 10.1.3.0 255.255.255.0 10.1.2.2

R1(config)#no ip route 10.1.4.0 255.255.255.0 10.1.2.2

R1(config)#exit

R1#show ip route

R3:

R3(config)#no ip route 10.1.1.0 255.255.255.0 10.1.3.1

R3(config)#no ip route 10.1.2.0 255.255.255.0 10.1.3.1

R3(config)#exit

R3#show ip route

⑺ 在R1、R3上配置缺省路由:

R1:

R1(config)#ip route 0.0.0.0 0.0.0.0 10.1.2.2

R1(config)#ip classless

R3:

R3(config)#ip route 0.0.0.0 0.0.0.0 10.1.3.1

R3(config)#ip classless

【问题2为什么要配置“ip classless

⑻ 在各路由器上用“ping”命令测试到各网络的连通性

【问题3缺省路由用在什么场合较好?

5实验问题参考答案

问题1】:都分别有4条路由,即到4个网络的路由,各自有两条直连网络的路由(用‘c’表示)和两条静态路由(用‘s’表示)。

问题2】:缺省时是可以不配置的,显式配置是防止有人执行了“no ip classless”,“ip classless”使得路由器对于查找不到路由的数据包会用缺省路由来转发。

问题3】:缺省路由通常用于桩网络。

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
思科路由器配置静态路由
EIGRP两条不等价的链路上实现负载均衡 - 思科认证 - 51CTO技术论坛_中国领先的...
思科扩展ACL具体怎么配置?
交换机常用40条运维配置命令
Cisco路由器上配置DHCP全程详解
静态路由也能胜任多网段之间进行通信
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服