路由协议ospf路由协议.docx

上传人:b****2 文档编号:11370089 上传时间:2023-05-31 格式:DOCX 页数:26 大小:141.55KB
下载 相关 举报
路由协议ospf路由协议.docx_第1页
第1页 / 共26页
路由协议ospf路由协议.docx_第2页
第2页 / 共26页
路由协议ospf路由协议.docx_第3页
第3页 / 共26页
路由协议ospf路由协议.docx_第4页
第4页 / 共26页
路由协议ospf路由协议.docx_第5页
第5页 / 共26页
路由协议ospf路由协议.docx_第6页
第6页 / 共26页
路由协议ospf路由协议.docx_第7页
第7页 / 共26页
路由协议ospf路由协议.docx_第8页
第8页 / 共26页
路由协议ospf路由协议.docx_第9页
第9页 / 共26页
路由协议ospf路由协议.docx_第10页
第10页 / 共26页
路由协议ospf路由协议.docx_第11页
第11页 / 共26页
路由协议ospf路由协议.docx_第12页
第12页 / 共26页
路由协议ospf路由协议.docx_第13页
第13页 / 共26页
路由协议ospf路由协议.docx_第14页
第14页 / 共26页
路由协议ospf路由协议.docx_第15页
第15页 / 共26页
路由协议ospf路由协议.docx_第16页
第16页 / 共26页
路由协议ospf路由协议.docx_第17页
第17页 / 共26页
路由协议ospf路由协议.docx_第18页
第18页 / 共26页
路由协议ospf路由协议.docx_第19页
第19页 / 共26页
路由协议ospf路由协议.docx_第20页
第20页 / 共26页
亲,该文档总共26页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

路由协议ospf路由协议.docx

《路由协议ospf路由协议.docx》由会员分享,可在线阅读,更多相关《路由协议ospf路由协议.docx(26页珍藏版)》请在冰点文库上搜索。

路由协议ospf路由协议.docx

路由协议ospf路由协议

5.3OSPF路由协议1

5.3.1OSPF的基本配置1

5.3.2关于ospfnetwork-type的配置原则4

5.3.3复杂些的多域OSPF配置4

5.3.4配置OSPF聚合7

5.3.5使用stub区10

5.3.6使用完全stub区12

5.3.7使用nssa15

5.3.8ospf的邻居认证配置18

5.3.9ospf虚连接的配置18

5.3OSPF路由协议

5.3.1OSPF的基本配置

『需求』

两台pc所在网段,通过两台使用OSPF协议的路由器实现互连互通。

第一种实现方法:

【RouterA】

当前路由器提示视图

依次输入的配置命令,重要的命令红色突出显示

简单说明

[Router]

!

适用版本:

vrp1.74及1.44

[Router]

routerid10.1.1.1

配置routerid

!

[Router]

interfaceEthernet0

进入以太0口

[Router-Ethernet0]

ipaddress10.1.1.1255.255.255.0

配置内网IP地址

[Router-Ethernet0]

ospfenablearea0.0.0.0

接口使能ospf,属于0域

!

[Router]

interfaceSerial0

进入串口0口

[Router-Serial0]

link-protocolppp

封装ppp协议

[Router-Serial0]

ipaddress20.1.1.2255.255.255.252

配置串口IP地址

[Router-Serial0]

ospfenablearea0.0.0.0

接口使能ospf,属于0域

!

quit

[Router]

ospfenable

启动ospf路由协议

!

【RouterB】

当前路由器提示视图

依次输入的配置命令,重要的命令红色突出显示

简单说明

[Router]

!

适用版本:

vrp1.74及1.44

[Router]

routerid30.1.1.1

配置routerid

!

[Router]

interfaceEthernet0

进入以太0口

[Router-Ethernet0]

ipaddress30.1.1.1255.255.255.0

配置内网IP地址

[Router-Ethernet0]

ospfenablearea0.0.0.0

接口使能ospf,属于0域

!

[Router]

interfaceSerial0

进入串口0口

[Router-Serial0]

link-protocolppp

封装ppp协议

[Router-Serial0]

ipaddress20.1.1.1255.255.255.252

配置串口IP地址

[Router-Serial0]

ospfenablearea0.0.0.0

接口使能ospf,属于0域

!

quit

[Router]

ospfenable

启动ospf路由协议

!

第二种方法:

【RouterA】

当前路由器提示视图

