WO2017206787A1 - 通信网络设备的报文转发控制方法及通信网络设备 - Google Patents

通信网络设备的报文转发控制方法及通信网络设备 Download PDF

Info

Publication number
WO2017206787A1
WO2017206787A1 PCT/CN2017/085877 CN2017085877W WO2017206787A1 WO 2017206787 A1 WO2017206787 A1 WO 2017206787A1 CN 2017085877 W CN2017085877 W CN 2017085877W WO 2017206787 A1 WO2017206787 A1 WO 2017206787A1
Authority
WO
WIPO (PCT)
Prior art keywords
port
access control
control address
medium access
forwarding table
Prior art date
Application number
PCT/CN2017/085877
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 中兴通讯股份有限公司
Publication of WO2017206787A1 publication Critical patent/WO2017206787A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering

Definitions

  • the present disclosure relates to the field of MAC (Media Access Control) address learning, and more particularly to a packet forwarding control method and a communication network device of a communication network device.
  • MAC Media Access Control
  • the switch chip In the current Ethernet switch or router, the switch chip is basically used to implement the function of the CPU (Central Processing Unit) data fast forwarding.
  • CPU Central Processing Unit
  • a common VLAN In the CPU of the device, in order to distinguish different ports in the switch chip, a common VLAN is to add a VLAN (Virtual Local Area Network) label to the packet information of each port on the switch chip, and add a VLAN.
  • the method of marking can be used to distinguish between different ports. However, this method can cause isolation between ports on the switch chip and cannot forward packets.
  • the FID Flexible Database Identifier
  • the MAC address sharing function is implemented on the switch chip that does not support the FID parameter configuration.
  • the VLAN ID is added to the packet, and the MAC address table is searched according to the VLAN identifier.
  • each port in the switch chip cannot obtain the device of the other port.
  • the MAC address therefore, causes the packets of different ports of the switch chip to query the destination MAC address by broadcast because the matching destination MAC address entry cannot be found, and broadcast flooding occurs.
  • different ports of the switch chip can be configured with different VLANs to avoid flooding, but the ports can not communicate with each other within the switch chip, and can only be uplinked to the CPU protocol stack for interworking, thus, in data forwarding. When the forwarding performance is reduced by 30% to 50%, the device forwarding performance is greatly affected.
  • the packet forwarding control method and the communication network device of the communication network device provided by the embodiments of the present disclosure mainly solve the technical problem that when the existing switching chip performs data forwarding, the VLAN identification cannot be implemented in the switching chip.
  • the technical problem of packet broadcast flooding occurs at each port of the switch chip.
  • an embodiment of the present disclosure provides a packet forwarding control method for a communication network device, including:
  • the central processing unit learns the media access control address of the device connected to each port in advance, and obtains a media access control address forwarding table.
  • the media access control address forwarding table includes: a media access control address, a port number, and a virtual local area network identifier corresponding to the port. ;
  • Each port processing unit acquires a medium access control address forwarding table from the central processing unit;
  • the port processing unit receives the packet reported by the device, and parses the destination medium access control address from the packet;
  • the port processing unit queries the port number corresponding to the destination medium access control address from the medium access control address forwarding table according to the destination medium access control address and the virtual local area network identifier of the port;
  • the port processing unit forwards the packet according to the port number.
  • An embodiment of the present disclosure further provides a communication network device, including: a processor and a switch chip, where the switch chip includes at least two port processing units and a memory;
  • the processor is configured to learn the media access control address of the device connected to each port in advance, and obtain a media access control address forwarding table, where the media access control address forwarding table includes: a media access control address, a port number, and a virtual local area network corresponding to the port.
  • the identifier is set to a media access control address forwarding table obtained by the storage processor in advance;
  • At least one port processing unit is configured to obtain a medium access control address forwarding table from the memory; and, to receive the message reported by the device, parse the destination medium access control address from the message, and access the control address and the virtual local area network of the port according to the destination medium
  • the identifier is queried from the medium access control address forwarding table to the port number corresponding to the destination medium access control address, and the packet is forwarded according to the port number.
  • Embodiments of the present disclosure also provide a computer storage medium having stored therein computer executable instructions for performing a message forwarding method of a communication network device of any of the foregoing.
  • the control method firstly learns the MAC address of the device connected to each port through the central processing unit to obtain a storage.
  • a MAC address forwarding table having all port related information, and each port processing unit obtains the MAC address forwarding table from the central processing unit, and obtains a destination MAC address by parsing the packet when performing packet forwarding, and according to the purpose
  • the MAC address and the VLAN ID of the port are queried to obtain the corresponding port number, and the packet is forwarded according to the port number.
  • the central processing unit learns the MAC address of the device connected to each port and records it in the MAC address forwarding table.
  • Each port can query the device MAC address of the port from the MAC address forwarding table to implement the entry of the entries between the ports, and further implement the interworking of the ports.
  • the MAC address forwarding table obtained by each port is the central processing unit. Unified learning, so each port is reporting When the packet is forwarded, the port number and the destination MAC address can be used to query the corresponding port number. Therefore, each port can forward the packet according to the port number, effectively avoiding the destination MAC address.
  • the phenomenon of packet broadcast flooding occurs inside the switch chip, which improves the performance of device data forwarding.
  • FIG. 1 is a flowchart of a packet forwarding control method of a communication network device according to a first embodiment of the present disclosure
  • FIG. 2 is a schematic structural diagram of a communication network device according to a second embodiment of the present disclosure.
  • FIG. 3 is another schematic structural diagram of a communication network device according to a third embodiment of the present disclosure.
  • the switch chip receives the message information sent by the device, extracts the MAC address of the source device, and the MAC address of the destination device, and the switch chip learns the extracted MAC address and adds it to the MAC forwarding table, but this The learning method can only learn from the VLAN identifier corresponding to the port, and cannot know the intersection outside the port. The MAC address of the device on the other port of the chip is changed. Therefore, the switchless chip cannot find the port number corresponding to the MAC address of the other port when performing the warm-up forwarding.
  • the first embodiment of the present disclosure provides a method for learning a MAC address, and the device of each port in the switch chip can be implemented by implementing the method.
  • the sharing of the MAC address effectively solves the problem of broadcast flooding due to the fact that the port number corresponding to the destination MAC address cannot be found.
  • FIG. 1 is a packet forwarding control method for a communication network device according to the embodiment. As shown in FIG. 1 , in the embodiment, the packet forwarding control method of the communication network device includes the following steps:
  • S102 The central processing unit learns the MAC address of the device connected to each port in advance, and obtains a MAC address forwarding table.
  • the central processing unit when the central processing unit learns the MAC address of the device of each port, it includes learning and updating of two types of MAC addresses, which are respectively performed on the MAC address of the device connected to each port of the switch chip. Learn to update each other and learn updates to the MAC address of the switch chip and the central processing unit connection port.
  • the MAC address forwarding table includes: a MAC address, a port number, and a virtual local area network identifier corresponding to the port. If the switch chip needs to forward the packet, the destination MAC address of the forwarded packet can be obtained by querying the MAC address forwarding table. The port number corresponding to the address, which implements the fast forwarding function of packets.
  • the central processing unit when the central processing unit learns the MAC address of the device connected to each port of the switch chip, the central processing unit obtains the message reported by the device connected to each port of the switch chip and the corresponding port number; The MAC address of the corresponding device and the virtual local area network identifier (VLAN identifier) of the corresponding port are parsed; the MAC address, the virtual local area network identifier, and the port number are recorded in the MAC address forwarding table.
  • VLAN identifier virtual local area network identifier
  • the central processing unit obtains the packet reported by the device connected to each port from the switch chip, and the central processing unit parses the obtained packet to parse the source MAC address in the packet, that is, the report is reported.
  • the MAC address of the device of the packet is added to the corresponding MAC address forwarding table.
  • the port number of the packet received by the switch chip is received, and the port number is also recorded to the MAC address.
  • the MAC address and the port number are in a fixed correspondence. When used, the port number can be queried through the MAC address; similarly, the other ports of the switch chip use the same learning method to learn other ports.
  • the MAC address of the connected device and the corresponding port number are learned by the central processing unit, so that each port in the switch chip can obtain the MAC address and the corresponding port number of the device connected to the other port, thereby realizing the ports. Inter-item sharing.
  • connection mode between the switch chip and the central processing unit is a relatively fixed connection manner, in order to ensure the stability of information exchange between the switch chip and the central processing unit, and realization through the central processing unit
  • the packets reported by the device are sent to other devices on the external network.
  • the ports connected to the communication channel formed by the WAN port and the central processing unit and the central processing unit and the switch chip are required.
  • the central processing unit obtains the packet reported by each port on the switch chip, and in addition to learning the MAC address of the device on each port, the central processing unit acquires the packet reported by each port on the switch chip.
  • the central processing unit also learns the port MAC address and corresponding port of the switch chip and the central processing unit. Number, and also record these two pieces of information into the MAC address forwarding table.
  • the MAC address and the virtual local area network identifier in the learned MAC address forwarding table may be utilized by the central processing unit to generate unique port identification information according to a preset calculation rule.
  • the record corresponding to the port identification information is recorded in the entry corresponding to the virtual local area network identifier in the MAC address forwarding table, where the preset calculation rule may be a hash algorithm, but is not limited to the foregoing two calculation rules. It can be understood that the preset calculation rules herein can be implemented as long as all algorithms calculated to be unique.
  • the MAC address and the virtual local area network identifier in the MAC address forwarding table learned by the central processing unit may be used by each port processing unit to generate a preset according to a preset calculation rule.
  • the unique port identification information is recorded in the MAC address forwarding table corresponding to the virtual local area network identifier corresponding to the port identification information.
  • the learning of the MAC address of the device of each port is implemented in step S102.
  • the port processing unit on each port of the switch chip acquires the learned MAC from the central processing unit.
  • An address forwarding table which includes a MAC address, a port number, and a virtual local area network identifier corresponding to each port, and a MAC address and a corresponding port number of the switch chip and the central processing unit, due to the MAC address.
  • the address forwarding table also records the MAC address and the corresponding port number of the switch chip and the central processing unit, so that when the message needs to be sent out through the central processing unit, the message can be directly obtained by looking up the table. Forward to the device on the external network.
  • the port processing unit receives the packet reported by the device, and parses the destination MAC address from the packet.
  • the port processing unit After receiving the packet, the port processing unit also processes the packet, that is, adds the VLAN identifier corresponding to the port to the packet, and extracts the destination MAC address from the packet after the addition is completed. It can be understood that the destination MAC address can be the MAC address of other devices on the same port, or the MAC address of the device on other ports.
  • the port processing unit queries, from the MAC address forwarding table, a port number corresponding to the destination MAC address according to the destination MAC address and the VLAN identifier of the port.
  • the port processing end can directly query the MAC address forwarding table according to the destination MAC address and the VLAN identifier, and then the port where the device is located can be queried. .
  • the destination MAC address is the MAC address of the device on the other port, you can check the port identification information. Check the MAC address forwarding table.
  • the method when performing packet forwarding, the method further includes: the port processing unit acquires the destination MAC address and the virtual local area network identifier in the packet, generates a port identification information according to the preset calculation rule, and queries the MAC according to the port identification information.
  • the address forwarding table obtains the port number corresponding to the destination MAC address.
  • S110 The port processing unit forwards the packet according to the port number.
  • a computer storage medium stores computer executable instructions for performing the foregoing communication.
  • Packet forwarding method of network devices is further provided, where the computer storage medium stores computer executable instructions for performing the foregoing communication.
  • the embodiment of the present disclosure is implemented by the above-mentioned method for providing a message loading and dissipating control of a communication network device.
  • the central processing unit learns the MAC address of the device connected to each port, and obtains a MAC address forwarding table, and each port processing unit.
  • the MAC address forwarding table is obtained from the central processing unit.
  • the destination MAC address is obtained by parsing the packet, and the corresponding port number is obtained according to the destination MAC address and the VLAN ID of the port. No.
  • FIG. 2 is a schematic structural diagram of a communication network device according to the embodiment.
  • the communication network device 2 provided in this embodiment includes: a processor 21 and a switch chip 22, where:
  • the processor 21 is configured to learn the MAC address of the device connected to each port in advance, and learn to obtain a MAC address forwarding table, where the MAC address forwarding table stores the MAC address of the device connected to each port of the switch chip and other Information, optionally, the MAC address forwarding table includes at least information such as a MAC address, a port number, and a virtual local area network identifier corresponding to the port.
  • the switch chip 22 is configured to obtain the MAC address forwarding table from the processor 21; and receive the packet reported by the device, parse the destination MAC address from the packet, and query from the MAC address forwarding table according to the destination MAC address and the port VLAN identifier. The port number corresponding to the destination MAC address is forwarded based on the port number.
  • the switch chip 22 includes at least two port processing units 221 and a memory 222.
  • the memory 222 is configured to store the medium access control address forwarding table obtained by the processor 21 in advance; the switch chip 22 is configured to acquire a MAC address.
  • the forwarding table and the forwarding message are executed by the port processing unit 221 itself on each port in the switch chip 22, wherein in the communication network device 2, at least one port processing unit 221 can obtain the MAC from the processor 21.
  • the address forwarding table parses the destination MAC address according to the received packet, and obtains the port number corresponding to the destination MAC address from the MAC address forwarding table by using the destination MAC address and the VLAN identifier of the port, and forwards the packet to the In the device corresponding to the port number.
  • the switch chip 22 used in the actual manufacturing process is not necessarily the same switch chip 22, and all of the FID parameter settings can be used. Can For all uses that do not support the FID parameter setting, both switch chips can be used.
  • the port processing unit 221 of each port learns the device MAC of each port through the processor 21. The address and other information, when the packet is forwarded, the port processing unit 221 can directly extract the destination MAC address of the packet and the VLAN identifier corresponding to the port, and query according to the VLAN identifier and the destination MAC address.
  • the port processing unit 221 implements the unicast forwarding of the packet by looking up the table, and avoids the flooding phenomenon caused by the port query unit 221 performing the broadcast query inside the switch chip 22 because the port number corresponding to the destination MAC address cannot be found.
  • the control method for forwarding packets of each port may be performed by using the control method of the embodiment as described above for unicast forwarding, or may be performed by using an existing FID query method. Unicast forwarding.
  • the processor 21 when the processor 21 learns the MAC address of the device connected to each port on the switch chip 22, the processor 21 includes learning and updating the two types of MAC addresses, which are respectively performed on each port of the switch chip 22.
  • the MAC address of the suspended device learns to update each other and learn updates to the MAC address of the port of the switch chip 22 and the processor 21.
  • the learning and mutual update of the MAC address of the device connected to each port of the switch chip 22 includes: obtaining the packet reported by the device connected to each port from the switch chip 22, and then parsing the source from the obtained packet.
  • MAC address refers to the MAC address of the device that sends the packet, and records the MAC address in the MAC address forwarding table.
  • the processor 21 records the port number of the packet exchanged by the switch chip 22 while acquiring the packet.
  • the port number refers to the port number assigned by the communication network device 2 to the port on the switch chip 22, and the port number of each port. In the switch chip 22 is a fixed arrangement.
  • the resolved MAC address is recorded together with the port number corresponding to the packet to the MAC address forwarding table.
  • the learning update for the MAC address of the port connecting the switch chip 22 to the processor 21 includes the record processor 21 acquiring the message on the switch chip 22 while the processor 21 acquires the message reported by each port from the switch chip 22.
  • the port number and MAC address are recorded in the MAC address forwarding table.
  • the method further includes generating a unique port identification information according to the MAC address and the port VLAN identifier recorded in the MAC address forwarding table.
  • the port identification information is generated according to a preset calculation rule, and the preset calculation rule may be a hash operation algorithm, as long as the calculation result has a unique calculation rule. Yes.
  • the calculation process for generating unique port identification information may be performed on the processor 21, and after the processor 21 learns the MAC address of the device, it may directly be based on the learned MAC address.
  • the port identifier of each port is obtained, and the port identification information is calculated according to the preset calculation rule, and is added to the MAC address forwarding table correspondingly.
  • the calculation process for generating the unique port identification information may also be performed on the port processing unit 221.
  • the processor 21 learns the MAC address of the device, the processor 21 transfers the learned MAC address.
  • the processor 21 is further configured to obtain the packet reported by the device connected to each port and the corresponding port number, and parse the media access control address of the corresponding device from the packet. Corresponding to the virtual local area network identifier of the port, the medium access control address, the virtual local area network identifier, and the port number are recorded to the medium access control address forwarding table. Further, the processor 21 obtains the MA address forwarding table including the MAC address, the port number, the VLAN identifier, and the port identification information, and shares it to each port. Each port first passes the receiving port when forwarding the packet. The packet is reported by the device and the packet is parsed. The destination MAC address is resolved and the VLAN ID corresponding to the port is obtained.
  • the VLAN ID is used when the port receives the packet.
  • the switch chip 22 is based on the current port. After the VLAN ID is added to the packet, after the destination MAC address and the VLAN ID are obtained, the destination MAC address and the VLAN identifier are calculated according to the preset calculation rule, and a port identification information is obtained, and then the port identification information is obtained according to the port identifier.
  • the port identification information is queried in the MAC address forwarding table. Preferably, the query compares the port identification information with the port identification information, and compares whether the packets are the same. If they are the same, the corresponding port number is obtained.
  • the generated unique port identification information and port identification information are hash values, and when the MAC address forwarding table is searched, the corresponding VLAN entry is obtained. The hash value is compared. If there is the same, the corresponding port number is obtained, and the packet is forwarded according to the port number.
  • the device is automatically learned, so that the device MAC address entries between the ports in the switch chip are shared and updated, so that different ports on the switch chip are forwarded.
  • the internal communication can be obtained, and the port number corresponding to the destination MAC address can be queried to implement unicast forwarding of the packet, thereby avoiding flooding of the packet broadcast within the switch chip.
  • the technical problem to be solved in this embodiment is that the processor 21 performs unified learning on the MAC addresses of the port devices, and shares the learned MAC address forwarding table to each port, thereby realizing sharing of MAC address entries of each port, thereby avoiding When forwarding a packet, the packet broadcast query is performed because the port number of the other port cannot be found.
  • the communication network device provided in this embodiment may be a router or a network switch. The following describes the disclosure in detail by using a network switch as an example.
  • each port in the switch chip 22 corresponds to each eth port of the network switch.
  • two PC devices are connected to the port of the switch chip 22, wherein PC1 is connected to the eth2 port, and PC2 is connected to the eth3 port.
  • the network switch performs the setting of each port in the switch chip 22 as shown in Table 1, as shown in Table 1:
  • the processor 21 compares the MAC address according to the reported message.
  • the learning methods include:
  • the processor 21 records the port number of the incoming packet of the current switch chip 22 port and the MAC address of the device that sends the packet, adds the two parameters to the MAC address forwarding table, and records the switch chip in the MAC address forwarding table. And corresponding to the VLAN identifier of the other port, and then generating a corresponding hash value according to the MAC address and the VLAN identifier recorded in the MAC address forwarding table, and the port processing unit 221 can find the MAC corresponding to the port of the switch chip 22 according to the hash value.
  • the port number is the port number of the incoming packet of the current switch chip 22 port and the MAC address of the device that sends the packet, adds the two parameters to the MAC address forwarding table, and records the switch chip in the MAC address forwarding table. And corresponding to the VLAN identifier of the other port, and then generating a corresponding hash value according to the MAC address and the VLAN identifier recorded in the MAC address forwarding table, and the port
  • the learning and mutual update of the device MAC address of each port of the switch chip 22 is performed by acquiring the packet reported by the device of each port from the switch chip 22, and then parsing the source MAC address from the obtained packet, the source.
  • the MAC address refers to the MAC address of the device that sent the packet and records the address in the MAC address forwarding table. For example, the port 3 of the switch chip 22 receives the packet sent by the device with the MAC address of 44:37:e6:29:cd:25, and the other ports of the switch chip 22 learn the MAC address entry as follows:
  • the MAC address and the VLAN ID recorded in the MAC address forwarding table are respectively calculated and recorded in the corresponding VLAN ID entries.
  • the port connection between the processor 21 and the switch chip 22 is a fixed setting, that is, the MAC address is unchanged.
  • the learning process is as follows:
  • the processor 21 obtains a MAC address forwarding table by the above learning, and the MAC address entries of the table in the switch chip 22 are as shown in Table 2 below:
  • the MAC address is 44:37:e6:29:cd:25, and the corresponding port number is obtained.
  • the destination MAC address and the corresponding switch chip 22 port number can be found in the MAC address forwarding table, and finally found according to the The port number unicasts the message within the switch chip 22.
  • a port identifier may be calculated according to the destination MAC address and the VLAN identifier.
  • the packet is forwarded unicast within the switch chip 22 according to the found port number. .
  • the control mode of forwarding packets of each port of the switch chip is the same as that of the network switch, and details are not described herein again.
  • the MAC address of the device connected to each port of the switch chip is performed by the processor before the message is forwarded.
  • the MAC address and port number of the device connected to each port are recorded in the same MAC address forwarding table, and then the MAC address forwarding table is shared to each port.
  • the port processing unit passes the packet forwarding.
  • the destination MAC address and the VLAN ID of the port can be queried, and the port number corresponding to the destination MAC address can be queried.
  • the unicast forwarding of the packet is performed according to the port number. The phenomenon that packet broadcast flooding occurs inside the switch chip due to the failure to find the destination MAC address improves the performance of device data forwarding.
  • modules or steps of the above-described embodiments of the present disclosure may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed across multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored by a computing device in a computer storage medium (ROM/RAM, diskette, optical disk) and In some cases, the steps shown or described may be performed in an order different than that herein, or they may be separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof may be fabricated into a single integrated circuit module. achieve. Therefore, the present disclosure is not limited to any specific combination of hardware and software.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

