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和路由的关系

相关推荐
zizisuo1 小时前
面试篇:Spring Security
网络·数据库·安全
玉笥寻珍1 小时前
Web安全渗透测试基础知识之HTTP参数污染篇
网络·网络协议·安全·web安全·http
GCKJ_08242 小时前
观成科技:加密C2框架Vshell流量分析
网络·科技·信息与通信
大蚂蚁2号4 小时前
windows文件共享另一台电脑资源管理器网络文件夹无法找到机器
运维·服务器·网络
LetsonH4 小时前
Home Assistant 米家集成:开启智能家居新体验
网络·智能家居
欧先生^_^4 小时前
Docker 的各种网络模式
网络·docker·容器
彬彬醤5 小时前
查询电脑伪装IP,网络安全速查攻略!
网络·网络协议·tcp/ip·安全·web安全·http·https
兴达易控7 小时前
Profibus DP主站转Modbus TCP网关接E+H流量计通讯案例
网络
熙曦Sakura7 小时前
【Linux网络】TCP全连接队列
linux·网络·tcp/ip
国产化创客9 小时前
OpenHarmony轻量系统--BearPi-Nano开发板网络程序测试
网络·物联网·harmonyos·国产化