IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 系统运维 -> OSPF的配置练习 -> 正文阅读

[系统运维]OSPF的配置练习

? ? ? ?

思路:分析需求

要求1.首先R4有给定的换回路由,其他的环回路由和骨干链路的都需要配置在192.168.1.0/24网段?。

要求2:给定区域OSPF,R3的环回需在area0内

要求3:area0区域内无BDR,有且仅有R3为DR

要求4:R4的环回不能宣告,全网可达

解:

第一步:划分网段

三个环回接口+两个骨干链路? ?---? 5? ? ?//至少需要5个网段

2^n-2>5? ?---- n至少为3? ? //借3位

192.168.1.0? /24+3

192.168.1.0/27? ? --- 骨干链路

? ? ? ? 此时R3-R4需要两个地址? ? --- /30? ? ? 192.168.1.0 /30

? ? ? ? ? ?而R1-R3需要三个地址? ? ?---/29? ? ? ?192.168.1.8/29

192.168.1.32/27? ---R1的环回接口

? ? ? ? 192.168.1.33/27????????

192.168.1.64/27? ---R2的环回接口

? ? ? ? 192.168.1.65/27

192.168.1.96/27?----R3的环回接口

? ? ? ? 192.168.1.97/27

开始配置R1-R4的接口和环回地址

//R1
[R1-GigabitEthernet0/0/0]ip address  192.168.1.9 29
Nov 15 2021 23:50:13-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R1]interface   l 0
[R1-LoopBack0]ip a	
[R1-LoopBack0]ip address   192.168.1.33  27
[R1-LoopBack0]q

//R2
[R2-GigabitEthernet0/0/0]ip address  192.168.1.10  29
Nov 15 2021 23:50:38-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R2]int	
[R2]interface    l 0
[R2-LoopBack0]ip a	
[R2-LoopBack0]ip address   192.168.1.65  27
[R2-LoopBack0]q

//R3
[R3-GigabitEthernet0/0/0]ip address  192.168.1.11  29
Nov 15 2021 23:51:06-08:00 R3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R3-GigabitEthernet0/0/0]int	
[R3-GigabitEthernet0/0/0]int  g0/0/1
[R3-GigabitEthernet0/0/1]ip  address  192.168.1.2  30
Nov 15 2021 23:51:36-08:00 R3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[R3-GigabitEthernet0/0/1]q
[R3]int	
[R3]interface   l 0
[R3-LoopBack0]ip	
[R3-LoopBack0]ip a	
[R3-LoopBack0]ip address   192.168.1.97  27
[R3-LoopBack0]q

//R4
[R4-GigabitEthernet0/0/0]ip address  192.168.1.1  30
Nov 15 2021 23:50:38-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R2]int	
[R2]interface    l 0
[R2-LoopBack0]ip a	
[R2-LoopBack0]ip address   4.4.4.1   24
[R2-LoopBack0]q

经过检查,没有配置错误,现在开始配置OSPF协议

//R1
[R1]os 
[R1]ospf  1  
[R1]ospf  1  r 
[R1]ospf  1  router-id  1.1.1.1
[R1-ospf-1]area  0
[R1-ospf-1-area-0.0.0.0]net 
[R1-ospf-1-area-0.0.0.0]network   192.168.1.33 0.0.0.255
[R1-ospf-1-area-0.0.0.0]ne 
[R1-ospf-1-area-0.0.0.0]network  192.168.1.9  0.0.0.0

//R2
[R2]
[R2]oss 
[R2]osp 
[R2]ospf  1 r 
[R2]ospf  1 router-id  2.2.2.2
[R2-ospf-1]area 
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]ne 
[R2-ospf-1-area-0.0.0.0]network  192.168.1.10  0.0.0.255

//R3
[R3]
[R3]os 
[R3]ospf  1 r  
[R3]ospf  1 router-id  3.3.3.3
[R3-ospf-1]ara 
[R3-ospf-1]are 
[R3-ospf-1]area  1
[R3-ospf-1-area-0.0.0.1]net 
[R3-ospf-1-area-0.0.0.1]network   192.168.1.2  0.0.0.0
//另一个区域
[R3]ospf 1  r 
[R3]ospf 1  router-id  3.3.3.3
[R3-ospf-1]ar 
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]netw 
[R3-ospf-1-area-0.0.0.0]network 192.168.1.97  0.0.0.255

//R4
[R4]ospf  1 router-id   4.4.4.4
Info: The configuration succeeded. You need to restart the OSPF process to valid
ate the new router ID.
[R4-ospf-1]ar 
[R4-ospf-1]area  1
[R4-ospf-1-area-0.0.0.1]netw 
[R4-ospf-1-area-0.0.0.1]network   192.168.1.1  0.0.0.0

?此时没有检查OSPF表,除了R4的4.4.4.0 /24没有宣告地址无法ping通

//R1
[R1]display   ospf  peer  

	 OSPF Process 1 with Router ID 1.1.1.1
		 Neighbors 

 Area 0.0.0.0 interface 192.168.1.9(GigabitEthernet0/0/0)'s neighbors
 Router ID: 2.2.2.2          Address: 192.168.1.10    
   State: Full  Mode:Nbr is  Master  Priority: 1
   DR: 192.168.1.10  BDR: 192.168.1.11  MTU: 0    
   Dead timer due in 37  sec 
   Retrans timer interval: 4 
   Neighbor is up for 00:00:49     
   Authentication Sequence: [ 0 ] 

 Router ID: 3.3.3.3          Address: 192.168.1.11    
   State: Full  Mode:Nbr is  Master  Priority: 1
   DR: 192.168.1.10  BDR: 192.168.1.11  MTU: 0    
   Dead timer due in 30  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:00:43     
   Authentication Sequence: [ 0 ] 

