

浏览全部资源
扫码关注微信
信息工程大学,河南郑州 450001
Received:31 May 2025,
Accepted:11 September 2025,
Published:25 September 2025
移动端阅览
杨兴源, 田乐, 姚莹, 等. 基于大语言模型的SDN网络自动化配置研究[J]. 电子学报, 2025, 53(09): 3078-3088.
YANG Xing-yuan, TIAN Le, YAO Ying, et al. Research on SDN Network Automated Configuration Based on Large Language Models[J]. Acta Electronica Sinica, 2025, 53(09): 3078-3088.
杨兴源, 田乐, 姚莹, 等. 基于大语言模型的SDN网络自动化配置研究[J]. 电子学报, 2025, 53(09): 3078-3088. DOI:10.12263/DZXB.20250463
YANG Xing-yuan, TIAN Le, YAO Ying, et al. Research on SDN Network Automated Configuration Based on Large Language Models[J]. Acta Electronica Sinica, 2025, 53(09): 3078-3088. DOI:10.12263/DZXB.20250463
传统网络依赖人工配置,在应对规模激增、需求复杂化及实时性要求提升的现代网络环境时,效率低下且成本高昂.大语言模型(Large Language Model,LLM)凭借其出色的自然语言理解能力,在网络自动化配置中展现出巨大的潜力.面向软件定义网络(Software Defined Networking,SDN),本文提出了一种基于LLM的轻量级自动化配置方法.在数据平面,提出了一种基于检索增强生成(Retrieval-Augmented Generation,RAG)技术的代码自动生成方法RetroP4,支持基于用户意图生成P4代码;在控制平面,提出了一种基于任务分解的流表自动生成方法CtrlSynth,支持基于用户意图和数据平面P4代码生成流表配置.实验结果表明:相较于通用大模型,RetroP4生成的P4代码的语法正确性提高了25%,语义正确性提高了87.5%;CtrlSynth能够准确生成与P4代码匹配的流表信息,在流量意图不超过300条时,准确率可达100%.
Traditional networks
which depend on manual configuration
are inefficient and expensive in the face of today’s rapidly expanding scales
increasingly complex demands
and the growing need for real-time responsiveness. Large language models (LLM)
known for their exceptional ability to understand natural language
show immense promise for automating network configurations. This paper introduces a streamlined approach to automated configuration for software defined networking (SDN)
leveraging LLM. For the data plane
we present RetroP4
a code generation method that uses retrieval-augmented generation (RAG) technology
enabling the creation of P4 code tailored to users’ intentions. In the control plane
we propose CtrlSynth
a method for automatically generating flow tables by breaking down tasks
aligning the configurations with users’ intentions and the P4 code from the data plane. Compared with general-purpose large models
the syntactic correctness of P4 code generated by RetroP4 is improved by 25%
and the semantic correctness is enhanced by 87.5%. CtrlSynth accurately produces flow table information that corresponds to the P4 code
achieving a 100% accuracy rate when dealing with up to 300 traffic-related intentions.
KHORSANDROO S , SÁNCHEZ A G , TOSUN A S , et al . Hybrid SDN evolution: A comprehensive survey of the state-of-the-art [J ] . Computer Networks , 2021 , 192 : 107981 .
王朝炜 , 杜嘉楠 , 王程 , 等 . 软件定义卫星网络中基于业务调度的混合路由算法 [J ] . 电子学报 , 2024 , 52 ( 5 ): 1506 - 1515 .
WANG C W , DU J N , WANG C , et al . A hybrid routing based on traffic scheduling in double-layer software defined satellite networks [J ] . Acta Electronica Sinica , 2024 , 52 ( 5 ): 1506 - 1515 . (in Chinese)
RAMANATHAN S , ZHANG Y , GAWISH M , et al . Practical intent-driven routing configuration synthesis [C ] // Proceedings of the 20th USENIX Symposium on Networked Systems Design and Implementation . California : USENIX Association , 2023 : 629 - 644 .
HSU K F , BECKETT R , CHEN A , et al . Contra: A programmable system for performance-aware routin [C ] // Proceedings of the 17th USENIX Symposium on Networked Systems Design and Implementation . California : USENIX Association , 2020 : 701 - 721 .
BECKETT R , MAHAJAN R , MILLSTEIN T , et al . Network configuration synthesis with abstract topologies [C ] // Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation . New York : ACM , 2017 : 437 - 451 .
TIAN B C , ZHANG X Y , ZHAI E N , et al . Safely and automatically updating in-network ACL configurations with intent language [C ] // Proceedings of the ACM Special Interest Group on Data Communication . New York : ACM , 2019 : 214 - 226 .
EL-HASSANY A , TSANKOV P , VANBEVER L , et al . NetComplete: Practical network-wide configuration synthesis with autocompletion [C ] // Proceedings of the 15th USENIX Symposium on Networked Systems Design and Implementation . California : USENIX Association , 2018 : 579 - 594 .
KOLIDES A , NAWAZ A , RATHOR A , et al . Artificial intelligence foundation and pre-trained models: Fundamentals, applications, opportunities, and social impacts [J ] . Simulation Modelling Practice and Theory , 2023 , 126 : 102754 .
FLORIDI L , CHIRIATTI M . GPT-3: Its nature, scope, limits, and consequences [J ] . Minds and Machines , 2020 , 30 ( 4 ): 681 - 694 .
LI J , TAO C Y , LI J , et al . Large language model-aware in-context learning for code generation [J ] . ACM Transactions on Software Engineering and Methodology , 2025 , 34 ( 7 ): 1 - 33 .
GAO B , HE Z M , SHARMA P , et al . Cost-efficient large language model serving for multi-turn conversations with CachedAttention [C ] // USENIX Annual Technical Conference . California : USENIX Association , 2024 : 111 - 126 .
WANG C J , SCAZZARIELLO M , FARSHIN A , et al . Making network configuration human friendly [J/OL ] . ( 2023-09-12 )[ 2025-05-24 ] . https://arxiv.org/abs/2309.06342 https://arxiv.org/abs/2309.06342 .
MONDAL R , TANG A L , BECKETT R , et al . What do LLMs need to synthesize correct router configurations? [C ] // Proceedings of the 22nd ACM Workshop on Hot Topics in Networks . New York : ACM , 2023 : 189 - 195 .
ZHANG F J , CHEN B , ZHANG Y , et al . RepoCoder: Repository-level code completion through iterative retrieval and generation [C ] // Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing . Stroudsburg : ACL , 2023 : 2471 - 2484 .
XU Z T , CRUZ M J , GUEVARA M , et al . Retrieval-augmented generation with knowledge graphs for customer service question answering [C ] // Proceedings of the 47th International ACM SIGIR Conference on Research and Development in Information Retrieval . New York : ACM , 2024 : 2905 - 2909 .
WEI J , WANG X Z , SCHUURMANS D , et al . Chain-of-thought prompting elicits reasoning in large language models [C ] // Proceedings of the 36th International Conference on Neural Information Processing Systems . New York : ACM , 2022 : 24824 - 24837 .
BIRKNER R , DRACHSLER-COHEN D , VANBEVER L , et al . Config2Spec: Mining network specifications from network configurations [C ] // Proceedings of the 17th USENIX Symposium on Networked Systems Design and Implementation . California : USENIX Association , 2020 : 969 - 984 .
SUBRAMANIAN K , D'ANTONI L , AKELLA A . Genesis: Synthesizing forwarding tables in multi-tenant networks [J ] . ACM SIGPLAN Notices , 2017 , 52 ( 1 ): 572 - 585 .
DOERING N , GORLLA C , TUTTLE T , et al . Empirical analysis of efficient fine-tuning methods for large pre-trained language models [EB/OL ] . ( 2024-01-08 )[ 2025-05-21 ] . https://arXiv.org/abs/2401.04051 https://arXiv.org/abs/2401.04051 .
DING N , QIN Y J , YANG G , et al . Parameter-efficient fine-tuning of large-scale pre-trained language models [J ] . Nature Machine Intelligence , 2023 , 5 ( 3 ): 220 - 235 .
FAN S D , CONG X , FU Y P , et al . WorkflowLLM: Enhancing workflow orchestration capability of large language models [EB/OL ] . ( 2024-11-08 )[ 2025-05-21 ] . https://arXiv.org/abs/2411.05451 https://arXiv.org/abs/2411.05451 .
0
Views
41
下载量
0
CSCD
Publicity Resources
Related Articles
Related Author
Related Institution
京公网安备11010802024621