CN102984075B - Based on the programmable router of NetFPGA - Google Patents

Based on the programmable router of NetFPGA Download PDF

Info

Publication number
CN102984075B
CN102984075B CN201210547114.9A CN201210547114A CN102984075B CN 102984075 B CN102984075 B CN 102984075B CN 201210547114 A CN201210547114 A CN 201210547114A CN 102984075 B CN102984075 B CN 102984075B
Authority
CN
China
Prior art keywords
router
module
netfpga
user
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201210547114.9A
Other languages
Chinese (zh)
Other versions
CN102984075A (en
Inventor
唐红
张健
徐川
赵国锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing University of Post and Telecommunications
Original Assignee
Chongqing University of Post and Telecommunications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing University of Post and Telecommunications filed Critical Chongqing University of Post and Telecommunications
Priority to CN201210547114.9A priority Critical patent/CN102984075B/en
Publication of CN102984075A publication Critical patent/CN102984075A/en
Application granted granted Critical
Publication of CN102984075B publication Critical patent/CN102984075B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a kind of programmable router based on NetFPGA, relate to computer networking technology.Comprise the NetFPGA board of WWW-mode module, CLI-mode module, administration agent module, programmable interface module, communication control module, Forwarding plane.The open DLL (dynamic link library) of this programmable router, user can customize and realizes Routing Protocol and more top agreement, is not limited to IP tunnel mode, provides unified mapping to transmit form; Allow User Defined processing data packets process; Provide web, telnet way to manage, user can customize increase command function; Implementation based on NetFPGA ensure that the forwarding performance that router is higher.The important component part of future network test bed should be can be used as based on the programmable router of NetFPGA, be applied to the checking of new network architecture, the research of New Deal, new expansion.

Description

Based on the programmable router of NetFPGA
Technical field
The present invention relates to the route technology of expansion able to programme, specifically based on the programmable router of NetFPGA, and can efficient forwarding data bag.
Background technology
Through the development of four more than ten years, existing TPC/IP architecture cannot adapt to the requirement that constantly progressive ICT (information and communication technology) and sustained traffic are innovated, and forces people to restudy architecture and the mechanism thereof of Future Internet.
Future network research is intended to carry out Theories and methods exploration and algorithm design from the Internet basic composition, operation principle and realization mechanism aspect.Future network architecture, agreement, algorithm etc. need a large amount of theory analysises and emulation experiment before practical application, need to carry out assessing in experimental network architecture and verify.But it is due to conventional router closure, very difficult at existing the Internet arrangement and checking new architecture, New Deal, algorithm.Router is as network core device, and the aspects such as its programmability, reconfigurability, manageability become more important.Programmable router allows user be configured or programme, the architecture that rapid deployment is new on an actual physics network and protocol stack, effectively can solve the problem that conventional router disposes agreement difficulty like this.It demonstrates great advantage and distant view in flexibility, dynamic, extensibility, manageability and programmability etc.
Programmable router not only has router forwarding capability, and possesses customizability.By simple programmed configurations, a kind of New Deal can be run, can verify agreement thus.Similar with conventional router, it comprises control plane, Forwarding plane, and control plane is responsible for router-level topology, routing table maintenance, routing management etc., and Forwarding plane uses NetFPGA fast-forwarding packet.
At present, immediate with the present invention is a kind of programmable router, uses Click and XORP to realize.XORP is intended to the closure solving business router, provides an opening, extendible router software platform, facilitates researcher to dispose and realize Routing Protocol.Click be one for the Modular programmable platform of router data plane, its objective is the reusability realizing functional configuration and module flexibly on datum plane.Router is on entirety realizes, and control plane adopts XORP to complete the function such as router-level topology, routing table maintenance, and Click mainly completes the protocol stack process of datum plane, packet is searched and the function such as to forward.Weak point is, this router still realizes based on ICP/IP protocol, limited to non-ip protocol disposal ability.For convenience of the test of New Deal, need to support non-ip protocol, break away from the constraint of TCP/IP.In addition, the implementation of Click, determines the forwarding that it is software view to the forwarding of packet, determines its forwarding performance not high relative to example, in hardware.The checking of New Deal needs production environment, needs relatively high forwarding performance.
Summary of the invention
For the above-mentioned deficiency of prior art, the invention discloses a kind of novel programmable router, not only can support that IP tunnel form realizes New Deal, newly expands, and support the clean-slate thought of checking future network, support to dispose non-ip protocol.There is provided a kind of higher forwarding performance in addition, for the checking of agreement, algorithm, architecture.
The present invention relates to a kind of programmable router based on NetFPGA, comprise control plane and Forwarding plane.Wherein control plane comprises WWW-mode module, CLI-mode module, administration agent module, programmable interface module and communication control module.
WWW-mode module, for providing web-based management service, completes information inspection and the configuration WWW-mode module of routers by web mode.For user provides web-based management interface, make user can by this interface configurations New Deal, configuration router port mac address, check logical forwarding table, check the information such as router traffic state.
CLI-mode module, for providing telnet to serve, for user provides a telnet command line interface interface, makes user can carry out administration configuration by order behavior routers.
Administration agent module, for providing the bottom data support of WWW-mode service and CLI-mode service, create the global variable representing router current state, WWW-mode service and CLI-mode service are registered to the administration order chained list of global variable, to facilitate expansion New function; Receives user's, and be actual executable function by command interpretation, read the information such as programmable router current logic is transmitted, data packet transceive state.Global variable comprises router present flow rate state, maps and transmit chained list, protocol identification, port information, administration order chained list and user-defined variable.
Programmable interface module, for providing the interface of user defined logic interface, comprise mapping and transmit (Map Forward Information Table) interface, mapping transmit change time the mapping upgraded in hardware (NetFPGA) transmit; With processing data packets function interface (packet_handler), user completes the process of self-defining data bag, and the self-defining processing data packets function of registered user, completes self-defining initialization; This module is transmitted by using unified MFIT(to map) the compatible various New Deal of mechanism, the list item of (as shown in Figure 4) wherein MFIT is normal address SA (standard address), next hop address MAC address, port to be forwarded (interface).The fixed length logical address that SA (standard address) is formed after Hash calculation for New Deal destination address, MAC address is the MAC Address of down hop, and interface is the interface of down hop.The maintenance of logical mappings table and the process of abnormal data bag is realized by the self-defining processing data packets function (packet_handler) of registered user.User realizes self-defining setup code, is registered as the user_init in route system, calls by during system initialization.User can increase custom feature order, is registered in the order chained list of router, adds the opening of system.
Communication control module, for providing control plane and Forwarding plane to carry out mutual interface function, receiving calling data bag process function interface when Forwarding plane sends the packet come up, calling registered custom data bag process function; When control plane sends packet to Forwarding plane, realize Packet Generation interface with libnet storehouse, Ethernet data bag is dressed up in custom data encapsulating and sends.The interactive information of this module has two kinds: data flow and control information stream.Data flow comprises route data packets and abnormal data bag; Control information stream comprises transmits data, initialization of register and configuration data.Communication control module shields bottom hardware, adopt libnet storehouse (low profile interface function library, the structure of lower layer network packet, process and sending function are provided) construction data bag sends, use libpcap storehouse (network data Packet capturing function library) monitoring reception data, by the realization of ioctl function to the configuration of register and reading.
Forwarding plane adopts NetFPGA to complete forwarding data bag.NetFPGA standard router UDP(user data channel) mainly comprise input judging module, output port enquiry module, output queue module.Wherein output port enquiry module is rewritten as above-mentioned mapping and transmits and search module, first Hash calculation is carried out in packet rs destination address to be forwarded, then in mapping is transmitted, corresponding list item is searched, if, this packet is not uploaded control plane process, if had, according to list item amendment packet header MAC Address, add corresponding port forwarding queue.
Forwarding plane receives packet, first the New Deal identification marking arranged in protocol identification according to user judges whether this packet is New Deal, if not being then uploaded to control plane process, if it is according to the logic destination address original position of the New Deal arranged, logic destination address length takes out destination address, hash algorithm is adopted to be converted to the normal address of fixed length 8 byte, search mapping to transmit, corresponding entry is not found then to be uploaded to control plane process, according to the object next hop address found, port to be forwarded, Update Table bag object next hop address, and deliver to corresponding down hop port output queue to be forwarded.
The present invention mainly adopts to map and transmits MFIT mechanism and realize its extensibility support to New Deal with registration packet process function, adopts NetFPGA programmable hardware to realize the efficient forwarding of packet.While not only ensureing programmability, possess higher performance, meet the requirement of future network test bed, the various New Deal of convenient checking.Provide good interactive interface, comprise web-based management interface and telnet command mode, user can check present flow rate state, transmit information, conveniently carries out administration configuration simultaneously.
Programmable router based on NetFPGA of the present invention compares with traditional programmable router, has the following advantages:
The route flow process that tradition is closed is opened to, User Defined processing data packets function.
Provide web-based management and telnet management, user can carry out secondary development on this basis, enriches router administration function.
Unified mapping is provided to transmit MFIT, simpler in structure, be beneficial to fast-forwarding.
Forwarding plane realizes based on NetFPGA, possesses higher forwarding performance, and traditional programmable router is all software router, and forwarding performance is not high.
Based on layer two MAC agreement, can verify three-layer network agreement, be more conducive to the checking of new network architecture, traditional programmable router is based on IP agreement, and the general mode of IP tunnel that adopts verifies other agreement, and implementation is complicated.
The important component part of future network test bed should be can be used as based on the programmable router of NetFPGA, be applied to the checking of new network architecture, the research of New Deal, new expansion.
Accompanying drawing explanation
Fig. 1 is programmable router architecture;
Fig. 2 is WWW-mode module realization flow figure;
Fig. 3 is CLI-mode module realization flow figure;
Fig. 4 is that MFIT item form is transmitted in mapping;
Fig. 5 is programmable router workflow diagram.
Embodiment
Be illustrated in figure 1 programmable router architectural schematic, this system forms primarily of with lower module: the NetFPGA board of WWW-mode module, CLI-mode module, administration agent module, programmable interface module, communication control module, Forwarding plane.
1. WWW-mode module, this module provides web-based management interface, make user can by this interface configurations New Deal, configuration router port mac address, check the information of transmitting, check the information such as router traffic state.First create ServerSocket, monitor 8080 ports, the client socket press-in www request task queue just will produced when a request is received.Create a capacity is the thread pool of 10 simultaneously, uses this thread pool process www to ask, and reduces server consumption.As Fig. 2 shows, first www request processing thread obtains task queue Line Procedure Mutually-exclusive lock, then checks in queue whether there is untreated request.If not, release thread mutual exclusion lock exits, and circular wait enters inspection again.If had, then win a task, release thread mutual exclusion lock carries out next step operation to this request.Check whether this request is standard HTTP form, receive data, obtain url and the parameter information of user's request.
The url submitted to for user detects, and has four kinds of results.Request list, namely user asks all orders of current support, and the command list (CLIST) of registering in inquiry global variable, text mode returns.Check state, flow information in querying router global variable, text mode return data, this flow information is by a state thread real-time servicing.Action command, i.e. configuration order, the viewing command of user's input, first registered order in string matching global variable, return command process handle, imports the parameter of user's input into, carries out respective function process, after process terminates, return results to handle.For the url of other nonrecognition, unification returns router First page information.
2. CLI-mode module, this module provides a telnet command line interface interface, make user can operate router simply efficiently, thus routers carries out administration configuration.As Fig. 3 shows, first create socket, monitor 23 ports, when receiving connection request, then socket is passed to sub-thread process.After the request content received being filtered out the meaningless characters such as line feed, carriage return, in the registered order of system, carry out matching operation, after finding process handle, call correlation function process, return results.
3. administration agent module, this module provides WWW mode service and the support of CLI mode service bottom order data.Create and safeguard an overall structure variable current_state, this structure relates to the current all state informations of router, mainly comprise flow status, map and transmit chained list, protocol identification, port information, administration order chained list and User Defined part, as processing data packets handle.Web-based management and telnet are managed the Ordered Registration used in current_state administration order chained list by this module, and receives user's, carries out chained list traversal, finds the corresponding command handle and processes.The order supported has:
Flow status exports: flow status structure in current_state is read in this order, returns to requestor in the form of text.The reception comprising four ports sends byte number, receive send number-of-packet, the number-of-packet that abandons due to queue full, owing to verifying the number-of-packet that failure abandons.Simultaneously with this function cooperating have a flow condition line journey, this thread is daemon thread, start when system initialization, its function is that the value that interface reads NetFPGA correlation behavior register in real time read by the register provided by communication control module, namely information such as sending byte number is received, by deposit data in the flow status member of current_state.
Output is transmitted in mapping: read current_state and export the every terms of information mapping and transmit, return and call.
Static mappings transmits configuration: add the static item deleted and map and transmit, and after logic destination address being converted to standard address during interpolation, write current_state maps and transmits.NetFPGA hardware is write after monitoring change by daemon thread.
Protocol identification configures: configuration New Deal identification marking, logic destination address original position, logic destination address length, write current_state structure.The register read-write interface that calling communication control module provides, write NetFPGA hardware.
Port information exports: read MAC Address, logical address that current_state exports four ports.
Port information configures: MAC Address, the logical address of configuration four ports, write current_state structure.The register read-write interface that calling communication control module provides, write NetFPGA hardware.
In addition, user can realize self-defining command functions as required, registers into administration order chained list, and namely can be router increases New function.
4. programmable interface module is mainly used in docking with user defined logic interface.The invention provides mapping and transmit (Map Forward Information Base) mechanism, the mapping that the routing table that non-ip protocol and IP agreement are operationally safeguarded is converted to reference format is transmitted, Forwarding plane only need be searched mapping when forwarding and transmit, according to list item amendment head target MAC (Media Access Control) address, source MAC, send into corresponding port transmit queue.
MFIT is transmitted in mapping, and as shown in Figure 4, its structure is standard address, mac, interface.Wherein standard address is the value of packet rs destination logical address after Hash mapping, 8 bytes; Mac is object mac address to be forwarded, 6 bytes; Interface is port to be forwarded, 1 byte.User can realize routing table, ARP table in similar conventional router, then both corresponding list item process is generated MFIT, and the hash function that just having to pass through system when generating SA provides maps the logical address that New Deal defines.
Under default conditions, processing data packets function can not do any process to the packet received, completely open to user herein, needs User Defined to adapt to the processing data packets function of New Deal, and is registered in the packet_handler in current_state.Using a packet daemon thread, when receiving new packet, calling packet_handler process.User realizes safeguarding the necessary code of MFIT in current_state, carries out associative operation as required to the packet received.In addition, the process of abnormal data bag, also here realizes.User realizes self-defining setup code, is registered as the user_init in current_state, by unified call during system initialization.User can realize some self-defining command functions, is registered in administration order chained list, can call when management router.
5. communication control module mainly provides upper layer software (applications) and NetFPGA board to carry out mutual interface function.Comprise two class functions, the reception of packet and transmission, the reading of control information and configuration.
Receives data packets adopts libpcap storehouse to monitor and realizes, and libpcap catches Ethernet data bag, calls packet_handler and is for further processing; Packet Generation provides the interface sending Ethernet data, and the packet of more than constructed two layers imports into by user, then uses libnet storehouse structure Ethernet data bag to send.The reading of control information and configuration, used ioctl to realize, driven, realize pci bus communication, DMA transfer of data by control NetFPGA standard.
6. hardware Forwarding plane realizes based on NetFPGA, uses the efficient forwarding data bag of NetFPGA.This part have modified forwarding module part on the basis of NetFPGA standard router.NetFPGA standard router UDP mainly comprises input_arbiter module, output_port_lookup module, oq_queues module.Amendment output_port_lookup module is written as above-mentioned mapping and transmits and search module.It is when processing Ethernet data bag, and the New Deal identification marking first arranged in protocol identification configuration order according to user judges whether this packet is New Deal, otherwise is uploaded to control plane process.If be New Deal, according to logic destination address original position, the logic destination address length taking-up destination address of the New Deal of configuration, the SA of fixed length 8 byte is converted to through hash algorithm, search mapping to transmit, do not find corresponding entry to be then uploaded to control plane process.According to the object MAC found, interface, Update Table bag target MAC (Media Access Control) address, and deliver to corresponding down hop port output queue.
Figure 5 shows that the initialization procedure of programmable router system, detailed step is as follows:
1. set up global variable current_state, carry out initialization, comprise set up thread lock, map transmit, routing state, protocol identification, port information, administration order chained list etc.Initialization administration agent, namely Accreditation System order is to order chained list, and these orders can be called by web mode or telnet mode.
2. initiating hardware, reads configuration file, the MAC Address of configuration four ports, and configuration mapping is transmitted.This configuration file can by user's change before system starts.Enter User Defined part, call usr_init handle, this function is realized by user and is registered in global variable current_state, the self-defining structure of initialization and start the thread of some necessity.
3. start a series of daemon thread successively: creation state daemon thread, for the flow information of each port of real-time update router; Create mapping and transmit daemon thread, information is transmitted in the mapping for real-time update router; Create receives data packets thread, receive the packet being sent to software layer process, the packet_handler process of invoke user registration; Create WWW thread, namely provide WWW-mode to serve, wait for that user connects, and process connection request; Create CLI thread, namely provide CLI-mode to serve, wait for that user connects, and process the order of user's input.

Claims (3)

1. based on the programmable router of NetFPGA, it is characterized in that: comprise control plane and Forwarding plane, described Forwarding plane adopts NetFPGA to complete forwarding data bag, and described control plane comprises:
WWW-mode module, for providing web-based management service, completes information inspection and the configuration WWW-mode module of routers by web mode;
CLI-mode module, for providing telnet to serve, makes user can carry out administration configuration by order behavior routers;
Administration agent module, for providing the bottom data support of WWW-mode service and CLI-mode service, create the global variable representing router current state, WWW-mode service and CLI-mode service are registered to the administration order chained list of global variable, to facilitate expansion New function;
Programmable interface module, for providing the interface of user defined logic interface, comprising mapping and transmitting interface, map transmit change time the mapping upgraded in hardware transmit; The list item that described mapping is transmitted is normal address, next hop address and port to be forwarded; With processing data packets function interface, user completes the process of self-defining data bag, and the self-defining processing data packets function of registered user, completes self-defining initialization;
Communication control module, for providing control plane and Forwarding plane to carry out mutual interface function, receiving when Forwarding plane sends the packet come up and calling described processing data packets function interface, calling registered custom data bag process function; When control plane sends packet to Forwarding plane, realize Packet Generation interface with libnet storehouse, Ethernet data bag is dressed up in custom data encapsulating and sends.
2. according to claim 1 based on the programmable router of NetFPGA, it is characterized in that: described global variable comprises router present flow rate state, maps and transmit chained list, protocol identification, port information, administration order chained list and user-defined variable.
3. according to claim 1 or 2 based on the programmable router of NetFPGA, it is characterized in that: described Forwarding plane receives packet, first the New Deal identification marking arranged in protocol identification according to user judges whether this packet is New Deal, if not being then uploaded to control plane process, if it is according to logic destination address original position and the logic destination address length taking-up destination address of the New Deal arranged, hash algorithm is adopted to be converted to the normal address of fixed length 8 byte, search mapping to transmit, corresponding entry is not found then to be uploaded to control plane process, according to the object next hop address found and port to be forwarded, Update Table bag object next hop address, and deliver to corresponding down hop port output queue to be forwarded.
CN201210547114.9A 2012-12-17 2012-12-17 Based on the programmable router of NetFPGA Active CN102984075B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210547114.9A CN102984075B (en) 2012-12-17 2012-12-17 Based on the programmable router of NetFPGA

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210547114.9A CN102984075B (en) 2012-12-17 2012-12-17 Based on the programmable router of NetFPGA

Publications (2)

Publication Number Publication Date
CN102984075A CN102984075A (en) 2013-03-20
CN102984075B true CN102984075B (en) 2015-09-09

Family

ID=47857833

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210547114.9A Active CN102984075B (en) 2012-12-17 2012-12-17 Based on the programmable router of NetFPGA

Country Status (1)

Country Link
CN (1) CN102984075B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103856407B (en) * 2014-03-25 2016-09-07 重庆邮电大学 A kind of packet based on NetFPGA programmable virtual router accelerates retransmission method and device
CN105208073B (en) * 2015-08-07 2018-02-13 上海斐讯数据通信技术有限公司 A kind of dynamic Telnet management methods
CN112054955B (en) * 2020-08-21 2023-05-02 深圳金智凌轩视讯技术有限公司 Gateway-based device communication method

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
NetFPGA: Reusable Router Architecture for Experimental;Jad Naous.etl;《ACM》;20080822;全文 *
可编程路由器技术研究;胡光武,华婷,姚姜源;《小型微型计算机系统》;20110930;第32卷(第9期);全文 *
洪毅清,秦雅娟,周华春.基于NetFPGA 的模块化硬件路由器实现.《计算机应用与软件》.2011,第28卷(第8期), *
范兵,杨宗凯,马娅婕.路由器管理子系统的设计与实现.《华中科技大学学报》.2003,第31卷(第3期), *

Also Published As

Publication number Publication date
CN102984075A (en) 2013-03-20

Similar Documents

Publication Publication Date Title
JP6395882B2 (en) Network operating system for managing and securing a network
US9749226B2 (en) Flow-based network switching system
TWI472187B (en) Network system,controller,network management method,storage medium,transmission systemand transmission method
CN103095565B (en) A kind of software defined network operating system and its implementation
TWI538461B (en) Management server and management method thereof for managing cloud appliances in virtual local area networks
CN110178342A (en) The scalable application level of SDN network monitors
WO2021017930A1 (en) Message forwarding
CN105765946A (en) A method and system of supporting service chaining in a data network
Wen et al. A RESTful framework for Internet of things based on software defined network in modern manufacturing
JPWO2011099320A1 (en) Information processing apparatus, information processing system, and information processing method
US11888818B2 (en) Multi-access interface for internet protocol security
US8072978B2 (en) Method for facilitating application server functionality and access node comprising same
US10374946B2 (en) Centralized wireless network management system
Li et al. SR-PVX: A source routing based network virtualization hypervisor to enable POF-FIS programmability in vSDNs
CN102984075B (en) Based on the programmable router of NetFPGA
US11095479B2 (en) VXLAN multi-tenant inter-networking device packet forwarding system
Ahmad et al. SDN interfaces: protocols, taxonomy and challenges
Wang et al. Novel architectures and security solutions of programmable software-defined networking: a comprehensive survey
Feng et al. TUNOS: A novel SDN-oriented networking operating system
Bozakov et al. OpenFlow: A perspective for building versatile networks
KR20190110719A (en) Apparatus and method for concealing network
Lan et al. Future network architectures and core technologies
Ahmad et al. Protection of centralized SDN control plane from high-rate Packet-In messages
Alekseev et al. Eventbus module for distributed openflow controllers
Piron Master thesis: Implementation and Evaluation of LISP Publish/Subscribe Functionality in NS3

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant