WO2012152184A1 - 多端口以太网接口装置及识别其端口的方法 - Google Patents

多端口以太网接口装置及识别其端口的方法 Download PDF

Info

Publication number
WO2012152184A1
WO2012152184A1 PCT/CN2012/074658 CN2012074658W WO2012152184A1 WO 2012152184 A1 WO2012152184 A1 WO 2012152184A1 CN 2012074658 W CN2012074658 W CN 2012074658W WO 2012152184 A1 WO2012152184 A1 WO 2012152184A1
Authority
WO
WIPO (PCT)
Prior art keywords
port
information
switch chip
module
mapping table
Prior art date
Application number
PCT/CN2012/074658
Other languages
English (en)
French (fr)
Inventor
王济晟
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Priority to RU2013154742/08A priority Critical patent/RU2562417C2/ru
Priority to EP12782009.0A priority patent/EP2709313B1/en
Publication of WO2012152184A1 publication Critical patent/WO2012152184A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/35Switches specially adapted for specific applications

Definitions

  • Multi-port Ethernet interface device and method for identifying the same
  • the present invention relates to the field of communications, and more particularly to a multi-port Ethernet interface device and a method of identifying a port thereof. Background technique
  • the high-end switches and routers are the core devices of the core network and the access network.
  • the switching capacity is one of the important indicators to determine its performance.
  • the equipment provider usually chooses the switch with the port bandwidth of 1GE or 10GE.
  • Chips, or network processors (NPs) to meet their switching capacity needs.
  • One problem that arises is that once the device needs to be connected to some low-end Ethernet switches, for example, if the high-end switch or router is connected to the 100M port of the low-end switch, you can only choose the 1G port of the switch.
  • the 100M port of the low-end switch is docked and self-negotiated to 100M. This method of use largely creates a waste of switching capacity and bandwidth.
  • a multi-port Ethernet interface device which may be a plurality of 100M Ethernet ports corresponding to a switch chip or a 1GE port of the NP, or Multiple 1GE ports correspond to a switch chip or a 10GE port of the NP, and so on.
  • a problem caused by this is that since the switch chip or the NP cannot recognize the ports of the multi-port Ethernet interface device, the switch chip or the NP cannot distinguish from which port the service from the multi-port Ethernet interface device is sent. At the same time, it is impossible to tell which port the multi-port Ethernet interface device should send traffic from. Summary of the invention
  • the main object of the present invention is to provide a multi-port Ethernet interface device and to identify its port
  • the method can implement a multi-port Ethernet interface device to avoid waste of switching capacity and bandwidth.
  • the embodiment of the present invention provides a method for identifying a port of a multi-port Ethernet interface device, including: a multi-port Ethernet interface device receiving a packet sent by a port module of a network device; and receiving, according to the inbound port information of the packet sent by the port module Obtaining, by a preset mapping table, information of a switch chip or a network processor NP of the corresponding network device; the mapping table includes a correspondence between the ingress port information and the information of the switch chip or the NP;
  • the method for identifying the multi-port Ethernet interface device port further includes: a mapping table, and acquiring corresponding ingress port information;
  • the ingress port information of the packet sent by the switch chip or the NP is deleted, and the packet is sent to the port module corresponding to the ingress port information.
  • the information about the switch chip or the NP of the corresponding network device is obtained according to the ingress port information of the packet sent by the port module and the preset mapping table:
  • the information of the switch chip or the NP corresponding to the ingress port information in the lookup mapping table is:
  • the keyword includes the ingress port message, when the information of the switch chip or the NP corresponding to the keyword exists in the mapping table, extracting the switch chip or the NP Information;
  • the packet is discarded.
  • the writing of the information of the switch chip or the NP to the port module sends the message:
  • the embodiment of the present invention further provides a multi-port Ethernet interface device, where the device includes: a receiving module, a first acquiring module, and a writing module;
  • the receiving module is configured to receive a packet sent by a port module of the network device
  • the first obtaining module is configured to obtain information about a switch chip or an NP of a corresponding network device according to the ingress port information of the packet received by the receiving module and a preset mapping table; the mapping table includes ingress port information. Correspondence with the information of the switch chip or NP;
  • the writing module is configured to write information of the switch chip or NP into a packet sent by the port module, and send the packet to a corresponding switch chip or NP for the switch chip or
  • the NP acquires the ingress port information based on the information of the switch chip or NP.
  • the multi-port Ethernet interface device further includes: a second acquiring module and a deleting module; wherein the information of the chip or the NP and the mapping table acquire corresponding inbound port information;
  • the deleting module is configured to delete the ingress port information of the packet sent by the switch chip or the NP, and send the packet to the port module corresponding to the ingress port information.
  • the first obtaining module includes: a parsing unit and a searching unit, where the parsing unit is configured to parse the packet sent by the port module to obtain ingress port information;
  • the information of the switch chip or the NP corresponding to the ingress port information in the mapping table is described.
  • the searching unit includes: a query subunit, an extracting subunit, and a discarding subunit; among them,
  • the query subunit is configured to query the mapping table according to a preset keyword; the keyword includes the ingress port information;
  • the extracting subunit is configured to extract information of the switching chip or the NP when the information of the switching chip or the NP corresponding to the keyword exists in the mapping table;
  • the discarding subunit is configured to discard the packet when the information of the switch chip or the NP corresponding to the keyword does not exist in the mapping table.
  • the writing module is specifically configured to add or modify a field of the packet sent by the port module according to a preset rule.
  • the multi-port Ethernet interface device and the method for identifying the port thereof are provided by the embodiment of the present invention, and the switch chip or the NP of the network device can identify the port of the multi-port Ethernet interface device by modifying the packet, thereby realizing the multi-port Ethernet.
  • the interface device further increases the capacity of the network device.
  • FIG. 1 is a schematic flowchart of a method for identifying a port of a multi-port Ethernet interface device according to the present invention
  • FIG. 2 is a schematic structural diagram of a network device according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of acquiring information of a switch chip or an NP in an embodiment of a method for identifying a port of a multi-port Ethernet interface device according to the present invention
  • FIG. 4 is a schematic flowchart of a lookup mapping table in an embodiment of a method for identifying a port of a multi-port Ethernet interface device according to the present invention
  • FIG. 5 is a schematic structural diagram of another embodiment of a multi-port Ethernet interface device according to the present invention
  • FIG. 6 is a schematic structural diagram of an embodiment of a multi-port Ethernet interface device according to the present invention
  • FIG. The structure of the first acquisition module in the example 8 is a schematic structural diagram of a searching unit in an embodiment of a multi-port Ethernet interface device according to the present invention
  • FIG. 9 is a schematic structural diagram of still another embodiment of a multi-port Ethernet interface device according to the present invention. detailed description
  • an embodiment of a method for identifying a port of a multi-port Ethernet interface device includes:
  • Step S10 The multi-port Ethernet interface device receives the packet sent by the port module of the network device.
  • a multi-port Ethernet interface device is added between the port module and the switch chip or the NP.
  • the device is divided into two directions of uplink and downlink, and the uplink module is from the port module to the switch chip. Or NP, the downstream direction is from the switch chip or NP to the port module.
  • the processing flow in the above direction of the embodiment is taken as an example to illustrate the method of the present invention.
  • the multi-port Ethernet interface device receives the packet sent by the port module of the network device.
  • Step S11 Acquire, according to the ingress port information of the packet sent by the port module, and a preset mapping table, information about a switch chip or an NP of the corresponding network device; the mapping table includes the ingress port information and the switch chip or the NP. Correspondence of information;
  • the packet information is decomposed from the packets received by the port module. To improve the packet processing efficiency, you need to selectively configure the packet.
  • the packet information generally includes: inbound port information, DMAC, SMAC, OVLAN, IVLAN, 8021p priority, Ethertype, Ip_protocoK DIP, SIP, which can be selectively parsed as needed.
  • searching for the corresponding switching chip or NP information according to the preset mapping table and the keyword of the mapping table, and the mapping table sets the mapping relationship based on the information of the port to the switching chip or the NP.
  • the keywords of the mapping table should include the inbound port information, and the setting of the keywords determines which message information is used to distinguish Port or service, etc.
  • the information of the switch chip or NP can be, but is not limited to, VLAN information, such as port 1 to port 8, respectively, corresponding to VLAN2001 ⁇ VLAN2008, and the mapping relationship in the mapping table is a one-to-one linear relationship.
  • Step S12 The information of the switch chip or the NP is written into the packet sent by the port module, and sent to the corresponding switch chip or NP, where the switch chip or NP obtains information according to the switch chip or NP. Incoming port information.
  • the packet sent by the port module is modified according to the information of the switch chip or the NP.
  • the fixed position or field of the message can be regularly added or modified according to the information and write action of the switch chip or NP. Regular addition or modification is the result of port differentiation and is the basis for switching chips or NP-differentiated ports.
  • the switch chip or NP of the network device can identify the port of the multi-port Ethernet interface device, thereby realizing the multi-port Ethernet interface device, and further improving the capacity of the network device.
  • step S11 may include:
  • Step S11 Parsing the packet sent by the port module to obtain the ingress port information; parsing the packet sent by the port module may obtain the information of the specified field or location of the packet, thereby obtaining the ingress port information. It can also be a variety of ways to convert the preset rules of the message.
  • Step S112 Search for information of the switch chip or NP corresponding to the ingress port information in the mapping table.
  • the lookup mapping table is searched by the keyword including the inbound port information. Since the inbound port information of the mapping table is in a corresponding linear relationship with the switching chip or the NP, the information of the switching chip or the NP can be obtained.
  • step S112 may further include: 51121. Query the mapping table according to a preset keyword; the keyword includes the ingress port information;
  • the keyword is one of the core points of the present invention, and determines which message information is used to distinguish between ports or services. In order to determine the uplink and downlink ports, the keyword must contain the inbound port information.
  • the packet is discarded.
  • the processing is performed according to the default action, which may be discarded, or the position or field of the fixed message may be regularly added or modified, and sent to the exchange. Chip or NP to handle.
  • a method of finding information of a switch chip or NP in a mapping table is proposed. Prepare for the port of the subsequent switch chip or NP identification port module.
  • step S12 may specifically include:
  • Regularly adding or modifying the message sent by the port module is another core point of the present invention. It is the result of distinguishing the port or the service, and is the basis for the switching chip or the NP to distinguish the service of the multi-port Ethernet interface device.
  • the method further includes:
  • Step S13 Obtain corresponding inbound port information according to the information of the switch chip or NP in the packet sent by the switch chip or the NP and the mapping table.
  • the multi-port Ethernet interface device receives the message from the switch chip or NP, and parses the information of the switch chip or NP therefrom.
  • Step S14 Delete the ingress port information of the packet sent by the switch chip or the NP, and send the information to the port module corresponding to the ingress port information.
  • the packet sent by the switch chip or the NP is modified or deleted.
  • the modification or deletion of the packet should be consistent with the modification of the packet in the uplink direction. If the corresponding ingress port information is not found in the mapping table, it is discarded by default, and other processing can be performed.
  • steps S13 and S14 are performed synchronously or sequentially with steps S10 to S13.
  • the packet in the downlink direction is modified, so that the switch chip or the NP sends the packet to the correct port in the multi-port Ethernet device.
  • mapping table may be used in the uplink and downlink directions, or two mapping tables, such as the row entry and the downlink entry, may be separately configured.
  • the device includes: a receiving module 10, which is used for a packet sent by a port module of a network device;
  • the first obtaining module 20 is configured to obtain information about a switch chip or an NP of the corresponding network device according to the ingress port information of the packet sent by the port module and a preset mapping table; the mapping table includes the ingress port information and Corresponding relationship between the information of the switch chip or the NP;
  • a writing module 30 configured to write information of the switch chip or NP into a packet sent by the port module, and send the packet to a corresponding switch chip or NP, where the switch chip or NP is used according to the switch chip or The NP information is obtained into the port information.
  • the multi-port Ethernet interface device is disposed between the port module and the switch chip or the NP. As shown in FIG. 2, the device is divided into two directions of uplink and downlink, and the uplink direction is from the port module to the switch chip or NP, the downstream direction is from the switch chip or NP to the port module.
  • the processing flow in the uplink direction of the embodiment is used as an example to illustrate the method of the present invention.
  • the multi-port Ethernet interface device receives the packet sent by the port module of the network device, and decomposes the packet information from the packet received by the port module. To improve the efficiency of message processing, you need to selectively configure the message parsing.
  • the information generally includes: Incoming port information, DMAC, SMAC, OVLAN, IVLAN, 8021p priority, Ethertype, Ip_protocoK DIP, SIP, which can be selectively parsed as needed.
  • DMAC Incoming port information
  • SMAC Session Initiation Protocol
  • OVLAN Virtual Local Area Network
  • IVLAN IVLAN
  • 8021p priority Ethertype
  • Ip_protocoK DIP SIP
  • the keyword of the mapping table should include the inbound port information, and the setting of the keyword determines which packet information is used to distinguish the port or the service, and the information of the switching chip or the NP can be, but is not limited to, the VLAN information, such as the port 1 ⁇ Port 8 corresponds to VLAN2001-VLAN2008, and the mapping relationship in the mapping table is a corresponding linear relationship.
  • the packet sent by the port module is modified according to the information of the switch chip or the NP.
  • the fixed position or field of the message can be regularly added or modified according to the information and write action of the switch chip or NP. Regular addition or modification is the result of port differentiation and is the basis for switching chips or NP-differentiated ports.
  • the switching chip or NP of the network device can identify the port of the multi-port Ethernet interface device, thereby realizing the multi-port Ethernet interface device, and further increasing the capacity of the network device.
  • the first ear module 20 includes:
  • the parsing unit 21 is configured to parse the packet sent by the port module to obtain the ingress port information
  • the searching unit 22 is configured to search for the information of the switch chip or the NP corresponding to the ingress port information in the mapping table.
  • the parsing of the packet sent by the port module may be obtained by obtaining the specified field or location of the packet, thereby obtaining the ingress port information. It can also be a variety of ways to convert the preset rules of the message.
  • the lookup mapping table is searched by the keyword including the inbound port information. Since the inbound port information in the mapping table is in a corresponding linear relationship with the switching chip or the NP, the information of the switching chip or the NP can be obtained. In this embodiment, a method of obtaining information of a switch chip or an NP according to port information is proposed. Referring to FIG. 8, in the above embodiment, the searching unit 22 includes:
  • the query subunit 221 is configured to query the mapping table according to a preset keyword; the keyword includes the ingress port information;
  • the extracting subunit 222 is configured to extract information of the switch chip or the NP when the information of the switch chip or the NP corresponding to the keyword exists in the mapping table;
  • the discarding subunit 223 is configured to discard the message when the information of the exchange chip or the NP corresponding to the keyword does not exist in the mapping table.
  • the keyword is one of the core points of the present invention, and determines which message information is used to distinguish between ports or services. In order to determine the uplink and downlink ports, the keyword must contain the inbound port information.
  • the processing is performed according to the default action, which may be discarded, or the position or field of the fixed message may be regularly added or modified, and sent to the exchange. Chip or NP to handle.
  • a method of finding information of a switch chip or NP in a mapping table is proposed. Prepare for the port of the subsequent switch chip or NP identification port module.
  • the writing module 30 is specifically configured to:
  • Regularly adding or modifying the message sent by the port module is another core point of the present invention. It is the result of distinguishing the port or the service, and is the basis for the switching chip or the NP to distinguish the service of the multi-port Ethernet interface device.
  • the device further includes:
  • a second obtaining block 40 configured to obtain corresponding inbound port information according to the information of the switching chip or NP in the packet sent by the switch chip or the NP and the mapping table;
  • the deleting module 50 is configured to delete the ingress port information of the packet sent by the switch chip or the NP. And sent to the port module corresponding to the ingress port information.
  • the multi-port Ethernet interface device receives the message from the switch chip or NP, and parses the information of the switch chip or NP therefrom.
  • the keyword including the information of the switch chip or the NP is indexed, and the mapping table is searched. If the corresponding inbound port information is found, the packet sent by the switch chip or the NP is modified or deleted. The modification or deletion of the packet should be consistent with the modification of the packet in the uplink direction. If the corresponding ingress port information is not found in the mapping table, it is discarded by default, and other processing can be performed.
  • the packet in the downlink direction is modified, so that the switch chip or the NP sends the packet to the correct port in the multi-port Ethernet device.
  • mapping table may be used in the uplink and downlink directions, or two mapping tables, such as the row entry and the downlink entry, may be separately configured.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明揭示了一种识别多端口以太网接口装置端口的方法,包括:多端口以太网接口装置接收网络设备的端口模块发送的报文;根据所述端口模块发送的报文的入端口信息和预设的映射表,获取对应的网络设备的交换芯片或网络处理器NP的信息;所述映射表包括入端口信息与交换芯片或NP的信息的对应关系;将所述交换芯片或NP的信息写入所述端口模块发送的报文,并发送至对应的交换芯片或NP,供所述交换芯片或NP根据所述交换芯片或NP的信息获取入端口信息。本发明还提出了对应的装置。本发明提出的一种识别多端口以太网接口装置端口的方法和多端口以太网接口装置,真正实现多端口以太网接口装置。

