路由器配置——OSPF协议(1)
一、实验目的:用OSPF协议使全网互通
二、拓扑图
三、具体步骤配置
(1)R1路由器配置
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#interface f0/0
R1(config-if)#ip address 192.168.1.2 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#interface s0/0/0
R1(config-if)#ip address 10.1.1.1 255.255.255.0
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown
R1(config-if)#interface s0/0/1
R1(config-if)#ip address 30.1.1.1 255.255.255.0
R1(config-if)#clock rate 64000
This command applies only to DCE interfaces
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 192.168.1.0 0.0.0.255 area 0
R1(config-router)#network 10.1.1.0 0.0.0.255 area 0
R1(config-router)#network 30.1.1.0 0.0.0.255 area 0
R1(config-router)#end
(2)R2路由器配置
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2
R2(config)#interface f0/0
R2(config-if)#ip address 192.168.2.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#interface s0/0/0
R2(config-if)#ip address 20.1.1.1 255.255.255.0
R2(config-if)#clock rate 64000
R2(config-if)#no shutdown
R2(config-if)#interface s0/0/1
R2(config-if)#ip address 10.1.1.2 255.255.255.0
R2(config-if)#clock rate 64000
This command applies only to DCE interfaces
R2(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial0/0/1, changed state to down
R2(config-if)#exit
R2(config)#router ospf 1
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 192.168.2.0 0.0.0.255 area 0
R2(config-router)#network 20.1.1.0 0.0.0.255 area 0
R2(config-router)#network 10.1.1.0 0.0.0.255 area 0
R2(config-router)#end
(3)R3路由器配置
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R3
R3(config)#interface f0/0
R3(config-if)#ip address 192.168.3.1 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#interface s0/0/0
R3(config-if)#ip address 30.1.1.2 255.255.255.0
R3(config-if)#clock rate 64000
R3(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down
R3(config-if)#interface s0/0/1
R3(config-if)#ip address 20.1.1.2 255.255.255.0
R3(config-if)#clock rate 64000
This command applies only to DCE interfaces
R3(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial0/0/1, changed state to down
R3(config-if)#exit
R3(config)#router ospf 1
R3(config-router)#router-id 3.3.3.3
R3(config-router)#network 192.168.3.0 0.0.0.255 area 0
R3(config-router)#network 30.1.1.0 0.0.0.255 area 0
R3(config-router)#network 20.1.1.0 0.0.0.255 area 0
R3(config-router)#end
(4)R4路由器配置
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R4
R4(config)#interface f0/0
R4(config-if)#ip address 192.168.1.1 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#interface f0/1
R4(config-if)#ip address 192.168.10.254 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#exit
R4(config)#router ospf 1
R4(config-router)#router-id 4.4.4.4
R4(config-router)#network 192.168.1.0 0.0.0.255 area 0
R4(config-router)#network 192.168.10.0 0.0.0.255 area 0
R4(config-router)#end
(5)R5路由器配置
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R5
R5(config)#interface f0/0
R5(config-if)#ip address 192.168.3.2 255.255.255.0
R5(config-if)#no shutdown
R5(config-if)#interface f0/1
R5(config-if)#ip address 192.168.30.254 255.255.255.0
R5(config-if)#no shutdown
R5(config-if)#exit
R5(config)#router ospf 1
R5(config-router)#router-id 5.5.5.5
R5(config-router)#network 192.168.3.0 0.0.0.255 area 0
R5(config-router)#network 192.168.30.0 0.0.0.255 area 0
R5(config-router)#end
(6)R6路由器配置
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R6
R6(config)#interface f0/0
R6(config-if)#ip address 192.168.2.1 255.255.255.0
R6(config-if)#no shutdown
R6(config-if)#interface f0/1
R6(config-if)#ip address 192.168.20.254 255.255.255.0
R6(config-if)#no shutdown
R6(config-if)#exit
R6(config)#router ospf 1
R6(config-router)#router-id 6.6.6.6
R6(config-router)#network 192.168.2.0 0.0.0.255 area 0
R6(config-router)#network 192.168.20.0 0.0.0.255 area 0
R6(config-router)#end
四、验证测试
1、查看R1路由表信息
2、查看ip路由协议配置与统计信息
3、查看OSPF数据库信息
4、查看OSPF进程及区域的细节。如路由器运行SPF算法的次数
5、测试各台主机间是否互通
(1)PC1与PC2
(2)PC2与PC3
(3)PC3与PC1
路由器配置——OSPF协议(1)的更多相关文章
- 路由器配置——OSPF协议(2)
一.实验目的:使用OSPF协议达到全网互通的效果 二.拓扑图 三.具体步骤配置 (1)R1路由器配置 Router>enableRouter#configure terminalEnter co ...
- 路由器配置PPP协议 CHAP验证 PAP验证
路由器配置PPP协议 CHAP验证 PAP验证 来源 https://www.cnblogs.com/tcheng/p/5967485.html PAP是两次握手,明文传输用户密码进行认证:CHAP是 ...
- 华为路由器配置OSPF
OSPF是什么 OSPF(Open Shortest Pass First,开放最短路径优先协议),是一个最常用的内部网管协议,是一个链路状态协议. 使用场景:适用于运营商.政府机构等大型网络中多节点 ...
- OSPF协议详解
CCNP OSPF协议详解 2010-02-24 20:30:22 标签:CCNP 职场 OSPF 休闲 OSPF(Open Shortest Path Fitst,ospf)开放最短路径优先协议,是 ...
- H3C路由器配置——动态路由OSPF协议
一.介绍 1.OSPF协议介绍 (1).OSPF(Open Shortest Path First,开放最短路径优先)路由协议是用于网际协议(IP)网络的链路状态路由协议.是一个被各厂商设备广泛支持的 ...
- OSPF协议学习以及路由器配置
OSPF协议学习以及路由器配置 1.实验任务 2,使用eNsp搭建网络拓扑 3.配置路由IP ps:要使用GE(3层口),2层口(E口)需要先配置Vlan才能配置IP地址 4.配置路由器R1的ospf ...
- OSPF协议介绍及配置 (下)
4.特殊区域详解 为了让我们的讲解更加的通俗易懂,我们看上面这个拓扑,这是一个根据客户业务逻辑结构所涉及的OSPF网络,共有三个区域(实际上远远不止),骨干区域area0为一级行及二级行所部署,*** ...
- OSPF协议介绍及配置 (上)
OSPF协议介绍及配置 (上) 一.OSPF概述 回顾一下距离矢量路由协议的工作原理:运行距离矢量路由协议的路由器周期性的泛洪自己的路由表,通过路由的交互,每台路由器都从相邻的路由器学习到路由,并且加 ...
- OSPF协议介绍及配置
一.OSPF概述 回顾一下距离矢量路由协议的工作原理:运行距离矢量路由协议的路由器周期性的泛洪自己的路由表,通过路由的交互,每台路由器都从相邻的路由器学习到路由,并且加载进自己的路由表中,而对于这个网 ...
随机推荐
- codeforces 1249C1 + 1249C2 (贪心)
(点击此处查看原题) 题意分析 给出一个数n,求一个数m,使得m >= n ,并且m 满足: m = ∑ 3 ^ i * x (x = 0 或者 x = 1 ),求出满足条件的最小的m 解题思路 ...
- TCP协议探究(一):报文格式与连接建立终止
一 TCP:传输控制协议报文格式 1 TCP服务 提供面向连接.可靠的字节流服务 面向连接意味着两方通信,不支持多播和广播 可靠性的支持: 应用数据被分割成TCP认为最适合发送的数据块.由TCP传递给 ...
- winfrom_权限设置_TreeView的相关问题
1.获取TreeView的值: 循环TreeView,获取checked每个节点的Text,串起来用逗号“,”隔开,保存到数据库. List<string> list = new List ...
- springCloud的feign异常:RequestHeader参数为空时,对key加了大括号{}
好久没写博客了,今天趁着周末把工作中遇到的问题梳理一下(在这个问题排查过程中,发现自己排查问题的能力还是太弱了,需要加强). 最近在公司springCloud的项目里,通过feign远程调用其他服务, ...
- [JZOJ4307]喝喝喝--枚举
[JZOJ4307]喝喝喝--枚举 题目链接 自行搜索 分析 我们需要找到所有不包含\((a_x,a_y),a_x \equiv k \mod a_y (x<y)\)这样的连续数对,转化一下变成 ...
- 抽奖JQ
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8 ...
- VUE【三、指令】
模板指令 1.数据渲染(对应data数据) {{a}} 当使用v-once指令时,数据会一次绑定,后续修改值不会变化 v-text="a" 等同于{{a}} v-html=&quo ...
- (十一)tina | openwrt关闭调试串口(DEBUG UART)
//编辑以下文件 vi target/allwinner/astar-parrot/base-files/etc/inittab //不同系统文件路径注意更改 //文件内容如下,注释::askcon ...
- linux入门常用指令1.配置本地yum源
创建光盘挂载点 [root@localhost /]# mkdir /mnt/cdrom 挂载光盘 #挂载光盘 [root@localhost /]# mount /dev/cdrom /mnt/cd ...
- java——多线程并发库
JDK5中增加了Doug Lea的并发库,这一引进给Java线程的管理和使用提供了强大的便利性. java.util.current包中提供了对线程优化.管理的各项操作,使得线程的使用变得的心应手.该 ...