VLAN operating with MAC addresses
Abstract
A method of forwarding by means of a bridge, comprising: obtaining an incoming virtual local area network (VLAN) identifier (VLAN) and a destination access control address (MAC) of a frame upon receiving the frame from an input port; characterized in that the method further comprises: determining an output port and an output VLAN ID other than the input VLAN ID, depending on the input port, the input VLAN ID and the destination MAC address Of the plot; and transmitting the frame according to the output port and the output VLAN ID, where said determination step comprises determining the Virtual Switching Instance (VSI) corresponding to the combination of the input port and the input VLAN ID; obtaining the output port and the output VLAN ID corresponding to the destination MAC address by searching the MAC address forwarding table corresponding to the VSI; and where said transmission step comprises adding the output VLAN ID to the frame , or replace in the frame the input VLAN ID with the output VLAN ID; and transmit the frame to the output port.

Term
0.1 yearsto projected expiry
Projected expiry 19 October 2026, counted from filing; an application has no term until it is granted.
- Priority
- Filed
- Published
- Today
- Projected expiry
23 claims: 3 independent, 20 dependent
- 1REIVINDICACIONES 1. Un método de reenvío mediante un bridge, que comprende:obtener un identificador (ID) de red de área local virtual (VLAN) de entrada y una dirección de control de acceso al medio (MAC) de destino de una trama al recibir la trama desde un puerto de entrada;caracterizado por que el método comprende, además: determinar un puerto de salida y un VLAN ID de salida distinto del VLAN ID de entrada, en función del puerto de entrada, el VLAN ID de entrada y la dirección MAC de destino de la trama;y transmitir la trama de acuerdo con el puerto de salida y el VLAN ID de salida, donde dicho paso de determinación comprende determinar la Instancia de Conmutación Virtual (VSI) correspondiente a la combinación del puerto de entrada y el VLAN ID de entrada;obtener el puerto de salida y el VLAN ID de salida correspondiente a la dirección MAC de destino mediante la búsqueda en la tabla de reenvío de direcciones MAC correspondiente a la VSI;y donde dicho paso de transmisión comprende añadir a la trama el VLAN ID de salida, o reemplazar en la trama el VLAN ID de entrada con el VLAN ID de salida;y transmitir la trama al puerto de salida.
- 2El método de la Reivindicación 1, que comprende, además:establecer una relación de correspondencia entre una o más combinaciones de puerto de entrada y VLAN ID de entrada con una Instancia de Conmutación Virtual (VSI).
- 3El método de la Reivindicación 1, donde dicha obtención del VLAN ID de entrada de la trama comprende:si se detecta que la trama incluye el VLAN ID, obtener el VLAN ID de la trama;si se detecta que la trama no incluye el VLAN ID, obtener un VLAN ID por defecto aplicable al puerto de entrada, y añadir a la trama el VLAN ID.
- 4El método de la Reivindicación 1, donde dicha tabla de reenvío de direcciones MAC se establece mediante autoaprendizaje; y el establecimiento de la tabla de reenvío de direcciones MAC comprende:registrar en la tabla de reenvío de direcciones MAC correspondiente a la VSI una dirección MAC de origen, el puerto de entrada y el VLAN ID de entrada.
- 5El método de la Reivindicación 1, donde dicha búsqueda en la tabla de reenvío de direcciones MAC correspondiente a la VSI comprende:buscar en la tabla de reenvío de direcciones MAC correspondiente a la VSI utilizando como clave la dirección MAC de destino;o buscar en la tabla de reenvío de direcciones MAC correspondiente a la VSI utilizando como clave la dirección MAC de destino y el VLAN ID de entrada.
- 6El método de la Reivindicación 1, donde dicha obtención del puerto de salida y el VLAN ID de salida mediante la búsqueda en la tabla de reenvío de direcciones MAC comprende:si el resultado de la búsqueda en la tabla de reenvío de direcciones MAC es un ID de multidifusión (MID), buscar en una tabla de multidifusión utilizando como clave el MID para obtener un conjunto de N combinaciones del puerto de salida y el VLAN ID de salida, donde N es un entero positivo;dicha transmisión de la trama comprende: hacer N copias de la trama;añadir en las N copias de la trama el VLAN ID de salida correspondiente, respectivamente, o sustituir en las N copias de la trama el VLAN ID de entrada por el VLAN ID de salida correspondiente, respectivamente;y transmitir las N copias de la trama, respectivamente, a los puertos de salida correspondientes.
- 7El método de la Reivindicación 1, donde dicha obtención del puerto de salida y el VLAN ID de salida mediante la búsqueda en la tabla de reenvío de direcciones MAC comprende:si en la tabla de reenvío de direcciones MAC no se encuentra ningún puerto de salida ni VLAN ID de salida correspondientes, se consideran las M combinaciones de los puertos de salida y los VLAN ID de salida correspondientes a la VSI como los puerto de salida y VLAN ID encontrados, donde M es un entero positivo;dicha transmisión de la trama comprende: hacer M copias de la trama;añadir en las M copias de la trama el VLAN ID de salida correspondiente, respectivamente, o sustituir en las M copias de la trama el VLAN ID de entrada por el VLAN ID de salida correspondiente, respectivamente;y transmitir las M copias de la trama a los puertos de salida correspondientes.
- 8El método de la Reivindicación 5, 6 ó 7, que comprende, además:antes de reenviar la trama al puerto de salida, descartar al trama si se detecta que el puerto de salida es el mismo que el puerto de entrada y que el VLAN ID de salida es el mismo que el VLAN ID de entrada.
- 9El método de la Reivindicación 6, 7 u 8, que comprende, además:establecer una relación entre el VLAN ID de entrada obtenido de la trama con un valor de Etiqueta o un �?ndice de Etiqueta;y registrar en la tabla de reenvío de direcciones MAC correspondiente a la VSI el valor de Etiqueta o el índice de Etiqueta correspondiente al VLAN ID de entrada;dicha obtención del VLAN ID de salida mediante la búsqueda en la tabla de reenvío de direcciones MAC comprende, además: buscar en la tabla de reenvío de direcciones MAC para obtener el valor de Etiqueta o el índice de Etiqueta;y obtener el VLAN ID de entrada en función del Valor de Etiqueta o el índice de Etiqueta.
- 10El método de la Reivindicación 1, que comprende, además:establecer una relación entre una o más combinaciones de puerto de entrada, VLAN ID de la capa interna y VLAN ID de la capa externa con una VSI;dicha obtención del VLAN ID de entrada de la trama comprende, además: obtener el VLAN ID de la capa interna de entrada y el VLAN ID de la capa externa de entrada de la trama;dicha obtención del puerto de salida y el VLAN ID de salida en función del puerto de entrada, el VLAN ID de entrada y la dirección MAC de destino comprende, además: determinar la VSI correspondiente a la combinación de puerto de entrada, VLAN ID de la capa interna de entrada y VLAN ID de la capa externa de entrada;obtener el puerto de salida, el VLAN ID de la capa interna de salida y el VLAN ID de la capa externa de salida correspondientes a la dirección MAC de destino mediante la búsqueda en la tabla de reenvío de direcciones MAC correspondiente a la VSI.
- 11El método de la Reivindicación 10, donde dicha tabla de reenvío de direcciones MAC se establece mediante autoaprendizaje; dicho establecimiento de la tabla de reenvío de direcciones MAC comprende:registrar en la tabla de reenvío de direcciones MAC correspondiente a la VSI una dirección MAC de origen, el puerto de entrada, el VLAN ID de la capa interna de entrada y el VLAN ID de la capa externa de entrada.
- 12El método de la Reivindicación 10, donde dicha búsqueda en la tabla de reenvío de direcciones MAC correspondiente a la VSI comprende:11 buscar en la tabla de reenvío de direcciones MAC correspondiente a la VSI utilizando como clave la dirección MAC de destino;o buscar en la tabla de reenvío de direcciones MAC correspondiente a la VSI utilizando como clave la dirección MAC de destino, el VLAN ID de la capa interna de entrada y el VLAN ID de la capa externa de entrada.
- 13El método de la Reivindicación 10, donde dicha obtención del puerto de salida y el VLAN ID de salida mediante la búsqueda en la tabla de reenvío de direcciones MAC comprende:obtener mediante búsqueda en la tabla de reenvío de direcciones MAC únicamente el puerto de salida, VLAN ID de la capa interna de salida y VLAN ID de la capa externa de salida;dicha transmisión de la trama comprende: añadir en la trama el VLAN ID de la capa interna de salida y el VLAN ID de la capa externa de salida, o sustituir en la trama el VLAN ID de la capa interna de entrada y el VLAN ID de la capa externa de entrada por el VLAN ID de la capa interna de salida y el VLAN ID de la capa externa de salida, respectivamente;y transmitir la trama al puerto de salida.
- 14El método de la Reivindicación 10, donde dicha obtención del puerto de salida y el VLAN ID de salida mediante la búsqueda en la tabla de reenvío de direcciones MAC comprende:si el resultado de la búsqueda en la tabla de reenvío de direcciones MAC es un MID, buscar en Multidifusión utilizando como clave el MID para obtener un conjunto de N combinaciones del puerto de salida, el VLAN ID de la capa interna de salida y el VLAN ID de la capa externa de salida, donde N es un entero positivo;dicha transmisión de la trama comprende: hacer N copias de la trama;añadir en las N copias de la trama los VLAN ID de la capa interna de salida y VLAN ID de la capa externa de salida correspondientes, respectivamente, o sustituir en las N copias de la trama, los VLAN ID de la capa interna de entrada y VLAN ID de la capa externa de entrada por los VLAN ID de la capa interna de salida y VLAN ID de la capa externa de salida correspondientes, respectivamente;y transmitir las N copias de la trama a los puertos de salida correspondientes.
- 15El método de la Reivindicación 10, donde dicha obtención del puerto de salida y VLAN ID de salida mediante la búsqueda en la tabla de reenvío de direcciones MAC comprende:si en la tabla de reenvío de direcciones MAC no se encuentra ningún puerto de salida ni VLAN ID de salida correspondientes, se consideran las M combinaciones del puerto de salida y el VLAN ID de la capa interna de salida y el VLAN ID de la capa externa de salida correspondientes a la VSI como los puerto de salida, VLAN ID de la capa interna de salida y VLAN ID de la capa externa de salida encontrados;dicha transmisión de la trama comprende: hacer M copias de la trama;añadir en las M copias de la trama el VLAN ID de la capa interna de salida y el VLAN ID de la capa externa de salida correspondientes, respectivamente, o sustituir en las M copias de la trama los VLAN ID de la capa interna de entrada y VLAN ID de la capa externa de entrada por los VLAN ID de la capa interna de salida y VLAN ID de la capa externa de salida correspondientes, respectivamente;y transmitir las M copias de la trama a los puertos de salida correspondientes.
- 16El método de la Reivindicación 13, 14 ó 15, que comprende, además:antes de transmitir la trama al puerto de salida, descartar la trama si se detecta que el puerto de salida, el VLAN ID de la capa interna de salida y el VLAN ID de la capa externa de salida son iguales que el puerto de entrada, el VLAN ID de la capa interna de entrada y el VLAN ID de la capa externa de entrada, respectivamente.
- 17El método de la Reivindicación 1, donde dicha VLAN es una o más VLAN sobre el mismo puerto Ethernet, una o más VLAN en diferentes puertos de la misma Ethernet, o una o más VLAN en diferentes puertos de más de una Ethernet.
- 18Un equipo de reenvío mediante un bridge, que comprende:al menos un puerto de entrada, para recibir una trama desde más de una VLAN;caracterizado por que el equipo comprende, además: una unidad de reenvío, para obtener un VLAN ID de entrada y una dirección MAC de destino de la trama recibida desde el puerto de entrada, determinar un puerto de salida y un VLAN ID de salida distinto del VLAN ID de entrada de acuerdo con el puerto de entrada, el VLAN ID de entrada y la dirección MAC de destino de la trama, y enviar la trama;al menos un puerto de salida, para transmitir la trama a más de una VLAN, donde la unidad de reenvío comprende: un módulo de almacenamiento, para almacenar la relación entre las combinaciones de puerto de entrada, identificador VLAN de entrada e Instancias de Conmutación Virtual (VSI), así como las tablas de reenvío de direcciones MAC correspondientes a las VSI, donde al menos una combinación de puerto de entrada y VLAN ID de entrada se corresponde con una VSI;un módulo de análisis de la entrada, para obtener el VLAN ID de entrada y la dirección MAC de destino de la trama, y producir como resultado el VLAN ID de entrada y la dirección MAC de destino;un primer módulo de reenvío, para determinar la VSI correspondiente a la combinación del puerto de entrada y el VLAN ID de entrada de acuerdo con la relación entre la combinación del puerto de entrada y el VLAN ID de entrada y la VSI, y obtener el puerto de salida y el VLAN ID de salida mediante la búsqueda en la tabla de reenvío de direcciones MAC correspondiente a la VSI;un segundo módulo de reenvío, para reenviar el mensaje de acuerdo con el puerto de salida y el VLAN ID de salida obtenidos del primer módulo de reenvío, donde, cuando el primer módulo de reenvío obtiene el puerto de salida y el VLAN ID de salida mediante la búsqueda en la tabla de reenvío de direcciones MAC, el segundo módulo de reenvío reenvía la trama después de añadir en la trama el VLAN ID de salida o sustituye en la trama el VLAN ID de entrada por el VLAN ID de salida.
- 19El equipo de la Reivindicación 18, donde dicha unidad de almacenamiento también almacena la relación entre los ID de multidifusión (MID) y combinaciones de puerto de salida y VLAN ID de salida;cuando se obtiene el MID después de la búsqueda en la tabla de reenvío de direcciones MAC, el primer módulo de reenvío busca en la tabla de multidifusión utilizando como clave el MID para obtener un conjunto de N combinaciones de puerto de salida y VLAN ID de salida, donde N es un entero positivo;dicho primer módulo de reenvío indica al segundo módulo de reenvío que haga N copias de la trama, y añade a las N tramas el VLAN de salida correspondiente, respectivamente, o sustituye en las N copias de la trama los VLAN ID de entrada por los VLAN ID de salida correspondientes, respectivamente, y reenvía las N tramas a los puertos de salida correspondientes.
- 20El equipo de la Reivindicación 18, donde si en la tabla de reenvío de direcciones MAC no se encuentra ningún puerto de salida ni VLAN ID de salida correspondientes, el primer módulo de reenvío toma la combinación de los M puertos de salida y M VLAN ID de salida correspondientes a la VSI como los puertos y VLAN ID de salida obtenidos, donde M es un entero positivo;dicho primer módulo de reenvío indica al segundo módulo de reenvío que haga M copias de la trama, añade en las M tramas el VLAN de salida correspondiente, respectivamente, o sustituye en las M copias de la trama los VLAN ID de entrada por los VLAN ID de salida correspondientes, respectivamente, y reenvía las M tramas a los puertos de salida correspondientes.
- 21El equipo de la Reivindicación 18, donde, antes del reenvío de la trama al puerto de salida, dicho segundo módulo de reenvío también se utiliza para detectar si el puerto de salida y el VLAN ID de salida son los mismos que el puerto de entrada y el VLAN ID de entrada, respectivamente, y descarta la trama en la que el puerto de salida y el VLAN ID de salida son los mismos que el puerto de entrada y el VLAN ID de entrada, respectivamente.
- 22El equipo de la Reivindicación 18, donde dicho primer módulo de reenvío también se utiliza para implementar el autoaprendizaje de MAC de origen, y registrar el puerto de entrada y el VLAN ID de entrada correspondientes a la VSI en la tabla de reenvío de direcciones MAC.
- 23El equipo de cualquiera de las Reivindicaciones 18 a 22, donde dicho VLAN ID de entrada comprende un VLAN ID de la capa interna de entrada y un VLAN ID de la capa externa de entrada;dicho VLAN ID de salida comprende un VLAN ID de la capa interna de salida y un VLAN ID de la capa externa de salida.
Independent claims23
132 paragraphs, as filed
VLAN operating with MAC addresses
Technology field
The present invention is related to the technical field of network switching. More particularly, the present invention relates to a method of forwarding by means of a bridge and a forwarding equipment by means of a bridge.
Background of the invention
There are currently two approaches to Ethernet frame forwarding: a Layer 2 Ethernet bridge and a Layer 3 IP route. The Layer 2 Ethernet bridge uses a method to search the Destination address forwarding table of the Media Access Control (MAC) using the MAC address to obtain the output information and forwarding the data packets according to the output information. The Layer 3 IP route uses a method to search the routing table using the destination IP to obtain the outbound information and forward the data packets according to the outbound information. The MAC address forwarding table is obtained by self-learning from the source MAC address (SMAC) or is configured statically by software.
Currently, as defined in the forwarding standard via the Ethernet bridge, a Virtual Switching Instance (VSI) corresponds to a Virtual Local Access Network (VLAN) in an access domain. Forwarding via a Layer 2 Ethernet bridge is a frame forwarding within a VLAN, and if you need to forward frames between different VLANs, the forwarding must be implemented through Layer 3 IP routing.
Fig. 1 is a flow chart illustrating forwarding by bridge within a VLAN in the prior art. As shown in Fig. 1, the MAC address forwarding table is searched using the destination MAC address and the VLAN Identifier (ID), the output information is obtained, and the frames are forwarded according to the information output The main bridge forwarding procedure includes the following steps:
Step 101: Receive the frame from the input port and obtain the VLAN ID of the frame.
Step 102: SMAC address self-learning is implemented, ie, the input port corresponding to the SMAC address is registered in the MAC address forwarding table corresponding to the VLAN ID.
Step 103: Search the MAC address forwarding table corresponding to the VLAN ID using the destination MAC address (DMAC) obtained from the frame.
Step 104: If the result of the search in step 103 is a unicast forward, continue in step 105; if the result of the search in step 103 is a multicast forward, continue in step 106; If no results are obtained in the search, continue with step 108.
Step 105: explore the MAC address forwarding table to get the output port and then continue in step 110.
Step 106: explore the MAC address forwarding table to obtain the Multicast ID (MID).
Step 107: Search the Multicast table using the MID to obtain a set of output ports and then continue to step 110.
Step 108: determine frame forwarding in broadcast mode.
Step 109: Obtain all the output ports corresponding to the VLAN where the input ports are located and continue in step 110.
Step 110: determine if the output port is the same as the input port, if so, continue in step 111; otherwise, continue in step 112.
Step 111: Discard frames to prevent forwarding loops.
Step 112: forward the frame to the exit port.
The input port and the output port mentioned above correspond to a VSI, and the relationship between the VLAN and the VSI is a one-to-one relationship.
Because in an access domain the relationship between the VLAN and the VSI is a one-to-one relationship and that between many VLANs and one VSI, the many-to-one relationship is not supported, Ethernet frames can only be supported.
forwarding within a VLAN using forwarding via a Layer 2 Ethernet bridge. If the frames need to be forwarded between VLANs, Layer 3 IP routing must be adopted. In addition, only Ethernet frames can be broadcast to a VLAN using the forwarding via a bridge, and broadcasting to multiple VLANs using forwarding via a bridge is not supported.
Document EP 1 206 077 A2 discloses a connected network switch configuration. From a specific point of view, when a data packet destined for a second network is received at a first network port of a first network, the data packet can be routed directly from the first network to the second network port. In addition, if the first network and the second network belong to different VLANs, a Layer 3 switching is necessary.
Summary of the Invention
The embodiments of the present invention provide a method of forwarding by means of a bridge and a forwarding equipment by means of a bridge to perform forwarding by means of a bridge of frames between different VLANs. The present invention is related to a forwarding method by means of a bridge comprising:
obtaining an identifier (ID) of an incoming virtual local area network (VLAN) and a destination access control address (MAC) of a frame after receiving the frame from an input port;
characterized in that the method further comprises: determine an output port and an output VLAN ID other than the input VLAN ID, based on the port of input, the VLAN input ID and the destination MAC address of the frame; and
transmit the frame based on the output port and the output VLAN ID, where said determination step comprises determine the VSI corresponding to the combination of the input port and the VLAN input ID; obtain the output port and the VLAN output ID corresponding to the destination MAC address using the
search in a MAC address forwarding table corresponding to the VSI; and where said transmission step comprises add the output VLAN ID in the frame, or replace the output VLAN ID with the input VLAN ID in the frame; and transmit the frame to the output port. The present invention is also related to a forwarding device by means of a bridge, comprising: at least one input port, to receive a frame from more than one VLAN; characterized in that the equipment also includes: a forwarding unit, to obtain an input VLAN ID and a destination MAC address of the received frame
from the input port, determine an output port and an output VLAN ID other than the input VLAN based on the input port, the input VLAN ID and the destination MAC address of the frame, and send the frame;
at least one output port, to transmit the frame to more than one VLAN, where the forwarding unit comprises: a storage module for storing the relationship between the input port combinations and
VLAN input and VSI identifier, as well as MAC address forwarding tables corresponding to VSIs,
where at least one combination of input port and VLAN input ID corresponds to a VSI; an input analysis module to obtain the input VLAN ID and the destination MAC address of the frame, and result in the input VLAN ID and the destination MAC address;
a first forwarding module to determine the VSI corresponding to the combination of the input port and the input VLAN ID according to the relationship between the combination of the input port and the input VLAN ID and the VSI, and obtain the port of outbound and outbound VLAN ID by searching the MAC address forwarding table corresponding to the VSI;
a second forwarding module to forward the message according to the outgoing port and the outgoing VLAN ID 3
obtained from the first forwarding module, where,
when the first forwarding module obtains the outgoing port and the outgoing VLAN ID by searching the MAC address forwarding table, the second forwarding module forwards the frame after adding the outgoing VLAN ID or the frame in the frame VLAN output ID replaces in the frame the input VLAN ID.
As can be seen in the technical scheme mentioned above, frame forwarding via a bridge between different VLANs is done by establishing the relationship between the pair {Port, VLAN} and the VSI and forwarding is implemented by means of a frame bridge between different pairs {Port, VLAN}, and the many-to-one relationship between multiple VLANs and a VSI is achieved, in addition to the one-to-one correspondence relationship. Broadcast frames can also be copied for all combinations of doubles {Port, VLAN} corresponding to the VSI, and broadcasting through a bridge to multiple VLANs is supported.
In addition, during the frame forwarding process, it is determined whether the input / output port is the same as the input / output VLAN ID, so, in order to prevent forwarding loops, a filtering can be implemented effectively. ports of origin In addition, the present invention supports forwarding via a bridge between multilayer VLAN ID.
Brief description of the drawings
Fig. 1 is a flow chart illustrating frame forwarding by a bridge in the prior art.
Fig. 2 is a flow chart illustrating the forwarding by a bridge between different VLANs in accordance with an embodiment of the present invention.
Fig. 3 is a flow chart illustrating the forwarding by bridge between different VLANs in accordance with another embodiment of the present invention.
Fig. 4 is a schematic diagram illustrating a forwarding equipment by a bridge according to an embodiment of the present invention.
Detailed description of the invention
The present invention will be described in more detail below with reference to the accompanying drawings to make clearer the technical solution and the advantages of the present invention.
The embodiments of the present invention extend the current forwarding method by a bridge within a VLAN to achieve frame forwarding by a bridge between different VLANs. In the solution of the present invention, a VSI corresponds to a number of doubles {port, VLAN ID}, ie, a number of doubles is assigned to a VSI. Each pair {port, VLAN ID} is considered as a virtual port, so frame forwarding is achieved through a bridge between virtual ports.
In all the pairs corresponding to the same VSI, the relationship can be between one port and one or more VLANs, or multiple ports and one or more VLANs. The VLAN can be one or more VLANs of the same Ethernet port, one or more VLANs of different ports of the same Ethernet access network, or one or more VLANs of different ports of multiple Ethernet access networks.
Embodiment 1:
Fig. 2 is a flow chart illustrating the forwarding by a bridge between different VLANs. As shown in Fig. 2, in this embodiment, the method of forwarding by means of a bridge between different VLANs includes, mainly, the steps:
Step 201: receive the frame from the port of entry.
Step 202: Obtain the VLAN frame input ID. Specifically, decide whether the frame includes the VLAN ID, if it does, obtain the VLAN ID of the frame; otherwise, obtain the default VLAN ID applicable to the input port, and add the VLAN ID in the frame.
Step 203: Search the equivalence table using the pair {input port, VLAN input ID} to determine the corresponding VSI. Here, the VSI is represented by the VSI ID, and the search result is the corresponding VSI ID. For the purpose of simplifying the description, a pair {input port, VLAN input ID} is defined as a virtual input port.
The equivalence table is defined to establish the relationship between a set of multiple virtual ports and a VSI; the format of the elements in the equivalence table is {port, VLAN ID, VSI ID}; the search key in the equivalence table is {port, VLAN ID}; and the search result is the VSI ID corresponding to the port
virtual.
Step 204: SMAC address self-learning is implemented, ie, the input port and the input VLAN corresponding to the SMAC address are registered in the MAC address forwarding table corresponding to the VSI.
Step 205: obtain the DMAC of the frame, and look in the MAC address forwarding table corresponding to the VSI using the DMAC address as the key, or obtain the DMAC address and the VLAN ID of the frame, and search the MAC address forwarding table corresponding to the VSI using the DMAC address and the VLAN ID as keys.
In the case where the MAC address forwarding table does not differentiate between the VSIs, ie, only one MAC address forwarding table is configured, the unified MAC address table is searched using the VSI ID and DMAC address as keys , or the unified MAC address table is searched using the VSI ID, the DMAC address and the input VLAN ID as keys.
Step 206: If the result of the search in step 205 is a unicast forward, continue in step 207; If the search result is a multicast forward, continue in step 209; If no results are obtained in the search, continue to step 213.
To represent the unicast forwarding mode or the multicast forwarding mode, an indicator bit is used in the MAC address forwarding table element, so, according to said value of the indicator bit, it can be determined whether the frame is forwarded with unicast or multicast mode.
Step 207: Search the MAC address forwarding table to get the pair {outbound port, outbound VLAN ID}. For the purpose of simplifying the description, the pair {output port, VLAN output ID} is defined as the virtual output port.
Step 208: Replace in the frame the input VLAN ID with the output VLAN ID and continue in step 217.
Step 209: Search the MAC address forwarding table to get the output MID.
Step 210: Search the multicast table using the MID as a key to obtain a set of virtual output ports, ie, {output port i, output VLAN ID i}, where, i = 1 ... n, is a correlative number of the virtual output ports, and n is the total number of virtual output ports obtained after the search in the multicast table.
The multicast table is set on the switch using the multicast protocol or any other approximation, and the key to the search in the multicast table is the MID. The search result is a set of all pairs {output port, VLAN output ID} corresponding to the MID.
Step 211: make n copies of the received frame, where n is a positive integer.
Step 212: replace in the frame the VLAN ID input with the VLAN ID i output, continue in step 217.
Step 213: If nothing is found in the MAC address forwarding table, determine the frame forwarding in broadcast mode.
Step 214: obtain all the virtual output ports corresponding to the VSI, ie, {output j port, VLAN output j ID} where, j = 1 ... m, is a correlative number of the virtual output ports, and m is the total number of virtual output ports in broadcast mode.
All the virtual output ports corresponding to the VSIs are obtained by searching the broadcast table, and the broadcast table is also set on the switch using the multicast protocol or any other approximation. The key to the search in the multicast table is the VSI ID, and the result of the search is a set of all the pairs {output port, VLAN output ID} corresponding to the VSI ID.
Step 215: make m copies of the received frame.
Step 216: replace in the frame the VLAN ID input with the VLAN ID j output, continue in step 217.
Step 217: determine if the virtual output port is exactly the same as the virtual input port, ie, determine if the output port is the same as the input port and the output VLAN ID is the same as the VLAN ID input If the output port is the same as the input port and the output VLAN ID is the same as the input VLAN ID, continue in step 218; if the output port is the same as the input port but the output VLAN ID is different than the input VLAN ID, or if the output port is different from the input port and the output VLAN ID is the same as The VLAN ID entry, continue in step 219.
Step 218: Discard the plot.
Step 219: forward the frame to the exit port.
The official standard of the Virtual LAN Bridge, IEEE 802.1 Q, states that multiple logical VLAN subnets can be separated into a physical bridge, and each VLAN corresponds to a logical forwarding table. In practice, a MAC address forwarding table is generally divided into multiple logical forwarding tables based on the VLAN ID. Four bytes are added to the Ethernet frame structure, and these four bytes are generally referred to as the Virtual Local Access Network Tag (VLAN Tag). In these four bytes, 12 bits are used to indicate the VLAN ID.
The IEEE 802.1ad standard adds Q-in-Q and VLAN translation based on the IEEE 802.1Q. The Q-in-Q refers to adding an additional layer of VLAN Tag to the IEEE 802.1Q frame in an Ethernet switch. The previous Label of the frame is known as CE-VLAN, and the new Label added by the operators in the PE is called P-VLAN. The use of two layers of VLAN allows the CE-VLAN used by the users and the P-VLAN used by the operators to be independent of each other. VLAN Translation refers to the translation of one VLAN ID to another in a bridge port.
In Steps 208, 212 and 216 mentioned above, the output VLAN ID replaces the VLAN ID in the frame. If the Q-in-Q service defined by the IEEE 802.1ad protocol is adopted, the previous VLAN ID is reserved and a layer of a new output VLAN ID is added, ie, 4 more bytes are added, and of those 4 bytes 12 bits are used to indicate the output VLAN ID.
In this embodiment, the restriction process of the source port can be performed after obtaining the virtual output port and before replacing the VLAN ID. For example, in the case of unicast forwarding, after obtaining the virtual port in Step 207, it is determined whether the virtual output port is exactly the same as the virtual input port; if they are exactly the same, the plot is discarded and the current flow is terminated; if they are not exactly the same, the output VLAN ID replaces the VLAN ID in the frame, as indicated in Step 208.
As indicated in Step 204, the MAC address forwarding table is set by self-learning. A MAC address forwarding table can be established in the switch, and the contents learned in the connection with multiple VSIs are recorded in said MAC address forwarding table. In the MAC address forwarding table, different VSIs can be distinguished using the VSI ID. Alternatively, multiple MAC address forwarding tables can be established, and each MAC address forwarding table corresponds to a VSI. When SMAC address self-learning is implemented, the input port and the VLAN frame input ID are registered in the MAC address forwarding table corresponding to the VSI. The format of the elements of the MAC address forwarding table is {VSI ID, MAC Address, Port, VLAN ID}, the search key of the table is {VSI ID, DMAC} or {VSI ID, DMAC, VLAN ID input} and the search result is the corresponding {output port, VLAN output ID}.
In the MAC address forwarding table, the VLAN ID can be registered or located indirectly using the Tag Value format or the Tag index. Here, the relationship between the VLAN ID and the Tag Value
or the Index of the Label should be set in advance. For example, transforming the learned VLAN ID into a Tag Value or a Index of the Tag according to the pre-established relationship, and records the Tag Value or the Index of the Tag in the corresponding element of the MAC address forwarding table. When the virtual output port is found after searching with a key in the MAC address forwarding table, and the VLAN output ID found is expressed by the Tag Value or the Tag index, the VLAN ID Output can be obtained according to the pre-established relationship.
Embodiment 2:
Embodiment 1 describes frame forwarding via a bridge with only one input VLAN ID. In practice, however, there is more than one layer of VLAN ID input and VLAN ID output, ie, there are two layers or more than two layers of VLAN ID input and VLAN ID output. For example, applications in accordance with the IEEE 802.1 ad standard, two VLAN ID layers are included in the frame. In this type of application environment, there are two layers of VLAN ID input, so two layers of VLAN ID output may be required. In this embodiment, a number of {input port, external input layer VLAN, internal input layer VLAN} corresponds to a VSI, ie, a number of {input port, external input layer VLAN , Internal input layer VLAN} is associated with a VSI.
The main frame forwarding procedure is described in detail by a bridge with two layers of VLAN input ID and VLAN output ID with reference to Fig. 3.
Step 301: receive the frame from the port of entry.
Step 302: Determine if the frame includes the VLAN ID. If included, obtain the VLAN ID including the VLAN ID of the external layer and the VLAN ID of the internal layer of the frame; otherwise, obtain the default external layer VLAN ID and the default internal layer VLAN ID applicable to the input port, and add the default external layer VLAN ID and the internal layer VLAN ID by plot defect.
Step 303: Search the equivalence table using the virtual input port, ie, using a triplet {input port, VLAN input ID} to determine the corresponding VSI ID.
Step 304: Self-learning of the SMAC address is implemented. That is, the input port, the VLAN ID of the external input layer and the VLAN ID of the internal input layer corresponding to the SMAC address are registered in the MAC address forwarding table corresponding to the VSI.
Step 305: obtain the DMAC address of the frame, and look in the MAC address forwarding table corresponding to the VSI using the DMAC address as a key, or looking in the MAC address forwarding table corresponding to the VSI using the key as the DMAC address, the VLAN of the internal input layer and the VLAN ID of the external input layer.
In the case where the MAC address forwarding table is not differentiated based on the VSI, ie, only one MAC address forwarding table is configured, the unified MAC address forwarding table is searched using the key as the VSI ID and DMAC address, or the unified MAC address forwarding table is searched using the VSI ID and DMAC address as a key, and the VLAN of the internal input layer and the VLAN ID of the external input layer .
Step 306: If the search result in Step 305 is a unicast forward, continue in Step 307; If the search result is a multicast forward, continue in Step 309; If no results are obtained in the search, continue to Step 313.
Step 307: Search the MAC address forwarding table to get the triplet {output port, VLAN ID of the external output layer, VLAN ID of the internal output layer}.
Step 308: replace in the frame the VLAN ID of the external input layer with the VLAN ID of the external output layer, continue in Step 317.
Step 309: Search the MAC address forwarding table to get the output MID.
Step 310: Search the multicast table using the MID to obtain a set of virtual output ports, ie, {output port i, VLAN ID i of the external output layer, VLAN ID i of the internal output layer} , where, i = 1 ... n, is the correlative number of the outgoing virtual ports, and n is the total number of outgoing virtual ports found in the multicast table search.
Step 311: make n copies of the received frame.
Step 312: replace in the frame the VLAN ID of the external input layer with the VLAN ID i of the external output layer, replace in the frame the VLAN ID of the internal input layer with the VLAN ID i of the internal layer Exit, and then execute Step 317.
Step 313: If nothing is found in the search in the MAC address forwarding table, set the frame to be forwarded in broadcast mode.
Step 314: Obtain all the virtual output ports corresponding to the VSI, ie, {output j port, VLAN ID j of the external output layer, VLAN ID j of the internal output layer}, where, j = 1. ..m, is the correlative number of the outgoing virtual ports, and m is the total number of broadcast outgoing virtual ports.
Step 315: make m copies of the received frame.
Step 316: replace in the frame the VLAN ID of the external input layer with the VLAN ID j of the external output layer, replace in the frame the VLAN ID of the internal input layer with the VLAN ID j of the internal layer Exit, and then execute Step 317.
Step 317: determine if the virtual output port is exactly the same as the virtual input port, ie, determine if the output port, the VLAN ID of the external output layer and the VLAN ID of the internal output layer are same as the input port, the VLAN ID of the external input layer and the VLAN ID of the internal input layer, respectively; if the output port, the VLAN ID of the external output layer and the VLAN ID of the internal output layer are the same as the input port, the VLAN ID of the external input layer and the VLAN ID of the internal layer input, respectively, continue in Step 318; in the opposite chaos, continue in Step 319.
Step 318: Discard the plot.
Step 319: forward the frame to the exit port.
In summary, the present invention combines multiple doubles {port, VLAN} in a set, and associates the set with a VSI, then the Ethernet frame is forwarded between the {Port, VLAN} corresponding to the same VSI, and therefore Therefore, by forwarding the frames through a bridge between different VLANs. The main idea of forwarding through a bridge is: to obtain the VLAN ID of the frame after receiving the frame of the input port; determine the VSI corresponding to {input port, VLAN input ID}; search the MAC address forwarding table {output port, VLAN output ID} corresponding to {VSI, DMAC}, and, after searching the table, forward the frame according to the {output port, VLAN ID output} found. Here, the VLAN ID can be a VLAN ID or a combination of two or more VLAN IDs. For example, a number of {port, external layer VLAN, internal layer VLAN} and {port, VLAN} corresponds to a VSI.
A layer of VLAN ID or two or more layers of VLAN ID can be obtained from the received frame.
If there is a VLAN ID layer, the VSI corresponding to the pair {input port, VLAN input ID} is searched; if there are two layers of VLAN ID, the VSI corresponding to the triplet is searched {input port, VLAN ID of the external input layer, VLAN ID of the internal input layer}.
In the SMAC address self-learning process, the VLAN IDs obtained from the frame are registered one by one in the MAC address forwarding table. When during the forwarding process the MAC address forwarding table is searched, the output VLAN ID obtained can be of one layer, two layers or more layers, which is applicable to the VLAN IDs registered in the process of SMAC address self-learning.
When the frame is forwarded, the input VLAN ID of the corresponding layer is replaced with the output VLAN ID of the corresponding layer, ie, the VLAN ID of the external input layer is replaced with the VLAN ID of the external layer of output, and the VLAN ID of the internal input layer is replaced with the VLAN ID of the internal output layer; or the frame is forwarded to the output port after adding the VLAN output ID.
When filtering the source port, the input port and the output port are compared, and the input VLAN ID and the output VLAN ID of the corresponding port are compared; if the results of the comparison indicate that they are exactly the same, the plot is discarded; otherwise, the plot is forwarded.
The present invention also provides a forwarding equipment via a bridge, as shown in Fig. 4, the equipment includes:
at least one input port to receive the frame from more than one VLAN;
a forwarding unit to obtain the input VLAN ID and DMAC address received through the input port, determine the output port and the output VLAN ID based on the input port, the input VLAN ID and the DMAC address and then send the plot; and
at least one output port to transmit the frame to more than one VLAN;
The forwarding unit includes:
a storage module to store the relationship between the combinations of ports and VLAN IDs with the VSIs, as well as all MAC address forwarding tables corresponding to the VSIs, where, at least a combination of the port and VLAN ID corresponds to a VSI;
an input analysis module, to obtain the input VLAN ID and the DMAC address of the frame, and produce as a result the input VLAN ID and the DMAC address;
a first forwarding module, to determine the VSI corresponding to the combination of the input port and the input VLAN ID according to the relationship between the combination of the port and the VLAN ID with the VSI, and then search the MAC address forwarding table corresponding to the VSI to obtain the output port and VLAN ID;
a second forwarding module, to transmit the message to the outgoing port according to the search result of the first forwarding module.
If the search result of the first forwarding module is only the outgoing port and the outgoing VLAN ID, the second forwarding module is added to add the outgoing VLAN ID to the frame or replace the port in the frame input through the output port before forwarding the frame to the output port.
The storage unit also stores the relationship between the multicast ID (MID) with the output port as well as with the VLAN output ID.
If the search result of the first forwarding module is the outgoing MID, the first forwarding module searches the multicast table using the MID to obtain a set of outbound ports and outbound VLAN IDs, and this set includes N combinations of output ports and VLAN output ID, where N is a positive integer.
In this case, the first forwarding module instructs the second forwarding module to make N copies of the frame, and adds the corresponding output VLAN ID to the N frames, respectively, or replaces the VLAN ID in the N copies of the frames input with the corresponding output VLAN ID, respectively, before forwarding the N frames to the corresponding output ports.
If the result of the search for the first forwarding module is that no corresponding output port or output VLAN ID is found in the MAC address table, the M combinations of the output port and the output VLAN ID corresponding to VSI as the output port and VLAN ID found, where M is a positive integer.
In this case, the first forwarding module instructs the second forwarding module to make M copies of the frame, and adds the corresponding output VLAN to the M frames, respectively, or replaces the VLAN ID in the M copies of the frames input with the corresponding output VLAN ID, respectively, before forwarding the M frames to the corresponding output ports.
Before the frame is forwarded to the output port, if the second forwarding module detects that the output port is the same as the input port and the output VLAN ID is the same as the input VLAN ID, the input VLAN ID is discarded. plot.
The first module implements the self-learning of SMAC addresses, and records the input port and the incoming VLAN ID corresponding to the SMAC address in the MAC address forwarding table corresponding to the VSI.
The VLAN input ID includes the VLAN ID of the internal input layer and the VLAN ID of the external input layer; The VLAN output ID includes the VLAN ID of the internal output layer and the VLAN ID of the external output layer.
Similar to the flow shown in Fig. 3, if the VLAN ID is a two-layer VLAN ID, when the second forwarding module forwards the frame, it replaces in the frame the VLAN ID of the internal input layer and the VLAN ID of the external input layer with the VLAN ID of the internal output layer and the VLAN ID of the external output layer, respectively. The second forwarding module detects whether the output VLAN ID is the same as the input VLAN ID, and when the VLAN ID of the internal output layer and the VLAN ID of the external output layer are, respectively, the same as the VLAN ID of the internal input layer and the VLAN ID of the external input layer, it can be determined that the output VLAN ID is the same as the input VLAN ID.
The above-mentioned distribution of the first forwarding module and the second forwarding module is solely for the purpose of simplifying the description. The examples from this moment are also within the scope of the present invention: combining the first forwarding module and the second forwarding module into a single module; distribute the first forwarding module or the second forwarding module in more modules; transfer a part of the functions of the first forwarding module to the second forwarding module and / or transfer a part of the functions of the second forwarding module to the first forwarding module.
The foregoing are only preferred embodiments of the present invention, and it is not intended to limit the scope of the present invention. Any modification, equivalent replacement or improvement made without departing from the principle of the present invention should be covered by the scope set forth in the appended claims.
4 sheets
Sheet 1 Sheet 2 Sheet 3 Sheet 4
15 members in 9 offices
Priority claims2
| Document | Office | Kind | Date |
|---|---|---|---|
| 200510112882 | China | A | |
| 200510112882 | China | – |
Members15
| Document | Office | Kind | |
|---|---|---|---|
| CN1852240A | China | A | |
| EP1777887A1 | European Patent Office (EPO) | A1 | |
| WO2007045146A1 | World Intellectual Property Organization (WIPO) | A1 | |
| US2007097968A1 | United States of America | A1 | |
| HK1102984A | Hong Kong, China | A | |
| HK1102984A1 | Hong Kong, China | A1 | |
| CN101160832A | China | A | |
| CN100442772C | China | C | |
| US7965709B2 | United States of America | B2 | |
| EP1777887B1 | European Patent Office (EPO) | B1 | |
| AT537633T | Austria | T | |
| ATE537633T1 | Austria | T1 | |
| PT1777887E | Portugal | E | |
| DK1777887T3 | Denmark | T3 | |
| ES2378079T3This record | Spain | T3 |
Numbers
- Publication
- 2378079
- Application
- 6255388
Titles2
- Spanish
- VLAN operando con direcciones MAC
- English
- VLAN operating with MAC addresses
Classification
- CPC, 1
- H04L12/4666
- IPC, 1
- H04L12 46