依次输入的配置命令,重要的命令红色突出显示

简单说明

[Router]

!

适用版本:

vrp1.74及1.44

[Router]

routerid10.1.1.1

配置routerid

!

[Router]

interfaceEthernet0

进入以太0口

[Router-Ethernet0]

ipaddress10.1.1.1255.255.255.0

配置内网IP地址

!

[Router]

interfaceSerial0

进入串口0口

[Router-Serial0]

link-protocolppp

封装ppp协议

[Router-Serial0]

ipaddress20.1.1.2255.255.255.252

配置串口IP地址

[Router-Serial0]

ospfenablearea0.0.0.0

接口使能ospf,属于0域

!

quit

[Router]

ospfenable

启动ospf路由协议

[Router-ospf]

import-routedirect

引入直连路由

!

【RouterB】

当前路由器提示视图

依次输入的配置命令,重要的命令红色突出显示

简单说明

[Router]

!

适用版本:

vrp1.74及1.44

[Router]

routerid30.1.1.1

配置routerid

!

[Router]

interfaceEthernet0

进入以太0口

[Router-Ethernet0]

ipaddress30.1.1.1255.255.255.0

配置内网IP地址

!

[Router]

interfaceSerial0

进入串口0口

[Router-Serial0]

link-protocolppp

封装ppp协议

[Router-Serial0]

ipaddress20.1.1.1255.255.255.252

配置串口IP地址

[Router-Serial0]

ospfenablearea0.0.0.0

接口使能ospf,属于0域

!

quit

[Router]

ospfenable

启动ospf路由协议

[Router-ospf]

import-routedirect

引入直连路由

!

『说明』

以上两种方法均能实现两台PC互通的需求;上面仅给出实现方法的具体配置,至于组网方式的确定,请参考其他OSPF协议组网资料。

5.3.2关于ospfnetwork-type的配置原则

Quidway路由器的网络类型缺省如下

ospf网络类型

链路层协议

p2p

PPP

NBMA

fr,x25,HDLC

p2mp

broadcast

Ethernet

『注意』

互连的路由器网络类型必须一致。

NBMA和p2mp的,必须在接口下配置:

[Router-Serial0]ospfpeer20.1.1.2

5.3.3复杂些的多域OSPF配置

『需求』

在一个OSPF自治系统中ABR的配置情况。

A,B运行在area0;B,C运行在area1,B为ABR

【RouterA】

当前路由器提示视图

依次输入的配置命令,重要的命令红色突出显示

简单说明

!

适用版本:

vrp1.74及1.44

[Router]

routerid10.1.1.1

配置routerid

!

[Router]

interfaceEthernet0

进入以太0口

[Router-Ethernet0]

ipaddress10.1.1.1255.255.255.0

配置内网IP地址

[Router-Serial1]

ospfenablearea0.0.0.0

接口使能ospf,属于0域

!

[Router]

interfaceSerial0

进入串口0口;连RouterB

[Router-Serial1]

link-protocolppp

封装ppp协议

[Router-Serial1]

ipaddress20.1.1.2255.255.255.252

配置串口IP地址

[Router-Serial1]

ospfenablearea0.0.0.0

接口使能ospf,属于0域

!

quit

[Router]

ospfenable

使能ospf

!

【RouterB】

当前路由器提示视图

依次输入的配置命令,重要的命令红色突出显示

简单说明

!

适用版本:

vrp1.74及1.44

[Router]

routerid30.1.1.1

配置routerid

!

[Router]

interfaceSerial0

进入串口0口;连RouterC

[Router-Serial0]

link-protocolppp

封装ppp协议

[Router-Serial0]

ipaddress30.1.1.1255.255.255.252

配置串口IP地址

[Router-Serial0]

ospfenablearea0.0.0.1

接口使能ospf,属于1域

!

[Router]

interfaceSerial1

进入串口0口;连RouterA

[Router-Serial1]

link-protocolppp

封装ppp协议

[Router-Serial1]

ipaddress20.1.1.1255.255.255.252

配置串口IP地址

[Router-Serial1]

ospfenablearea0.0.0.0

接口使能ospf,属于0域

!

quit

[Router]

ospfenable

使能ospf

!

【RouterC】

当前路由器提示视图

依次输入的配置命令,重要的命令红色突出显示

简单说明

!

适用版本:

vrp1.74及1.44

[Router]

routerid40.1.1.1

配置routerid

