- 一页一块:页号胶囊是 PDF 物理页序(1–48);幻灯片上印的页码可能另有编号,以胶囊为准。
- 逐句对照:蓝色左框内是西语原句(逐字照抄,含原文笔误),下面带「中」字标的是中文翻译;项目符号统一用 • 表示。
- 提示框:绿色「考点」= 这页怎么考;红色「陷阱」= 易错点与原文勘误;紫色「记忆钩子」= 口诀;橙色「补充」= 前后页串联。
- 术语悬停:西语句里带浅蓝底的词,鼠标停上去出中文;中文句里带虚下划线的词,停上去出西语原词。
- 公式:一律用本地 MathJax 渲染(断网也能显示),每个公式下附「符号 / 西语读法 / 中文含义」三列小表——口语考试念的就是这一列。
一、课程导览:本讲要讲什么、怎么考
p.1–p.2Tema 1.3. Controladores SDN avanzados: OpenDaylight · 高级 SDN 控制器:OpenDaylight
▸ 原页截图 p.1
Tema 1.3. Controladores SDN avanzados: OpenDaylight
主题 1.3 高级 SDN 控制器:OpenDaylight
Controladores SDN avanzados
高级 SDN 控制器
OpenDaylight (ODL)
OpenDaylight(简称 ODL)
Contenido · 目录
▸ 原页截图 p.2
Contenido
目录
►What is OpenDaylight
►OpenDaylight 是什么
►Casos de uso de OpenDayLight
►OpenDaylight 的用例
►Guía Instalación
►安装指南
►Pedir Topología, nodos conectados y reglas instaladas
►查询拓扑、已连接节点与已安装的规则
►Instalar una regla de flujo
►安装一条流规则
►Bibliografía
►参考文献
二、OpenDaylight 是什么:定位、架构、MD-SAL 与 3SP
p.3–p.10What is OpenDaylight · OpenDaylight 是什么
▸ 原页截图 p.3
What is OpenDaylight
OpenDaylight 是什么
►El Proyecto OpenDaylight es una iniciativa colaborativa de código abierto cuyo objetivo es acelerar la adopción de las Redes Definidas por Software (SDN) y establecer una base sólida para la Virtualización de Funciones de Red (NFV).
►OpenDaylight 项目是一个开源协作计划,目标是加速软件定义网络(SDN)的采用,并为网络功能虚拟化(NFV)奠定坚实基础。
►Busca un enfoque más transparente que fomente la innovación y reduzca riesgos.
►它追求一种更透明的路线,以鼓励创新并降低风险。
►Fundada por líderes de la industria y abierta a la participación de todos, la comunidad de OpenDaylight está desarrollando un marco SDN común y abierto, compuesto por código y planos de diseño.
►该项目由业界领军企业发起、对所有人开放参与;OpenDaylight 社区正在开发一个通用、开放的 SDN 框架,由代码与设计蓝图组成。
►La plataforma SDN open source más desplegada, potenciando redes con más de 1B de subscriptores
►部署最广的开源 SDN 平台,支撑着超过 10 亿用户(1B subscribers)的网络。
Miembros y Patrocinadores de OpenDaylight · 成员与赞助商
▸ 原页截图 p.4
Miembros y Patrocinadores de OpenDaylight
OpenDaylight 的成员与赞助商
►OpenDaylight es un proyecto open source impulsado por un amplio ecosistema de empresas líderes en redes, cloud y software.
►OpenDaylight 是一个开源项目,由网络、云与软件领域的领先企业构成的广泛生态推动。
►Los miembros se organizan en niveles de contribución:
►成员按贡献层级组织:
►Platinum: principales impulsores (Cisco, Microsoft, IBM, RedHat, Juniper, etc.).
►铂金级(Platinum):主要推动者(思科、微软、IBM、红帽、瞻博等)。
►Gold: soporte relevante (NEC, VMware).
►黄金级(Gold):重要支持者(NEC、VMware)。
►Silver: colaboración y desarrollo (Intel, HP, Dell, Fujitsu, etc.).
►白银级(Silver):协作与开发(英特尔、惠普、戴尔、富士通等)。
►Esta colaboración garantiza un proyecto abierto, vendor-neutral y sostenible, evitando dependencia de un solo fabricante.
►这种协作保证项目开放、厂商中立(vendor-neutral)且可持续,避免依赖单一厂商。
Open Daylight Controller Architecture · 控制器架构总览(图示)
▸ 原页截图 p.5
Open Daylight Controller Architecture
OpenDaylight 控制器架构(总览图)
Arquitectura del controlador: aplicaciones (northbound) · MD-SAL · plugins y protocolos (southbound) · dispositivos de red.
控制器架构:应用(北向)· MD-SAL · 插件与协议(南向)· 网络设备。
Arquitectura ODL: MD-SAL · MD-SAL 服务抽象层
▸ 原页截图 p.6
►MD-SAL (Model-Driven Service Abstraction Layer): El corazón de OpenDaylight es el MD-SAL.
►MD-SAL(模型驱动的服务抽象层):OpenDaylight 的核心就是 MD-SAL。
►Su función es actuar como un “traductor universal” para la red.
►它的作用是充当网络的「通用翻译器」。
►El bus de datos y servicios de ODL: desacopla aplicaciones (northbound) y plugins/protocolos (southbound).
►它是 ODL 的数据与服务总线:把应用(北向)与插件/协议(南向)解耦。
►Basado en Model-Driven (YANG): YANG es un lenguaje estándar del IETF para modelar datos de red.
►基于模型驱动(YANG):YANG 是 IETF 用于网络数据建模的标准语言。
►Sirve para describir, con precisión y sin ambigüedades, qué objetos existen en un dispositivo/controlador (interfaces, rutas, ACLs, flujos…), qué campos tienen, sus tipos y validaciones, y también acciones (RPCs) y eventos (notificaciones).
►它用于精确、无歧义地描述设备/控制器里存在哪些对象(接口、路由、ACL、流表项……)、各有哪些字段、类型与校验规则,以及动作(RPC)与事件(通知)。
►Con esos modelos, herramientas como NETCONF y RESTCONF saben exactamente qué configurar/leer y cómo validar los datos.
►有了这些模型,NETCONF、RESTCONF 之类的工具就能确切知道该配置/读取什么,以及如何校验数据。
►Lenguaje común de la red: convierte datos heterogéneos (OpenFlow, NETCONF, OVSDB, BGP, …) en estructuras unificadas.
►网络的通用语言:把异构数据(OpenFlow、NETCONF、OVSDB、BGP……)转换成统一结构。
►El modelo YANG genera las APIs, los árboles de datos y la validación.
►YANG 模型会生成 API、数据树与校验逻辑。
►Eso da interoperabilidad (mismo modelo entre fabricantes), automatización fiable y menos errores de formato.
►从而带来互操作性(不同厂商用同一模型)、可靠的自动化,以及更少的格式错误。
►Dos data stores: Config: intención → PUT → lo que quiero aplicar.
►两个数据存储:Config:意图 → PUT → 我想下发的配置。
►Operational: estado real → GET → lo que hay
►Operational:真实状态 → GET → 实际是什么样。
►Servicios generados: RPCs (Remote Procedure Call) y notificaciones a partir de YANG (suscripciones, eventos).
►自动生成的服务:由 YANG 生成 RPC(远程过程调用)与通知(订阅、事件)。
►Transacciones con consistencia y escucha de cambios (data change listeners).
►具备一致性的事务,以及变更监听(data change listeners)。
►Abstracción Total: Permite que las aplicaciones (consumidores) interactúen con los servicios de red (productores) sin necesidad de conocer los detalles específicos del hardware o del protocolo subyacente.
►完全抽象:让应用(消费者)与网络服务(生产者)交互时,无需了解具体硬件或底层协议的细节。
Arquitectura · 架构分层图
▸ 原页截图 p.7
Arquitectura
架构
Arquitectura en capas de OpenDaylight: aplicaciones y orquestadores arriba; MD-SAL con los data stores config/operational en el centro; plugins de protocolo abajo.
OpenDaylight 的分层架构:上层是应用与编排器;中间是带 config/operational 数据存储的 MD-SAL;下层是协议插件。
Arquitectura ODL: Modular y Multiprotocolo · 模块化与多协议
▸ 原页截图 p.8
►OpenDaylight no es un controlador monolítico, sino una plataforma modular y extensible.
►OpenDaylight 不是一个单体控制器,而是模块化、可扩展的平台。
►Está construida sobre Karaf, un contenedor OSGi que permite cargar y descargar componentes (features) en tiempo de ejecución.
►它构建在 Karaf 之上——一个 OSGi 容器,可在运行时加载与卸载组件(features)。
►Cada componente añade una funcionalidad concreta: un protocolo (OpenFlow, NETCONF, BGP, OVSDB…), un servicio de red (topología, routing, QoS…) o una API adicional.
►每个组件提供一项具体功能:某个协议(OpenFlow、NETCONF、BGP、OVSDB……)、某项网络服务(拓扑、路由、QoS……)或额外的 API。
►Multiprotocolo por diseño: Un mismo núcleo puede gestionar equipos OpenFlow, routers BGP/NETCONF y switches OVSDB, traduciendo todo a un modelo común.
►设计上即多协议:同一内核可管理 OpenFlow 设备、BGP/NETCONF 路由器与 OVSDB 交换机,并全部翻译为统一模型。
►Esto permite: ►Integración vertical con orquestadores como OpenStack Neutron.
►这带来:►与 OpenStack Neutron 等编排器的纵向集成。
►Interoperabilidad horizontal entre distintos dominios SDN.
►不同 SDN 域之间的横向互操作。
►Integración sencilla: Los módulos se desarrollan con Maven y se integran en Karaf sin alterar el resto del sistema.
►集成简单:模块用 Maven 开发,直接装入 Karaf,不影响系统其余部分。
►Cada módulo define sus modelos YANG y se comunica con otros a través del MD-SAL, garantizando interoperabilidad.
►每个模块定义自己的 YANG 模型,并通过 MD-SAL 与其他模块通信,从而保证互操作。
►Cada usuario instala solo los módulos que necesita.
►每个用户只安装自己需要的模块。
►Ejemplo laboratorio → OpenFlow + L2Switch.
►实验室示例 → OpenFlow + L2Switch。
►Ejemplo operador → BGP-LS, PCEP, NETCONF.
►运营商示例 → BGP-LS、PCEP、NETCONF。
Arquitectura ODL: 3SP · 安全 / 扩展 / 稳定 / 性能
▸ 原页截图 p.9
Arquitectura ODL: 3SP
ODL 架构:3SP(Security / Scalability / Stability / Performance)
►Security (Seguridad):
►安全(Security):
►AAA (Authentication, Authorization, Accounting) en Karaf y RESTCONF; RBAC (Role-Based Access Control) por roles.
►Karaf 与 RESTCONF 中的 AAA(认证、授权、计费);基于角色的访问控制(RBAC)。
►TLS para RESTCONF/NETCONF; gestión de keystores y credenciales.
►RESTCONF/NETCONF 使用 TLS;管理密钥库与凭据。
►Endurecimiento: desactivar features innecesarias, aislamiento de red de gestión, revisión de CVE y logs.
►加固:关闭不必要的 feature、隔离管理网络、审查 CVE 与日志。
►Scalability (Escalabilidad)
►可扩展性(Scalability)
►Clustering con particionado por shards y líder/réplicas en MD-SAL.
►集群:按分片(shards)分区,MD-SAL 内采用主/副本(líder/réplicas)。
►Escala horizontal: más nodos → más capacidad de transacciones/eventos.
►横向扩展:节点越多 → 事务/事件处理能力越强。
►Multiprotocolo concurrente (OpenFlow/NETCONF/OVSDB/BGP) en el mismo núcleo.
►同一内核中并发支持多协议(OpenFlow/NETCONF/OVSDB/BGP)。
►Stability (Estabilidad)
►稳定性(Stability)
►Transacciones atómicas y validación YANG (sin estados intermedios corruptos).
►原子事务与 YANG 校验(不产生中间损坏状态)。
►Data change listeners y notificaciones controladas (back-pressure).
►数据变更监听与受控通知(背压机制)。
►Ciclo de releases con pruebas de regresión; logs y trazas en Karaf (log:tail, data/log/karaf.log).
►有发布周期与回归测试;Karaf 中查看日志与跟踪(log:tail、data/log/karaf.log)。
►Performance (Rendimiento):
►性能(Performance):
►Latencia de programación de flujos baja; cachés en MD-SAL.
►流表下发延迟低;MD-SAL 内有缓存。
►Offload en data plane (switches) + reglas proactivas cuando sea posible.
►把负载卸载到数据面(交换机),尽量使用主动下发的规则。
►Métricas clave: tiempo de flow install, eventos/s, tamaño de topología, uso de heap/GC.
►关键指标:流安装耗时、每秒事件数、拓扑规模、堆/GC 使用率。
bundle:diag 看谁缺依赖,log:tail 看实时日志 —— 这两条就是 p.20 的命令,前后呼应。Características de ODL: Controladores Industriales · 工业级控制器特征
▸ 原页截图 p.10
►El controlador no interviene en el reenvío de los paquetes de datos.
►控制器不参与数据包的实际转发。
►Los mensajes Packet-In son la excepción, no la norma (solo aparecen cuando falta alguna regla).
►Packet-In 消息是例外而非常态(只有在缺少规则时才会出现)。
►El controlador se centra en mantener una visión global de la red: topología, inventario de nodos, estadísticas.
►控制器专注于维持全局网络视图:拓扑、节点清单、统计信息。
►Proporciona APIs norte (RESTCONF, NETCONF, gRPC) que permiten a aplicaciones externas y orquestadores gestionar la red.
►它提供北向 API(RESTCONF、NETCONF、gRPC),让外部应用与编排器管理网络。
►Traduce políticas y configuraciones de alto nivel en reglas que se instalan proactivamente en los switches.
►把高层策略与配置翻译成规则,并主动(proactivamente)下发到交换机。
►El tráfico circula de forma proactiva y escalable, sin depender de envíos constantes de paquetes al controlador.
►流量以主动、可扩展的方式转发,不依赖持续把数据包上送控制器。
►Ventaja clave: preparado para redes de gran escala y entornos de producción, donde la eficiencia y la integración con sistemas externos son esenciales.
►关键优势:面向大规模网络与生产环境,这类场景中效率与外部系统集成至关重要。
三、用例:NRO 服务自动交付、云与 NFV
p.11–p.18Contenido · 目录(第二次出现)
▸ 原页截图 p.11
Contenido
目录
►What is OpenDaylight
►OpenDaylight 是什么
►Casos de uso de OpenDayLight
►OpenDaylight 的用例
►Guía Instalación
►安装指南
►Pedir Topología, nodos conectados y reglas instaladas
►查询拓扑、已连接节点与已安装的规则
►Instalar una regla de flujo
►安装一条流规则
►Bibliografía
►参考文献
Casos de uso de OpenDayLight · OpenDaylight 的用例(总览)
▸ 原页截图 p.12
►OpenDaylight se diseñó como una plataforma amplia y de propósito general que admitiera una amplia gama de casos de uso, incluyendo algunos aún no inventados.
►OpenDaylight 被设计为一个宽广、通用的平台,可承载大量用例——甚至包括尚未被发明出来的用例。
►ODL ofrece las ventajas de SDN y NFV a operadores, empresas, instituciones de investigación y negocios.
►ODL 把 SDN 与 NFV 的优势带给运营商、企业、研究机构与各类商业组织。
►Entrega automatizada de servicios: SDN de código abierto y automatización para acelerar la prestación de servicios.
►服务自动交付:开源 SDN + 自动化,加速业务开通。
►Network Resources Optimization (NRO): Optimización dinámica de la red en función de la carga y el estado.
►网络资源优化(NRO):依据负载与状态动态优化网络。
►Cloud y NFV: Proporcionar servicios bajo demanda que puedan ser controlados por el usuario final o el entorno del proveedor de servicios.
►云与 NFV:按需提供服务,可由最终用户或服务提供商环境加以控制。
Entrega automatizada de servicios · 服务自动交付
▸ 原页截图 p.13
►Las empresas necesitan desplegar servicios rápidamente para competir, pero se ven frenadas por procesos manuales y una infraestructura de red rígida y multi-fabricante.
►企业需要快速部署服务以参与竞争,却被人工流程与僵化、多厂商的网络基础设施拖慢。
►El gran desafío es modernizarse sin tener que reemplazar las costosas inversiones ya realizadas.
►最大挑战是:在不替换既有昂贵投资的前提下完成现代化改造。
►Como resultado los grandes operadores globales usan OpenDaylight para ser más ágiles, lanzar nuevos servicios al mercado más rápido y reducir significativamente sus costes operativos.
►因此,全球大型运营商使用 OpenDaylight,以变得更敏捷、更快把新服务推向市场,并显著降低运营成本。
►Una solución es la Automatización Inteligente con OpenDaylight que permite automatizar la entrega de servicios sobre la infraestructura existente.
►解决方案之一是基于 OpenDaylight 的智能自动化:在既有基础设施之上实现服务交付自动化。
►Control Unificado: A través de su arquitectura basada en modelos (MD-SAL) y sus múltiples plugins, controla de forma centralizada el hardware de diversos fabricantes.
►统一控制:借助基于模型(MD-SAL)的架构与众多插件,集中控制多厂商硬件。
►Agilidad en la Creación de Servicios: Sus APIs de “intención” simplifican el desarrollo, permitiendo que las aplicaciones definan el servicio deseado sin preocuparse por la complejidad de la red.
►业务创建敏捷:其「意图」API 简化开发,让应用只声明所需服务,无需关心网络复杂度。
►Entorno Multi-servicio: Facilita la virtualización de la red para desplegar de forma segura múltiples servicios y clientes sobre la misma infraestructura física.
►多业务环境:便于网络虚拟化,在同一物理基础设施上安全部署多个服务与多个客户。
Network Resources Optimization · 网络资源优化(需求侧)
▸ 原页截图 p.14
►El crecimiento del tráfico (móvil, vídeo, cloud) exige una mayor eficiencia.
►流量增长(移动、视频、云)要求更高的效率。
►Ya no es viable simplemente añadir más hardware.
►简单堆硬件的做法已不可行。
►Tanto empresas como proveedores de servicios necesitan optimizar sus redes para obtener el máximo rendimiento de sus inversiones.
►企业与服务提供商都需要优化网络,让投资产出最大回报。
►La solución es SDN, que centraliza el control y la inteligencia de la red.
►解决方案是 SDN:把控制与智能集中化。
►Una verdadera solución de NRO debe ser capaz de:
►一个真正的 NRO 方案必须具备以下能力:
►Optimizar Múltiples Parámetros: No solo ancho de banda, sino también latencia, coste, resiliencia y otros QoS.
►多参数优化:不仅是带宽,还包括时延、成本、弹性与其它 QoS 指标。
►Soportar Algoritmos Flexibles: Ejecutar diferentes lógicas de optimización según las necesidades del negocio.
►支持灵活算法:按业务需要运行不同的优化逻辑。
►Entender la Topología Compleja: Tener un estado robusto de la red, incluyendo topologías multi-capa (ej. paquete-óptico).
►理解复杂拓扑:掌握健壮的网络状态,包括多层拓扑(例如分组-光层)。
►Operar en Entornos Heterogéneos: Funcionar sobre equipos de múltiples fabricantes, incluyendo hardware no preparado para SDN.
►在异构环境中运行:可工作于多厂商设备,包括未为 SDN 准备的硬件。
►Aplicar Políticas: Garantizar que se cumplan las reglas de negocio y de servicio.
►执行策略:确保业务与服务规则被遵守。
Network Resources Optimization · ODL 为什么适合做 NRO
▸ 原页截图 p.15
►OpenDaylight proporciona la plataforma SDN abierta ideal para implementar NRO gracias a su arquitectura:
►凭借其架构,OpenDaylight 是实现 NRO 的理想开放 SDN 平台:
►Visibilidad Centralizada y Estado de Red: Mantiene una visión completa de la topología, configuración, fallos y rendimiento, que es la base para cualquier algoritmo de optimización.
►集中可视化与网络状态:完整掌握拓扑、配置、故障与性能——这是任何优化算法的基础。
►MD-SAL (Model-Driven Service Abstraction Layer): Utiliza modelos estándar (YANG) para abstraer la red.
►MD-SAL(模型驱动服务抽象层):用标准模型(YANG)抽象网络。
►Permite conectar, a través de plugins “southbound”, una amplia gama de dispositivos con interfaces estándar (BGP, PCEP, OpenFlow) y propietarias.
►通过南向插件接入大量设备,既支持标准接口(BGP、PCEP、OpenFlow),也支持私有接口。
►APIs “Northbound” Basadas en Intención: Abstrae los detalles de la infraestructura, permitiendo que las aplicaciones de NRO simplemente declaren su “intención” (ej. “encontrar la ruta más barata entre A y B”).
►基于意图的北向 API:抽象掉基础设施细节,让 NRO 应用只需声明意图(例如「找到 A 到 B 之间最便宜的路径」)。
►Plataforma Extensible: Soporta de forma nativa servicios de red avanzados como cómputo de rutas, gestión de recursos y analítica.
►可扩展平台:原生支持路径计算、资源管理与分析等高级网络服务。
►Incluye múltiples mecanismos para la aplicación de políticas.
►内置多种策略执行机制。
Network Resources Optimization · 工业界实例(Tencent / China Mobile / Ericsson / Fujitsu / HPE)
▸ 原页截图 p.16
►Ejemplos de la Industria: La flexibilidad y apertura de OpenDaylight lo han convertido en la base para soluciones de optimización de gigantes de la industria.
►工业界实例:OpenDaylight 的灵活与开放,使其成为行业巨头优化方案的底座。
►Tencent: Desarrolló un controlador ODL para su Interconexión de Centros de Datos (DCI), optimizando el uso del costoso ancho de banda WAN y mejorando la entrega de servicios.
►腾讯:为其数据中心互联(DCI)开发了 ODL 控制器,优化昂贵的 WAN 带宽使用并改善服务交付。
►China Mobile: Su visión de red del futuro, NovoNet, se basa en SDN y NFV con OpenDaylight para la optimización inteligente del tráfico y la autogestión de la red.
►中国移动:其未来网络愿景 NovoNet 基于 SDN 与 NFV,并用 OpenDaylight 实现流量智能优化与网络自管理。
►Ericsson: Utiliza OpenDaylight en su producto Transport SDN para ofrecer una visión abstracta de los recursos de red, optimizando la asignación de recursos en capas IP y Ópticas.
►爱立信:在 Transport SDN 产品中使用 OpenDaylight,提供网络资源的抽象视图,优化 IP 层与光层的资源分配。
►Fujitsu: Su plataforma Virtuora NC, construida sobre ODL, sirve como el centro de control y gestión para redes virtuales complejas.
►富士通:基于 ODL 构建的 Virtuora NC 平台,作为复杂虚拟网络的控制与管理中心。
►HPE: Ha desarrollado ContexNet, una plataforma SDN distribuida de nivel carrier basada en OpenDaylight, que aprovecha tecnologías de virtualización.
►HPE:开发了 ContexNet——基于 OpenDaylight 的运营商级分布式 SDN 平台,充分利用虚拟化技术。
Cloud & NFV · 云与 NFV 各自的核心挑战
▸ 原页截图 p.17
►Tanto las empresas (Cloud) como los proveedores de servicios (NFV) necesitan una red más ágil, programable y automatizada.
►企业(云)与服务提供商(NFV)都需要更敏捷、可编程、自动化的网络。
►SDN, con un controlador central, es la arquitectura que permite lograrlo. La clave es una plataforma abierta que evite la dependencia de un solo proveedor (vendor lock-in) y fomente la innovación.
►以中央控制器为核心的 SDN 正是实现它的架构。关键在于一个开放平台:避免对单一厂商的依赖(vendor lock-in),并鼓励创新。
| 环境 | Desafío (ES) | 中文 |
|---|---|---|
| Cloud(企业) | Limitaciones de OpenStack Neutron | Neutron 只有低层接口,并非为管理物理 underlay 而设计 |
| Cloud(企业) | Integración Multi-Vendor | 需要统一管理多厂商的复杂基础设施 |
| Cloud(企业) | Visibilidad de Extremo a Extremo | 缺少统一工具同时管理数据中心、园区网与 WAN |
| NFV(运营商) | Complejidad de los Servicios | 需要 VNF 服务链(VNF Forwarding Graphs / Service Chaining) |
| NFV(运营商) | Interconexión de Dominios | 跨不同网络、甚至跨不同运营商编排服务 |
| NFV(运营商) | Despliegue y Gestión de VNFs | 需要平台敏捷集成并管理多供应商 VNF |
Cloud & NFV · ODL 如何解决这些挑战
▸ 原页截图 p.18
►OpenDaylight proporciona la abstracción, programabilidad y apertura necesarias para una infraestructura inteligente.
►OpenDaylight 提供智能基础设施所需的抽象、可编程性与开放性。
►Para Cloud y OpenStack — Supera los desafíos de Neutron: Se integra directamente a través del plugin ML2, ofreciendo un control más rico sobre la red.
►面向云与 OpenStack —— 克服 Neutron 的局限:通过 ML2 插件直接集成,提供更丰富的网络控制能力。
►Abstracción de la Infraestructura: Su “Service Abstraction Layer” (SAL) y sus múltiples plugins (OpenFlow, OVSDB, NETCONF) permiten gestionar una red multi-vendor de forma homogénea.
►基础设施抽象:其服务抽象层(SAL)与多种插件(OpenFlow、OVSDB、NETCONF)可同构地管理多厂商网络。
►Puente hacia SDN: Facilita una migración suave, gestionando tanto equipos tradicionales como los nuevos equipos habilitados para SDN.
►通往 SDN 的桥梁:既管理传统设备也管理新型 SDN 设备,实现平滑迁移。
►Para NFV — Habilitador de Service Chaining: Es la plataforma de control SDN sobre la que se despliega NFV para automatizar el enrutamiento del tráfico a través de servicios (firewalls, etc.).
►面向 NFV —— 服务链的使能者:它是承载 NFV 的 SDN 控制平台,自动把流量按顺序引过各项服务(防火墙等)。
►Validado por la Industria: Utilizado en Pruebas de Concepto (PoCs) de ETSI NFV y seleccionado como tecnología clave para OPNFV / Anuket, acelerando la adopción de NFV.
►经工业验证:用于 ETSI NFV 的概念验证(PoC),并被选为 OPNFV / Anuket 的关键技术,加速 NFV 落地。
四、安装指南:Karaf、必装 feature、Mininet 与北向应用
p.19–p.23Contenido · 目录(第三次出现)
▸ 原页截图 p.19
Contenido
目录
►What is OpenDaylight
►OpenDaylight 是什么
►Casos de uso de OpenDayLight
►OpenDaylight 的用例
►Guía Instalación
►安装指南
►Pedir Topología, nodos conectados y reglas instaladas
►查询拓扑、已连接节点与已安装的规则
►Instalar una regla de flujo
►安装一条流规则
►Bibliografía
►参考文献
/rests/data/ 前缀和 ?content= 参数当成固定搭配背。Guía Instalación · 安装与 Karaf 常用命令
▸ 原页截图 p.20
►Descargar e iniciar ODL Vanadium (Karaf): https://docs.opendaylight.org/en/stable-vanadium/downloads.html
►下载并启动 ODL Vanadium(Karaf 发行版):https://docs.opendaylight.org/en/stable-vanadium/downloads.html
►Versión de Java usada: 21 o superior.
►所用 Java 版本:21 或更高。
►$ sudo apt-get install openjdk-21-jdk
►$ sudo apt-get install openjdk-21-jdk
►Ejecutar: $ ./bin/karaf
►启动:$ ./bin/karaf
►Dentro de ODL se pueden ejecutar diferentes acciones (consola Karaf):
►在 ODL 内部(Karaf 控制台)可以执行多种操作:
►feature:list — (Muestra TODAS las características, instaladas o no)
►feature:list —— 列出全部 feature(无论是否已安装)
►feature:list -i — (Muestra solo las instaladas)
►feature:list -i —— 只列出已安装的
►feature:install <modulo> — (Instala un módulo)
►feature:install <modulo> —— 安装一个模块
►feature:uninstall <modulo> — (Lo desinstala)
►feature:uninstall <modulo> —— 卸载该模块
►bundle:diag — (Si algo no arranca, dice qué le falta)
►bundle:diag —— 若有组件启动不了,它会指出缺什么依赖
►log:display -n 100 — (Últimas 100 líneas del log)
►log:display -n 100 —— 查看日志最后 100 行
►system:shutdown -r -f — (Reinicia ODL, sin preguntar)
►system:shutdown -r -f —— 重启 ODL,不再询问
►Para reiniciar ODL: $ cd ~/ODL_Vanadium && ./bin/karaf clean
►重启 ODL 的另一种方式:$ cd ~/ODL_Vanadium && ./bin/karaf clean
feature:list(看全部)/ feature:install(装)/ bundle:diag(排障)。再补一个 log:display 就够。./bin/karaf 是前台启动,关掉终端 ODL 就停;karaf clean 会清理缓存后重启,排查奇怪故障时才用,别当日常启动命令。Guía Instalación: Módulos necesarios en ODL · 必装 8 个 feature
▸ 原页截图 p.21
1. feature:install odl-restconf-all
1. 安装 RESTCONF 全套(提供 REST API 入口,curl 从这里进)
2. feature:install odl-l2switch-switch
2. 二层交换:泛洪、MAC 学习、ARP 发现主机
3. feature:install odl-openflowplugin-flow-services-rest
3. OpenFlow 通道 + 库存/流表通过 REST 暴露
4. feature:install odl-openflowplugin-app-forwardingrules-manager
4. 把你在 ODL 里写的规则下发到交换机,重连后自动补回
5. feature:install odl-openflowplugin-app-topology
5. 拓扑应用:把发现结果变成 flow:1 拓扑
6. feature:install odl-openflowplugin-app-topology-manager
6. 每个端口发 LLDP,发现交换机之间的链路
7. feature:install odl-openflowplugin-app-topology-lldp-discovery
7. 把发现的链路写入并维护到拓扑中
8. feature:install odl-openflowplugin-nxm-extensions
8. Nicira 扩展:没有它就无法设置隧道目的,VXLAN 网格不可用
...topology-manager 才是「写入并维护链路」,...topology-lldp-discovery 才是「发 LLDP 发现链路」。按功能语义记,别按行号背。Guía rápida de inicio · Mininet + Karaf + RESTCONF + ovs-ofctl
▸ 原页截图 p.22
►Lanzar Mininet (Terminal A): $ sudo mn -c ; $ sudo mn --mac --topo=linear,2,2 --controller=remote --switch ovsk,protocols=OpenFlow13
►启动 Mininet(终端 A):先 sudo mn -c 清理,再启动 2 台交换机 × 2 台主机的线性拓扑,控制器指向远端,交换机用 OpenFlow 1.3
►Lanzar Karaf (Terminal B): $ ./bin/karaf
►启动 Karaf(终端 B):$ ./bin/karaf
►Consultar Topología: Endpoint RESTCONF (terminal C)
►查询拓扑:RESTCONF 端点(终端 C)
►Ver tablas: (terminal D) $ sudo ovs-ofctl -O OpenFlow13 dump-flows s1
►查看流表(终端 D):用 ovs-ofctl 以 OpenFlow 1.3 导出 s1 的流表
# A) Mininet $ sudo mn -c $ sudo mn --mac --topo=linear,2,2 --controller=remote --switch ovsk,protocols=OpenFlow13 # B) Karaf $ ./bin/karaf # C) 拓扑查询 $ curl -u admin:admin "http://localhost:8181/rests/data/network-topology:network-topology?content=nonconfig" # D) 交换机侧流表 $ sudo ovs-ofctl -O OpenFlow13 dump-flows s1
ovs-ofctl dump-flows 查。两边对得上才算成功。protocols=OpenFlow13 不能省:ODL 的 flow 模型对应 OF1.3,用默认 1.0 会 match 失败。sudo mn -c 是清场命令,先把上次残留的虚拟网卡/进程清掉,否则拓扑起不来。Guía de aplicaciones · Flask 可视化器与 FastAPI 服务
▸ 原页截图 p.23
►Visualizador con Flask — Se lanza con: $ python3 visualizador.py · URL: http://127.0.0.1:5000/ (se puede cambiar el puerto).
►Flask 可视化器 —— 启动:python3 visualizador.py;地址 http://127.0.0.1:5000/(端口可改)。
►Aplicación básica hecha en Python. Pregunta datos a ODL por RESTCONF y los pinta de otra forma (por ejemplo, grafo de topología).
►一个基础 Python 应用:通过 RESTCONF 向 ODL 取数据,再以另一种形式呈现(例如拓扑图)。
►API hecha con FastAPI — Se lanza con: $ uvicorn MainFast:app --reload --port 7000 --host 0.0.0.0 · URL: http://127.0.0.1:7000/ (o desde otra máquina, si 0.0.0.0).
►用 FastAPI 做的 API —— 启动:uvicorn MainFast:app --reload --port 7000 --host 0.0.0.0;地址 http://127.0.0.1:7000/(监听 0.0.0.0 时可从其它机器访问)。
►Es otra aplicación distinta: una API REST donde puedes exponer endpoints para consultar o modificar cosas (por ejemplo, flujos, reglas, etc.).
►这是另一个不同的应用:一个 REST API,可暴露端点用于查询或修改内容(例如流表、规则等)。
--host 0.0.0.0 是监听所有网卡,方便跨机访问,但也意味着对外暴露;生产环境记得配防火墙/鉴权。五、查询拓扑、已连接节点与已安装的规则(RESTCONF 实操)
p.24–p.33Contenido · 目录(第四次出现)
▸ 原页截图 p.24
Contenido
目录
►What is OpenDaylight
►OpenDaylight 是什么
►Casos de uso de OpenDayLight
►OpenDaylight 的用例
►Guía Instalación
►安装指南
►Pedir Topología, nodos conectados y reglas instaladas
►查询拓扑、已连接节点与已安装的规则
►Instalar una regla de flujo
►安装一条流规则
►Bibliografía
►参考文献
MD-SAL en ODL: Config vs Operational · 两个数据存储
▸ 原页截图 p.25
►YANG define la estructura de estos datos.
►YANG 定义这些数据的结构。
►ODL genera automáticamente los endpoints RESTCONF bajo /rests/data/ con ?content=config o ?content=nonconfig.
►ODL 会自动生成 RESTCONF 端点:前缀 /rests/data/,再配 ?content=config 或 ?content=nonconfig。
►Config — Lo que queremos hacer. Se modifica con: PUT / POST / DELETE. ?content=config
►Config —— 我们「想做什么」。用 PUT / POST / DELETE 修改,查它用 ?content=config。
►Operational — El estado real del dispositivo. Se consulta con: GET. ?content=nonconfig
►Operational —— 设备的真实状态。用 GET 查询,查它用 ?content=nonconfig。
►Representación: JSON/XML; API: RESTCONF /rests/data/…; Modelo YANG define la estructura.
►表示格式:JSON/XML;接口:RESTCONF /rests/data/…;结构由 YANG 模型定义。
| 对比项 | Config | Operational |
|---|---|---|
| 含义 | Lo que queremos hacer(意图) | El estado real del dispositivo(真实状态) |
| 修改方式 | PUT / POST / DELETE | 控制器/设备写入,应用只读 |
| 查询方式 | GET + ?content=config | GET + ?content=nonconfig |
| 典型用途 | 下发策略、装流规则 | 看拓扑、看端口、看统计 |
?content=nonconfig 当成「无配置」。它其实读的是 operational(真实运行状态);「non-config」= 非配置数据,不是「没有配置」。Anatomía de una petición RESTCONF · 一次请求的三段解剖
▸ 原页截图 p.26
►La URL siempre tiene esta forma: curl -X MÉTODO http://<IP>:<puerto>/rests/data/RUTA?PARÁMETROS
►URL 永远是这种形状:curl -X 方法 http://<IP>:<端口>/rests/data/路径?参数。
►1. El MÉTODO — qué quieres hacer: GET → Leer / consultar (lo más habitual).
►1. 方法(MÉTODO)—— 你想做什么:GET → 读取/查询(最常用)。
►PUT → Crear o reemplazar entero un recurso.
►PUT → 创建,或整体替换一个资源。
►POST → Crear algo nuevo dentro / lanzar un RPC.
►POST → 在内部新建内容,或触发一个 RPC。
►PATCH → Cambiar solo una parte, sin reemplazar todo.
►PATCH → 只改一部分,不整体替换。
►DELETE → Borrar un recurso.
►DELETE → 删除一个资源。
►2. La RUTA — sobre qué actúas: opendaylight-inventory:nodes / node=openflow:1 / flow-node-inventory:table=0 / network-topology:network-topology.
►2. 路径(RUTA)—— 你作用于什么:节点清单 / 某台交换机 / 表 0 / 网络拓扑。
►3. Los PARÁMETROS — afinan el GET (tras ?): content=config → Solo lo que metiste tú.
►3. 参数(PARÁMETROS)—— 细化 GET(在 ? 之后):content=config → 只含你写进去的。
►content=nonconfig → El estado real (operacional).
►content=nonconfig → 真实(运行)状态。
►content=all → Los dos juntos (por defecto si lo omites).
►content=all → 两者合并(省略参数时的默认值)。
►&fields=node-connector(Campo1;Campo2;…) → pedir solo esos campos.
►&fields=node-connector(字段1;字段2;…) → 只返回指定字段,减小响应体。
►Referencia: https://docs.opendaylight.org/projects/openflowplugin/en/stable-vanadium/users/operation.html
►参考:OpenFlow Plugin 的 operation 文档(含全部字段说明)。
| Método | 语义 | 装流规则场景 |
|---|---|---|
| GET | Leer / consultar | 查已安装的流表 |
| PUT | 创建或整体替换 | 写入完整 flow.json |
| POST | 新建子资源 / 触发 RPC | 在集合下新增一条 flow |
| PATCH | 局部修改 | 只改 priority 或 timeout |
| DELETE | 删除资源 | 删掉 flow=id |
Campos de un puerto (node-connector) · 端口字段全景
▸ 原页截图 p.27
►1. Datos del puerto — id: Identificador del puerto (openflow:1:1).
►1. 端口数据 —— id:端口标识(openflow:1:1 = 交换机 1 的 1 号口)。
►flow-node-inventory:name — Nombre legible (ej. s1-eth1).
►flow-node-inventory:name —— 可读名称(如 s1-eth1)。
►flow-node-inventory:port-number — Número de puerto real (1, 2, LOCAL).
►flow-node-inventory:port-number —— 真实端口号(1、2、LOCAL)。
►flow-node-inventory:hardware-address — La MAC del puerto.
►flow-node-inventory:hardware-address —— 端口 MAC。
►flow-node-inventory:current-speed — Velocidad negociada del enlace.
►flow-node-inventory:current-speed —— 链路协商速率。
►flow-node-inventory:configuration — Config administrativa (PORT-DOWN).
►flow-node-inventory:configuration —— 管理配置(如 PORT-DOWN)。
►flow-node-inventory:state — Estado del enlace: live, link-down, blocked.
►flow-node-inventory:state —— 链路状态:live(通)、link-down(断)、blocked(阻塞)。
►2. Estadísticas de tráfico (subárbol) — opendaylight-port-statistics: flow-capable-node-connector-statistics: packets, bytes, errores, drops.
►2. 流量统计(子树)—— opendaylight-port-statistics 下的 flow-capable-node-connector-statistics:包数、字节数、错误数、丢包数。
►3. Hosts detectados (los añade l2switch) — address-tracker: addresses: IP y MAC del equipo colgado del puerto (10.0.0.1).
►3. 已发现的主机(由 l2switch 添加)—— address-tracker:addresses:挂在端口上的设备的 IP 与 MAC(如 10.0.0.1)。
| 字段 | 含义 | 示例值 |
|---|---|---|
| id | 端口唯一标识 | openflow:1:1 |
| flow-node-inventory:name | 可读名称 | s1-eth1 |
| flow-node-inventory:port-number | 真实端口号 | 1 / LOCAL=4294967294 |
| flow-node-inventory:hardware-address | 端口 MAC | 3e:19:32:8b:6b:29 |
| flow-node-inventory:configuration | 管理配置 | PORT-DOWN |
| flow-node-inventory:state | 链路状态(3 个布尔) | live / link-down / blocked |
live / link-down / blocked,注意它不是一个枚举字符串。Ejemplos con curl · 六个常用 curl 模板
▸ 原页截图 p.28
►Ver nodos conectados (GET): consulta opendaylight-inventory:nodes?content=nonconfig.
►查已连接节点(GET):请求节点清单的 operational 数据。
►Ver la topología (GET): consulta network-topology:network-topology?content=nonconfig.
►查拓扑(GET):请求网络拓扑的 operational 数据。
►Ver las reglas instaladas (GET): consulta nodes/node=openflow:1/flow-node-inventory:table=0?content=config.
►查已安装规则(GET):查交换机 1 表 0 的 config —— 也就是「我下发的规则」。
►Ver las reglas Generales (GET): el mismo path con ?content=nonconfig.
►查「实际生效」的规则(GET):同一路径改用 ?content=nonconfig。
►Instalar una regla de flujo (PUT): añade /flow=1 并带 -d @flow.json.
►安装流规则(PUT):路径末尾加 /flow=1,请求体用 -d @flow.json。
►Borrar una regla (DELETE): mismo path, sin cuerpo.
►删除规则(DELETE):同一路径,不带请求体。
# 1) 节点 $ curl -u admin:admin -H "Accept: application/json" \ "http://127.0.0.1:8181/rests/data/opendaylight-inventory:nodes?content=nonconfig" # 2) 拓扑 $ curl -u admin:admin -H "Accept: application/json" \ "http://127.0.0.1:8181/rests/data/network-topology:network-topology?content=nonconfig" # 3) 已安装规则(config) $ curl -u admin:admin -H "Accept: application/json" \ "http://127.0.0.1:8181/rests/data/opendaylight-inventory:nodes/node=openflow:1/flow-node-inventory:table=0?content=config" # 4) 实际生效规则(nonconfig) $ curl -u admin:admin -H "Accept: application/json" \ "http://127.0.0.1:8181/rests/data/opendaylight-inventory:nodes/node=openflow:1/flow-node-inventory:table=0?content=nonconfig" # 5) 安装规则(PUT) $ curl -u admin:admin -H "Content-Type: application/json" -X PUT \ "http://127.0.0.1:8181/rests/data/opendaylight-inventory:nodes/node=openflow:1/flow-node-inventory:table=0/flow=1" \ -d @flow.json # 6) 删除规则(DELETE) $ curl -u admin:admin -X DELETE \ "http://127.0.0.1:8181/rests/data/opendaylight-inventory:nodes/node=openflow:1/flow-node-inventory:table=0/flow=1"
flow=1 必须与 JSON 里的 "id": "1" 一致,否则会出现「路径说一套、正文说一套」,规则可能装不上或落在别的 id 下。-u admin:admin 是 ODL 默认账号;-H "Accept: application/json" 决定响应格式(不加可能返回 XML)。Ver nodos conectados · 节点清单返回什么
▸ 原页截图 p.29
►Devuelve el inventario completo de nodos y puertos que el controlador conoce vía MD-SAL.
►返回控制器通过 MD-SAL 掌握的全部节点与端口清单。
►node: cada switch OpenFlow conectado (openflow:1, openflow:2, etc.).
►node:每台已连接的 OpenFlow 交换机(openflow:1、openflow:2……)。
►Dentro de cada node, una lista de node-connector → son los puertos de ese switch.
►每个 node 内部有一个 node-connector 列表 → 即该交换机的各个端口。
►Cada puerto tiene muchos atributos: id, port-number, hardware-address, state (live / link-down / blocked).
►每个端口带多个属性:id、port-number、hardware-address、state(live / link-down / blocked)。
openflow:2 就知道是第 2 台交换机;看到 host:... 就是主机(由 l2switch 发现)。Ver nodos conectados · 控制台与浏览器两种看法
▸ 原页截图 p.30
►En consola: se ejecuta el curl y se lee el JSON devuelto.
►控制台方式:执行 curl,直接读返回的 JSON。
►En URL: se pega la misma URL en el navegador (con credenciales) y se ve el árbol JSON.
►URL 方式:把同一 URL 贴进浏览器(需带凭据),即可看到 JSON 树。
Ver campos específicos (fields) · 只要想看的字段
▸ 原页截图 p.31
►En lugar del volcado completo, fields pide solo los campos elegidos de cada puerto.
►fields 不去做完整转储,而是只取每个端口中选中的字段。
►Aquí, del switch openflow:1, mostramos sus puertos con cuatro datos cada uno: id, port-number, hardware-address, state.
►这里对交换机 openflow:1,每个端口只显示四项:id、port-number、hardware-address、state。
►flow-node-inventory:port-number — número de puerto real (el valor gigante de LOCAL es el puerto interno del propio switch, no un puerto físico).
►port-number —— 真实端口号;LOCAL 那个巨大数值是交换机内部端口,不是物理口。
►flow-node-inventory:state — estado del enlace, con tres booleanos: live (activo), link-down (caído), blocked.
►state —— 链路状态,含三个布尔量:live(通)、link-down(断)、blocked(阻塞)。
►Sintaxis: ?content=nonconfig&fields=node-connector(id;flow-node-inventory:port-number;…)
►语法:?content=nonconfig&fields=node-connector(字段;字段;…),字段之间用分号分隔。
$ curl -u admin:admin -H "Accept: application/json" \
"http://127.0.0.1:8181/rests/data/opendaylight-inventory:nodes/node=openflow:1?content=nonconfig&fields=node-connector(id;flow-node-inventory:port-number;flow-node-inventory:hardware-address;flow-node-inventory:state)"
{"opendaylight-inventory:node":[{
"node-connector":[
{"id":"openflow:1:1",
"flow-node-inventory:port-number":1,
"flow-node-inventory:hardware-address":"3e:19:32:8b:6b:29",
"flow-node-inventory:state":{"live":true,"blocked":false,"link-down":false}},
{"id":"openflow:1:LOCAL",
"flow-node-inventory:port-number":4294967294,
"flow-node-inventory:hardware-address":"a2:50:28:0d:37:4a",
"flow-node-inventory:state":{"live":false,"blocked":false,"link-down":true}},
{"id":"openflow:1:2","flow-node-inventory:port-number":2,
"flow-node-inventory:hardware-address":"5e:bf:d9:46:99:2d",
"flow-node-inventory:state":{"live":true,"blocked":false,"link-down":false}}]
}]}
fields 里的分隔符是分号 ;,不是逗号;参数之间才用 &。写错分隔符会直接 400。Ver topología de red · topology / node / link
▸ 原页截图 p.32
►Devuelve la vista lógica de la topología conocida por ODL.
►返回 ODL 所掌握拓扑的逻辑视图。
►Dentro aparece un objeto topology.
►里面是一个 topology 对象。
►Cada topología tiene: node — Puede ser un switch (openflow:1, openflow:2, …) o un host (host:xx:xx:xx...).
►每个拓扑包含:node —— 可以是交换机(openflow:1、openflow:2……),也可以是主机(host:xx:xx:xx…)。
►link — Conexiones entre nodos (source → destination).
►link —— 节点之间的连接(source → destination)。
►topology-id es "flow:1" en el ejemplo: es la topología creada por la app de topología del openflowplugin.
►示例里的 topology-id 是 flow:1:这是 openflowplugin 拓扑应用创建的拓扑。
►Cada link trae source-node / source-tp / dest-node / dest-tp: los dos extremos del enlace (tp = termination point).
►每条 link 带 source-node / source-tp / dest-node / dest-tp:即链路两端(tp = termination point,终结点)。
{"network-topology:network-topology":{
"topology":[{
"topology-id":"flow:1",
"node":[
{"node-id":"openflow:2", "...":"..."},
{"node-id":"openflow:3", "...":"..."},
{"node-id":"openflow:1", "...":"..."}],
"link":[
{"link-id":"openflow:2:2",
"source":{"source-node":"openflow:2","source-tp":"openflow:2:2"},
"destination":{"dest-tp":"openflow:1:2","dest-node":"openflow:1"}},
{"link-id":"openflow:2:3",
"source":{"source-node":"openflow:2","source-tp":"openflow:2:3"},
"destination":{"dest-tp":"openflow:3:2","dest-node":"openflow:3"}},
{"link-id":"openflow:1:2",
"source":{"source-node":"openflow:1","source-tp":"openflow:1:2"},
"destination":{"dest-tp":"openflow:2:2","dest-node":"openflow:2"}}]
}]}}
source 与 destination 两端,否则算不完整。Ver la topología · 三种呈现方式
▸ 原页截图 p.33
►Haciendo curl en terminal: se obtiene el JSON crudo de la topología.
►终端里 curl:拿到拓扑的原始 JSON。
►Con APP haciendo peticiones: la aplicación consulta RESTCONF y dibuja el grafo.
►由应用发起请求:应用查询 RESTCONF 后绘制成图。
►Haciendo GET en navegador: se visualiza el árbol JSON directamente.
►浏览器里 GET:直接查看 JSON 树。
六、安装一条流规则:match / instructions / action / priority / order
p.34–p.47Contenido · 目录(第五次出现)
▸ 原页截图 p.34
Contenido
目录
►What is OpenDaylight
►OpenDaylight 是什么
►Casos de uso de OpenDayLight
►OpenDaylight 的用例
►Guía Instalación
►安装指南
►Pedir Topología, nodos conectados y reglas instaladas
►查询拓扑、已连接节点与已安装的规则
►Instalar una regla de flujo
►安装一条流规则
►Bibliografía
►参考文献
Instalar una regla de flujo · PUT 的路径语义
▸ 原页截图 p.35
►curl -X PUT "http://127.0.0.1:8181/rests/data/opendaylight-inventory:nodes/node=openflow:1/flow-node-inventory:table=0/flow=id" -d @flow.json
►用 PUT 把 flow.json 写到指定交换机、指定表、指定流 id 的位置。
►openflow:1 → DPID del switch.
►openflow:1 → 交换机的 DPID(数据路径标识)。
►table=0 → tabla 0.
►table=0 → 表 0(单表流水线的默认表)。
►flow=id → identificador de la entrada (tú eliges), debe ser el mismo que el campo “id” del json.
►flow=id → 表项标识(自己取),必须与 JSON 里的 "id" 字段一致。
►@flow.json → fichero con el cuerpo de la regla.
►@flow.json → 存放规则正文的文件。
$ curl -u admin:admin -H "Content-Type: application/json" -H "Accept: application/json" -X PUT \ "http://127.0.0.1:8181/rests/data/opendaylight-inventory:nodes/node=openflow:1/flow-node-inventory:table=0/flow=1" \ -d @flow.json
flow=abc、JSON 里写 "id":"def" 是最常见的翻车点:ODL 按路径定位资源,正文不一致会导致覆盖或失败。Estructura general de un flow.json · 规则骨架
▸ 原页截图 p.36
►{"flow-node-inventory:flow": [{ "id": …, "table_id": …, "priority": …, "cookie": …, "idle-timeout": …, "hard-timeout": …, "match": {…}, "instructions": {…} }]}
►最外层是 flow-node-inventory:flow 数组,每一项是一条表项,含 id、table_id、priority、可选超时、以及必需的 match 与 instructions。
►id: identificador único de la regla en esa tabla.
►id:该表中规则的唯一标识。
►table_id: número de tabla en el switch (normalmente 0).
►table_id:交换机中的表号(通常是 0)。
►priority: prioridad de la regla (mayor → más preferida).
►priority:规则优先级(数值越大越优先)。
►cookie: número para identificar el flujo (útil para borrados selectivos).
►cookie:用于标识流的数值(便于按 cookie 批量删除)。
►idle-timeout: segundos hasta que expira si no se usa.
►idle-timeout:闲置多少秒后过期(有流量就续命)。
►hard-timeout: segundos hasta que expira siempre, aunque se use.
►hard-timeout:无论是否使用,到期必删(绝对寿命)。
{"flow-node-inventory:flow": [{
"id": "<string>",
"table_id": <int>,
"priority": <int>,
"cookie": <int>, // opcional
"idle-timeout": <int>, // opcional
"hard-timeout": <int>, // opcional
"match": { ... }, // obligatoria
"instructions": { ... } // obligatoria
}]}
Campos principales: match {<match>} · 二层与 ARP 匹配
▸ 原页截图 p.37
►<match> — Puerto de entrada: "in-port": "openflow:1:1".
►<match> —— 入口端口:"in-port": "openflow:1:1"。
►MAC destino / origen: "ethernet-match": { "ethernet-destination": {"address": "00:00:00:00:00:0A"}, "ethernet-source": {"address": "00:00:00:00:00:0B"} }.
►目的/源 MAC:写在 ethernet-match 下的 ethernet-destination 与 ethernet-source。
►Tipo Ethernet: "ethernet-match": {"ethernet-type": {"type": 2048}} // 0x0800 → IPv4.
►以太网类型:ethernet-type.type = 2048(0x0800)表示 IPv4。
►ARP (cuando ethertype = 0x0806): type 2054, más arp-op (1=request, 2=reply) y las direcciones IP/MAC de origen y destino.
►ARP(ethertype = 0x0806,十进制 2054):再加 arp-op(1=请求,2=应答)以及源/目的 IP 与 MAC 地址。
►arp-source-transport-address / arp-target-transport-address — sender / target protocol address (IP).
►arp-source-transport-address / arp-target-transport-address —— 发送方/目标协议地址(IP)。
►arp-source-hardware-address / arp-target-hardware-address — sender / target HW addr (MAC).
►arp-source-hardware-address / arp-target-hardware-address —— 发送方/目标硬件地址(MAC)。
"in-port": "openflow:1:1"
"ethernet-match": {
"ethernet-destination": { "address": "00:00:00:00:00:0A" },
"ethernet-source": { "address": "00:00:00:00:00:0B" }
}
"ethernet-match": { "ethernet-type": { "type": 2048 } } // 0x0800 → IPv4
// ARP (ethertype = 0x0806 = 2054)
"ethernet-match": { "ethernet-type": { "type": 2054 } },
"arp-op": 1, // 1=request, 2=reply
"arp-source-transport-address": "10.0.0.1/32", // sender IP
"arp-target-transport-address": "10.0.0.2/32", // target IP
"arp-source-hardware-address": { "address": "00:00:00:00:00:0A" },
"arp-target-hardware-address": { "address": "00:00:00:00:00:0B" }
“ethernet-type" 用了中文式弯引号,直接复制会 JSON 解析失败;本文已统一为直引号。Campos principales: match {<match>} · IPv4 与 DSCP/ECN/协议
▸ 原页截图 p.38
►IPv4 (Direcciones): "ethernet-match": {"ethernet-type": {"type": 2048}}, "ipv4-source": "10.0.0.1/32", "ipv4-destination": "10.0.0.2/32".
►IPv4 地址:先声明 ethertype = 2048(IPv4),再给 ipv4-source 与 ipv4-destination(带掩码)。
►DSCP / ECN / Protocolo L4: "ip-match": { "ip-dscp": 10, "ip-ecn": 2, "ip-protocol": 6 }.
►DSCP / ECN / 四层协议:写在 ip-match 下,ip-dscp(0..63)、ip-ecn(0..3)、ip-protocol。
►ip-protocol: 6 = TCP, 17 = UDP, 1 = ICMPv4.
►ip-protocol:6 = TCP,17 = UDP,1 = ICMPv4。
"ethernet-match": { "ethernet-type": { "type": 2048 } },
"ipv4-source": "10.0.0.1/32",
"ipv4-destination": "10.0.0.2/32"
"ethernet-match": { "ethernet-type": { "type": 2048 } },
"ip-match": {
"ip-dscp": 10, // 0..63
"ip-ecn": 2, // 0..3
"ip-protocol": 6 // 6=TCP, 17=UDP, 1=ICMPv4
}
Campos principales: match {<match>} · TCP / UDP / ICMP
▸ 原页截图 p.39
►TCP: ethertype 2048 + ip-protocol 6 + "tcp-source-port": 12345 + "tcp-destination-port": 80.
►TCP:ethertype 2048 + ip-protocol 6 + 源端口 12345 + 目的端口 80。
►UDP: ethertype 2048 + ip-protocol 17 + "udp-source-port": 5000 + "udp-destination-port": 53.
►UDP:ethertype 2048 + ip-protocol 17 + 源端口 5000 + 目的端口 53。
►ICMP: ethertype 2048 + ip-protocol 1 + "icmpv4-match": {"icmpv4-type": 8, "icmpv4-code": 0} // 8=echo-request, 0=echo-reply.
►ICMP:ethertype 2048 + ip-protocol 1 + icmpv4-match(type 8 = echo-request,0 = echo-reply;code 通常省略)。
// TCP "ethernet-match": { "ethernet-type": { "type": 2048 } }, "ip-match": { "ip-protocol": 6 }, "tcp-source-port": 12345, "tcp-destination-port": 80 // UDP "ethernet-match": { "ethernet-type": { "type": 2048 } }, "ip-match": { "ip-protocol": 17 }, "udp-source-port": 5000, "udp-destination-port": 53 // ICMP "ethernet-match": { "ethernet-type": { "type": 2048 } }, "ip-match": { "ip-protocol": 1 }, "icmpv4-match": { "icmpv4-type": 8, "icmpv4-code": 0 }
tcp-destination-port 而不写 ip-protocol: 6,在 ODL 的模型中是不完整的匹配链,可能被拒绝。Campos principales: instructions · 动作容器
▸ 原页截图 p.40
►Estructura básica: "instructions": { "instruction": [{ "order": 0, "apply-actions": { "action": [ … ] } }] }.
►基本结构:instructions 里是 instruction 数组,每项含 order 与 apply-actions。
►Salida: {"order":0,"output-action":{"output-node-connector":"FLOOD"}} — también CONTROLLER o un puerto concreto (openflow:1:3).
►输出:output-action 的目标可以是 FLOOD(泛洪)、CONTROLLER(上送控制器)或具体端口(openflow:1:3)。
►Seteo de campos: {"order": 0, "set-field": {"ipv4-destination": "10.0.0.99/32"}} — modificar una cabecera antes de enviar.
►改字段:set-field 在发送前重写某个头部字段(例如目的 IP)。
►Drop: no poner ninguna acción de salida → "action": [].
►丢弃:不放任何输出动作,"action": [] 即为 drop。
"instructions": {
"instruction": [{
"order": 0,
"apply-actions": {
"action": [ ... ]
}
}]
}
// 输出
{"order":0,"output-action":{"output-node-connector":"FLOOD"}}
{"order":0,"output-action":{"output-node-connector":"CONTROLLER"}}
{"order":0,"output-action":{"output-node-connector":"openflow:1:3"}}
// 改字段
{"order": 0, "set-field": { "ipv4-destination": "10.0.0.99/32" }}
// drop
"action": []
"action": "drop" 是无效 JSON 语义。Campos principales: instructions · 十种 action 速查表
▸ 原页截图 p.41
►Drop: no es una acción explícita; se consigue no poniendo ninguna acción de salida (p. ej., apply-actions vacío) o dejando que caduque el pipeline sin output/group.
►Drop 并非显式动作:不放任何输出动作(例如 apply-actions 为空),或让流水线走到头都没有 output/group,即可实现丢弃。
►Las acciones más comunes se resumen en la tabla: output, set-field, group, push/pop VLAN, set-queue, push/pop MPLS, dec-nw-ttl, set-nw-ttl.
►最常用的动作见下表:输出、改字段、组表、压/弹 VLAN、设置队列、压/弹 MPLS、TTL 递减、TTL 设置。
| # | Acción | Para qué se usa | Parámetros típicos |
|---|---|---|---|
| 1 | output-action | 发往端口 / CONTROLLER / FLOOD / LOCAL | output-node-connector: 2 · CONTROLLER · FLOOD |
| 2 | set-field | 改写头部(MAC / IP / 端口 / VLAN / DSCP…) | ipv4-destination: "10.0.0.99/32" · tcp-dst: 8000 |
| 3 | group-action | ECMP / 负载均衡、复制、快速故障切换 | group-id: 10 |
| 4 | push-vlan-action | 加 VLAN 标签(trunking) | ethernet-type: 0x8100 |
| 5 | pop-vlan-action | 剥掉 VLAN 标签(access) | — |
| 6 | set-queue-action | QoS:指定队列发送 | queue-id: 1 |
| 7 | push-mpls-action | 封装 MPLS | ethernet-type: 0x8847 |
| 8 | pop-mpls-action | 弹出 MPLS 标签 | ethernet-type: 0x0800 |
| 9 | dec-nw-ttl | TTL 递减(路由器行为) | — |
| 10 | set-nw-ttl-action | 显式设置 TTL | ttl: 64 |
Campos principales: instructions · order 到底是什么
▸ 原页截图 p.42
►order es solo un índice de ordenación: dice en qué orden se ejecutan las instructions (y también las actions dentro de apply-actions).
►order 只是一个排序索引:它决定各条 instruction(以及 apply-actions 内各 action)的执行先后。
►Valores: entero sin signo, normalmente 0…65535 (uint16). Dentro de una misma lista deben ser únicos. Puedes usar 0,1,2… (o 0,10,20…).
►取值:无符号整数,通常 0…65535(uint16);同一列表内必须唯一。可用 0,1,2…(或留间隔 0,10,20…)。
►Significado: no “delimita” nada especial; simplemente ordena. El switch ejecuta primero la de order: 0, luego la de order: 1, etc.
►语义:它不「界定」任何特殊含义,只负责排序。交换机先执行 order 0,再执行 order 1……
priority,两者别混。Ejemplo 1: Datos de entrada del host h1 a FLOOD · 把 h1 的流量泛洪
▸ 原页截图 p.43
►match: ethernet-type 2048 (IPv4) + ipv4-source "10.0.0.1/32" → 只匹配 h1 发出的 IPv4 流量.
►match:ethertype 2048(IPv4)+ 源 IP 10.0.0.1/32 → 只匹配 h1 发出的 IPv4 流量。
►instructions: apply-actions con output-node-connector "FLOOD" → 从除入端口外的所有端口发出去.
►instructions:apply-actions 里用 output-node-connector: "FLOOD" → 从除入端口外的所有端口泛洪。
►priority 100; se instala en openflow:1, tabla 0, con id "h1_FLOOD".
►priority 100;装到 openflow:1 的表 0,id 为 h1_FLOOD。
{"flow-node-inventory:flow": [{
"id": "h1_FLOOD",
"table_id": 0,
"priority": 100,
"match": {
"ethernet-match": { "ethernet-type": {"type": 2048}},
"ipv4-source": "10.0.0.1/32" },
"instructions": {
"instruction": [{
"order": 0,
"apply-actions": {"action": [{
"order": 0,
"output-action": {"output-node-connector": "FLOOD"}
}]}
}]
}
}]}
$ curl -u admin:admin -H "Content-Type: application/json" -X PUT \
"http://127.0.0.1:8181/rests/data/opendaylight-inventory:nodes/node=openflow:1/flow-node-inventory:table=0/flow=h1_FLOOD" \
-d @Ej1.json
Ejemplo 2: Descartar LLDP (0x88cc = 35020) · 屏蔽 LLDP
▸ 原页截图 p.44
►match: "ethernet-type": {"type": 35020} → 0x88CC,即 LLDP 帧.
►match:ethernet-type.type = 35020(0x88CC),即 LLDP 帧。
►instructions: apply-actions con "action": [] → 不做任何输出,等于丢弃.
►instructions:apply-actions 里 "action": [] → 不输出任何东西,等于丢弃。
►priority 50000 (muy alta) y se instala en openflow:2, tabla 0, id "99".
►priority 50000(非常高),装到 openflow:2 的表 0,id 为 99。
{"flow-node-inventory:flow":[{
"id": "99",
"table_id": 0,
"priority": 50000,
"match": { "ethernet-match": { "ethernet-type": { "type": 35020 } } },
"instructions": { "instruction": [ {
"order": 0,
"apply-actions": { "action": [] }
}]}
}]}
$ curl -u admin:admin -H "Content-Type: application/json" -X PUT \
"http://127.0.0.1:8181/rests/data/opendaylight-inventory:nodes/node=openflow:2/flow-node-inventory:table=0/flow=99" \
-d @Ej2.json
Ejemplo 3: si eth_dst = MAC_X → por puerto P · 基于目的 MAC 转发
▸ 原页截图 p.45
►match: ethernet-destination "00:00:00:00:00:02" → 目的 MAC 等于该地址的帧.
►match:ethernet-destination = 00:00:00:00:00:02 → 目的 MAC 为该地址的帧。
►instructions: output-node-connector "3" → 固定从 3 号口发出.
►instructions:output-node-connector: "3" → 固定从 3 号口发出。
►priority 300; openflow:2, tabla 0, id "mac_port".
►priority 300;装到 openflow:2 的表 0,id 为 mac_port。
{"flow-node-inventory:flow": [{
"id": "mac_port",
"table_id": 0,
"priority": 300,
"match": {"ethernet-match": {"ethernet-destination": { "address": "00:00:00:00:00:02" }}},
"instructions": {
"instruction": [{
"order": 0,
"apply-actions": {"action": [{
"order": 0,
"output-action": { "output-node-connector": "3" }
}]}
}]
}
}]}
$ curl -u admin:admin -H "Content-Type: application/json" -X PUT \
"http://127.0.0.1:8181/rests/data/opendaylight-inventory:nodes/node=openflow:2/flow-node-inventory:table=0/flow=mac_port" \
-d @Ej3.json
output-node-connector: "3" 是字符串,而 match 里的 ethernet-type.type 是整数。类型写反会 400。Ejemplo 4: Cambia las MAC como un router · 改写源/目的 MAC 后转发
▸ 原页截图 p.46
►match: IPv4 + ipv4-source "10.0.0.2/32" → 匹配 h2 发出的 IPv4 流量.
►match:IPv4 + 源 IP 10.0.0.2/32 → 匹配 h2 发出的 IPv4 流量。
►instructions: action 按 order 0→1→2 依次执行: set-field (ethernet-source = 00:00:00:00:aa:01) → set-field (ethernet-destination = 00:00:00:00:00:02) → output-node-connector "2".
►instructions:三个 action 按 order 0→1→2 依次执行:改源 MAC → 改目的 MAC → 从 2 号口发出。
►priority 200; openflow:1, tabla 0, id "Chg_MAC".
►priority 200;装到 openflow:1 的表 0,id 为 Chg_MAC。
{"flow-node-inventory:flow": [{
"id": "Chg_MAC",
"table_id": 0,
"priority": 200,
"match": {
"ethernet-match": { "ethernet-type": {"type": 2048}},
"ipv4-source": "10.0.0.2/32" },
"instructions": { "instruction": [{
"order": 0,
"apply-actions": { "action": [
{"order": 0, "set-field": {"ethernet-match": {"ethernet-source": { "address": "00:00:00:00:aa:01" }}}},
{"order": 1, "set-field": {"ethernet-match": {"ethernet-destination": { "address": "00:00:00:00:00:02" }}}},
{"order": 2, "output-action": { "output-node-connector": "2" }}
]}
}]}
}]}
$ curl -u admin:admin -H "Content-Type: application/json" -X PUT \
"http://127.0.0.1:8181/rests/data/opendaylight-inventory:nodes/node=openflow:1/flow-node-inventory:table=0/flow=Chg_MAC" \
-d @Ej4.json
order 存在的意义。Contenido · 目录(第六次出现)
▸ 原页截图 p.47
Contenido
目录
►What is OpenDaylight
►OpenDaylight 是什么
►Casos de uso de OpenDayLight
►OpenDaylight 的用例
►Guía Instalación
►安装指南
►Pedir Topología, nodos conectados y reglas instaladas
►查询拓扑、已连接节点与已安装的规则
►Instalar una regla de flujo
►安装一条流规则
►Bibliografía
►参考文献
七、参考文献与规范
p.48Bibliografía · 参考文献
▸ 原页截图 p.48
►OpenDaylight OpenFlow Plugin – índice general: visión global del plugin (arquitectura, módulos, cómo empezar y referencias).
►OpenDaylight OpenFlow Plugin —— 总索引:插件的全局概览(架构、模块、入门与参考)。
►OpenFlow Plugin – Operations: guía de operación del plugin (estadísticas, inventory, topology, RPCs/notificaciones, gestión de nodos/puertos).
►OpenFlow Plugin – Operations:插件操作指南(统计、库存、拓扑、RPC/通知、节点与端口管理)。
►OpenFlow Flow Examples: ejemplos listos de flujos (matches, acciones, tables, groups, meters) con RESTCONF.
►OpenFlow Flow Examples:现成的流表示例(match、动作、表、group、meter),配 RESTCONF 用法。
►OpenFlow 1.3.5 (ONF spec): especificación oficial del protocolo (mensajes, tablas, acciones, pipeline).
►OpenFlow 1.3.5(ONF 规范):协议官方规范(消息、表、动作、流水线)。
►RFC 7950 (YANG 1.1): estándar IETF del lenguaje YANG para modelado de datos de red (tipos, módulos, augment, RPC/notification).
►RFC 7950(YANG 1.1):IETF 的网络数据建模语言标准(类型、模块、augment、RPC/notification)。
►RFC 6241 (NETCONF): protocolo IETF para configuración/gestión de red basado en modelos YANG (operaciones, locking, capabilities).
►RFC 6241(NETCONF):基于 YANG 模型的 IETF 网络配置/管理协议(操作、加锁、能力集)。
►RFC 8040 (RESTCONF): interfaz REST sobre datos YANG/NETCONF (endpoints /data, /operations, notificaciones, media types).
►RFC 8040(RESTCONF):架在 YANG/NETCONF 数据之上的 REST 接口(/data、/operations 端点、通知、媒体类型)。
专有名词速记表(A–Z)
共 76 条,覆盖全 48 页的高频术语。第三列点页码直接跳回原页;最后一列只写「一句话 + 最容易被扣分的点」。
| 西语术语 | 中文 | 页码 | 一句话记住 · 易错点 |
|---|---|---|---|
| A | |||
| acciones | 动作 | p.40 | instruction 里真正执行的那一步;本讲列了 10 种。别把 actions 当成 instructions。 |
| API Northbound | 北向 API | p.23 | 应用 ↔ 控制器,RESTCONF 就在这里;Flask 可视化器、FastAPI 都是它的消费者。 |
| API Southbound | 南向 API | p.26 | 控制器 ↔ 交换机,OpenFlow 走这一侧。北=向上给业务,南=向下管盒子。 |
| apply-actions | 立即执行动作 | p.40 | 命中即按 order 顺序执行;对比 write-actions 是写进 action set 稍后统一执行。 |
| ARP | 地址解析协议 | p.37 | ethernet-type 2054;匹配字段是 arp-op / arp-tpa / arp-target-hardware-address。 |
| B | |||
| bundle:diag | OSGi 诊断命令 | p.20 | 组件装上了却起不来时用它,它会告诉你缺哪个依赖。排障三件套之一。 |
| C | |||
| Config datastore | 配置数据存储 | p.25 | 「我们想做什么」= intención;写入用 PUT / POST / DELETE。 |
| content=config | 配置视图 | p.25 | 查 config store 用 ?content=config,拿到的才是你下发的意图。 |
| content=nonconfig | 运行态视图 | p.25 | 读 operational;不是「没有配置」,是「非配置数据」,即设备真实状态。 |
| curl | 命令行 HTTP 客户端 | p.28 | 本讲六个模板全靠它:查节点 / 端口 / 拓扑 / 流表 + PUT 装规则。别忘 -u admin:admin。 |
| conector (node-connector) | 节点端口 | p.27 | 描述「某个节点的某个端口」:id、状态、统计。它是 node 的子资源。 |
| D | |||
| datastore | 数据存储 | p.25 | MD-SAL 里就两个:config 与 operational。所有查询都先问自己「问哪一边」。 |
| DSCP | 差分服务码点 | p.38 | IPv4 match 里的 ip-dscp,6 bit;和 ECN 的 2 bit 拼成 TOS 字节。 |
| drop | 丢弃 | p.40 | 在 instructions 里就是 "drop": {};在 action 列表里表现为空数组。 |
| E | |||
| ECN | 显式拥塞通知 | p.38 | ip-ecn,2 bit(0–3);别和 DSCP 的 6 bit 记混。 |
| endpoint RESTCONF | RESTCONF 端点 | p.22 | 固定形态 http://IP:8181/rests/data/…;端口 8181,前缀 /rests/data/。 |
| ethernet-match | 以太网匹配 | p.37 | 二层匹配的外壳,里面放 ethernet-type / ethernet-source / ethernet-destination。 |
| ethernet-type | 以太类型 | p.37 | 2048=IPv4、2054=ARP、35020=LLDP。原文这一行混了中文弯引号,直接抄会 JSON 报错。 |
| F | |||
| FastAPI | FastAPI 框架 | p.23 | 北向 REST API 示例(MainFast:app,端口 7000);可读可写,和 Flask 的只读画图区分开。 |
| feature:install | 安装功能模块 | p.20 | 装模块的唯一命令;本讲必装 8 个,答题记住前三:restconf-all / l2switch-switch / flow-services-rest。 |
| feature:list | 列出功能模块 | p.20 | 不加参数看全部;加 -i 只看已安装。 |
| Flask | Flask 框架 | p.23 | 可视化器:取 ODL 数据画成图(如拓扑图),典型只读应用。 |
| FLOOD | 泛洪 | p.43 | 发到除入端口以外的所有端口;ALL 才是含入端口。例 1 用它实现「先通再说」。 |
| flow (tabla de flujos) | 流表项 | p.32 | 查询路径 …/flow-node-inventory:table=0/flow=1;表号从 0 开始。 |
| flow-node-inventory | 流表清单模型 | p.32 | ODL 里装流表的容器名;装规则时 JSON 顶层也是它。 |
| flow.json | 规则 JSON 文件 | p.36 | 用 -d @flow.json 提交;结构 = match + instructions + priority + table_id + id。 |
| G | |||
| GET | 查询方法 | p.26 | 只读、不带 body;所有「查拓扑/查节点/查流表」都是 GET。 |
| guía de instalación | 安装指南 | p.19 | 本讲第四段:Karaf → 8 个 feature → Mininet 起拓扑 → 北向应用。 |
| H | |||
| hard-timeout | 硬超时 | p.42 | 从装上的那一刻开始倒计时,到点无条件删除,不管有没有流量。 |
| I | |||
| ICMP | 控制报文协议 | p.39 | icmpv4-type: 8 才是 echo request(ping 请求)。 |
| idle-timeout | 空闲超时 | p.42 | 只有在「一段时间没有匹配到包」时才计时删除;有流量就一直续命。 |
| in-port | 入端口匹配 | p.37 | 写法 "openflow:1:1" = 节点:端口;它是 match 里最常用的区分依据。 |
| instructions | 指令集 | p.40 | 命中后「进入哪套流程」:apply-actions / write-actions / drop 三选一(或组合)。 |
| IPv4 match | IPv4 匹配 | p.38 | ipv4-source / ipv4-destination 要写成 "10.0.0.1/32" 这种带掩码的形式。 |
| K | |||
| Karaf | Karaf 容器 | p.20 | ODL 跑在 Karaf(OSGi)上;./bin/karaf 是前台启动,关终端就停。 |
| karaf clean | 清理后重启 | p.20 | 清缓存再启动,只在排查古怪故障时用,不是日常启动方式。 |
| L | |||
| l2switch-switch | 二层交换模块 | p.21 | 提供泛洪、MAC 学习、ARP 发现主机;不装它,主机之间根本 ping 不通。 |
| link (enlace) | 链路 | p.32 | 拓扑 JSON 里 link 由 source / destination 两个 node-connector 描述。 |
| LLDP | 链路发现协议 | p.44 | ethernet-type 35020;例 2 把它丢掉,避免控制器把探测包当成业务流。 |
| LOCAL | 本地保留端口 | p.31 | 端口号 4294967294,是交换机内部端口,不是真实物理口。 |
| M | |||
| MAC learning | MAC 地址学习 | p.21 | l2switch 的看家本领:记住「哪个 MAC 在哪个端口」,之后就能精确转发。 |
| match | 匹配段 | p.36 | 决定「像不像」;由 in-port + ethernet-match + ip-match… 逐层套娃组成。 |
| MD-SAL | 模型驱动服务抽象层 | p.6 | ODL 的心脏:YANG 模型 → 自动生成 RESTCONF 端点与两个 datastore。 |
| Mininet | 网络仿真器 | p.22 | --topo=linear,2,2 起 2 交换机 × 2 主机;必须带 protocols=OpenFlow13。 |
| N | |||
| network-topology | 网络拓扑容器 | p.32 | 路径 /rests/data/network-topology:network-topology,查拓扑只能走它。 |
| NFV | 网络功能虚拟化 | p.3 | ODL 的定义里与 SDN 并列出现:「base sólida para NFV」。别只说 SDN。 |
| node | 节点 | p.29 | node-id 形如 openflow:1;它下面才挂 node-connector。 |
| node-connector | 节点端口资源 | p.27 | id 形如 openflow:1:1,与流规则里的 in-port 写法完全一致。 |
| O | |||
| OpenDaylight | OpenDaylight 控制器 | p.3 | 部署最广的开源 SDN 平台;基于 MD-SAL + YANG,支持 OpenFlow 等多种南向协议。 |
| OpenFlow | OpenFlow 协议 | p.21 | 南向协议,本讲用 1.3;ODL 是控制器。说「OpenFlow 是控制器」直接零分。 |
| Operational datastore | 运行态数据存储 | p.25 | 「设备真实状态」= 端上来的菜;应用只读,写它的是控制器与设备。 |
| order | 动作执行序号 | p.42 | 同一 action 列表内的先后(0→1→2);与 priority(选哪条规则)完全不同层。 |
| output | 输出动作 | p.40 | "output-action": {"output-node-connector": "openflow:1:2"},从指定端口发出。 |
| ovs-ofctl | OVS 管理工具 | p.22 | dump-flows s1 看交换机侧流表;与控制器侧查询互相印证。 |
| P | |||
| PATCH | 局部更新 | p.26 | 只改你给出的字段,其余保留;PUT 是整体替换。 |
| POST | 新建 | p.26 | 往集合里追加一条;路径写到「表」这一层,id 交给服务端或 JSON 里的 id。 |
| priority | 优先级 | p.42 | 数值越大越先匹配;多条规则同时命中时只执行最高的那条。默认 0。 |
| PUT | 整体替换/写入 | p.35 | 路径必须精确到 flow id;同路径再 PUT 就是覆盖。装规则的主用手法。 |
| R | |||
| RESTCONF | REST 式配置协议 | p.26 | 把 YANG 模型暴露成 HTTP 资源;本讲所有操作都是 curl + RESTCONF。 |
| RFC 6241 | NETCONF 规范 | p.48 | RESTCONF 的前身;参考文献里三条 RFC 之一。 |
| RFC 7950 | YANG 1.1 规范 | p.48 | 定义 YANG 语言本身;MD-SAL 能自动生成 API 全靠它。 |
| RFC 8040 | RESTCONF 规范 | p.48 | RESTCONF 的正式定义;/rests/data 这套写法就是它规定的。 |
| S | |||
| SDN | 软件定义网络 | p.3 | 控制与转发分离;ODL 的目标就是「加速 SDN 采用」。 |
| Service Chaining | 服务链 | p.18 | 把流量按顺序穿过一串虚拟网络功能(防火墙→LB→IDS);云场景里 ODL 的核心卖点。 |
| set-field | 改字段动作 | p.46 | 例 4 用它改目的 MAC;改完还要再接一个 output 才真正发出去。 |
| 3SP | 三大需求 + 性能 | p.9 | Security / Scalability / Stability / Performance;原文写作 3SP 但实际列了四项。 |
| suscriptores | 用户/订户 | p.3 | 规范拼写;原文写成 subscriptores 是笔误,口述时别跟着错。 |
| T | |||
| tabla de flujos (table) | 流表 | p.32 | table=0 是默认表;查询时 flow-node-inventory:table=0。 |
| TCP | 传输控制协议 | p.39 | 三层套娃:ethernet-match → ip-match → tcp-match;少一层就匹配不到。 |
| topología | 拓扑 | p.33 | 同一份数据有三种看法(JSON / 控制台 / 浏览器插件),本质都是 network-topology。 |
| topology-manager | 拓扑维护模块 | p.21 | 把发现的链路写入并维护到拓扑;原文把第 6/7 条说明写反了,按语义记。 |
| U | |||
| UDP | 用户数据报协议 | p.39 | 与 TCP 同层,同样嵌在 ip-match 里;匹配字段是 udp-source/destination-port。 |
| URI | 统一资源标识 | p.26 | RESTCONF 的 URI = 主机端口 + /rests/data/ + YANG 路径 + 查询参数。 |
| V | |||
| vendor-neutral | 厂商中立 | p.4 | 来自各家厂商共同参与、不锁定单一供应商;反义是 vendor lock-in。 |
| VXLAN | VXLAN 隧道 | p.21 | 要设置隧道目的就必须装 nxm-extensions(Nicira 扩展)。 |
| Y | |||
| YANG | YANG 数据建模语言 | p.6 | 先写模型,API 与两个 datastore 全自动生成;这是 MD-SAL「模型驱动」的含义。 |
数字与时限速记卡
口诀:「2 库、3 层、5 方法、8 feature、10 action」。这些数字张口就能报,是 OpenDaylight 这一章的送分点。
| 行 | 数字 | 原文关键词 | 中文 | 页 |
|---|---|---|---|---|
| 1 | 1B | 1B de subscriptores | 十亿用户(mil millones);西语 billón 是万亿,别说错 | p.3 |
| 2 | 2 | Config / Operational | MD-SAL 的两个 datastore:意图 vs 真实状态 | p.25 |
| 3 | 3 | Aplicación / Control / Infraestructura | ODL 架构三层;最下层即数据平面 | p.7 |
| 4 | 4 | 3SP | 名字叫 3SP,实际列了 4 项:Security / Scalability / Stability / Performance | p.9 |
| 5 | 5 | GET · POST · PUT · PATCH · DELETE | RESTCONF 五个 HTTP 方法;装规则用 PUT,查用 GET | p.26 |
| 6 | 6 | Contenido | 目录六段:是什么 / 用例 / 安装 / 查询 / 装规则 / 参考 | p.2 |
| 7 | 8 | feature:install | 必装 8 个 feature;答题记前三即可 | p.21 |
| 8 | 8 | icmpv4-type: 8 | echo request(ping 请求)的类型号 | p.39 |
| 9 | 10 | action | 本讲速查的 10 种 action:output / drop / set-field / push-vlan… | p.41 |
| 10 | 2048 | "type": 2048 | 0x0800,IPv4 的以太类型 | p.37 |
| 11 | 2054 | "type": 2054 | 0x0806,ARP 的以太类型 | p.37 |
| 12 | 35020 | "type": 35020 | 0x88CC,LLDP;例 2 专门丢它 | p.44 |
| 13 | 8181 | localhost:8181 | RESTCONF 默认端口;前缀 /rests/data/ | p.26 |
| 14 | 50000 | "priority": 50000 | 例 2 丢 LLDP 的高优先级;例 1 的 FLOOD 用默认 0 | p.44 |
| 15 | 0 → 1 → 2 | "order" | 例 4 三个动作的执行序号:改 MAC → 改 IP → 输出 | p.46 |
| 16 | 4294967294 | LOCAL | 交换机内部端口号;看到它就说明不是物理口 | p.31 |
| 17 | 3 | RFC 7950 / 6241 / 8040 | YANG 1.1 · NETCONF · RESTCONF 三份规范 | p.48 |
| 18 | 4 | nodes / node-connector / network-topology / table | 四个最常用的顶层查询容器 | p.33 |
最容易混的十四组概念
每组只抓一个分界点:谁写谁读、谁大谁小、谁只是叫法不同。