<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Cni on kl &#39;s blog</title>
    <link>https://klworldy.com/tags/cni/</link>
    <description>Recent content in Cni on kl &#39;s blog</description>
    <image>
      <title>kl &#39;s blog</title>
      <url>https://klworldy.com/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</url>
      <link>https://klworldy.com/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</link>
    </image>
    <generator>Hugo -- 0.133.1</generator>
    <language>zh</language>
    <lastBuildDate>Sat, 13 Sep 2025 00:53:56 +0800</lastBuildDate>
    <atom:link href="https://klworldy.com/tags/cni/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>ryu&#43;ovs 在容器网络中的应用</title>
      <link>https://klworldy.com/posts/ryu-in-cni/</link>
      <pubDate>Sat, 13 Sep 2025 00:53:56 +0800</pubDate>
      <guid>https://klworldy.com/posts/ryu-in-cni/</guid>
      <description>前言 博主之前从事过基于ovs的自研cni的研发，当时是选择ryu作为ovs的南向控制端，这次来好好的剖析一下该ryu-controller程序的架构、工作流程和思想。
项目概述 功能定位: 本程序基于 Ryu SDN 框架构建，是 CNI项目的核心网络控制组件。OVS CNI 组件的控制端，负责通过 OpenFlow 协议向 OVS 交换机下发流表规则。 * 整体架构 1. RyuController 类 主控制器，继承自 RyuApp 和 FlowManager，负责：
OpenFlow 交换机连接管理 数据包处理（Packet-In 事件） 流表生成和下发 与 cni-ctl 的交互 2. FlowManager 类 流表管理器，负责：
流表的增删改查 流表匹配字段和动作的格式化 异步请求和回调管理 3. DefaultFlowGenerator 类 默认流表生成器，负责初始化 OVS 流表结构。
核心流表表 (FlowTable):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 DEFAULT_TABLE = 0 # 默认入口表 CT_SVC_TRACE_TABLE = 2 # Service 追踪表 CT_EP_TABLE = 3 # 连接跟踪端点表 STATIC_TABLE = 4 # 静态规则表 FILTER_TABLE = 5 # 过滤表 LEARN_TABLE = 6 # 学习表 CT_CHECK_TABLE = 10 # 连接状态检查表 CT_SVC_TABLE = 12 # Service 连接跟踪表 BASE_LEARN_TABLE = 15 # 基础学习表 CT_COMMIT_TABLE = 20 # 连接提交表 CT_NAT_TABLE = 30 # NAT 处理表 LOCAL_TABLE = 60 # 本地处理表 NORMAL_TABLE = 70 # 转发表 EXTERNAL_TABLE = 80 # 外部处理表 寄存器用途 (reg0-reg7)</description>
    </item>
  </channel>
</rss>
