WO2016197787A2 - 一种接入控制方法和装置 - Google Patents
一种接入控制方法和装置 Download PDFInfo
- Publication number
- WO2016197787A2 WO2016197787A2 PCT/CN2016/082236 CN2016082236W WO2016197787A2 WO 2016197787 A2 WO2016197787 A2 WO 2016197787A2 CN 2016082236 W CN2016082236 W CN 2016082236W WO 2016197787 A2 WO2016197787 A2 WO 2016197787A2
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- packet
- layer
- mac address
- forwarding
- service type
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4641—Virtual LANs, VLANs, e.g. virtual private networks [VPN]
- H04L12/4645—Details on frame tagging
- H04L12/4666—Operational details on the addition or the stripping of a tag in a frame, e.g. at a provider edge node
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/25—Routing or path finding in a switch fabric
Definitions
- This document relates to, but is not limited to, the field of communication technologies, and in particular, to an access control method and apparatus.
- the functions of the ONU are more and more powerful.
- a single device can support various entertainment functions. In addition to its traditional services, it can also be used to carry video on demand, IPTV, XBOX and other customized private networks. business.
- a new type of smart set-top box supports multiple services, such as IPTV, video on demand, and specific video on demand, and these different types of services are carried on different VLANs, but the set-top box has only one MAC (Media Access Control, media access control). )address.
- MAC Media Access Control, media access control
- a single MAC/VLAN (Virtual Local Area Network) mapping relationship in the traditional forwarding model cannot be applied to such a requirement, because the traditional transport layer forwarding is implemented based on the ingress MAC address learning mechanism, and the source address of the ingress packet. It will be recorded on the port corresponding to the ingress. The egress packet will be clarified according to the destination address when forwarding the selected port.
- the present invention provides an access control method and apparatus, which enables an access device to forward and control packets of multiple virtual local area networks sharing the same physical address.
- An embodiment of the present invention provides an access control method, which is applied to an access device, and the method includes:
- the correspondence between the service type of each MAC address and the VLAN identifier of the virtual local area network is recorded in the MAC address learning record table.
- determining the forwarding exit and the service type of the packet including:
- the forwarding port is searched according to the destination MAC address of the packet. If the forwarding exit is found and the forwarding egress is a Layer 2 LAN port, the service type of the packet is determined to be two. Layer LAN - LAN service; or
- the forwarding entry is searched according to the destination MAC address of the packet. If the forwarding exit is found and the forwarding outlet is a Layer 2 WAN port, the service type of the packet is determined to be two. Layer LAN-WAN service; or
- the forwarding entry is determined according to the destination IP address of the packet, and the service type of the packet is determined to be a Layer 3 service.
- determining the forwarding exit and the service type of the packet including:
- the Layer 2 packet is flooded in each VLAN of the port and the response of the port is received.
- the service type of the packet is determined to be a Layer 2 LAN-LAN service; if the port is a Layer 2 WAN port, the service type of the packet is determined. It is a Layer 2 LAN-WAN service.
- the method further includes:
- the report is generated.
- a new record of the source MAC address of the text where the new record records the correspondence between the service type of the source MAC address of the packet and the VLAN identifier.
- the access device comprises: an optical network unit ONU.
- the embodiment of the invention further provides an access control device, which is applied to an access device, and includes:
- the receiving module is configured to: after receiving the packet, determine a forwarding exit and a service type of the packet;
- a forwarding module configured to query a media access control MAC address learning record table, determine a VLAN identifier corresponding to the service type of the destination MAC address, and carry the determined VLAN identifier when forwarding the packet;
- the correspondence between the service type of each MAC address and the VLAN identifier of the virtual local area network is recorded in the MAC address learning record table.
- the receiving module is configured to determine, according to the following manner, the forwarding exit and the service type of the packet after receiving the packet:
- the forwarding port is searched according to the destination MAC address of the packet. If the forwarding exit is found and the forwarding egress is a Layer 2 LAN port, the service type of the packet is determined to be two. Layer LAN - LAN service; or
- the forwarding entry is searched according to the destination MAC address of the packet. If the forwarding exit is found and the forwarding outlet is a Layer 2 WAN port, the service type of the packet is determined to be two. Layer LAN-WAN service; or
- the forwarding entry is determined according to the destination IP address of the packet, and the service type of the packet is determined to be a Layer 3 service.
- the receiving module is configured to determine, according to the following manner, the forwarding exit and the service type of the packet after receiving the packet:
- the Layer 2 packet is flooded in each VLAN of the port and the response of the port is received.
- the service type of the packet is determined to be a Layer 2 LAN-LAN service; if the port is a Layer 2 WAN port, the service type of the packet is determined. It is a Layer 2 LAN-WAN service.
- the receiving module is further configured to: after receiving the packet and determining the forwarding exit and the service type of the packet, querying the MAC address learning record table, if the source MAC address of the packet is not included in any Recording, or the record corresponding to the service type in the record of the source MAC address of the packet, generating a new record of the source MAC address of the packet, the new record Corresponding relationship between the service type of the source MAC address of the packet and the VLAN identifier is recorded.
- the access device comprises: an optical network unit ONU.
- the embodiment of the invention further provides a computer readable storage medium storing computer executable instructions, which are implemented when executed by a processor.
- an access control method and apparatus are provided by the embodiment of the present invention.
- the access device After receiving the packet, the access device determines the forwarding exit and service type of the packet, and queries the media access control MAC address learning record.
- the MAC address learning record table records the correspondence between the service type of each MAC address and the VLAN identifier of the virtual local area network, and determines the VLAN identifier corresponding to the service type of the destination MAC address, and forwards the packet when the packet is forwarded.
- the carrying of the determined VLAN identifier, the embodiment of the present invention enables the access device to forward and control the packets of multiple virtual local area networks sharing the same physical address.
- FIG. 1 is a flowchart of an access control method according to an embodiment of the present invention.
- FIG. 2 is a schematic diagram of an access control apparatus according to an embodiment of the present invention.
- FIG. 3 is a schematic diagram of a home access scenario in an example of the present invention.
- an embodiment of the present invention provides an access control method, which is applied to an access device, and the method includes:
- S102 Query a media access control MAC address learning record table, determine a VLAN identifier corresponding to the service type of the destination MAC address, and carry the determined VLAN identifier when forwarding the packet;
- the correspondence between the service type of each MAC address and the VLAN identifier of the virtual local area network is recorded in the MAC address learning record table.
- determining the forwarding exit and the service type of the packet including:
- the forwarding port is searched according to the destination MAC address of the packet. If the forwarding exit is found and the forwarding egress is a Layer 2 LAN port, the service type of the packet is determined to be two. Layer LAN - LAN service; or
- the forwarding entry is searched according to the destination MAC address of the packet. If the forwarding exit is found and the forwarding outlet is a Layer 2 WAN port, the service type of the packet is determined to be two. Layer LAN-WAN service; or
- the forwarding entry is determined according to the destination IP address of the packet, and the service type of the packet is determined to be a Layer 3 service.
- determining the forwarding exit and the service type of the packet including:
- the Layer 2 packet is flooded in each VLAN of the port and the response of the port is received.
- the service type of the packet is determined to be a Layer 2 LAN-LAN service; if the port is a Layer 2 WAN port, the service type of the packet is determined. It is a Layer 2 LAN-WAN service.
- the method further includes:
- the report is generated.
- a new record of the source MAC address of the text where the new record records the correspondence between the service type of the source MAC address of the packet and the VLAN identifier.
- the access device includes: an optical network unit ONU.
- an embodiment of the present invention provides an access control apparatus, which is applied to an access device, and includes:
- the receiving module 201 is configured to: after receiving the packet, determine a forwarding exit and a service type of the packet;
- the forwarding module 202 is configured to query the media access control MAC address learning record table, determine the VLAN identifier corresponding to the service type of the destination MAC address, and carry the determined VLAN identifier when forwarding the packet;
- the correspondence between the service type of each MAC address and the VLAN identifier of the virtual local area network is recorded in the MAC address learning record table.
- the receiving module 201 is configured to determine, according to the following manner, the forwarding exit and the service type of the packet after receiving the packet:
- the forwarding port is searched according to the destination MAC address of the packet. If the forwarding exit is found and the forwarding egress is a Layer 2 LAN port, the service type of the packet is determined to be two. Layer LAN - LAN service; or
- the forwarding entry is searched according to the destination MAC address of the packet. If the forwarding exit is found and the forwarding outlet is a Layer 2 WAN port, the service type of the packet is determined to be two. Layer LAN-WAN service; or
- the forwarding entry is determined according to the destination IP address of the packet, and the service type of the packet is determined to be a Layer 3 service.
- the receiving module 201 is configured to determine, according to the following manner, the forwarding exit and the service type of the packet after receiving the packet:
- the Layer 2 packet is flooded in each VLAN of the port and the response of the port is received.
- the service type of the packet is determined to be a Layer 2 LAN-LAN service; if the port is a Layer 2 WAN port, the service type of the packet is determined. It is a Layer 2 LAN-WAN service.
- the receiving module 201 is further configured to: after receiving the packet and determining the forwarding exit and the service type of the packet, querying the MAC address learning record table, if any record of the source MAC address of the packet is not included therein If the record of the source MAC address of the packet does not include the record corresponding to the service type, a new record of the source MAC address of the packet is generated, and the source MAC address of the packet is recorded in the new record. Correspondence between the service type of the address and the VLAN ID.
- the access device includes: an optical network unit ONU.
- Figure 3 shows the home access scenario.
- the smart entertainment device is accessed through the LAN1 port on the ONU, and the PC is accessed through the LAN2 port on the ONU.
- the smart entertainment device can interconnect with the internal devices of the home through the untag channel (Layer 2 LAN-LAN service) to carry out home services such as storage sharing and video sharing.
- Intelligent entertainment devices and PCs communicate via a local area network.
- VLAN8 three-layer service
- VLAN8 is an on-demand service for smart entertainment devices. It can broadcast video, games and entertainment interactions on the Internet. It can access the Internet through VLAN8 and access the Internet. These services are services that can be accessed by public platforms.
- the smart entertainment device on the network side belongs to the three-tier service.
- the smart entertainment device can also carry out the private content service, which belongs to the private network operated by the service.
- the service is on the VLAN 9 to be isolated from other public services, and the smart entertainment device is connected to the upper VLAN 9 service of the networking through the Layer 2 service channel. Belongs to the Layer 2 LAN-WAN service;
- the forwarding control of the ONU includes the following steps:
- the LAN1 port of the ONU receives the packet sent by the smart entertainment device.
- step S402 it is determined whether it is a three-tier service, if yes, step S403 is performed, if not, step S406 is performed;
- the source MAC address and the VLAN identifier (for example, VLAN 8) of the smart entertainment device are learned at the LAN1 port, and the VLAN identifier of the Layer 3 service type corresponding to the smart entertainment device on the LAN1 interface (for example, VLAN8) is determined, and the source MAC address of the smart entertainment device is established. Correspondence between the address and the VLAN ID of the Layer 3 service type and recorded in the MAC address learning record table;
- S404 The LAN1 sends the packet to the Layer 3 route to be transmitted to the upper layer network.
- the VLAN identifier of the Layer 3 service of the smart entertainment device (for example, VLAN 8) is queried on the LAN1 port, and the downlink packet is tagged with the queried VLAN tag (for example, , VLAN8) is sent to the smart entertainment device;
- step S406 if an address request (broadcast message) initiated by the smart entertainment device (Dynamic Host Configuration Protocol) is received, step S407 is performed; if the access to the LAN2 port is sent by the smart entertainment device, The message of the PC (the message carrying the MAC address of the smart entertainment device, the VLAN identifier "untag", the MAC address of the PC), step S411 is performed;
- the DHCP response packet of the upper device reaches the LAN1 port. If the VLAN identifier corresponding to the LAN-WAN service type is not queried, it is flooded in all VLAN domains of the LAN1 port, including VLAN9, and the smart entertainment device can be in the downlink channel VLAN9. Receiving a DHCP response message from the upper device;
- the DHCP message of the smart entertainment device is sent from the LAN1 to the upper device again. Because the smart entertainment device has learned the MAC address of the upper device, the unicast message is sent; the LAN1 port determines the LAN-WAN service type of the smart entertainment device. a VLAN identifier (for example, VLAN 9), establishing a correspondence between a source MAC address of the smart entertainment device and a VLAN identifier of the LAN-WAN service type, and recording the MAC address learning record table;
- VLAN identifier for example, VLAN 9
- the VLAN 9 data packet sent by the upper device to the smart entertainment device is queried by the LAN1 to the VLAN ID corresponding to the LAN-WAN service type, and the VLAN of the packet sent from the LAN1 outlet to the smart entertainment device is set to VLAN9;
- the LAN1 port queries the MAC address learning record table. If the MAC address of the smart entertainment device and the record whose VLAN identifier is "untag" are not found, the physical address learning is performed and a record is generated:
- the LAN1 port is a Layer 2 LAN port
- the forwarding exit is found, for example, the LAN 2 port, the type of the LAN 2 port is determined, and the LAN 2 port is a Layer 2 LAN port;
- the message of the smart entertainment device is flooded at each port. Then, after receiving the packet, the PC connected to the LAN 2 sends a response packet, where the response packet carries the MAC address of the PC, the identifier of the VLAN "untag", the MAC address of the smart entertainment device, and the LAN 2 port receives. After the response message, physical address learning is performed and a record is generated:
- the forwarding exit is searched for according to the destination address of the packet, that is, the forwarding address corresponding to the destination address (intelligent entertainment device) of the response packet is searched, and the forwarding outlet is the LAN1 port.
- the LAN1 port is a Layer 2 LAN port. Therefore, it is determined that the service type of the response message is a LAN-LAN type.
- the physical address learning record corresponding to the response message is generated, and the correspondence between the MAC address of the PC and the LAN 2, the identifier of the VLAN "untag", and the service type LAN-LAN are described.
- the service type of the LAN1 port determination message is a LAN-LAN type, and the VLAN identifier (for example, untag) of the LAN-LAN service type corresponding to the smart entertainment device on the LAN1 port is determined, and the LAN-LAN of the source MAC address of the smart entertainment device is established.
- the correspondence between the service type and the VLAN identifier (for example, untag) is recorded in the MAC address learning record table.
- the smart entertainment device sends a Layer 2 packet to the PC again.
- the message carries the MAC address of the smart entertainment device, the identifier of the VLAN "untag”, and the MAC address of the PC;
- the LAN1 port receives the packet sent by the smart entertainment device, and the LAN1 port queries the forwarding exit as the LAN2 port according to the destination address of the packet, and the service type is determined to be a LAN-LAN type.
- the VLAN ID corresponding to the LAN-LAN service type is "untag”.
- the packet is sent to the PC through the LAN 2 interface, and the VLAN identifier of the packet is “untag”.
- an embodiment of the present invention further provides a computer readable storage medium storing computer executable instructions, which are implemented when executed by a processor.
- the access device determines the forwarding exit and the service type of the packet, and queries the media access control MAC address learning record table, where the MAC address is learned.
- the record table records the correspondence between the service type of each MAC address and the VLAN identifier of the virtual local area network, and determines the VLAN identifier corresponding to the service type of the destination MAC address, and carries the determined VLAN when forwarding the packet.
- the access device can perform forwarding control on the packets of multiple virtual local area networks sharing the same physical address.
- each module/unit in the above embodiment may be implemented in the form of hardware, for example, by implementing an integrated circuit to implement its corresponding function, or may be implemented in the form of a software function module, for example, executing a program stored in the memory by a processor. Instructions to achieve their corresponding functions. This application is not limited to any specific combination of hardware and software.
- the access device determines the forwarding exit and the service type of the packet, and queries the media access control MAC address learning record table, where the MAC address learning record table records The correspondence between the service type of each MAC address and the VLAN identifier of the virtual local area network, and the VLAN tag corresponding to the service type of the destination MAC address is determined.
- the access device can forward and control the packets of multiple virtual local area networks sharing the same physical address.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Small-Scale Networks (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本文公开了一种接入控制方法,应用于接入设备,该方法包括:接收到报文后,确定所述报文的转发出口和业务类型;查询媒体访问控制MAC地址学习记录表,确定目的MAC地址的所述业务类型对应的VLAN标识,转发所述报文时携带所述确定出的VLAN标识;其中,所述MAC地址学习记录表中记录有每一个MAC地址的业务类型与虚拟局域网VLAN标识之间的对应关系。
Description
本文涉及但不限于通信技术领域,尤其涉及的是一种接入控制方法和装置。
目前接入设备ONU(Optical Network Unit,光网络单元)的功能越来越强大,单一的设备可以支撑各种娱乐功能,除了自身传统业务,还可以复合承载视频点播、IPTV、XBOX等定制专网业务。
比如,某新型智能机顶盒支持多种业务,诸如IPTV、视频点播、特定视频点播等,且这些不同类别的业务均承载在不同的VLAN上,但是此机顶盒只有一个MAC(Media Access Control,媒体访问控制)地址。传统的转发模型中单一的MAC/VLAN(Virtual Local Area Network,虚拟局域网)映射关系将无法适用此类需求,因为传统的传输层转发是基于入口MAC地址学习机制实现的,入口报文的源地址会记录在对应入口的端口,出口的报文则根据在转发选择端口的时候,根据目标地址查询到此源地址即可明确出口端口。
因此,如何支持接入设备实现多种业务的报文转发,是需要解决的技术问题。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本文提供一种接入控制方法和装置,能够使接入设备对共享同一物理地址的多个虚拟局域网的报文进行转发控制。
本发明实施例提供了一种接入控制方法,应用于接入设备,该方法包括:
接收到报文后,确定所述报文的转发出口和业务类型;
查询媒体访问控制MAC地址学习记录表,确定目的MAC地址的所述业务类型对应的VLAN标识,转发所述报文时携带所述确定出的VLAN标识;
其中,所述MAC地址学习记录表中记录有每一个MAC地址的业务类型与虚拟局域网VLAN标识之间的对应关系。
可选地,接收到报文后,确定所述报文的转发出口和业务类型,包括:
如果接收到二层报文,根据所述报文的目的MAC地址查找转发出口,如果查找到所述转发出口且所述转发出口是二层局域网端口,则确定所述报文的业务类型为二层局域网-局域网业务;或者
如果接收到二层报文,根据所述报文的目的MAC地址查找转发出口,如果查找到所述转发出口且所述转发出口是二层广域网端口,则确定所述报文的业务类型为二层局域网-广域网业务;或者
如果接收到三层报文,则根据所述报文的目的IP地址确定转发出口,所述报文的业务类型确定为三层业务。
可选地,接收到报文后,确定所述报文的转发出口和业务类型,包括:
如果接收到二层报文且根据所述报文的目的MAC地址未查找到转发出口,则将所述二层报文在所有端口的各VLAN内进行洪泛,在接收到某个端口的响应报文后,如果所述端口是二层局域网端口,则确定所述报文的业务类型为二层局域网-局域网业务;如果所述端口是二层广域网端口,则确定所述报文的业务类型为二层局域网-广域网业务。
可选地,接收到报文后,确定所述报文的转发出口和业务类型后,还包括:
查询MAC地址学习记录表,如果其中未包含所述报文的源MAC地址的任何记录,或者所述报文的源MAC地址的记录中未包含所述业务类型对应的记录,则生成所述报文的源MAC地址的新记录,所述新纪录中记载所述报文的源MAC地址的所述业务类型与VLAN标识的对应关系。
可选地,所述接入设备包括:光网络单元ONU。
本发明实施例还提供了一种接入控制装置,应用于接入设备,包括:
接收模块,设置为接收到报文后,确定所述报文的转发出口和业务类型;
转发模块,设置为用于查询媒体访问控制MAC地址学习记录表,确定目的MAC地址的所述业务类型对应的VLAN标识,转发所述报文时携带所述确定出的VLAN标识;
其中,所述MAC地址学习记录表中记录有每一个MAC地址的业务类型与虚拟局域网VLAN标识之间的对应关系。
可选地,接收模块,是设置为采用以下方式在接收到报文后确定所述报文的转发出口和业务类型:
如果接收到二层报文,根据所述报文的目的MAC地址查找转发出口,如果查找到所述转发出口且所述转发出口是二层局域网端口,则确定所述报文的业务类型为二层局域网-局域网业务;或者
如果接收到二层报文,根据所述报文的目的MAC地址查找转发出口,如果查找到所述转发出口且所述转发出口是二层广域网端口,则确定所述报文的业务类型为二层局域网-广域网业务;或者
如果接收到三层报文,则根据所述报文的目的IP地址确定转发出口,所述报文的业务类型确定为三层业务。
可选地,接收模块,是设置为采用以下方式在接收到报文后确定所述报文的转发出口和业务类型:
如果接收到二层报文且根据所述报文的目的MAC地址未查找到转发出口,则将所述二层报文在所有端口的各VLAN内进行洪泛,在接收到某个端口的响应报文后,如果所述端口是二层局域网端口,则确定所述报文的业务类型为二层局域网-局域网业务;如果所述端口是二层广域网端口,则确定所述报文的业务类型为二层局域网-广域网业务。
可选地,接收模块,还设置为接收到报文并确定所述报文的转发出口和业务类型后,还查询MAC地址学习记录表,如果其中未包含所述报文的源MAC地址的任何记录,或者所述报文的源MAC地址的记录中未包含所述业务类型对应的记录,则生成所述报文的源MAC地址的新记录,所述新纪录
中记载所述报文的源MAC地址的所述业务类型与VLAN标识的对应关系。
可选地,所述接入设备包括:光网络单元ONU。
本发明实施例还提供一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现上述方法。
与相关技术相比,本发明实施例提供的一种接入控制方法和装置,接入设备接收到报文后,确定所述报文的转发出口和业务类型,查询媒体访问控制MAC地址学习记录表,所述MAC地址学习记录表中记录有每一个MAC地址的业务类型与虚拟局域网VLAN标识之间的对应关系,确定目的MAC地址的所述业务类型对应的VLAN标识,转发所述报文时携带所述确定出的VLAN标识,本发明实施例能够使接入设备对共享同一物理地址的多个虚拟局域网的报文进行转发控制。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图概述
图1为本发明实施例的一种接入控制方法流程图。
图2为本发明实施例的一种接入控制装置示意图。
图3为本发明示例中家庭接入场景示意图。
下文中将结合附图对本发明的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。
如图1所示,本发明实施例提供了一种接入控制方法,应用于接入设备,该方法包括:
S101,接收到报文后,确定所述报文的转发出口和业务类型;
S102,查询媒体访问控制MAC地址学习记录表,确定目的MAC地址的所述业务类型对应的VLAN标识,转发所述报文时携带所述确定出的VLAN标识;
其中,所述MAC地址学习记录表中记录有每一个MAC地址的业务类型与虚拟局域网VLAN标识之间的对应关系。
可选地,接收到报文后,确定所述报文的转发出口和业务类型,包括:
如果接收到二层报文,根据所述报文的目的MAC地址查找转发出口,如果查找到所述转发出口且所述转发出口是二层局域网端口,则确定所述报文的业务类型为二层局域网-局域网业务;或者
如果接收到二层报文,根据所述报文的目的MAC地址查找转发出口,如果查找到所述转发出口且所述转发出口是二层广域网端口,则确定所述报文的业务类型为二层局域网-广域网业务;或者
如果接收到三层报文,则根据所述报文的目的IP地址确定转发出口,所述报文的业务类型确定为三层业务。
可选地,接收到报文后,确定所述报文的转发出口和业务类型,包括:
如果接收到二层报文且根据所述报文的目的MAC地址未查找到转发出口,则将所述二层报文在所有端口的各VLAN内进行洪泛,在接收到某个端口的响应报文后,如果所述端口是二层局域网端口,则确定所述报文的业务类型为二层局域网-局域网业务;如果所述端口是二层广域网端口,则确定所述报文的业务类型为二层局域网-广域网业务。
可选地,接收到报文后,确定所述报文的转发出口和业务类型后,还包括:
查询MAC地址学习记录表,如果其中未包含所述报文的源MAC地址的任何记录,或者所述报文的源MAC地址的记录中未包含所述业务类型对应的记录,则生成所述报文的源MAC地址的新记录,所述新纪录中记载所述报文的源MAC地址的所述业务类型与VLAN标识的对应关系。
其中,所述接入设备包括:光网络单元ONU。
如图2所示,本发明实施例提供了一种接入控制装置,应用于接入设备,包括:
接收模块201,设置为接收到报文后,确定所述报文的转发出口和业务类型;
转发模块202,设置为查询媒体访问控制MAC地址学习记录表,确定目的MAC地址的所述业务类型对应的VLAN标识,转发所述报文时携带所述确定出的VLAN标识;
其中,所述MAC地址学习记录表中记录有每一个MAC地址的业务类型与虚拟局域网VLAN标识之间的对应关系。
可选地,接收模块201,是设置为采用以下方式在接收到报文后确定所述报文的转发出口和业务类型:
如果接收到二层报文,根据所述报文的目的MAC地址查找转发出口,如果查找到所述转发出口且所述转发出口是二层局域网端口,则确定所述报文的业务类型为二层局域网-局域网业务;或者
如果接收到二层报文,根据所述报文的目的MAC地址查找转发出口,如果查找到所述转发出口且所述转发出口是二层广域网端口,则确定所述报文的业务类型为二层局域网-广域网业务;或者
如果接收到三层报文,则根据所述报文的目的IP地址确定转发出口,所述报文的业务类型确定为三层业务。
可选地,接收模块201,是设置为采用以下方式在接收到报文后确定所述报文的转发出口和业务类型:
如果接收到二层报文且根据所述报文的目的MAC地址未查找到转发出口,则将所述二层报文在所有端口的各VLAN内进行洪泛,在接收到某个端口的响应报文后,如果所述端口是二层局域网端口,则确定所述报文的业务类型为二层局域网-局域网业务;如果所述端口是二层广域网端口,则确定所述报文的业务类型为二层局域网-广域网业务。
其中,接收模块201,还设置为接收到报文并确定所述报文的转发出口和业务类型后,还查询MAC地址学习记录表,如果其中未包含所述报文的源MAC地址的任何记录,或者所述报文的源MAC地址的记录中未包含所述业务类型对应的记录,则生成所述报文的源MAC地址的新记录,所述新纪录中记载所述报文的源MAC地址的所述业务类型与VLAN标识的对应关系。
其中,所述接入设备包括:光网络单元ONU。
示例
图3为家庭接入场景,智能娱乐设备通过ONU上的LAN1口接入,PC通过ONU上的LAN2口接入。
智能娱乐设备可以通过untag通道(二层LAN-LAN业务)与家庭的内部设备互联,开展存储共享,视频共享等家庭业务。智能娱乐设备和PC通过局域网进行互通。VLAN8(三层业务)为智能娱乐设备的点播业务,可以点播互联网的视频、游戏以及娱乐互动,通过VLAN8接入上一级网络进入互联网,这些业务都是公共平台可以访问的业务,对接入网侧的智能娱乐设备而言属于三层业务。智能娱乐设备还可以开展私有内容业务,此业务隶属其运营的私有网络,这个业务在VLAN9上面以便与其他公共业务隔离,智能娱乐设备通过二层业务通道接入到组网的上层VLAN9业务上,属于二层LAN-WAN业务;
ONU的转发控制,包括如下步骤:
S401,ONU的LAN1口接收到智能娱乐设备发送的报文;
S402,判断是否为三层业务,如果是,则执行步骤S403,如果不是,则执行步骤S406;
S403,在LAN1口学习智能娱乐设备的源MAC地址和VLAN标识(比如,VLAN8),确定LAN1口上智能娱乐设备对应的三层业务类型的VLAN标识(比如,VLAN8),建立智能娱乐设备的源MAC地址和三层业务类型的VLAN标识的对应关系并记录在MAC地址学习记录表中;
S404,LAN1口将报文上送三层路由以传递到更上层组网;
S405,下行报文从ONU往智能娱乐设备发送的时候,在LAN1口查询到智能娱乐设备的三层业务的VLAN标识(比如,VLAN8),将所述下行报文打上查询到的VLAN标记(比如,VLAN8)后发送给智能娱乐设备;
S406,如果接收到智能娱乐设备通过DHCP(Dynamic Host Configuration Protocol,动态主机配置协议)发起的地址请求(广播报文),则执行步骤S407;如果接收到智能娱乐设备发出的访问LAN2口下挂的PC的报文(所述报文携带智能娱乐设备的MAC地址、VLAN标识“untag”,PC的MAC地址),则执行步骤S411;
S407,在LAN1口学习智能娱乐设备的源MAC地址和VLAN标识(比如,VLAN9);
S408,上层设备的DHCP应答报文到达LAN1口,如果查询不到LAN-WAN业务类型对应的VLAN标识,则在LAN1口所有VLAN域中洪泛,其中包括VLAN9,智能娱乐设备可以在下行通道VLAN9内接收到上层设备的DHCP应答报文;
S409,智能娱乐设备的DHCP报文再次从LAN1发往上层设备,因为智能娱乐设备已经学习到上层设备的MAC地址,则上发单播报文;LAN1口确定智能娱乐设备的LAN-WAN业务类型对应的VLAN标识(比如,VLAN9),建立智能娱乐设备的源MAC地址和LAN-WAN业务类型的VLAN标识的对应关系并记录在MAC地址学习记录表中;
S410,上层设备下发给智能娱乐设备的VLAN9数据报文在LAN1查询到LAN-WAN业务类型对应的VLAN标识为VLAN9,则从LAN1出口发送给智能娱乐设备的报文的VLAN设定为VLAN9;
S411,LAN1口查询MAC地址学习记录表,如果未查找到智能娱乐设备的MAC地址和VLAN标识为“untag”的记录,则进行物理地址学习并生成记录:
a)确定报文的入口类型:
发现LAN1口是二层局域网端口;
b)确定报文的出口类型:
b1)查找报文的目的地址(PC的MAC地址)所对应的转发出口;
b2)如果查找到转发出口,比如是LAN2口,则判断LAN2口的类型,LAN2口是一个二层局域网端口;
b3)如果没有查找到转发出口,则在每一个端口洪泛智能娱乐设备的报文。然后,LAN2口下挂的PC收到所述报文后,发送应答报文,所述应答报文中携带PC的MAC地址、VLAN的标识“untag”,智能娱乐设备的MAC地址;LAN2口接收到所述应答报文后,进行物理地址学习并生成记录:
与LAN1口进行物理地址学习类似,首先根据报文的目的地址查找转发出口,也即,查找所述应答报文的目的地址(智能娱乐设备)所对应的转发出口,所述转发出口是LAN1口,LAN1口是一个二层局域网端口,因此,判定所述应答报文的业务类型是LAN-LAN类型。生成应答报文对应的物理地址学习记录,其中记载PC的MAC地址与LAN2对应关系、VLAN的标识“untag”和业务类型LAN-LAN的对应关系。
c)LAN1口判定报文的业务类型是LAN-LAN类型,确定LAN1口上智能娱乐设备对应的LAN-LAN业务类型的VLAN标识(比如,untag),建立智能娱乐设备的源MAC地址的LAN-LAN业务类型与VLAN标识(比如,untag)的对应关系并记录在MAC地址学习记录表中;
S412,智能娱乐设备再次向PC发送二层报文;
所述报文携带智能娱乐设备的MAC地址、VLAN的标识“untag”,PC的MAC地址;
S413,LAN1口接收到智能娱乐设备发出的报文,LAN1口根据报文的目的地址查询到转发出口为LAN2口,其业务类型确定为LAN-LAN类型。在转发出口LAN2口找到PC的MAC地址记录中,LAN-LAN业务类型对应的VLAN标识为“untag”。将所述报文通过LAN2口发送给PC,所述报文的VLAN标识为“untag”。
此外,本发明实施例还提供一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现上述方法。
上述实施例提供的一种接入控制方法和装置,接入设备接收到报文后,确定所述报文的转发出口和业务类型,查询媒体访问控制MAC地址学习记录表,所述MAC地址学习记录表中记录有每一个MAC地址的业务类型与虚拟局域网VLAN标识之间的对应关系,确定目的MAC地址的所述业务类型对应的VLAN标识,转发所述报文时携带所述确定出的VLAN标识,本发明实施例能够使接入设备对共享同一物理地址的多个虚拟局域网的报文进行转发控制。
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件(例如处理器)完成,所述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现。相应地,上述实施例中的各模块/单元可以采用硬件的形式实现,例如通过集成电路来实现其相应功能,也可以采用软件功能模块的形式实现,例如通过处理器执行存储于存储器中的程序指令来实现其相应功能。本申请不限制于任何特定形式的硬件和软件的结合。
需要说明的是,本申请还可有其他多种实施例,在不背离本申请精神及其实质的情况下,熟悉本领域的技术人员可根据本申请作出各种相应的改变和变形,但这些相应的改变和变形都应属于本申请所附的权利要求的保护范围。
本发明实施例提供的技术方案,接入设备接收到报文后,确定所述报文的转发出口和业务类型,查询媒体访问控制MAC地址学习记录表,所述MAC地址学习记录表中记录有每一个MAC地址的业务类型与虚拟局域网VLAN标识之间的对应关系,确定目的MAC地址的所述业务类型对应的VLAN标
识,转发所述报文时携带所述确定出的VLAN标识,本发明实施例能够使接入设备对共享同一物理地址的多个虚拟局域网的报文进行转发控制。
Claims (10)
- 一种接入控制方法,应用于接入设备,该方法包括:接收到报文后,确定所述报文的转发出口和业务类型;查询媒体访问控制MAC地址学习记录表,确定目的MAC地址的所述业务类型对应的VLAN标识,转发所述报文时携带所述确定出的VLAN标识;其中,所述MAC地址学习记录表中记录有每一个MAC地址的业务类型与虚拟局域网VLAN标识之间的对应关系。
- 如权利要求1所述的方法,其中:接收到报文后,确定所述报文的转发出口和业务类型,包括:如果接收到二层报文,根据所述报文的目的MAC地址查找转发出口,如果查找到所述转发出口且所述转发出口是二层局域网端口,则确定所述报文的业务类型为二层局域网-局域网业务;或者如果接收到二层报文,根据所述报文的目的MAC地址查找转发出口,如果查找到所述转发出口且所述转发出口是二层广域网端口,则确定所述报文的业务类型为二层局域网-广域网业务;或者如果接收到三层报文,则根据所述报文的目的IP地址确定转发出口,所述报文的业务类型确定为三层业务。
- 如权利要求1所述的方法,其中:接收到报文后,确定所述报文的转发出口和业务类型,包括:如果接收到二层报文且根据所述报文的目的MAC地址未查找到转发出口,则将所述二层报文在所有端口的各VLAN内进行洪泛,在接收到某个端口的响应报文后,如果所述端口是二层局域网端口,则确定所述报文的业务类型为二层局域网-局域网业务;如果所述端口是二层广域网端口,则确定所述报文的业务类型为二层局域网-广域网业务。
- 如权利要求1-3中任一项所述的方法,其中:接收到报文后,确定所述报文的转发出口和业务类型后,还包括:查询MAC地址学习记录表,如果其中未包含所述报文的源MAC地址的任何记录,或者所述报文的源MAC地址的记录中未包含所述业务类型对应的记录,则生成所述报文的源MAC地址的新记录,所述新纪录中记载所述报文的源MAC地址的所述业务类型与VLAN标识的对应关系。
- 如权利要求1所述的方法,其中:所述接入设备包括:光网络单元ONU。
- 一种接入控制装置,应用于接入设备,包括:接收模块,设置为接收到报文后,确定所述报文的转发出口和业务类型;转发模块,设置为查询媒体访问控制MAC地址学习记录表,确定目的MAC地址的所述业务类型对应的VLAN标识,转发所述报文时携带所述确定出的VLAN标识;其中,所述MAC地址学习记录表中记录有每一个MAC地址的业务类型与虚拟局域网VLAN标识之间的对应关系。
- 如权利要求6所述的装置,其中:接收模块,是设置为采用以下方式在接收到报文后确定所述报文的转发出口和业务类型:如果接收到二层报文,根据所述报文的目的MAC地址查找转发出口,如果查找到所述转发出口且所述转发出口是二层局域网端口,则确定所述报文的业务类型为二层局域网-局域网业务;或者如果接收到二层报文,根据所述报文的目的MAC地址查找转发出口,如果查找到所述转发出口且所述转发出口是二层广域网端口,则确定所述报文的业务类型为二层局域网-广域网业务;或者如果接收到三层报文,则根据所述报文的目的IP地址确定转发出口,所述报文的业务类型确定为三层业务。
- 如权利要求6所述的装置,其中:接收模块,是设置为采用以下方式在接收到报文后确定所述报文的转发 出口和业务类型:如果接收到二层报文且根据所述报文的目的MAC地址未查找到转发出口,则将所述二层报文在所有端口的各VLAN内进行洪泛,在接收到某个端口的响应报文后,如果所述端口是二层局域网端口,则确定所述报文的业务类型为二层局域网-局域网业务;如果所述端口是二层广域网端口,则确定所述报文的业务类型为二层局域网-广域网业务。
- 如权利要求6-8中任一项所述的装置,其中:接收模块,还设置为接收到报文并确定所述报文的转发出口和业务类型后,还查询MAC地址学习记录表,如果其中未包含所述报文的源MAC地址的任何记录,或者所述报文的源MAC地址的记录中未包含所述业务类型对应的记录,则生成所述报文的源MAC地址的新记录,所述新纪录中记载所述报文的源MAC地址的所述业务类型与VLAN标识的对应关系。
- 如权利要求6所述的装置,其中:所述接入设备包括:光网络单元ONU。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610122377.3 | 2016-03-02 | ||
| CN201610122377.3A CN107154898A (zh) | 2016-03-02 | 2016-03-02 | 一种接入控制方法和装置 |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| WO2016197787A2 true WO2016197787A2 (zh) | 2016-12-15 |
| WO2016197787A3 WO2016197787A3 (zh) | 2017-02-02 |
Family
ID=57503173
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2016/082236 Ceased WO2016197787A2 (zh) | 2016-03-02 | 2016-05-16 | 一种接入控制方法和装置 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN107154898A (zh) |
| WO (1) | WO2016197787A2 (zh) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108512686A (zh) * | 2017-02-28 | 2018-09-07 | 中兴通讯股份有限公司 | 一种多设备数据传输方法、装置及系统 |
| CN110392122A (zh) * | 2018-04-16 | 2019-10-29 | 腾讯大地通途(北京)科技有限公司 | 地址类型的确定方法和装置、存储介质、电子装置 |
| CN110933106A (zh) * | 2019-12-13 | 2020-03-27 | 迈普通信技术股份有限公司 | Pvlan隔离方法、装置、电子设备及存储介质 |
| CN117857218A (zh) * | 2024-03-04 | 2024-04-09 | 中兴通讯股份有限公司 | Fttr系统的业务隔离方法、存储介质及电子装置 |
Families Citing this family (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108551422A (zh) * | 2018-03-30 | 2018-09-18 | 青岛海信宽带多媒体技术有限公司 | 一种网关、其网络报文处理方法、装置及网关存储介质 |
| CN110381361A (zh) * | 2018-04-12 | 2019-10-25 | 华为技术有限公司 | 一种业务处理方法及相关设备 |
| CN109660394B (zh) * | 2018-12-18 | 2021-11-30 | 北京东土军悦科技有限公司 | 分组传送网络管理方法、装置、系统、设备及存储介质 |
| CN113794657B (zh) * | 2021-09-14 | 2023-10-31 | 迈普通信技术股份有限公司 | Mac地址迁移处理方法、装置及交换设备 |
| CN115914896A (zh) * | 2022-12-22 | 2023-04-04 | 深圳市创维软件有限公司 | 报文处理方法、装置、设备以及存储介质 |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN100466626C (zh) * | 2006-11-27 | 2009-03-04 | 华为技术有限公司 | 区分无线业务的方法及无线传输设备 |
| CN102594711B (zh) * | 2012-03-28 | 2014-11-26 | 杭州华三通信技术有限公司 | 一种在边缘设备上的报文转发方法和边缘设备 |
| CN104158743B (zh) * | 2014-08-22 | 2017-08-25 | 福建星网锐捷网络有限公司 | 分布式路由器的报文跨卡转发方法及装置 |
-
2016
- 2016-03-02 CN CN201610122377.3A patent/CN107154898A/zh active Pending
- 2016-05-16 WO PCT/CN2016/082236 patent/WO2016197787A2/zh not_active Ceased
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108512686A (zh) * | 2017-02-28 | 2018-09-07 | 中兴通讯股份有限公司 | 一种多设备数据传输方法、装置及系统 |
| CN110392122A (zh) * | 2018-04-16 | 2019-10-29 | 腾讯大地通途(北京)科技有限公司 | 地址类型的确定方法和装置、存储介质、电子装置 |
| CN110933106A (zh) * | 2019-12-13 | 2020-03-27 | 迈普通信技术股份有限公司 | Pvlan隔离方法、装置、电子设备及存储介质 |
| CN117857218A (zh) * | 2024-03-04 | 2024-04-09 | 中兴通讯股份有限公司 | Fttr系统的业务隔离方法、存储介质及电子装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107154898A (zh) | 2017-09-12 |
| WO2016197787A3 (zh) | 2017-02-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2016197787A2 (zh) | 一种接入控制方法和装置 | |
| US11005752B2 (en) | Packet transmission | |
| US11765000B2 (en) | Method and system for virtual and physical network integration | |
| EP3461072B1 (en) | Access control in a vxlan | |
| CN110647698B (zh) | 页面加载方法、装置、电子设备及可读存储介质 | |
| WO2018028606A1 (zh) | 转发策略配置 | |
| CN104883547B (zh) | 基于网络接入设备物理端口接入ipc的方法及nvr | |
| US20150188802A1 (en) | System for supporting multi-tenant based on private ip address in virtual private cloud networks and operating method thereof | |
| WO2010139238A1 (zh) | 实现强制mac转发功能的方法和装置 | |
| WO2018090872A1 (zh) | 数据处理 | |
| CN104486589B (zh) | 基于gvrp的视频监控系统中的访问方法及装置 | |
| WO2011113393A2 (zh) | 一种实现虚拟局域网标识转换的方法及装置 | |
| US20150200849A1 (en) | Method operating in a fixed access network and ues | |
| WO2017186159A1 (zh) | 报文传输 | |
| WO2018214784A1 (zh) | Cgn的转控分离 | |
| CN101908996A (zh) | 接入私有网络的方法、数据传输方法及装置和系统 | |
| CN105979405A (zh) | 访问视频设备的方法及装置 | |
| WO2018171722A1 (zh) | Mac地址同步 | |
| WO2016141818A1 (zh) | 一种业务上行转发、下行转发的方法和相应装置 | |
| WO2009076906A1 (zh) | 实现终端接入零售业务提供商的方法、装置及系统 | |
| WO2018233632A1 (zh) | 视频点播流的转发 | |
| US9729391B2 (en) | Method and apparatus for path indication | |
| CN109995637B (zh) | S-vxlan构建方法、数据转发方法及系统 | |
| CN113973045A (zh) | 一种报文传输方法及装置 | |
| CN105791130A (zh) | 路由隔离的数据转发方法及装置 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 16806685 Country of ref document: EP Kind code of ref document: A2 |