Description

多端口以太网接口装置及识别其端口的方法 技术领域
本发明涉及到通信领域, 特别涉及到一种多端口以太网接口装置及识 别其端口的方法。 背景技术
中高端交换机、 路由器作为核心网和接入网的核心设备, 其交换容量 大小是决定其性能的重要指标之一, 为了满足交换容量的需要, 设备供应 商通常选择端口带宽为 1GE或 10GE的交换芯片,或选择网络处理器 (NP), 来满足其对交换容量的需要。 由此引起的一个问题是, 一旦该类设备需要 和一些低端以太网交换机对接, 例如: 高端交换机或路由器与低端交换机 的 100M端口对接,此时只能选择采用该类交换机的 1G端口与低端交换机 的 100M端口对接, 自协商成 100M来使用。这种使用方法在很大程度上造 成了交换容量和带宽的浪费。
为了在不影响设备交换容量的前提下, 解决上述带宽浪费的问题, 采 用多端口以太网接口装置是一个很好的选择,可以是多个 100M以太端口对 应交换芯片或 NP的一个 1GE端口, 或多个 1GE端口对应交换芯片或 NP 的一个 10GE端口, 依次类推。但由此带来的一个问题是, 由于交换芯片或 NP无法识别多端口以太网接口装置的各端口, 从而交换芯片或 NP无法区 分从多端口以太网接口装置上来的业务是从哪个端口发送的, 同时也无法 告知多端口以太网接口装置应该从哪个端口发送业务。 发明内容
本发明的主要目的为提供一种多端口以太网接口装置及识别其端口的 方法, 能够实现多端口以太网接口装置, 避免交换容量和带宽的浪费。 本发明实施例提出一种识别多端口以太网接口装置端口的方法, 包括: 多端口以太网接口装置接收网络设备的端口模块发送的报文; 根据所述端口模块发送的报文的入端口信息和预设的映射表, 获取对 应的网络设备的交换芯片或网络处理器 NP的信息;所述映射表包括入端口 信息与交换芯片或 NP的信息的对应关系;
将所述交换芯片或 NP的信息写入所述端口模块发送的报文,并将所述 报文发送至对应的交换芯片或 NP, 供所述交换芯片或 NP根据所述交换芯 片或 NP的信息获取入端口信息。
优选地, 多端口以太网接口装置将所述报文发送至对应的交换芯片或 NP之后, 所述识别多端口以太网接口装置端口的方法还包括: 映射表, 获取对应的入端口信息;
删除所述交换芯片或 NP发送的报文的入端口信息,并将所述报文发送 至所述入端口信息对应的端口模块。
优选地, 所述根据端口模块发送的报文的入端口信息和预设的映射表, 获取对应的网络设备的交换芯片或 NP的信息为:
解析所述端口模块发送的报文, 得到入端口信息;
查找所述映射表内所述入端口信息对应的交换芯片或 NP的信息。
优选地,所述查找映射表内所述入端口信息对应的交换芯片或 NP的信 息为:
根据预设的关键字, 查询所述映射表; 所述关键字包括所述入端口信 当所述映射表中存在所述关键字对应的交换芯片或 NP的信息时,提取 该交换芯片或 NP的信息; 当所述映射表中不存在所述关键字对应的交换芯片或 NP的信息时,丟 弃所述报文。
优选地,所述将交换芯片或 NP的信息写入所述端口模块发送的报文包 括:
根据预设的规则增加或修改所述端口模块发送的报文的字段。
本发明实施例还提出一种多端口以太网接口装置, 该装置包括: 接收 模块、 第一获取模块和写入模块; 其中,
所述接收模块, 用于接收网络设备的端口模块发送的报文;
所述第一获取模块, 用于根据所述接收模块接收的报文的入端口信息 和预设的映射表,获取对应的网络设备的交换芯片或 NP的信息; 所述映射 表包括入端口信息与交换芯片或 NP的信息的对应关系;
所述写入模块,用于将所述交换芯片或 NP的信息写入所述端口模块发 送的报文, 并将所述报文发送至对应的交换芯片或 NP, 供所述交换芯片或
NP根据所述交换芯片或 NP的信息获取入端口信息。
优选地, 所述多端口以太网接口装置还包括: 第二获取模块和删除模 块; 其中, 芯片或 NP的信息和所述映射表, 获取对应的入端口信息;
所述删除模块, 用于删除所述交换芯片或 NP发送的报文的入端口信 息, 并将所述报文发送至所述入端口信息对应的端口模块。
优选地, 所述第一获取模块包括: 解析单元和查找单元; 其中, 所述解析单元, 用于解析所述端口模块发送的报文, 得到入端口信息; 所述查找单元, 用于查找所述映射表内所述入端口信息对应的交换芯 片或 NP的信息。
优选地, 所述查找单元包括: 查询子单元、 提取子单元和丟弃子单元; 其中,
所述查询子单元, 用于根据预设的关键字, 查询所述映射表; 所述关 键字包括所述入端口信息;
所述提取子单元, 用于当所述映射表中存在所述关键字对应的交换芯 片或 NP的信息时, 提取该交换芯片或 NP的信息;
所述丟弃子单元, 用于当所述映射表中不存在所述关键字对应的交换 芯片或 NP的信息时, 丟弃所述报文。
优选地, 所述写入模块, 具体用于根据预设的规则增加或修改所述端 口模块发送的报文的字段。
本发明实施例提出的多端口以太网接口装置及识别其端口的方法, 通 过修改报文,使网络设备的交换芯片或 NP可以识别多端口以太网接口装置 的端口, 从而真正实现多端口以太网接口装置, 进一步提高网络设备的容 量。 附图说明
图 1 为本发明识别多端口以太网接口装置端口的方法一实施例的流程 示意图;
图 2 为本发明实施例网络设备的结构示意图;
图 3 为本发明识别多端口以太网接口装置端口的方法一实施例中获取 交换芯片或 NP的信息的流程示意图;
图 4 为本发明识别多端口以太网接口装置端口的方法一实施例中查找 映射表的流程示意图;
图 5 为本发明多端口以太网接口装置又一实施例的结构示意图; 图 6 为本发明多端口以太网接口装置一实施例的结构示意图; 图 7 为本发明多端口以太网接口装置一实施例中第一获取模块的结构 图 8 为本发明多端口以太网接口装置一实施例中查找单元的结构示意 图;
图 9 为本发明多端口以太网接口装置又一实施例的结构示意图。 具体实施方式
应当理解, 此处所描述的具体实施例仅仅用以解释本发明, 并不用于 限定本发明。
参照图 1 , 提出本发明识别多端口以太网接口装置端口的方法一实施 例, 包括:
步驟 S10、 多端口以太网接口装置接收网络设备的端口模块发送的报 文;
本实施例中,在端口模块和交换芯片或 NP之间增加一个多端口以太网 接口装置, 如图 2所示, 此装置分为上下行两个方向的处理, 上行方向从 端口模块到交换芯片或 NP, 下行方向从交换芯片或 NP到端口模块。 本实 施例以上行方向的处理流程为例说明本发明的方法, 多端口以太网接口装 置接收网络设备的端口模块发送的报文。
步驟 Sll、 根据所述端口模块发送的报文的入端口信息和预设的映射 表, 获取对应的网络设备的交换芯片或 NP的信息; 所述映射表包括入端口 信息与交换芯片或 NP的信息的对应关系;
从端口模块接收到的报文中分解出报文信息, 为了提高报文处理效率 , 需要有选择地进行报文解析设置。报文信息一般包括:入端口信息、 DMAC、 SMAC、 OVLAN、 IVLAN、 8021p优先级、 Ethertype, Ip_protocoK DIP, SIP, 可以根据需要进行选择性的解析。 依据从报文中得到的报文信息, 根 据预设的映射表和该映射表的关键字查找对应的交换芯片或 NP的信息,映 射表设置了基于端口到交换芯片或 NP的信息的映射关系,因此映射表的关 键字应该包括入端口信息, 关键字的设置决定了依据哪些报文信息来区分 端口或业务等, 而交换芯片或 NP的信息可以但不仅限于是 VLAN信息, 如端口 1〜端口 8, 分别对应 VLAN2001~VLAN2008, 映射表内的映射关系 是一个一一对应的线性关系。
步驟 S12、将所述交换芯片或 NP的信息写入所述端口模块发送的报文, 并发送至对应的交换芯片或 NP, 供所述交换芯片或 NP根据所述交换芯片 或 NP的信息获取入端口信息。
当查找到映射表内对应的交换芯片或 NP 的信息后, 根据交换芯片或 NP的信息对端口模块发送的报文进行修改。 可以根据交换芯片或 NP的信 息和写入动作对报文固定的位置或字段进行有规律的添加或修改。 有规律 的添加或修改是是区分端口的结果, 是交换芯片或 NP区分端口的依据。
本实施例中,通过修改报文,使网络设备的交换芯片或 NP可以识别多 端口以太网接口装置的端口, 从而真正实现了多端口以太网接口装置, 进 一步提高了网络设备的容量。
参照图 3 , 在一实施例中, 步驟 S11可包括:
步驟 Slll、 解析所述端口模块发送的报文, 得到入端口信息; 对端口模块发送的报文进行解析可以是获取报文的指定字段或位置的 信息, 从而得到入端口信息。 也可以是对报文进行预设规则的转换等多种 方式。
步驟 S112、 查找所述映射表内所述入端口信息对应的交换芯片或 NP 的信息。
以包括入端口信息的关键字进行查找映射表, 由于映射表内入端口信 息与交换芯片或 NP为——对应的线性关系, 因此可以得到交换芯片或 NP 的信息。
本实施例中, 提出根据入端口信息获得交换芯片或 NP的信息的方法。 参照图 4, 在上述实施例中, 步驟 S112可进一步包括: 51121、 根据预设的关键字, 查询所述映射表; 所述关键字包括所述入 端口信息;
关键字是本发明的核心点之一, 决定了依据哪些报文信息来区分端口 或业务等。 为了实现上下行出端口的确定, 关键字中一定包含入端口信息。
51122、 当所述映射表中存在所述关键字对应的交换芯片或 NP的信息 时, 提取该交换芯片或 NP的信息;
51123、 当所述映射表中不存在所述关键字对应的交换芯片或 NP的信 息时, 丟弃所述报文。
如未查找到映射表内对应的交换芯片或 NP的信息,则根据默认动作进 行处理, 可以是丟弃, 也可以是对报文固定的位置或字段进行有规律的添 加或修改, 送给交换芯片或 NP来处理。
本实施例中,提出了查找映射表中交换芯片或 NP的信息的方法。 为后 续交换芯片或 NP识别端口模块的端口做准备。
在上述实施例中, 步驟 S12具体可包括:
根据预设的规则增加或修改所述端口模块发送的报文的字段。
有规律的添加或修改端口模块发送的报文是本发明的另一个核心点, 它是区分端口或业务的结果,是交换芯片或 NP区分多端口以太网接口装置 业务的依据。
参照图 5 ,提出本发明识别多端口以太网接口装置端口的方法又一实施 例, 在上述实施例中, 还包括:
步驟 S13、 根据所述交换芯片或 NP发送的报文内的交换芯片或 NP的 信息和所述映射表, 获取对应的入端口信息;
多端口以太网接口装置接收从交换芯片或 NP过来的报文,从中解析出 交换芯片或 NP的信息。
将包括交换芯片或 NP的信息的关键字为索引, 对映射表进行查找。 步驟 S14、 删除所述交换芯片或 NP发送的报文的入端口信息, 并发送 至所述入端口信息对应的端口模块。
如果查找到对应的入端口信息,则对交换芯片或 NP发送的报文进行修 改或删除, 对报文的修改或删除应保持与在上行方向中对报文的修改一致 的规律。 如未在映射表中查找到对应的入端口信息, 则默认进行丟弃, 也 可以进行其他处理。
需要注意的是, 步驟 S13、 S14与步驟 S10至 S13同步或先后进行。 本实施例中,对下行方向的报文进行修改,使交换芯片或 NP将报文发 送至多端口以太网装置中正确的端口。
在上述实施例中, 上、 下行方向可以使用同一映射表, 也可以分设两 个映射表, 如上行表项和下行表项。
参照图 6, 提出本发明多端口以太网装置一实施例, 该装置包括: 接收模块 10, 用于网络设备的端口模块发送的报文;
第一获取模块 20, 用于根据所述端口模块发送的报文的入端口信息和 预设的映射表, 获取对应的网络设备的交换芯片或 NP的信息; 所述映射表 包括入端口信息与交换芯片或 NP的信息的对应关系;
写入模块 30, 用于将所述交换芯片或 NP的信息写入所述端口模块发 送的报文, 并发送至对应的交换芯片或 NP, 供所述交换芯片或 NP根据所 述交换芯片或 NP的信息获取入端口信息。
本实施例中, 多端口以太网接口装置设置在端口模块和交换芯片或 NP 之间, 如图 2所示, 此装置分为上下行两个方向的处理, 上行方向从端口 模块到交换芯片或 NP, 下行方向从交换芯片或 NP到端口模块。 本实施例 以上行方向的处理流程为例说明本发明的方法, 多端口以太网接口装置接 收网络设备的端口模块发送的报文, 从端口模块接收到的报文中分解出报 文信息, 为了提高报文处理效率, 需要有选择地进行报文解析设置。 报文 信息一般包括: 入端口信息、 DMAC、 SMAC、 OVLAN、 IVLAN、 8021p 优先级、 Ethertype、 Ip_protocoK DIP, SIP, 可以根据需要进行选择性的解 析。 依据从报文中得到的报文信息, 根据预设的映射表和该映射表的关键 字查找对应的交换芯片或 NP的信息,映射表设置了基于端口到交换芯片或 NP的信息的映射关系, 因此映射表的关键字应该包括入端口信息, 关键字 的设置决定了依据哪些报文信息来区分端口或业务等,而交换芯片或 NP的 信息可以但不仅限于是 VLAN 信息, 如端口 1〜端口 8 , 分别对应 VLAN2001 -VLAN2008 , 映射表内的映射关系是一个——对应的线性关系。
当查找到映射表内对应的交换芯片或 NP 的信息后, 根据交换芯片或 NP的信息对端口模块发送的报文进行修改。 可以根据交换芯片或 NP的信 息和写入动作对报文固定的位置或字段进行有规律的添加或修改。 有规律 的添加或修改是是区分端口的结果, 是交换芯片或 NP区分端口的依据。
本实施例中,通过修改报文,使网络设备的交换芯片或 NP可以识别多 端口以太网接口装置的端口, 从而真正实现多端口以太网接口装置, 进一 步提高网络设备的容量。
参照图 7, 在一实施例中, 第一获耳 4莫块 20包括:
解析单元 21 , 用于解析所述端口模块发送的报文, 得到入端口信息; 查找单元 22, 用于查找所述映射表内所述入端口信息对应的交换芯片 或 NP的信息。
对端口模块发送的报文进行解析可以是获取报文的指定字段或位置的 信息, 从而得到入端口信息。 也可以是对报文进行预设规则的转换等多种 方式。
以包括入端口信息的关键字进行查找映射表, 由于映射表内入端口信 息与交换芯片或 NP为——对应的线性关系, 因此可以得到交换芯片或 NP 的信息。 本实施例中, 提出根据入端口信息获得交换芯片或 NP的信息的方法。 参照图 8, 在上述实施例中, 查找单元 22包括:
查询子单元 221 , 用于根据预设的关键字, 查询所述映射表; 所述关键 字包括所述入端口信息;
提取子单元 222,用于当所述映射表中存在所述关键字对应的交换芯片 或 NP的信息时, 提取该交换芯片或 NP的信息;
丟弃子单元 223 ,用于当所述映射表中不存在所述关键字对应的交换芯 片或 NP的信息时, 丟弃所述报文。
关键字是本发明的核心点之一, 决定了依据哪些报文信息来区分端口 或业务等。 为了实现上下行出端口的确定, 关键字中一定包含入端口信息。
如未查找到映射表内对应的交换芯片或 NP的信息,则根据默认动作进 行处理, 可以是丟弃, 也可以是对报文固定的位置或字段进行有规律的添 加或修改, 送给交换芯片或 NP来处理。
本实施例中,提出了查找映射表中交换芯片或 NP的信息的方法。 为后 续交换芯片或 NP识别端口模块的端口做准备。
在上述实施例中, 写入模块 30具体用于:
根据预设的规则增加或修改所述端口模块发送的报文的字段。
有规律的添加或修改端口模块发送的报文是本发明的另一个核心点, 它是区分端口或业务的结果,是交换芯片或 NP区分多端口以太网接口装置 业务的依据。
参照图 9,提出本发明多端口以太网接口装置又一实施例, 在上述多端 口以太网接口装置实施例的基础上, 该装置还包括:
第二获 莫块 40 , 用于根据所述交换芯片或 NP发送的报文内的交换 芯片或 NP的信息和所述映射表, 获取对应的入端口信息;
删除模块 50, 用于删除所述交换芯片或 NP发送的报文的入端口信息, 并发送至所述入端口信息对应的端口模块。
多端口以太网接口装置接收从交换芯片或 NP过来的报文,从中解析出 交换芯片或 NP的信息。
将包括交换芯片或 NP的信息的关键字为索引, 对映射表进行查找。 如果查找到对应的入端口信息,则对交换芯片或 NP发送的报文进行修 改或删除, 对报文的修改或删除应保持与在上行方向中对报文的修改一致 的规律。 如未在映射表中查找到对应的入端口信息, 则默认进行丟弃, 也 可以进行其他处理。
本实施例中,对下行方向的报文进行修改,使交换芯片或 NP将报文发 送至多端口以太网装置中正确的端口。
在上述实施例中, 上、 下行方向可以使用同一映射表, 也可以分设两 个映射表, 如上行表项和下行表项。
以上所述仅为本发明的优选实施例, 并非因此限制本发明的专利范围 , 凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换, 或直 接或间接运用在其他相关的技术领域, 均同理包括在本发明的专利保护范 围内。