!

[Router]

interfaceEthernet0

进入以太0口

[Router-Ethernet0]

ipaddress40.1.1.1255.255.255.0

配置内网IP地址

[Router-Ethernet0]

ospfenablearea0.0.0.1

接口使能ospf,属于1域

!

[Router]

interfaceSerial0

进入串口0口;连RouterB

[Router-Serial0]

link-protocolppp

封装ppp协议

[Router-Serial0]

ipaddress30.1.1.2255.255.255.252

配置串口IP地址

[Router-Serial0]

ospfenablearea0.0.0.1

接口使能ospf,属于0域

!

quit

[Router]

ospfenable

使能ospf

!

5.3.4配置OSPF聚合

『需求』

在一个OSPF自治系统中ABR的配置情况。

A,B运行在area0;B,C运行在area1,B为ABR

RouterC上有两个接口配置了ospfenablearea1,他们分别是40.1.1.0/24和40.1.2.0/24网段

要求ABRRouterC上做路由聚合,将上两个网段聚合为一个网段

【RouterA】

当前路由器提示视图

依次输入的配置命令,重要的命令红色突出显示

简单说明

!

适用版本:

vrp1.74及1.44

[Router]

routerid10.1.1.1

配置routerid

!

[Router]

interfaceEthernet0

进入以太0口

[Router-ethernet0]

ipaddress10.1.1.1255.255.255.0

配置内网IP地址

[Router-ethernet0]

ospfenablearea0.0.0.0

接口使能ospf,属于0域

!

[Router]

interfaceSerial0

进入串口0口;连RouterB

[Router-Serial0]

link-protocolppp

封装ppp协议

[Router-Serial0]

ipaddress20.1.1.2255.255.255.252

配置串口IP地址

[Router-Serial0]

ospfenablearea0.0.0.0

接口使能ospf,属于0域

!

quit

[Router]

ospfenable

使能ospf

!

【RouterB】

当前路由器提示视图

依次输入的配置命令,重要的命令红色突出显示

简单说明

!

适用版本:

vrp1.74及1.44

[Router]

routerid30.1.1.1

配置routerid

!

[Router]

interfaceSerial0

进入串口0口;连RouterC

[Router-Serial0]

link-protocolppp

封装ppp协议

[Router-Serial0]

ipaddress30.1.1.1255.255.255.252

配置串口IP地址

[Router-Serial0]

ospfenablearea0.0.0.1

接口使能ospf,属于1域

!

[Router]

interfaceSerial1

进入串口0口;连RouterA

[Router-Serial1]

link-protocolppp

封装ppp协议

[Router-Serial1]

ipaddress20.1.1.1255.255.255.252

配置串口IP地址

[Router-Serial1]

ospfenablearea0.0.0.0

接口使能ospf,属于0域

!

quit

[Router]

ospfenable

使能ospf

[Router-ospf]

abr-summary40.1.0.0mask255.255.0.0area

0.0.0.1

ABR路由器将1域的包含在40.1.0.0/16内的网段聚合

!

【RouterC】

当前路由器提示视图

依次输入的配置命令,重要的命令红色突出显示

简单说明

!

适用版本:

vrp1.74及1.44

[Router]

routerid30.1.1.1

配置routerid

!

[Router]

interfaceEthernet0

进入以太0口

[Router-ethernet0]

ipaddress40.1.1.1255.255.255.0

配置内网IP地址

[Router-ethernet0]

ospfenablearea0.0.0.1

接口使能ospf,属于1域

!

[Router]

interfaceEthernet1

进入以太1口

[Router-ethernet1]

ipaddress40.1.2.1255.255.255.0

配置内网IP地址

[Router-ethernet1]

ospfenablearea0.0.0.1

接口使能ospf,属于1域

!

[Router]

interfaceSerial0

进入串口0口;连RouterB

[Router-Serial0]

link-protocolppp

封装ppp协议

[Router-Serial0]

ipaddress30.1.1.2255.255.255.252

配置串口IP地址

[Router-Serial0]

ospfenablearea0.0.0.1

接口使能ospf,属于1域

!

quit

[Router]

ospfenable

使能ospf

!

『注意』

路由聚合只能配置在ABR上。

路由聚合对组网也提出了要求:

同一非骨干域的网段请尽量连续可聚合。

否则以后网络扩容,维护难度加大很多。

5.3.5使用stub区

『需求』

一个OSPF自治系统中,A,B运行在area0,B,C运行在area1,且为stub区域,B为ABR

routerC引入到D的外部路由,area1可以去往D,除area1的其他区域无法访问D

【RouterA】

当前路由器提示视图

依次输入的配置命令,重要的命令红色突出显示

简单说明

!

适用版本:

vrp1.74及1.44

[Router]

routerid10.1.1.1

配置routerid

!

[Router]

interfaceEthernet0

进入以太0口

[Router-ethernet0]

ipaddress10.1.1.1255.255.255.0

配置内网IP地址

[Router-ethernet0]

ospfenablearea0.0.0.0

接口使能ospf,属于0域

!

[Router]

interfaceSerial0

进入串口0口;连RouterB

[Router-Serial0]

link-protocolppp

封装ppp协议

[Router-Serial0]

ipaddress20.1.1.2255.255.255.252

配置串口IP地址

[Router-Serial0]

ospfenablearea0.0.0.0

接口使能ospf,属于1域

!

quit

[Router]

ospfenable

使能ospf

!

【RouterB】

当前路由器提示视图

依次输入的配置命令,重要的命令红色突出显示

简单说明

!

适用版本:

vrp1.74及1.44

[Router]

routerid10.1.1.1

配置routerid

!

适用版本:

vrp1.74

[Router]

interfaceSeria0

进入串口0口;连RouterC

[Router-Serial0]

link-protocolppp

封装ppp协议

[Router-Serial0]

ipaddress30.1.1.1255.255.255.252

配置串口IP地址

[Router-Serial0]

ospfenablearea0.0.0.1

接口使能ospf,属于1域

!

[Router]

interfaceSerial1

进入串口0口;连RouterA

[Router-Serial1]

link-protocolppp

封装ppp协议

[Router-Serial1]

ipaddress20.1.1.1255.255.255.252

配置串口IP地址

[Router-Serial1]

ospfenablearea0.0.0.0

接口使能ospf,属于0域

!

quit

[Router]

ospfenable

使能ospf

[Router-ospf]

stubcost60area0.0.0.1

将1域配置成为stub域

!

『RouterC』

当前路由器提示视图

依次输入的配置命令,重要的命令红色突出显示

简单说明

!

适用版本:

vrp1.74及1.44

[Router]

routerid40.1.1.1

配置routerid

!

[Router]

interfaceEthernet0

进入以太0口

[Router-ethernet0]

ipaddress40.1.1.1255.255.255.0

配置内网IP地址

[Router-ethernet0]

ospfenablearea0.0.0.1

接口使能ospf,属于1域

!

[Router]

interfaceSerial0

进入串口0口;连RouterB

[Router-Serial0]

link-protocolppp

封装ppp协议

[Router-Serial0]

ipaddress30.1.1.2255.255.255.252

配置串口IP地址

[Router-Serial0]

ospfenablearea0.0.0.1

接口使能ospf,属于1域

!

[Router]

interfaceSerial1

进入串口1口;连D

[Router-Serial0]

link-protocolppp

封装ppp协议

[Router-Serial0]

ipaddress1.1.1.2255.255.255.252

配置串口IP地址

!

quit

[Router]

ospfenable

使能ospf

[Router-ospf]

stubcost60area0.0.0.1

将1域配置为stub域

[Router-ospf]

import-routestatic

引入静态路由

!

quit

iproute-static50.0.0.0255.0.0.01.1.1.1preference60

配置去往D的静态路由

5.3.6使用完全stub区

『需求』

一个OSPF自治系统中,A,B运行在area0,B,C运行在area1,且为stub区域,B为ABR

routerC引入到D的外部路由,area1和area1之外的其他区域无法访问D

【RouterA】

当前路由器提示视图

依次输入的配置命令,重要的命令红色突出显示

简单说明

!

适用版本:

vrp1.74

[Router]

routerid10.1.1.1

配置routerid

!

[Router]

interfaceEthernet0

进入以太0口

[Router-ethernet0]

ipaddress10.1.1.1255.255.255.0

配置内网IP地址

[Router-ethernet0]

ospfenablearea0.0.0.0

接口使能ospf,属于0域

!

[Router]

interfaceSerial0

进入串口0口;连RouterB

[Router-Serial0]

link-protocolppp

封装ppp协议

[Router-Serial0]

ipaddress20.1.

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 医药卫生 > 基础医学

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2