CCNP-OSPFv3

现在在企业中,用的IPv4居多,在我们的手机上,数据中心,运营商以及一些大企业用的都是IPv6;

为啥用IPv6啊,因为IPv4地址不够用,IPv4地址只有32bit,而IPv6足足有128bit;

那么,在中小企业中,用的最多的路由协议 - > OSPF,

为啥呀?为啥大家都用OSPF,因为OSPF在获得学习资料的渠道很多,学习成本低,而且操作简单,容易上手,对于企业和员工来说,双赢;

那么IPv6版本的OSPF叫什么呢?叫OSPFv3

OSPF工作原理

建立邻居表

七个邻居状态

复制代码
1.Down      -> 接口没开启,或者没有启用OSPF
2.Init      -> 接口刚开启,初始化
3.two-way   -> 两个邻居分别都在对方的Hello包中收到了自己的Router-id,然后开始pk
4.Exstart   -> 开始同步 Link State Database
5.Exchange  -> 开始交换机LSA了
6.Loading   -> 计算同步过来的LSA,然后放入本地设备的路由表
7.Full      -> 完全邻接

5个报文

复制代码
1.Hello  
    ##建立并且维护邻居
2.DD
    ##第一个DD报文是用来PK链路上的DR优先级
      后续的DD报文中才包含大量的LSA
3.LSR
    ## 邻居收到经过DD报文转发过来的LSA后,进行比对,如果自己数据库中没有,
       那就发送该报文请求该LSA
4.LSU
    ## 邻居收到 LSR 报文后,迅速发给对方设备
5.LSAck
    ## 邻居收到设备发送的LSU后进行确认,靠谱,就是这里靠谱

同步数据库

  • 在DD报文开始时,从二个就开始发送大量的LSA来比对,然后才产生了后续的LSR,LSU,LSA

计算路由表

  • 把数据库中的LSA,经过SPF算法计算出来后放在设备的路由表中使用

OSPFv3单区域案例

拓扑

需求

  • 让这三个设备都建立OSPF邻居
  • 让内网这三个设备互通

思路

配置设备IPv6地址

开启设备全局IPv6 单播路由功能

开启OSPFv3

把接口加入到OSPFv3的进程以及区域中

配置命令

复制代码
1.配置设备IP地址
R1:
enable
configure terminal
interface g0/0
ipv6 enable
ipv6 address 2001:12::1/64 
no shutdown

R2
enable
configure terminal
interface g0/1
ipv6 enable
ipv6 address 2001:12::2/64 
no shutdown
exit
interface g0/0
ipv6 enable
ipv6 address 2001:23::1/64
no shutdown
exit

R3:
enable
configure terminal
interface g0/1
ipv6 enable
ipv6 address 2001:23::2/64 
no shutdown
exit

2.开启设备的IPv6单播路由功能
R1/2/3
ipv6 unicast-routing

3.开启OSPFv3
R1:
ipv6 route ospf 1  -> {Process ID 1-65535}进入OSPFv3视图
router-id 1.1.1.1  -> {A.B.C.D跟OSPFv2是一样的,只能配置点分十进制}
exit

R2:
ipv6 route ospf 1 
router-id 2.2.2.2
exit

R3:
ipv6 route ospf 1 
router-id 3.3.3.3
exit

4:把接口加入到OSPFv3进程中
------------------------------------------
格式:ipv6 ospf {Process ID} area {area ID}
------------------------------------------

R1:
interface g0/0
ipv6 ospf 1 area 12
exit

R2:
interface g0/1
ipv6 ospf 1 area 12 
exit
interface g0/0 
ipv6 ospf 1 area 12 
exit

R3:
interface g0/1
ipv6 ospf 1 area 12 
exit

==============================验证===========================================
1.show ipv6 ospf neighbor
    // 查看IPv6版本的OSPF邻居
2.show ipv6 route ospf
    // 查看IPv6路由中关于OSPF的

纯文本

OSPFV3多区域案例

拓扑

需求

1.按图配置设备接口IP地址

2.部署R1-R2为OSPF Area 12区域

3.部署R2-R3-R4-R5为OSPF Area 0区域

4.部署R5-R6为OSPF Area 56区域

5.实现全网互通

思路

  • 配置接口IPv6地址
  • 开启设备IPv6单播路由功能
  • 开启设备OSPFv3功能并且设置Router-id
  • 将接口加入到OSPFv3的进程中的区域中
  • 测试