Claims

权利要求书
1、 一种识别多端口以太网接口装置端口的方法, 其中, 该方法包括: 多端口以太网接口装置接收网络设备的端口模块发送的报文; 根据所述端口模块发送的报文的入端口信息和预设的映射表, 获取对 应的网络设备的交换芯片或网络处理器 NP的信息;所述映射表包括入端口 信息与交换芯片或 NP的信息的对应关系;
将所述交换芯片或 NP的信息写入所述端口模块发送的报文,并将所述 报文发送至对应的交换芯片或 NP, 供所述交换芯片或 NP根据所述交换芯 片或 NP的信息获取入端口信息。
2、如权利要求 1所述的识别多端口以太网接口装置端口的方法,其中, 多端口以太网接口装置将所述报文发送至对应的交换芯片或 NP之后,该方 法还包括: 映射表, 获取对应的入端口信息;
删除所述交换芯片或 NP发送的报文的入端口信息,并将所述报文发送 至所述入端口信息对应的端口模块。
3、 如权利要求 1或 2所述的识别多端口以太网接口装置端口的方法, 其中, 所述根据端口模块发送的报文的入端口信息和预设的映射表, 获取 对应的网络设备的交换芯片或 NP的信息为:
解析所述端口模块发送的报文, 得到入端口信息;
查找所述映射表内所述入端口信息对应的交换芯片或 NP的信息。
4、如权利要求 3所述的识别多端口以太网接口装置端口的方法,其中, 所述查找映射表内所述入端口信息对应的交换芯片或 NP的信息为:
根据预设的关键字, 查询所述映射表; 所述关键字包括所述入端口信 当所述映射表中存在所述关键字对应的交换芯片或 NP的信息时,提取 该交换芯片或 NP的信息;
当所述映射表中不存在所述关键字对应的交换芯片或 NP的信息时,丟 弃所述报文。
5、 如权利要求 1或 2所述的识别多端口以太网接口装置端口的方法, 其中, 所述将交换芯片或 NP的信息写入所述端口模块发送的报文为:
根据预设的规则增加或修改所述端口模块发送的报文的字段。
6、 一种多端口以太网接口装置, 其中, 该装置包括: 接收模块、 第一 获取模块和写入模块; 其中,
所述接收模块, 用于接收网络设备的端口模块发送的报文;
所述第一获取模块, 用于根据所述接收模块接收的报文的入端口信息 和预设的映射表,获取对应的网络设备的交换芯片或 NP的信息; 所述映射 表包括入端口信息与交换芯片或 NP的信息的对应关系;
所述写入模块,用于将所述交换芯片或 NP的信息写入所述端口模块发 送的报文, 并将所述报文发送至对应的交换芯片或 NP, 供所述交换芯片或
NP根据所述交换芯片或 NP的信息获取入端口信息。
7、如权利要求 6所述的多端口以太网接口装置,其中,该装置还包括: 第二获取模块和删除模块; 其中, 芯片或 NP的信息和所述映射表, 获取对应的入端口信息;
所述删除模块, 用于删除所述交换芯片或 NP发送的报文的入端口信 息, 并将所述报文发送至所述入端口信息对应的端口模块。
8、 如权利要求 6或 7所述的多端口以太网接口装置, 其中, 所述第一 获取模块包括: 解析单元和查找单元; 其中,
所述解析单元, 用于解析所述端口模块发送的报文, 得到入端口信息; 所述查找单元, 用于查找所述映射表内所述入端口信息对应的交换芯 片或 NP的信息。
9、 如权利要求 8所述的多端口以太网接口装置, 其中, 所述查找单元 包括: 查询子单元、 提取子单元和丟弃子单元; 其中,
所述查询子单元, 用于根据预设的关键字, 查询所述映射表; 所述关 键字包括所述入端口信息;
所述提取子单元, 用于当所述映射表中存在所述关键字对应的交换芯 片或 NP的信息时, 提取该交换芯片或 NP的信息;
所述丟弃子单元, 用于当所述映射表中不存在所述关键字对应的交换 芯片或 NP的信息时, 丟弃所述报文。
10、 如权利要求 6或 7所述的多端口以太网接口装置, 其中, 所述写 入模块, 具体用于根据预设的规则增加或修改所述端口模块发送的报文的 字段。
PCT/CN2012/074658 2011-05-10 2012-04-25 多端口以太网接口装置及识别其端口的方法 WO2012152184A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
RU2013154742/08A RU2562417C2 (ru) 2011-05-10 2012-04-25 Многопортовое устройство интерфейса ethernet и способ идентификации его портов
EP12782009.0A EP2709313B1 (en) 2011-05-10 2012-04-25 Multiport ethernet interface device and method for identifying ports thereof

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110120010.5 2011-05-10
CN201110120010.5A CN102185775B (zh) 2011-05-10 2011-05-10 识别多端口以太网接口装置端口的方法和多端口以太网接口装置

Publications (1)

Publication Number Publication Date
WO2012152184A1 true WO2012152184A1 (zh) 2012-11-15

Family

ID=44571846

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/074658 WO2012152184A1 (zh) 2011-05-10 2012-04-25 多端口以太网接口装置及识别其端口的方法

Country Status (4)

Country Link
EP (1) EP2709313B1 (zh)
CN (1) CN102185775B (zh)
RU (1) RU2562417C2 (zh)
WO (1) WO2012152184A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113438749A (zh) * 2021-05-17 2021-09-24 深圳市广和通无线股份有限公司 多公网连接驱动方法、装置、计算机设备和存储介质

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102185775B (zh) * 2011-05-10 2016-06-22 中兴通讯股份有限公司 识别多端口以太网接口装置端口的方法和多端口以太网接口装置
CN102546416A (zh) * 2012-01-13 2012-07-04 中兴通讯股份有限公司 L3vpn业务报文的传输方法和装置
CN102647350A (zh) * 2012-03-31 2012-08-22 北京华源格林科技有限公司 交换芯片端口号与用户端口号的转换方法及装置
CN103051530B (zh) * 2012-12-26 2015-03-25 北京四方继保自动化股份有限公司 一种用于智能变电站报文的多网口发送优化方法
CN104618266A (zh) * 2015-02-09 2015-05-13 浪潮集团有限公司 一种多端口间报文转发的方法和装置
CN105681228A (zh) * 2016-01-30 2016-06-15 安徽欧迈特数字技术有限责任公司 一种多端口以太网交换聚合同步方法
CN105681479A (zh) * 2016-01-30 2016-06-15 安徽欧迈特数字技术有限责任公司 一种多端口以太网接口的传输方法
CN108270638B (zh) * 2017-01-03 2022-10-28 中兴通讯股份有限公司 一种基于网口传输的纠错方法、装置及网口传输设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101374046A (zh) * 2007-08-23 2009-02-25 中兴通讯股份有限公司 一种宽带接入设备实现用户端口定位的方法
CN101404645A (zh) * 2008-04-29 2009-04-08 华为技术有限公司 多端口的以太网接口及其实现方法和物理层接口
CN101610216A (zh) * 2009-07-29 2009-12-23 华为技术有限公司 以太网报文转发方法、装置及系统
CN102006173A (zh) * 2010-10-28 2011-04-06 武汉中元华电科技股份有限公司 一种以太网接口扩展方法及装置
CN102185775A (zh) * 2011-05-10 2011-09-14 中兴通讯股份有限公司 识别多端口以太网接口装置端口的方法和多端口以太网接口装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4616535B2 (ja) * 1999-12-23 2011-01-19 シテイシャン ネットワークス インコーポレイテッド パケットスケジューリングを用いるネットワーク交換方法
US8775584B2 (en) * 2003-04-29 2014-07-08 Microsoft Corporation Method and apparatus for discovering network devices
CN100428737C (zh) * 2005-03-08 2008-10-22 杭州华三通信技术有限公司 一种简化vpn网络布署的方法
US8533316B2 (en) * 2007-04-27 2013-09-10 Hitachi, Ltd. Management computer for setting configuration information of node
CN101668238B (zh) * 2009-10-20 2013-04-17 上海市共进通信技术有限公司 Epon中实现vlan n:1汇聚和1:n转换的方法、装置及光网络单元
CN101931835B (zh) * 2010-09-03 2013-07-03 深圳市共进电子股份有限公司 Epon中实现vlan汇聚和转换的方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101374046A (zh) * 2007-08-23 2009-02-25 中兴通讯股份有限公司 一种宽带接入设备实现用户端口定位的方法
CN101404645A (zh) * 2008-04-29 2009-04-08 华为技术有限公司 多端口的以太网接口及其实现方法和物理层接口
CN101610216A (zh) * 2009-07-29 2009-12-23 华为技术有限公司 以太网报文转发方法、装置及系统
CN102006173A (zh) * 2010-10-28 2011-04-06 武汉中元华电科技股份有限公司 一种以太网接口扩展方法及装置
CN102185775A (zh) * 2011-05-10 2011-09-14 中兴通讯股份有限公司 识别多端口以太网接口装置端口的方法和多端口以太网接口装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113438749A (zh) * 2021-05-17 2021-09-24 深圳市广和通无线股份有限公司 多公网连接驱动方法、装置、计算机设备和存储介质

Also Published As

Publication number Publication date
RU2562417C2 (ru) 2015-09-10
EP2709313B1 (en) 2019-06-19
CN102185775A (zh) 2011-09-14
EP2709313A1 (en) 2014-03-19
EP2709313A4 (en) 2014-12-24
RU2013154742A (ru) 2015-06-20
CN102185775B (zh) 2016-06-22

Similar Documents

Publication Publication Date Title
WO2012152184A1 (zh) 多端口以太网接口装置及识别其端口的方法
CN102215170B (zh) 抑制网络风暴的方法及处理器
WO2014187204A1 (zh) 一种ofs带内通信方法及ofs
US8576866B2 (en) Hierarchical rate limiting of control packets
EP2667545A1 (en) Network system, controller, switch, and traffic monitoring method
WO2012049960A1 (ja) スイッチシステム、モニタリング集中管理方法
RU2562425C2 (ru) Многопортовое устройство интерфейса ethernet и способ доступа к vpn услуге интерфейса ethernet
WO2016082588A1 (zh) 链路连通性检测方法及装置
WO2016107122A1 (zh) RapidIO报文和以太网报文之间的转换方法和设备
EP3113427A1 (en) Method for sending multicast packet and switch
US20090190588A1 (en) Data Packet Switching
EP3657742A1 (en) Method and apparatus for processing modified packet
WO2015085748A1 (zh) 交换装置及丢包方法
EP2587742A1 (en) Method for forwarding message and switch chip
US8050185B2 (en) Sampling of network traffic based on CAM lookup
WO2014169812A1 (zh) 报文的转发处理方法及装置
CN113162855B (zh) 组播报文检测方法、网络设备和系统
WO2011097859A1 (zh) 一种实现灵活qinq的方法及装置
EP2698954A1 (en) Message filtering method and access device
KR101072461B1 (ko) 스위칭 정보를 이용한 데이터 전송 시스템 및 방법
CN108833284B (zh) 一种云平台和idc网络的通信方法及装置
EP2908476B1 (en) Method and apparatus for sending multi-link transparent interconnected data frame
WO2015010514A1 (zh) 一种信号转换方法、装置及系统
WO2015035813A1 (zh) 上报交换机类型的方法及装置
WO2016070725A1 (zh) 一种实现dhcp广播交互报文vlan n:1转换的方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12782009

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2012782009

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2013154742

Country of ref document: RU

Kind code of ref document: A