本公开实施例提供一种通信网络设备的报文转发控制方法及通信网络设备,通过中央处理单元预先对各个端口下挂的设备的MAC地址进行学习,获得一个MAC地址转发表,各个端口处理单元从中央处理单元中获取该MAC地址转发表,在进行报文转发时,通过对报文的解析获得目的MAC地址,并根据该目的MAC地址以及端口的VLAN标识查询得到对应的端口号,根据端口号转发报文;使得端口处理单元在进行报文转发时,通过提取目的MAC地址以及对应的VLAN标识即可查询到对应的端口号,根据端口号进行报文的单播转发,从而实现了各个端口的设备的MAC地址的相互更新学习,有效地避免了由于找不到目的MAC地址而在交换芯片内部出现报文广播洪泛的现象,提高了设备数据转发的性能。

Description

通信网络设备的报文转发控制方法及通信网络设备 技术领域
本公开涉及MAC(Media Access Control,介质访问控制地址)地址学习领域,尤其涉及一种通信网络设备的报文转发控制方法及通信网络设备。
背景技术
在当前的以太网交换机或路由器中,基本都使用了交换芯片实现设备CPU(Central Processing Unit,中央处理器)数据快速转发的功能。在设备的CPU中,为了区分交换芯片中的不同端口一般采用的方式是通过在交换芯片上对每个端口进来的报文信息添加不同VLAN(Virtual Local Area Network,虚拟局域网)标签,通过添加VLAN标识的方式可以实现区分不同的端口,但该种方式却会造成交换芯片中各个端口之间的隔离,无法互通转发报文。
为了解决上述的问题,在现有的一些交换芯片通过设置FID(Filtering Database Identifier,过滤数据库标识符)参数来实现交换芯片中端口的跨VLAN互通,但是该种方式只能适用于支持FID设置的交换芯片。
对于不支持FID参数配置的交换芯片实现MAC条目共享功能,是通过在报文上添加VLAN标识,根据VLAN标识查找MAC地址表,但是该种交换芯片中的每个端口并不能获取其他端口的设备MAC地址,因此,就会导致交换芯片不同端口的报文因查找不到匹配的目的MAC地址条目而通过广播的方式查询目的MAC地址,出现广播洪泛的情况。根据上述的两种方式,交换芯片的不同端口虽然可以配置不同VLAN来避免洪泛,但是会导致端口之间不能在交换芯片内部互通,只能上行到CPU协议栈实现互通,这样,在数据转发时,其转发性能就会降低30%~50%左右,大大影响了设备转发性能。
发明内容
本公开实施例提供的通信网络设备的报文转发控制方法及通信网络设备,主要解决的技术问题是现有的交换芯片在进行数据转发时,由于各个端口添加VLAN标识无法在交换芯片内部实现互通,而导致交换芯片的各个端口出现报文广播洪泛的技术问题。
为解决上述技术问题,本公开实施例提供一种通信网络设备的报文转发控制方法,包括:
中央处理单元预先对各个端口下挂的设备的介质访问控制地址进行学习,获得介质访问控制地址转发表,介质访问控制地址转发表包括:介质访问控制地址、端口号和与端口对应的虚拟局域网标识;
各个端口处理单元从中央处理单元中获取介质访问控制地址转发表;
端口处理单元接收设备上报的报文,从报文中解析出目的介质访问控制地址;
端口处理单元根据目的介质访问控制地址以及端口的虚拟局域网标识从介质访问控制地址转发表中查询到与目的介质访问控制地址对应的端口号;
端口处理单元根据端口号转发报文。
本公开的实施例还提供一种通信网络设备,包括:处理器和交换芯片,交换芯片包括至少两个端口处理单元和存储器;
处理器设置为预先对各个端口下挂的设备的介质访问控制地址进行学习,获得介质访问控制地址转发表,介质访问控制地址转发表包括:介质访问控制地址、端口号和与端口对应的虚拟局域网标识;存储器设置为存储处理器预先学习得到的介质访问控制地址转发表;
至少一个端口处理单元设置为从存储器中获取介质访问控制地址转发表;以及,接收设备上报的报文,从报文中解析出目的介质访问控制地址,根据目的介质访问控制地址以及端口的虚拟局域网标识从介质访问控制地址转发表中查询到与目的介质访问控制地址对应的端口号,根据端口号转发报文。
本公开的实施例还提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行前述的任一项的通信网络设备的报文转发方法。
根据本公开的实施例提供的通信网络设备的报文转发方法、通信网络设备以及计算机存储介质,该控制方法首先是通过中央处理单元对各个端口下挂的设备的MAC地址进行学习,获得一个存储有所有端口相关信息的MAC地址转发表,然后各个端口处理单元从中央处理单元中获取该MAC地址转发表,在进行报文转发时,通过对报文的解析获得目的MAC地址,并根据该目的MAC地址以及端口的VLAN标识查询得到对应的端口号,根据端口号转发报文;由中央处理单元对各个端口下挂的设备的MAC地址进行统一的学习,并记录到MAC地址转发表中,使得各个端口可以从MAC地址转发表中查询到不同端口的设备MAC地址,实现了各个端口之间的条目共享,进一步地实现了各个端口的互通,由于各个端口获取的MAC地址转发表是中央处理单元统一学习得到的,因此,各个端口在进行报文转发时,可以通过端口的VLAN标识以及目的MAC地址可以查询到对应的端口号,从而实现各个端口根据端口号对报文进行单播的转发,有效地避免了由于找不到目的MAC地址而在交换芯片内部出现报文广播洪泛的现象,提高了设备数据转发的性能。
附图说明
图1为本公开的第一实施例提供的通信网路设备的报文转发控制方法的流程图;
图2为本公开的第二实施例提供的通信网络设备的结构示意图;
图3为本公开的第三实施例提供的通信网络设备的另一种结构示意图。
具体实施方式
下面通过具体实施方式结合附图对本公开实施例作进一步详细说明。
第一实施例:
在相关技术中,交换芯片接收设备发送过来的报文信息,提取源设备的MAC地址以及目的设备MAC地址,交换芯片对提取到的MAC地址进行学习,并添加到MAC转发表中,但是,这种学习方法只能对端口所对应的VLAN标识中学习,无法获知该端口之外的交 换芯片的其他端口上的设备的MAC地址,因此,造成无交换芯片在进行保温转发时找不到其他端口的MAC地址对应的端口号。
为了解决上述由于VLAN标识而导致交换芯片各个端口无法实现互通的问题,本公开的第一实施例提供了一种MAC地址学习方法,通过本方法的实施,可以实现交换芯片中各个端口的设备的MAC地址的共享,有效地解决了由于找不到目的MAC地址对应的端口号而产生广播洪泛的现象。
图1为本实施例提供的通信网路设备的报文转发控制方法,如图1所示,在本实施例中,通信网路设备的报文转发控制方法包括如下步骤:
S102,中央处理单元预先对各个端口下挂的设备的MAC地址进行学习,获得MAC地址转发表。
在本实施例中,中央处理单元在对各个端口的设备的MAC地址进行学习时,其包括两类MAC地址的学习和更新,分别是对交换芯片的每个端口下挂的设备的MAC地址进行学习互相更新和对交换芯片与中央处理单元连接端口的MAC地址的学习更新。该MAC地址转发表包括:MAC地址、端口号和与端口对应的虚拟局域网标识,若交换芯片接收到报文需要进行转发时,则通过查询MAC地址转发表即可获取到转发报文的目的MAC地址对应的端口号,从而实现报文的快速转发功能。
在本实施例中,中央处理单元在对交换芯片各个端口下挂的设备的MAC地址进行学习时,是通过获取交换芯片的各个端口下挂的设备上报的报文以及对应的端口号;从报文中解析出对应的设备的MAC地址以及对应端口的虚拟局域网标识(VLAN标识);将MAC地址、虚拟局域网标识和端口号对应的记录到MAC地址转发表。
具体的,中央处理单元通过从交换芯片上获取各个端口下挂的设备上报的报文,中央处理单元通过对获取到的报文进行解析处理,解析报文中的源MAC地址,也即是上报该报文的设备的MAC地址,并将该MAC地址添加到对应的MAC地址转发表中,另外,还包括获取交换芯片接收该报文的端口号,同时也将该端口号记录到MAC地址转发表中,并且该MAC地址与端口号是固定的对应关系,在使用时,通过该MAC地址即可查询到该端口号;同理,交换芯片的其他端口也是采用同样的学习方法学习其他端口上下挂的设备的MAC地址和对应的端口号,通过中央处理单元的学习,使得交换芯片中的各个端口均可获得其他端口下挂的设备的MAC地址和对应的端口号,从而实现了各端口之间的条目共享。
在实际应用中,由于交换芯片与中央处理单元之间的连接方式是一种相对比较固定的连接方式,为了能保证交换芯片与中央处理单元之间的信息交互稳定,以及实现通过中央处理单元将设备上报的报文发送到外网的其他设备上,需要将WAN口与中央处理单元,中央处理单元与交换芯片组成的通信信道固定设置的端口。
在本实施例中,中央处理单元在获取交换芯片上各个端口上报的报文除了能学习到各个端口上设备的MAC地址外,同时,在获取交换芯片上的各个端口上报的报文的过程中,中央处理单元也学习了交换芯片与中央处理单元连接的端口MAC地址和对应的端口 号,并且也将这两项信息记录到MAC地址转发表中。
在本实施例中,在进行MAC地址学习的过程中,可以通过中央处理单元来利用学习好的MAC地址转发表中的MAC地址和虚拟局域网标识,根据预设的计算规则生成唯一的端口识别信息,将端口识别信息对应的记录到MAC地址转发表中与所述虚拟局域网标识对应的表项中,这里的预设的计算规则可以是哈希算法,但并不限制于上述的两种计算规则,可理解的是,这里的预设的计算规则只要能实现计算出来的至具有唯一性的所有算法均可以。
在本实施例中,在进行MAC地址学习的过程中,还可以通过各个端口处理单元自己利用中央处理单元学习好的MAC地址转发表中的MAC地址和虚拟局域网标识,根据预设的计算规则生成唯一的端口识别信息,将端口识别信息对应的记录到MAC地址转发表中与所述虚拟局域网标识对应的表项中。
可选的,在本实施例中,当中央处理单元接收到端口1上的设备所上报的报文时,中央处理单元从该报文中提取出设备的MAC地址以及记录设备上报报文给交换芯片的端口号,假设端口1的VLAN为1,则在生成端口识别信息时,根据MAC地址和VLAN=1生成端口识别信息,并记录到MAC地址转发表中的VLAN=1的表项中,假设VLAN=2,则根据MAC地址和VLAN=2生成端口识别信息,并记录到MAC地址转发表中的VLAN=2的表项中。
S104,将所述介质访问控制地址转发表发送至各个端口处理单元。
在本实施例中,通过步骤S102实现了对各个端口的设备MAC地址的学习,得到一个MAC地址转发表之后,交换芯片的各个端口上的端口处理单元从中央处理单元中获取已学习完成的MAC地址转发表,该MAC地址转发表除了包括设备MAC地址、端口号和与各个端口对应的虚拟局域网标识之外,还包括交换芯片与中央处理单元连接的MAC地址和对应的端口号,由于在MAC地址转发表中也记录有交换芯片与中央处理单元连接的MAC地址和对应的端口号,使得当需要将报文通过中央处理单元进行外发时,也可以直接通过查表就可实现将报文转发至外网的设备上。
S106,端口处理单元接收设备上报的报文,从报文中解析出目的MAC地址。
在该步骤中,端口处理单元在接收到报文后,还会对报文进行处理,即,在报文中添加对该端口对应的VLAN标识,添加完成后从该报文中提取目的MAC地址,可理解的是,该目的MAC地址可以是同一端口下的其他设备的MAC地址,也可以是其他端口上的设备的MAC地址。
S108,端口处理单元根据目的MAC地址以及端口的VLAN标识从MAC地址转发表中查询到与目的MAC地址对应的端口号。
在该步骤中,若该目的MAC地址是同一端口下的其他设备的MAC地址时,则端口处理端元可以直接根据目的MAC地址以及VLAN标识查询MAC地址转发表,即可查询到设备所在的端口。
若该目的MAC地址是其他端口上的设备的MAC地址时,则可以通过端口识别信息查 询MAC地址转发表。
在本实施例中,在进行报文转发时,还包括:端口处理单元获取报文中的目的MAC地址和虚拟局域网标识,根据预设的计算规则生成一个端口识别信息,根据端口识别信息查询MAC地址转发表,获得与目的MAC地址对应的端口号。
S110,端口处理单元根据端口号转发报文。
对应的,对于上述的处理步骤,在本公开的实施例中,还提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行前述的通信网络设备的报文转发方法。
本公开实施例通过上述提供通信网络设备的报文装发放控制方法的实施,首先是通过中央处理单元对各个端口下挂的设备的MAC地址进行学习,获得一个MAC地址转发表,各个端口处理单元从中央处理单元中获取该MAC地址转发表,在进行报文转发时,通过对报文的解析获得目的MAC地址,并根据该目的MAC地址以及端口的VLAN标识查询得到对应的端口号,根据端口号转发报文;通过预先的MAC地址学习,并且是由中央处理单元进行的统一学习,然后再发送给各个端口,从而实现了对各个端口下挂的设备的MAC地址的共享,避免了各个端口只能学习到本端口下挂的设备的MAC地址的情况发生,解决了由于无法找到对应的MAC地址而在交换芯片内部出现报文内转发广播洪泛的问题,提高了交换芯片的数据转发性能。
第二实施例:
图2为本实施例提供的通信网路设备的结构示意图,如图2所示,在本实施例提供的通信网路设备2包括:处理器21和交换芯片22,其中:
处理器21设置为预先对各个端口下挂的设备的MAC地址进行学习,通过学习获得MAC地址转发表,在该MAC地址转发表中存储有交换芯片的各个端口下挂的设备的MAC地址以及其他信息,可选的,该MAC地址转发表至少包括MAC地址、端口号和与端口对应的虚拟局域网标识等信息。
交换芯片22设置为从处理器21中获取MAC地址转发表;以及,接收设备上报的报文,从报文中解析出目的MAC地址,根据目的MAC地址以及端口VLAN标识从MAC地址转发表中查询到与目的MAC地址对应的端口号,根据端口号转发报文。
在本实施例中,交换芯片22包括至少两个端口处理单元221和存储器222,存储器222设置为存储处理器21预先学习得到的所述介质访问控制地址转发表;交换芯片22设置为获取MAC地址转发表以及转发报文,是由交换芯片22中的各个端口上的端口处理单元221自身来执行,其中,在通信网络设备2中,至少一个端口处理单元221可以通过从处理器21中获取MAC地址转发表,并根据接收到的报文解析出目的MAC地址,通过目的MAC地址以及该端口的VLAN标识从MAC地址转发表中查询得到与目的MAC地址对应的端口号,并将报文转发至与端口号对应的设备中。
可选的,对于本实施例中的通信网络设备2来说,在实际的生产制造时,所使用的交换芯片22并不一定是相同的交换芯片22,可以全部使用支持FID参数设置的,也可 以全部使用不支持FID参数设置的,还可以是两种交换芯片均有使用,对于不支持FID参数设置的交换芯片22,其各个端口的端口处理单元221通过处理器21学习各个端口的设备MAC地址以及其他信息,在进行报文转发时,端口处理单元221可以直接从报文中提取报文需要转发的目的MAC地址以及该端口对应的VLAN标识,根据VLAN标识以及目的MAC地址进行查询,使得端口处理单元221通过查表来实现对报文的单播转发,避免了端口处理单元221由于找不到目的MAC地址对应的端口号而在交换芯片22内部进行广播查询所造成的洪泛现象。对于支持FID参数设置的交换芯片22,其各个端口转发报文的控制方法可以采用如上文所描述的本实施例的控制方法进行单播转发,也可以采用现有的通过FID来查询的方式进行单播转发。
在本实施例中,处理器21在对交换芯片22上各个端口下挂的设备的MAC地址进行学习时,包括对两类MAC地址的学习和更新,分别是对交换芯片22的每个端口下挂的设备的MAC地址进行学习互相更新和对交换芯片22与处理器21连接端口的MAC地址的学习更新。
对于对交换芯片22的每个端口下挂的设备的MAC地址进行学习互相更新包括,通过从交换芯片22上获取各个端口下挂的设备上报的报文,然后再从获取的报文中解析源MAC地址,该源MAC地址指的是发送该报文的设备的MAC地址,并将该地址记录到MAC地址转发表中。处理器21在获取报文的同时,记录交换芯片22接收该报文的端口号,该端口号指的是通信网络设备2为交换芯片22上的端口分配的端口号,每个端口的端口号在交换芯片22中是固定的设置。最后,将解析到的MAC地址和该报文对应的端口号一起记录到MAC地址转发表。
对于对交换芯片22与处理器21连接端口的MAC地址的学习更新包括,在处理器21从交换芯片22上获取各个端口上报的报文的同时,记录处理器21获取交换芯片22上的报文的端口号和MAC地址,并记录到MAC地址转发表中。
在本实施例中,在对交换芯片22上的各个端口下挂的设备的MAC地址进行学习的过程中,还包括根据MAC地址转发表中记录的MAC地址和端口VLAN标识生成唯一的端口识别信息,优选的,在生成端口识别信息时,根据预设的计算规则进行计算生成端口识别信息,该预设的计算规则可以是哈希运算算法,只要能实现计算出来的结果具有唯一性的计算规则均可以。
在本实施例中,对于生成唯一的端口识别信息这一计算过程可以在处理器21上进行,在处理器21在学习到设备的MAC地址后,可以直接在学习到的MAC地址的基础上,再获取各个端口的VLAN标识,利用这两个信息根据预设的计算规则计算端口识别信息,并对应地添加到MAC地址转发表中。
在本实施例中,对于生成唯一的端口识别信息这一计算过程还可以在端口处理单元221上进行,在处理器21在学习到设备的MAC地址后,处理器21将学习得到的MAC地址转发表共享给交换芯22的各个端口,各个端上的端口处理单元221,在接收到MAC地址转发表后,端口处理单元221利用MAC地址转发表中记录的MAC地址以及各个端口对 应的VLAN标识,根据预设的计算规则计算得出每个端口的唯一的端口识别信息,并对应的添加到MAC地址转发表中。
在本实施例中,所述处理器21还设置为获取所述各个端口下挂的设备上报的报文以及对应的端口号,从所述报文中解析出对应的设备的介质访问控制地址以及对应端口的虚拟局域网标识,将所述介质访问控制地址、虚拟局域网标识和端口号对应的记录到介质访问控制地址转发表。进一步的,处理器21通过上述的学习得到包含有MAC地址、端口号、VLAN标识和端口识别信息的MA地址转发表后,共享给各个端口,各个端口在进行报文转发时,首先通过接收端口下挂的设备上报的报文,并对报文进行解析,从中解析出目的MAC地址,以及获取该端口对应的VLAN标识,这里的VLAN标识是在端口接收报文时,交换芯片22根据当前端口的VLAN标识添加到报文中的,在解析得到目的MAC地址和VLAN标识后,根据预设的计算规则对目的MAC地址和VLAN标识进行计算,得到一个端口识别信息,然后根据该端口识别信息到MAC地址转发表中查询端口识别信息,优选的,该查询是通过将端口识别信息与端口识别信息进行对比,对比是否相同,若相同,则获取对应的端口号。
在本实施例中,当预设的计算规则为哈希运算算法时,则生成的唯一的端口识别信息以及端口识别信息均为hash值,找查询MAC地址转发表时,在对应的VLAN表项中进行hash值的对比,若有相同的,则获取对应的端口号,并根据端口号进行报文的转发。
通过对本实施例提供的通信网络设备的实施,通过处理器的自主学习,使得交换芯片中的各个端口之间的设备MAC地址条目的相互共享更新,实现了交换芯片上的不同端口在转发报文时可以获得内部互通,能够查询到目的MAC地址对应的端口号,实现对报文的单播转发,避免了在交换芯片内部报文广播洪泛问题。
第三实施例:
现结合具体应用场景对本公开做进一步的诠释说明。
本实施例所要解决的技术问题是,通过处理器21对各个端口设备MAC地址的统一学习,并将学习得到的MAC地址转发表共享给各个端口,从而实现各个端口MAC地址条目共享,避免了在转发报文时,由于找不到其他端口的端口号而进行报文广播查询的问题。本实施例提供的通信网络设备可以是路由器,也可以是网络交换机,下面以网络交换机为例对本公开进行详细说明。
假设交换芯片22中的每个端口对应网络交换机对外的每个eth端口,如图3所示,交换芯片22的端口下挂两台PC设备,其中,eth2端口下挂PC1,eth3端口下挂PC2,网络交换机对交换芯片22中的各个端口进行如表1的设置,如表1所示:
表1交换芯片上每个端口对应的PVID
Name eth0 eth1 eth2 eth3 eth4 cpu
switch-port 4 3 2 1 0 6
PVID 5 4 3 2 1  
上表中“Name”表示的是交换芯片的端口名称,“switch-port”表示的是端口在交换芯片中的端口号,“PVID”表示的是端口的VLAN标识。
在本实施例中,在网络交换机对各个端口设置完成后,当端口上的设备第一次上报报文,从交换芯片22到达处理器21时,处理器21会根据上报的报文对MAC地址进行更新学习,学习方法包括:
处理器21记录当前交换芯片22端口进来报文的端口号和发送该报文的设备MAC地址,将这两个参数添加到MAC地址转发表中,并且还在该MAC地址转发表中记录交换芯片的其他端口对应的VLAN标识,然后根据MAC地址转发表中记录的MAC地址和VLAN标识生成相应的hash值,端口处理单元221根据该hash值在交换芯片22的端口上可以查找到该MAC对应的该端口号。
对于对交换芯片22的每个端口的设备MAC地址进行学习互相更新,是通过从交换芯片22上获取各个端口的设备上报的报文,然后再从获取的报文中解析源MAC地址,该源MAC地址指的是发送该报文的设备的MAC地址,并将该地址记录到MAC地址转发表中。比如,在交换芯片22的port3口收到MAC地址为44:37:e6:29:cd:25的设备发送的报文,交换芯片22的其他端口学习到MAC地址条目如下:
Figure PCTCN2017085877-appb-000001
首先,处理器21从交换芯片22上获取port3口收到的报文,并从报文中解析出MAC地址:44:37:e6:29:cd:25,查表1得知port3口对应的VLAN=4,然后将该MAC地址:44:37:e6:29:cd:25记录到MAC地址转发表中VLAN=4的表项中,并且也将port3口对应的端口号也记录到VLAN=4的表项中与MAC地址对应,同时处理器21也将获取到的MAC地址:44:37:e6:29:cd:25以及端口号记录到其他端口的VLAN标识的表项中,最后根据MAC地址转发表中记录的MAC地址和VLAN标识分别计算hash值,并记录到对应的VLAN标识表项中。其中hash=16a条目为采用本公开之前原有端口学习到的MAC地址条目。
对于对交换芯片22与处理器21连接端口的MAC地址的学习更新,在实际应用中,处理器21与交换芯片22之间的端口连接是固定的设置,也即是说其MAC地址是不变的,其学习过程如下:
Figure PCTCN2017085877-appb-000002
Figure PCTCN2017085877-appb-000003
其中hash=1e0和hash=1f0条目为采用本公开之前原有端口学习到的MAC地址条目,0019c650a645为br0设备接口MAC地址。
处理器21通过上述的学习,得到MAC地址转发表,该表格在交换芯片22中的MAC地址条目如下表2所示:
表2
Figure PCTCN2017085877-appb-000004
在本实施例中,如图3所示,当PC1(18:a9:05:e3:33:d6)有报文需要向PC2(44:37:e6:29:cd:25)发送,这时,交换芯片22通过端口eth2收到PC1上报的报文,该端口eth2上的端口处理单元221在接收到的报文中根据802.1Q协议添加头部VLAN标识,VLAN=3,端口处理单元221需要进行报文转发时,首先从报文中解析出目的MAC地址以及VLAN标识,然后根据VLAN标识在MAC地址转发表中查找到VLAN=3的表项,再在VLAN=3的表项中查找目的MAC地址是44:37:e6:29:cd:25的端口,并获取对应的端口号,此时,在MAC地址转发表中可以找到目的MAC地址及对应交换芯片22端口号,最后根据找到的端口号将报文在交换芯片22内部进行单播转发。
可选的,在本实施例中,当端口处理单元221需要进行报文转发时,从报文中解析出目的MAC地址以及VLAN标识之后,还可以根据目的MAC地址以及VLAN标识计算出一个端口识别信息,具体为hash值,然后根据VLAN标识在MAC地址转发表中查找到VLAN=3 的表项,再在VLAN=3的表项中查找与该端口识别信息一致的端口识别信息,并获取对应的端口号,最后根据找到的端口号将报文在交换芯片22内部进行单播转发。
同理,在本实施例中,通信网络设备为路由器时,其交换芯片的各个端口转发报文的控制方式与上述网络交换机的一样,这里就不再赘述了。
综上可知,通过对本公开的提供的通信网络设备的报文转发控制方法及通信网络设备的实施,在进行报文转发之前,通过处理器对交换芯片的各个端口下挂的设备的MAC地址进行学习,通过学习将各个端口下挂的设备的MAC地址和端口号记录到同一个MAC地址转发表中,然后将该MAC地址转发表共享给各个端口,端口处理单元在进行报文转发时,通过提取目的MAC地址以及端口的VLAN标识即可查询到与目的MAC地址对应的端口号,根据端口号进行报文的单播转发,从而实现了各个端口的设备的MAC地址的相互更新学习,有效地避免了由于找不到目的MAC地址而在交换芯片内部出现报文广播洪泛的现象,提高了设备数据转发的性能。
显然,本领域的技术人员应该明白,上述本公开的实施例的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在计算机存储介质(ROM/RAM、磁碟、光盘)中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。所以,本公开不限制于任何特定的硬件和软件结合。
以上内容是结合具体的实施方式对本公开实施例所作的进一步详细说明,不能认定本公开的具体实施只局限于这些说明。对于本公开所属技术领域的普通技术人员来说,在不脱离本公开构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本公开的保护范围。

Claims (11)

  1. 一种通信网络设备的报文转发控制方法,包括:
    中央处理单元预先对各个端口下挂的设备的介质访问控制地址进行学习,获得介质访问控制地址转发表,所述介质访问控制地址转发表包括:所述介质访问控制地址、端口号和虚拟局域网标识;并将所述介质访问控制地址转发表发送至各个端口处理单元;
    端口处理单元接收设备上报的报文,从所述报文中解析出目的介质访问控制地址;根据所述目的介质访问控制地址以及端口的虚拟局域网标识从所述介质访问控制地址转发表中查询到与所述目的介质访问控制地址对应的端口号;根据所述端口号转发所述报文。
  2. 根据权利要求1所述的通信网络设备的报文转发控制方法,其中,所述中央处理单元预先对各个端口下挂的设备的介质访问控制地址进行学习还包括:
    所述中央处理单元利用所述介质访问控制地址转发表中的介质访问控制地址和虚拟局域网标识,根据预设的计算规则生成唯一的端口识别信息,将所述端口识别信息对应的记录到介质访问控制地址转发表中与所述虚拟局域网标识对应的表项中;
    所述端口处理单元从所述介质访问控制地址转发表中查询端口号包括:端口处理单元获取所述报文中的目的介质访问控制地址和虚拟局域网标识,根据所述预设的计算规则生成一个端口识别信息,根据所述端口识别信息查询介质访问控制地址转发表,获得与所述目的介质访问控制地址对应的端口号。
  3. 根据权利要求1所述的通信网络设备的报文转发控制方法,其中,在所述各个端口处理单元从所述中央处理单元中获取所述介质访问控制地址转发表之后,还包括:
    各个端口处理单元利用所述介质访问控制地址转发表中的介质访问控制地址和虚拟局域网标识,根据预设的计算规则生成唯一的端口识别信息,将所述端口识别信息对应的记录到介质访问控制地址转发表中与所述虚拟局域网标识对应的表项中;
    所述端口处理单元从所述介质访问控制地址转发表中查询端口号包括:端口处理单元从所述报文中获取目的介质访问控制地址和虚拟局域网标识,根据所述预设的计算规则生成一个端口识别信息,根据所述端口识别信息查询介质访问控制地址转发表,获得与所述目的介质访问控制地址对应的端口号。
  4. 根据权利要求2或3所述的通信网络设备的报文转发控制方法,其中,所述预设的计算规则为哈希运算算法。
  5. 根据权利要求1至3任一项所述的通信网络设备的报文转发控制方法,其中,所述中央处理单元预先对各个端口下挂的设备的介质访问控制地址进行学习,获得介质访问控制地址转发表包括:
    获取所述各个端口下挂的设备上报的报文以及对应的端口号;
    从所述报文中解析出对应的设备的介质访问控制地址以及对应的端口的虚拟局域网标识;
    将所述介质访问控制地址、虚拟局域网标识和端口号对应的记录到所述介质访问控制 地址转发表。
  6. 一种通信网络设备,包括:处理器和交换芯片,所述交换芯片包括至少两个端口处理单元和存储器;所述处理器设置为预先对各个端口下挂的设备的介质访问控制地址进行学习,获得介质访问控制地址转发表,所述介质访问控制地址转发表包括:所述介质访问控制地址、端口号和虚拟局域网标识;所述存储器设置为存储所述处理器预先学习得到的所述介质访问控制地址转发表;
    至少一个端口处理单元设置为从所述存储器中获取所述介质访问控制地址转发表;以及,接收设备上报的报文,从所述报文中解析出目的介质访问控制地址,根据所述目的介质访问控制地址以及端口的虚拟局域网标识从所述介质访问控制地址转发表中查询到与所述目的介质访问控制地址对应的端口号,根据所述端口号转发所述报文。
  7. 根据权利要求6所述的通信网络设备,其中,所述处理器还设置为利用所述介质访问控制地址转发表中的介质访问控制地址和虚拟局域网标识,根据预设的计算规则生成唯一的端口识别信息,将所述端口识别信息对应的记录到介质访问控制地址转发表中与所述虚拟局域网标识对应的表项中;
    所述端口处理单元还设置为获取所述报文中的目的介质访问控制地址和虚拟局域网标识,根据所述预设的计算规则生成一个端口识别信息,根据所述端口识别信息查询介质访问控制地址转发表,获得与所述目的介质访问控制地址对应的端口号。
  8. 根据权利要求6所述的通信网络设备,其中,所述端口处理单元还设置为利用所述介质访问控制地址转发表中的介质访问控制地址和虚拟局域网标识,根据预设的计算规则生成唯一的端口识别信息,将所述端口识别信息对应的记录到介质访问控制地址转发表中与所述虚拟局域网标识对应的表项中;以及
    获取所述报文中的目的介质访问控制地址和虚拟局域网标识,根据所述预设的计算规则生成一个端口识别信息,根据所述端口识别信息查询介质访问控制地址转发表,获得与所述目的介质访问控制地址对应的端口号。
  9. 根据权利要求7或8所述的通信网络设备,其中,所述预设的计算规则为哈希运算算法。
  10. 根据权利要求6至8任一项所述的通信网络设备,其中,所述处理器还设置为获取所述各个端口下挂的设备上报的报文以及对应的端口号,从所述报文中解析出对应的设备的介质访问控制地址以及对应端口的虚拟局域网标识,将所述介质访问控制地址、虚拟局域网标识和端口号对应的记录到介质访问控制地址转发表。
  11. 一种计算机存储介质,所述计算机存储介质存储有执行指令,所述执行指令用于执行权利要求1至6中任一项所述的方法。
PCT/CN2017/085877 2016-06-02 2017-05-25 通信网络设备的报文转发控制方法及通信网络设备 WO2017206787A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610388128.9A CN107465617A (zh) 2016-06-02 2016-06-02 通信网络设备的报文转发控制方法及通信网络设备
CN201610388128.9 2016-06-02

Publications (1)

Publication Number Publication Date
WO2017206787A1 true WO2017206787A1 (zh) 2017-12-07

Family

ID=60478541

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/085877 WO2017206787A1 (zh) 2016-06-02 2017-05-25 通信网络设备的报文转发控制方法及通信网络设备

Country Status (2)

Country Link
CN (1) CN107465617A (zh)
WO (1) WO2017206787A1 (zh)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110808854A (zh) * 2019-10-24 2020-02-18 新华三信息安全技术有限公司 报文调度方法、装置及交换机
CN111835859A (zh) * 2020-07-20 2020-10-27 安徽华速达电子科技有限公司 跨网段操作局域网设备控制器的方法及智能光网络设备
CN113014516A (zh) * 2019-12-20 2021-06-22 华为技术有限公司 一种数据流发送的方法及装置
CN113271266A (zh) * 2021-04-21 2021-08-17 锐捷网络股份有限公司 异构交换芯片的报文转发方法及设备
CN113630342A (zh) * 2021-06-25 2021-11-09 济南浪潮数据技术有限公司 一种虚拟交换机的转发表管理方法、系统及装置
CN114448740A (zh) * 2022-01-14 2022-05-06 绿盟科技集团股份有限公司 一种组播方法、装置、介质、产品和设备
CN114666269A (zh) * 2022-04-11 2022-06-24 浪潮思科网络科技有限公司 一种基于ip子网的vlan的报文转发方法、装置、设备及介质

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108696431B (zh) * 2018-06-27 2021-09-17 深圳市普威技术有限公司 局域网端口配置方法及装置、交换芯片和路由交换设备
CN109728992B (zh) * 2018-11-27 2021-09-28 苏州盛科通信股份有限公司 分配转发域的方法、装置、存储介质及电子装置
CN110768916B (zh) * 2019-10-22 2021-11-02 新华三信息安全技术有限公司 一种端口统计参数通告方法以及设备
CN112866115B (zh) * 2020-12-31 2023-04-07 杭州迪普科技股份有限公司 一种实现透明串接的方法、装置、电子设备及存储介质
CN114390008B (zh) * 2021-11-22 2024-04-02 裕太微电子股份有限公司 一种以太网二层转发表的学习方法及系统

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101094187A (zh) * 2007-07-30 2007-12-26 杭州华三通信技术有限公司 一种学习介质访问控制地址的方法和装置、业务板
US7747954B2 (en) * 2006-03-23 2010-06-29 Alcatel Lucent Method and system for virtual private network connectivity verification
CN101820392A (zh) * 2010-03-26 2010-09-01 中兴通讯股份有限公司 一种实现多业务转发的方法和网络处理器

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7747954B2 (en) * 2006-03-23 2010-06-29 Alcatel Lucent Method and system for virtual private network connectivity verification
CN101094187A (zh) * 2007-07-30 2007-12-26 杭州华三通信技术有限公司 一种学习介质访问控制地址的方法和装置、业务板
CN101820392A (zh) * 2010-03-26 2010-09-01 中兴通讯股份有限公司 一种实现多业务转发的方法和网络处理器

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110808854A (zh) * 2019-10-24 2020-02-18 新华三信息安全技术有限公司 报文调度方法、装置及交换机
CN110808854B (zh) * 2019-10-24 2022-05-06 新华三信息安全技术有限公司 报文调度方法、装置及交换机
CN113014516A (zh) * 2019-12-20 2021-06-22 华为技术有限公司 一种数据流发送的方法及装置
CN111835859A (zh) * 2020-07-20 2020-10-27 安徽华速达电子科技有限公司 跨网段操作局域网设备控制器的方法及智能光网络设备
CN113271266A (zh) * 2021-04-21 2021-08-17 锐捷网络股份有限公司 异构交换芯片的报文转发方法及设备
CN113271266B (zh) * 2021-04-21 2024-03-22 锐捷网络股份有限公司 异构交换芯片的报文转发方法及设备
CN113630342A (zh) * 2021-06-25 2021-11-09 济南浪潮数据技术有限公司 一种虚拟交换机的转发表管理方法、系统及装置
CN113630342B (zh) * 2021-06-25 2023-08-15 济南浪潮数据技术有限公司 一种虚拟交换机的转发表管理方法、系统及装置
CN114448740A (zh) * 2022-01-14 2022-05-06 绿盟科技集团股份有限公司 一种组播方法、装置、介质、产品和设备
CN114448740B (zh) * 2022-01-14 2023-11-07 绿盟科技集团股份有限公司 一种组播方法、装置、介质、产品和设备
CN114666269A (zh) * 2022-04-11 2022-06-24 浪潮思科网络科技有限公司 一种基于ip子网的vlan的报文转发方法、装置、设备及介质
CN114666269B (zh) * 2022-04-11 2024-05-14 浪潮思科网络科技有限公司 一种基于ip子网的vlan的报文转发方法、装置、设备及介质

Also Published As

Publication number Publication date
CN107465617A (zh) 2017-12-12

Similar Documents

Publication Publication Date Title
WO2017206787A1 (zh) 通信网络设备的报文转发控制方法及通信网络设备
US20220191064A1 (en) Method for sending virtual extensible local area network packet, computer device, and computer readable medium
US10193707B2 (en) Packet transmission method and apparatus
WO2018028606A1 (zh) 转发策略配置
US9397942B2 (en) Packet forwarding
US10063470B2 (en) Data center network system based on software-defined network and packet forwarding method, address resolution method, routing controller thereof
US9281955B2 (en) Interoperability of data plane based overlays and control plane based overlays in a network environment
US11374857B2 (en) Network device management method and apparatus, and system for indicating a network device to perform management operation
JP6490205B2 (ja) フローエントリ構成の方法、装置及びシステム
US8879549B2 (en) Clearing forwarding entries dynamically and ensuring consistency of tables across ethernet fabric switch
US8693478B2 (en) Multiple shortest-path tree protocol
US10608866B2 (en) Forwarding Ethernet packets
WO2017181757A1 (zh) 报文转发方法及装置
US20140362854A1 (en) Ingress switch multicast distribution in a fabric switch
US20130003747A1 (en) Efficient trill forwarding
WO2016101646A1 (zh) 以太虚拟网络的接入方法及装置
US11290497B2 (en) Access-control list generation for security policies
EP3021533B1 (en) Switching device, controller, and method and system for switching device configuration and packet processing
WO2018001020A1 (zh) 一种基于聚合链路的报文转发方法和装置
US11522792B2 (en) Method for discovering forwarding path and related device thereof
WO2016138845A1 (zh) 一种实现协议报文上送cpu的方法和装置
WO2014067328A1 (zh) 二层转发方法及转发设备
US20150244544A1 (en) Connecting a pvlan switch to a non-pvlan device
WO2017036384A1 (zh) 运营商边缘设备及数据转发方法
US10541914B2 (en) Data packet forwarding method and network device

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

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

Ref document number: 17805732

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17805732

Country of ref document: EP

Kind code of ref document: A1