配置命令

复制代码
R1:
enable
configure terminal
ipv6 unicast-routing
ipv6 router ospf 1
  rouetr-id 1.1.1.1
  exit
interface g0/0
ipv6 enable
ipv6 address 2001:12::1/64 
no shutdown
ipv6 ospf 1 area 12
exit

R2:
enable
configure terminal
ipv6 unicast-routing
ipv6 router ospf 1 
  router-id 2.2.2.2
  exit
interface g0/1
ipv6 enable
ipv6 address 2001:12::2/64 
no shutdown
ipv6 ospf 1 area 12
exit
interface g0/0
ipv6 enable
ipv6 address 2001:23::1/64 
no shutdown
ipv6 ospf 1 area 0 
exit

R3:
enable
configure terminal
ipv6 unicast-routing
ipv6 router ospf 1 
  router-id 3.3.3.3
  exit
interface g0/1
ipv6 enable
ipv6 address 2001:23::2/64 
no shutdown
ipv6 ospf 1 area 0 
exit

interface g0/0
ipv6 enable
ipv6 address 2001:34::1/64 
no shutdown
ipv6 ospf 1 area 0 
exit

R4:
enable
configure terminal
ipv6 unicast-routing
ipv6 router ospf 1 
  router-id 4.4.4.4
  exit
interface g0/1
ipv6 enable
ipv6 address 2001:34::2/64 
no shutdown
ipv6 ospf 1 area 0 
exit
interface g0/0
ipv6 enable
ipv6 address 2001:45::1/64 
no shutdown
ipv6 ospf 1 area 0 
exit

R5:
enable
configure terminal
ipv6 unicast-routing
ipv6 router ospf 1 
  router-id 5.5.5.5
  exit
interface g0/1
ipv6 enable
ipv6 address 2001:45::2/64 
no shutdown
ipv6 ospf 1 area 0
exit

interface g0/0
ipv6 enable
ipv6 address 2001:56::1/64 
no shutdown
ipv6 ospf 1 area 56
exit

R6:
enable
configure terminal
ipv6 unicast-routing
ipv6 router ospf 1 
  router-id 6.6.6.6
  exit
interface g0/1
ipv6 enable
ipv6 address 2001:56::2/64 
no shutdown
ipv6 ospf 1 area 56
exit

此时,R1/2/3/4/5/6均已有彼此的邻居,
R1访问R6是通的
测试:
R1>ping ipv6 2001:56::2 结果是通的
----------------------------------------------------------------------------
验证命令:
    *   show ipv6 ospf neighbor
    *   show ipv6 route ospf

OSPF中LSA和路由的关系

相关推荐
打工仔折腾 AI10 分钟前
Linux 网络编程:从零掌握 TCP Socket 编程与 C++ 实战落地
linux·网络·人工智能·后端·python·tcp/ip·性能优化
Yiran_G38 分钟前
ZigBee通信正常,数据却是错的?嵌入式开发中的数据链路排查
网络·嵌入式硬件·物联网·智能家居
honsor41 分钟前
ModbusTCP、SNMP、HTTP 怎么选?以太网温湿度变送器协议选型实战
网络·物联网·网络协议·tcp/ip·http
启博网络41 分钟前
智慧档案库房工业组网:MR-1280 边缘大脑,实现温湿度、漏水、防火防盗设备智能联动教程
运维·网络·物联网·网络协议·网络安全·信息与通信·sdwan
2401_868534781 小时前
国家东数西算纵深推进的算力感知网络(APN6/算网一体)架构规划与设计
服务器·网络
诚丞成1 小时前
Kavita真正好用的不是“远程阅读”:而是把NAS目录重新组织成可扫描的Library
开发语言·网络
weixin_417396831 小时前
酒店弱电工程多少钱?三种计价口径与报价构成
网络·技术·酒店·综合布线·弱电
mengge.cloud1 小时前
1022小白入门教程(番外筑基)— nerdctl 容器基本功 + K8s 资源编写
linux·网络·云原生·容器·kubernetes·云计算·k8s
sbjdhjd1 小时前
从 VLAN 到 MSTP 的交换网络入门
网络·计算机网络·mac·ip·stp·vlan·交换机
whyutianict_vv1 小时前
HCIE-Datacom 考纲技术拆解:从 OSPF/BGP 到 VXLAN/Netconf 的知识地图
运维·网络