//R2和R3同理
[R2]display   ospf  peer

	 OSPF Process 1 with Router ID 2.2.2.2
		 Neighbors 

 Area 0.0.0.0 interface 192.168.1.10(GigabitEthernet0/0/0)'s neighbors
 Router ID: 1.1.1.1          Address: 192.168.1.9     
   State: Full  Mode:Nbr is  Slave  Priority: 1
   DR: 192.168.1.9  BDR: 192.168.1.10  MTU: 0    
   Dead timer due in 40  sec 
   Retrans timer interval: 0 
   Neighbor is up for 00:03:48     
   Authentication Sequence: [ 0 ] 

 Router ID: 3.3.3.3          Address: 192.168.1.11    
   State: Full  Mode:Nbr is  Master  Priority: 1
   DR: 192.168.1.9  BDR: 192.168.1.10  MTU: 0    
   Dead timer due in 31  sec 
   Retrans timer interval: 4 
   Neighbor is up for 00:01:12     
   Authentication Sequence: [ 0 ] 

//R4
<R4>display   ospf   peer  

	 OSPF Process 1 with Router ID 4.4.4.4
		 Neighbors 

 Area 0.0.0.1 interface 192.168.1.1(GigabitEthernet0/0/0)'s neighbors
 Router ID: 3.3.3.3          Address: 192.168.1.2     
   State: Full  Mode:Nbr is  Slave  Priority: 1
   DR: 192.168.1.1  BDR: 192.168.1.2  MTU: 0    
   Dead timer due in 33  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:31:53     
   Authentication Sequence: [ 0 ] 

开始配置area0的BR和BDR

//R1
[R1]int	
[R1]interface g0/0/0
[R1-GigabitEthernet0/0/0]os	
[R1-GigabitEthernet0/0/0]ospf d	
[R1-GigabitEthernet0/0/0]ospf dr-priority  ?
  INTEGER<0-255>  Router priority value
[R1-GigabitEthernet0/0/0]ospf dr-priority  0

//R2
[R2]int	
[R2]interface  g0/0/0
[R2-GigabitEthernet0/0/0]os	
[R2-GigabitEthernet0/0/0]ospf  d	
[R2-GigabitEthernet0/0/0]ospf  dr-priority  0

此时再次查看area表内的内容?

[R3]display   ospf  peer  

	 OSPF Process 1 with Router ID 3.3.3.3
		 Neighbors 

 Area 0.0.0.0 interface 192.168.1.11(GigabitEthernet0/0/0)'s neighbors
 Router ID: 1.1.1.1          Address: 192.168.1.9     
   State: Full  Mode:Nbr is  Slave  Priority: 0
   DR: 192.168.1.11  BDR: None   MTU: 0    
   Dead timer due in 30  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:00:57     
   Authentication Sequence: [ 0 ] 

 Router ID: 2.2.2.2          Address: 192.168.1.10    
   State: Full  Mode:Nbr is  Slave  Priority: 0
   DR: 192.168.1.11  BDR: None   MTU: 0    
   Dead timer due in 36  sec 
   Retrans timer interval: 4 
   Neighbor is up for 00:00:29     
   Authentication Sequence: [ 0 ] 

		 Neighbors 

 Area 0.0.0.1 interface 192.168.1.2(GigabitEthernet0/0/1)'s neighbors
 Router ID: 4.4.4.4          Address: 192.168.1.1     
   State: Full  Mode:Nbr is  Master  Priority: 1
   DR: 192.168.1.1  BDR: 192.168.1.2  MTU: 0    
   Dead timer due in 32  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:05:46     
   Authentication Sequence: [ 0 ] 

此时已经没有BDR,只有BR

尝试ping联通

[R3]ping 192.168.1.1
  PING 192.168.1.1: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.1: bytes=56 Sequence=1 ttl=255 time=30 ms
    Reply from 192.168.1.1: bytes=56 Sequence=2 ttl=255 time=30 ms
    Reply from 192.168.1.1: bytes=56 Sequence=3 ttl=255 time=20 ms
    Reply from 192.168.1.1: bytes=56 Sequence=4 ttl=255 time=30 ms
    Reply from 192.168.1.1: bytes=56 Sequence=5 ttl=255 time=30 ms

  --- 192.168.1.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/28/30 ms

结束

  系统运维 最新文章
配置小型公司网络WLAN基本业务(AC通过三层
如何在交付运维过程中建立风险底线意识,提
快速传输大文件,怎么通过网络传大文件给对
从游戏服务端角度分析移动同步(状态同步)
MySQL使用MyCat实现分库分表
如何用DWDM射频光纤技术实现200公里外的站点
国内顺畅下载k8s.gcr.io的镜像
自动化测试appium
ctfshow ssrf
Linux操作系统学习之实用指令(Centos7/8均
上一篇文章      下一篇文章      查看所有文章
加:2021-11-17 13:09:07  更:2021-11-17 13:10:25 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年11日历 -2024/11/16 1:35:24-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码