WO2009149646A1 - 端口切换方法、网络设备及网络系统 - Google Patents

端口切换方法、网络设备及网络系统 Download PDF

Info

Publication number
WO2009149646A1
WO2009149646A1 PCT/CN2009/072146 CN2009072146W WO2009149646A1 WO 2009149646 A1 WO2009149646 A1 WO 2009149646A1 CN 2009072146 W CN2009072146 W CN 2009072146W WO 2009149646 A1 WO2009149646 A1 WO 2009149646A1
Authority
WO
WIPO (PCT)
Prior art keywords
physical member
packet
type
member port
mac address
Prior art date
Application number
PCT/CN2009/072146
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 WO2009149646A1 publication Critical patent/WO2009149646A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/54Store-and-forward switching systems 
    • H04L12/56Packet switching systems

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a port switching method, a network device, and a network system.
  • a link failure between a BAS (Broadband Access Server) device and a switch is not perceived by the user, that is, a hot switch of the user when the link or the BAS device port fails.
  • BAS Broadband Access Server
  • VRRP Virtual Router Redundancy Protocol
  • a virtual router number and a virtual router IP address need to be configured on Router A and Router B, and a virtual media access control is generated.
  • Media Access Control, MAC ) address so that a virtual router is added to the network.
  • a virtual router consists of a primary router and several backup routers (such as Router A and Router B in the figure, it can be assumed that Router A is the primary router and Router B is the backup router).
  • the primary router truly implements the forwarding function. When the primary router fails. When the backup router becomes the new primary router, it takes over the work of the original primary router.
  • the packets transmitted between the host and the virtual router carry the virtual MAC address and the virtual IP address.
  • the host accesses the network through the virtual router without knowing any information about the physical router that the host actually accesses.
  • a router the primary router in the virtual router
  • it can be replaced by another router (backup router) in time to maintain communication continuity and reliability.
  • the prior art has the following problems: In the prior art router, an IP address needs to be configured, a Layer 3 network that is forwarded by IP, and a physical member port of the router is faulty. The user accessing the physical member port cannot be transferred to another physical member port. That is, the switch between ports cannot be implemented.
  • the embodiments of the present invention provide a port switching method, a network device, and a network system, which can implement switching between physical member ports of a routing device.
  • a port switching method includes:
  • the second physical port is selected
  • the TRUNK sub-interface information includes: a virtual MAC address and a user identifier allocated to the TRUNK sub-interface;
  • a network device including:
  • a confirmation unit configured to confirm that the first physical member port is unavailable
  • a selecting unit configured to select a second physical member port after confirming that the first physical member port is unavailable
  • a first sending unit configured to send the TRUNK sub-interface information of the first physical member port mapping to the second physical member port;
  • the TRUNK sub-interface information includes: a virtual MAC address and a user allocated to the TRUNK sub-interface Identification
  • a second sending unit configured to send a packet carrying the virtual MAC address to a switch that is connected to the second physical member port.
  • a network system including: a routing device and a switch,
  • the routing device is configured to: confirm that the first physical member port is unavailable, select the second physical member port, and send the virtual MAC address corresponding to the first physical member port to the second physical member port; the first physical member The virtual MAC address corresponding to the port is: a virtual MAC address assigned to the TRUNK sub-interface mapped to the first physical member port; and a packet carrying the virtual MAC address is sent to the switch connected to the second physical member port ;
  • the switch is configured to receive a packet carrying the virtual MAC address.
  • the TRUN sub-interface information mapped by the first physical member port is sent to the second physical member port, and is connected to the second physical member end.
  • the packets sent by the switch carry the virtual MAC address to switch between physical member ports of the routing device.
  • FIG. 1 is a network architecture diagram of a prior art using virtual router access
  • Embodiment 1 of the present invention is a networking diagram of Embodiment 1 of the present invention.
  • FIG. 3 is a flowchart of a method for mapping a virtual MAC address to a physical member port according to Embodiment 1 of the present invention
  • FIG. 4 is a flowchart of a port switching method according to Embodiment 1 of the present invention.
  • FIG. 5 is a flowchart of a method for confirming that a member port is unavailable according to Embodiment 1 of the present invention
  • FIG. 6 is a structural diagram of a network device according to Embodiment 2 of the present invention.
  • the embodiment of the present invention provides a port switching method, including: the routing device confirms that the first physical member port is unavailable; selects the second physical member port; and sends the information of the port aggregation TRUNK sub-interface mapped by the first physical member port to the first And the TRUN sub-interface information includes: a virtual MAC address and a user identifier that are allocated to the TRUNK sub-interface; and a packet that carries the virtual MAC address is sent to the switch that is connected to the second physical member port.
  • the technical solution provided by the embodiment of the present invention can ensure continuity and reliability of communication through switching between physical member ports.
  • the BAS device accesses the aggregation switch through an asymmetric Ethernet trunk. As shown in Figure 2, there are 4 physics under one Ethernet TRUNK interface of the BAS device. Member interfaces: GE 1/0/K GE2/0/1 > GE3/0/1 GE4/0/1, where the first two physical member interfaces (GE1/0/1 and GE2/0/1) Connected to one switch, the latter two physical member interfaces (GE3Z0/1 and GE4/0/1) are connected to another switch.
  • the first is to use the ether.
  • Step 301 The BAS device creates an Ethernet trunk interface, which is divided into Ethernet TRUNK sub-interfaces. Match the virtual MAC address and user ID.
  • the user identifier may be: a VLAN (Virtual Local Area Network) or a QinQ (also called a Layered VLAN).
  • the routing device in this embodiment may be a BAS.
  • the TRUNK sub-interface information is mapped to the physical member port of the BAS according to the user ID assigned to the Ethernet TRUNK sub-interface, and the TRUNK sub-interface information includes: MAC address and user ID.
  • Step 303 Each physical member port receives a packet broadcasted by the user, and the packet broadcasted by the user includes the VLAN/QinQ information of the user, where the packet broadcast by the user is the first type of packet.
  • Step 304 Determine whether the user identifier in the first type of packet is the user identifier in the TRUNK sub-interface information mapped by the physical member port that receives the first type of packet. If yes, go to step 305; if no, end the process. .
  • Step 305 It is assumed that the VLAN/QinQ information in the first type of packet is the VLAN/QinQ in the TRUNK sub-interface information mapped by the first physical member port.
  • the BAS device sends a response packet to the switch through the first physical member port.
  • the text includes: The virtual MAC address in the TRUNK sub-interface information.
  • Step 306 The switch saves the correspondence between the virtual MAC address and the switch port connected to the first physical member port, and sends a response packet to the user, where the response packet carries the virtual MAC address in the TRUNK sub-interface information.
  • the second type of message sent by the subsequent user to the BAS uses the virtual MAC address as the destination address.
  • the switch After the switch receives the second type of packet from the user, the switch follows the pre-stored virtual MAC address and the switch port (with the first physical member). Corresponding relationship of the switch port connected to the port, the second type of packet with the virtual MAC address being the destination address is received by the first physical member port.
  • the port switching method provided by the first embodiment of the present invention is described in detail below with reference to FIG. 4, and the method specifically includes:
  • Step 401 Confirm that the first physical member port is unavailable.
  • Step 402 Select a second physical member port according to the user identifier of each physical member port according to the user identifier in the TRUNK sub-interface information mapped by the first physical member port.
  • Step 403 Send the TRUNK sub-interface information mapped by the first physical member port to the second physical member port, where the TRUNK sub-interface information includes: a virtual MAC address and a user identifier allocated by the BAS device for the TRUNK sub-interface.
  • Step 404 Send a user probe packet to the switch by using the second physical member port, where the user probe packet carries a virtual MAC address.
  • Step 405 The switch refreshes the MAC table, that is, the switch deletes the correspondence between the originally saved virtual MAC address and the switch port connected to the first physical member port, and saves the correspondence between the virtual MAC address and the switch port connected to the second physical member port.
  • the first physical member port and the second physical member port may be on different service boards. Therefore, the port switching method described above can implement hot switching of users across the board on the routing device.
  • the method for confirming that the first physical member port is unavailable includes:
  • Step 501 After receiving the second type of packet from the user, the switch sends the first physical member of the BAS to the corresponding port of the BAS according to the correspondence between the virtual MAC address and the switch port in the second type of packet.
  • the port (connected to the switch port corresponding to the virtual MAC address) sends a second type of packet, and the response message from the BAS is not received within a certain period of time, confirming that the first physical member port is unavailable, and the virtual MAC address is aged.
  • the second type of packet includes: a user ID, a VLAN, a QinQ, a virtual MAC address, and a board and a port number.
  • Step 502 The switch broadcasts the second type of packet by using each port.
  • Step 503 After receiving the second type of packet, the BAS determines whether the type flag in the TRUNK port attribute table of the second type of packet is represented as an asymmetric TRUNK, and if yes, executing step 504; if not, according to the ordinary member The port receives the packet flow for processing.
  • Step 504 The BAS determines whether the user identifier in the second type of packet is the same as the user identifier in the TRUNK sub-interface information mapped by the physical member port that receives the second type of packet. If yes, go to step 505. If no, Go to step 507.
  • Step 505 The BAS determines whether the virtual MAC address in the second type of packet is the same as the virtual MAC address in the TRUNK sub-interface information mapped by the physical member port that receives the second type of packet. If yes, go to step 506. If no, go to step 507.
  • Step 506 The BAS determines whether the board and the port number carried in the second type of packet are the same as the board and the port number of the physical member port that receives the second type of packet. If yes, the process ends. Step 507.
  • Step 507 The BAS discards the second type of packet.
  • Step 508 The BAS uses the packet sampling detection technology to confirm that the first physical member port is unavailable according to the virtual MAC address in the discarded second type packet when the second type of packet discarded in the unit time period reaches the threshold. use.
  • a second embodiment of the present invention provides a network device, where the device includes: a first physical member port, a second physical member port, an acknowledgment unit 601, a selection unit 602, a first sending unit 603, and a second sending unit 604. , among them,
  • the confirmation unit 601 is configured to confirm that the first physical member port is unavailable
  • the selecting unit 602 is configured to select a second physical member port after confirming that the first physical member port is unavailable;
  • the first sending unit 603 is configured to send the TRUNK sub-interface information of the first physical member port mapping to the second physical member port;
  • the TRUNK sub-interface information includes: a virtual MAC address allocated to the TRUNK sub-interface and User ID;
  • the second sending unit 604 is configured to send, by using the second physical member port, a packet carrying the virtual MAC address to a switch that is connected to the second physical member port.
  • the device also includes:
  • the allocating unit 605 is configured to allocate a virtual MAC address and a user identifier to the TRUNK sub-interface.
  • the mapping unit 606 is configured to map the TRUNK sub-interface information to the physical member port, where the TRUN sub-interface information includes: allocating the TRUNK sub-interface Virtual MAC address and use Household identification
  • the first type of message receiving unit 607 is configured to receive the first type of packet carrying the user identifier.
  • the determining unit 608 is configured to determine whether the user identifier in the first type of packet is the first type of packet.
  • the response message sending unit 609 is configured to: when the determining result of the determining unit is yes, send a response message to the user, where the response message carries the virtual information in the TRUNK sub-interface information.
  • the confirmation unit 601 includes:
  • a second type of message receiving unit configured to receive a second type of text carrying a virtual MAC address and a user identifier
  • the packet acknowledgment unit is configured to: when the user identifier in the second type of packet is different from the user identifier in the TRUNK sub-interface information mapped by the physical member port that receives the second type of packet, or the second type of report When the virtual MAC address in the text is different from the virtual MAC address in the TRUN sub-interface information mapped by the physical member port that receives the second type of packet, the second type of packet is discarded.
  • a threshold value determining unit configured to determine whether the second type of packet discarded in the unit time period reaches a threshold
  • a port unavailability confirming unit configured to confirm, according to a correspondence between a virtual MAC address and a physical member port in the discarded second type of packet, when the result of the determination by the threshold determining unit is YES
  • the physical member port that is, the first physical member port is unavailable.
  • the physical member port corresponding to the virtual MAC address is: a physical member port that is mapped by the TRUNK sub-interface information including the virtual MAC address;
  • the selecting unit 602 is configured to select a second physical member port according to a user identifier in the TRUN sub-interface information mapped to the first physical member port according to a user identity balancing principle of each physical member port.
  • the third embodiment of the present invention provides a network system, including: a routing device and a switch, where the routing device allocates a virtual MAC address and a user identifier to the TRUNK sub-interface, and maps the TRUNK sub-interface information to the principle that the physical member ports are balanced.
  • the physical member port receives the first type of packet, and confirms that the user identifier in the first type of packet is the physical medium that receives the first type of packet.
  • the user identifier in the TRUNK sub-interface information mapped by the member port sends a response packet to the switch, where the response packet carries the virtual MAC address in the information of the TRUNK sub-interface; the correspondence between the switch ports, and the The user sends the response message;
  • the switch receives the second type of packet sent by the user, and sends the second to the routing device by using the switch port corresponding to the virtual MAC address according to the correspondence between the virtual MAC address and the switch port in the second type of packet.
  • the response message from the routing device is not received, it is confirmed that the virtual MAC address is aged, and the second type of packet is sent to the routing device by each port of the switch.
  • the routing device receives the second type of packet carrying the virtual MAC address and the user identifier from the switch, and the user identifier in the second type of packet and the TRUNK sub-interface information mapped by the physical member port receiving the second type of packet If the user ID is different, or the virtual MAC address in the second type of packet is different from the virtual MAC address in the TRUNK sub-interface information mapped by the physical member port that receives the second type of packet, the second type of report is discarded.
  • the switch records the correspondence between the virtual MAC address and the switch port connected to the second physical member port.
  • the information of the TRUN sub-interface mapped by the first physical member port is sent to the second physical member port, and the packet is sent to the switch connected to the second physical member port.
  • the switch connecting the second physical member port stores the mapping between the virtual MAC address and the switch port connected to the second physical member port.
  • the uplink packet carrying the virtual MAC address is carried, the uplink packet of the user can be connected according to the corresponding relationship.
  • the switch port corresponding to the virtual MAC address is sent to the routing device.
  • the routing device receives the uplink packet through the second physical member port, that is, the switch between the physical member ports of the routing device to ensure continuity and reliability of the communication. .
  • the TRUNK sub-interface information is mapped to the physical member port according to the user identifier of the TRUN sub-interface information, and the TRUNK sub-interface information is: The assigned virtual MAC address and user ID.
  • a virtual MAC address is mapped to a corresponding physical member port, and a response message carrying the virtual MAC address is sent to the user to implement load sharing of the user on different physical member ports.

Landscapes

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

Description

端口切换方法、 网络设备及网络系统
本申请要求于 2008 年 6 月 13 日提交中国专利局、 申请号为 200810111286.5、 发明名称为 "端口切换方法、 网络设备及网络系统" 的中国 专利申请的优先权, 其全部内容通过引用结合在本申请中。
技术领域
本发明涉及通信技术领域, 特别涉及一种端口切换方法、 网络设备及网络 系统。
背景技术
在宽带接入网中,要求 BAS ( Broadband Access Server, 宽带接入服务器) 设备和交换机间的链路故障对用户不感知, 即实现链路或者 BAS设备端口故 障时用户的热切换。
现有技术提供一种 VRRP ( Virtual Router Redundancy Protocol, 虚拟备份 路由器)技术, 参阅图 1 , 需要在路由器 A和路由器 B上配置虚拟路由器号 和虚拟路由器 IP地址,同时产生一个虚拟媒体接入控制( Media Access Control, MAC ) 地址, 这样在该网络中就加入了一个虚拟路由器。 即一个虚拟路由器 由一个主路由器和若干个备份路由器(如图中的路由器 A和路由器 B, 可假 定路由器 A为主路由器, 路由器 B为备份路由器)组成, 主路由器真正实现 转发功能, 当主路由器故障时, 备份路由器将成为新的主路由器, 接替原主路 由器的工作。 主机与虛拟路由器通讯时所传输的报文中携带虚拟 MAC和虚拟 IP, 主机通过虛拟路由器接入网络, 而无需了解主机实际所接入的物理路由器 的任何信息, 能保证当主机的下一跳路由器(虚拟路由器中的主路由器)故障 时, 可以及时由另一台路由器(备份路由器)来代替, 从而保持通讯的连续性 和可靠性。
在对现有技术的研究和实践过程中, 发明人发现现有技术存在以下问题: 现有技术的路由器中需要配置 IP地址, 于 IP转发的三层网络, 而且 路由器的某个物理成员端口故障时,不能将接入该物理成员端口的用户转入其 他物理成员端口, 即不能实现端口间的切换。
发明内容 本发明实施例提供一种端口切换方法、 网络设备及网络系统, 能够实现路 由设备的物理成员端口间的切换。
有鉴于此, 本发明实施例提供:
一种端口切换方法, 包括:
当确认第一物理成员端口不可用时, 选择第二物理成 端口;
将所述第一物理成员端口映射的端口汇聚 TRUNK 子接口信息发送给第 二物理成员端口; 所述 TRUNK子接口信息包括: 为所述 TRUNK子接口分配 的虚拟 MAC地址和用户标识;
向连接所述第二物理成员端口的交换机发送携带所述虚拟 MAC地址的报 文。
一种网络设备, 包括:
确认单元, 用于确认第一物理成员端口不可用;
选择单元, 用于在确认第一物理成员端口不可用后, 选择第二物理成员端 口;
第一发送单元,用于将所述第一物理成员端口映射的 TRUNK子接口信息 发送给第二物理成员端口; 所述 TRUNK子接口信息包括: 为所述 TRUNK子 接口分配的虚拟 MAC地址和用户标识;
第二发送单元,用于向连接所述第二物理成员端口的交换机发送携带所述 虚拟 MAC地址的报文。
一种网络系统, 包括: 路由设备和交换机,
所述路由设备, 用于确认第一物理成员端口不可用, 选择第二物理成员端 口,将所述第一物理成员端口对应的虚拟 MAC地址发送给第二物理成员端口; 所述第一物理成员端口对应的虚拟 MAC地址是: 为映射到所述第一物理成员 端口的 TRUNK子接口所分配的虚拟 MAC地址; 向接所述第二物理成员端口 的交换机发送携带所述虚拟 MAC地址的报文;
所述交换机, 用于接收携带所述虚拟 MAC地址的报文。
本发明实施例在第一物理成员端口不可用时,将第一物理成员端口映射的 TRUN 子接口信息发送给第二物理成员端口, 并在向连接该第二物理成员端 口的交换机发送的报文中携带虚拟 MAC地址, 以实现路由设备物理成员端口 间的切换。
附图说明
图 1为现有技术提供的利用虚拟路由器接入的网络架构图;
图 2为本发明实施例一所提供的组网图;
图 3为本发明实施例一所提供的虚拟 MAC地址映射到物理成员端口的方 法流程图;
图 4为本发明实施例一所提供的端口切换方法流程图;
图 5为本发明实施例一所提供的确认成员端口不可用的方法流程图; 图 6为本发明实施例二提供的网络设备结构图。
具体实施方式
本发明实施例提供一种端口切换方法, 包括: 路由设备确认第一物理成员 端口不可用; 选择第二物理成员端口; 将所述第一物理成员端口映射的端口汇 聚 TRUNK子接口信息发送给第二物理成员端口;所述 TRUN 子接口信息包 括: 为所述 TRUNK子接口分配的虚拟 MAC地址和用户标识; 向接所述第二 物理成员端口的交换机发送携带所述虚拟 MAC地址的报文。 使用本发明实施 例提供的技术方案, 能够通过物理成员端口间的切换,保证通讯的连续性和可 靠性。
如下先对 BAS ( Broadband Access Server, 宽带接入服务器)设备接口作 简单介绍: BAS设备通过非对称以太 Trunk接入汇聚交换机, 如图 2所示, BAS设备的一个以太 TRUNK接口下有 4个物理成员接口: 千兆以太网 GE1/0/K GE2/0/1 > GE3/0/1 GE4/0/1 , 其中, 前两个物理成员接口 ( GE1/0/1 和 GE2/0/1 )与一台交换机相连接,后两个物理成员接口( GE3Z0/1和 GE4/0/1 ) 与另一台交换机相连接。
为使后续本发明实施例所提供的端口切换方法更加清楚明白,先对以以太
TRUN 子接口为单位, 将虚拟 MAC地址映射到物理成员端口的过程进行详 细介绍, 参阅图 3, 该流程具体包括:
步骤 301、 BAS设备创建以太 TRUNK子接口, 为以太 TRUNK子接口分 配虚拟 MAC地址和用户标识。 其中, 用户标识可以是: VLAN ( Virtual Local Area Network, 虚拟局域网)或者 QinQ (也称 Stacked VLAN, 二层虚拟局域 网) 标识, 该实施例中的路由设备可以是 BAS。
步骤 302、 利用为以太 TRUNK子接口所分配的用户标识, 按照各物理成 员端口的用户标识均衡的原则 , 将 TRUNK子接口信息映射到 BAS的物理成 员端口, TRUNK子接口信息包括: 所分配的虚拟 MAC地址和用户标识。
步骤 303、 各物理成员端口接收用户广播的报文, 用户广播的报文中包含 用户的 VLAN/QinQ信息, 其中, 用户广播的报文是第一类报文。
步骤 304、 判断第一类报文中的用户标识是否是接收第一类报文的物理成 员端口所映射的 TRUNK子接口信息中的用户标识, 如果是, 执行步骤 305; 如果否, 结束本流程。
步骤 305、 假定第一类报文中的 VLAN/QinQ信息是第一物理成员端口映 射的 TRUNK子接口信息中 VLAN/QinQ, BAS设备通过第一物理成员端口向 交换机发送响应报文, 该响应报文中包括: 该 TRUNK子接口信息中的虚拟 MAC地址。
步骤 306、 交换机保存虚拟 MAC地址与连接该第一物理成员端口的交换 机端口的对应关系, 并向用户发送响应报文, 该响应报文中携带 TRUNK子接 口信息中的虚拟 MAC地址。
后续用户向 BAS发送的第二类艮文中都以虚拟 MAC地址作为目的地址, 这样交换机收到来自用户的第二类报文后, 根据预先保存的虚拟 MAC地址与 交换机端口 (与第一物理成员端口连接的交换机端口)的对应关系, 通过该交 换机端口向 BAS设备发送用户的第二类报文, 这样所有以虚拟 MAC地址为 目的地址的第二类报文都被第一物理成员端口接收。
下面参阅图 4, 对本发明实施例一所提供的端口切换方法进行详细介绍, 该方法具体包括:
步骤 401、 确认第一物理成员端口不可用。
该步骤的具体实现方式如图 5所示。 步骤 402、 根据第一物理成员端口所映射的 TRUNK子接口信息中的用户 标识, 按照各物理成员端口的用户标识均衡的原则, 选择第二物理成员端口。
步骤 403、 将第一物理成员端口所映射的 TRUNK子接口信息发送给第二 物理成员端口, 其中, TRUNK子接口信息包括: BAS设备为该 TRUNK子接 口所分配的虚拟 MAC地址和用户标识。
步骤 404、 通过第二物理成员端口向交换机发送用户探测报文, 该用户探 测报文中携带虚拟 MAC地址。
步骤 405、 交换机刷新 MAC表, 即交换机删除原来保存的虚拟 MAC地 址与连接第一物理成员端口的交换机端口的对应关系 , 保存虚拟 MAC地址与 连接第二物理成员端口的交换机端口的对应关系。
其中,上述第一物理成员端口和第二物理成员端口可能分部在不同的业务 单板上, 因此, 上面描述的端口切换方法可以实现路由设备上跨单板的用户热 切换。
参阅图 5, 确认第一物理成员端口不可用的方法流程具体包括:
步骤 501、 交换机接收来自用户的第二类报文后, 根据第二类报文中的虚 拟 MAC地址与交换机端口的对应关系, 通过虚拟 MAC地址所对应的交换机 端口, 向 BAS的第一物理成员端口 (与虚拟 MAC地址所对应的交换机端口 连接)发送第二类报文, 在特定时间段内接收不到来自 BAS的响应消息, 确 认第一物理成员端口不可用, 该虚拟 MAC地址被老化。 其中, 该第二类报文 包括: 用户标识 VLAN/QinQ、 虚拟 MAC地址、 报文接入的单板及端口号。
步骤 502、 交换机通过各端口广播该第二类报文。
步骤 503、 BAS接收到第二类报文后, 判断接收该第二类报文的 TRUNK 端口属性表中的类型标志是否表示为非对称 TRUNK, 如果是, 执行步骤 504; 如果否, 按照普通成员端口接收报文流程来处理。
步骤 504、 BAS判断第二类报文中的用户标识与接收该第二类报文的物理 成员端口所映射的 TRUNK子接口信息中的用户标识是否相同, 如果是, 执行 步骤 505, 如果否, 执行步骤 507。 步骤 505、 BAS判断第二类报文中的虚拟 MAC地址与接收该第二类报文 的物理成员端口所映射的 TRUNK子接口信息中的虚拟 MAC地址是否相同, 如果是, 执行步骤 506, 如果否, 执行步骤 507。
步骤 506、 BAS判断第二类报文中携带的单板及端口号与接收该第二类报 文的物理成员端口的单板及端口号是否相同, 如果是, 结束本流程, 如果否, 执行步骤 507。
步骤 507、 BAS丢弃第二类报文。
步骤 508、 BAS利用报文采样检测技术, 当单位时间段内被丢弃的第二类 报文达到阈值时, 根据被丢弃的第二类报文中的虚拟 MAC地址 , 确认第一物 理成员端口不可用。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤 是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可 读存储介质中, 例如只读存储器, 磁盘或光盘等。
参阅图 6, 本发明实施例二提供一种网络设备, 该设备包括: 第一物理成 员端口,第二物理成员端口,确认单元 601 ,选择单元 602,第一发送单元 603 , 第二发送单元 604, 其中,
确认单元 601 , 用于确认第一物理成员端口不可用;
选择单元 602, 用于在确认第一物理成员端口不可用后, 选择第二物理成 员端口;
第一发送单元 603 , 用于将所述第一物理成员端口映射的 TRUNK子接口 信息发送给第二物理成员端口;所述 TRUNK子接口信息包括:为所述 TRUNK 子接口分配的虛拟 MAC地址和用户标识;
第二发送单元 604, 用于通过第二物理成员端口, 向连接所述第二物理成 员端口的交换机发送携带所述虚拟 MAC地址的报文。
该设备还包括:
分配单元 605, 用于为 TRUNK子接口分配虚拟 MAC地址和用户标识; 映射单元 606, 用于将 TRUNK 子接口信息映射到物理成员端口, 所述 TRUN 子接口信息包括: 为所述 TRUNK子接口分配的虚拟 MAC地址和用 户标识;
第一类报文接收单元 607 , 用于接收携带用户标识的第一类报文; 判断单元 608, 用于判断所述第一类报文中的用户标识是否是接收所述第 一类报文的物理成员端口所映射的 TRUNK子接口信息中的用户标识;
响应报文发送单元 609, 用于当所述判断单元的判断结果为是时, 向所述 用户发送响应报文, 所述响应报文中携带所述 TRUNK 子接口信息中的虚拟
MAC地址。
其中 , 所述确认单元 601包括:
第二类报文接收单元, 用于接收携带虚拟 MAC地址和用户标识的第二类 · ^文;
丢弃报文确认单元,用于当所述第二类报文中的用户标识与接收第二类报 文的物理成员端口所映射的 TRUNK子接口信息中的用户标识不同, 或者, 第 二类报文中的虚拟 MAC 地址与接收第二类报文的物理成员端口所映射的 TRUN 子接口信息中的虚拟 MAC地址不同时, 确认丢弃第二类报文;
阈值判断单元, 用于判断单位时间段内被丢弃的第二类报文是否达到阈 值;
端口不可用确认单元, 用于当所述阈值判断单元的判断结果为是时,根据 所述被丢弃的第二类报文中的虚拟 MAC 地址与物理成员端口之间的对应关 系, 确认所述物理成员端口即第一物理成员端口不可用。 其中, 虚拟 MAC地 址对应的物理成员端口为: 包括该虚拟 MAC地址的 TRUNK子接口信息所映 射到的物理成员端口;
其中, 所述选择单元 602, 用于根据映射到所述第一物理成员端口的 TRUN 子接口信息中的用户标识, 按照各物理成员端口的用户标识均衡的原 则, 选择第二物理成员端口。
本发明实施例三提供一种网络系统, 包括: 路由设备和交换机, 路由设备为 TRUNK子接口分配虚拟 MAC地址和用户标识, 按照各物理 成员端口用户标识均衡的原则, 将 TRUNK子接口信息映射到物理成员端口; 接收第一类报文,确认第一类报文中的用户标识是接收所述第一类报文的物理 成员端口所映射的 TRUNK 子接口信息中的用户标识, 向交换机发送响应报 文, 所述响应报文中携带所述 TRUNK子接口信息中的虚拟 MAC地址; 交换机端口的对应关系, 并向所述用户发送所述响应报文;
交换机接收用户发送的所述第二类报文, 根据第二类报文中的虚拟 MAC 地址与交换机端口的对应关系 , 通过所述虚拟 MAC地址所对应的交换机端口 向路由设备发送所述第二类报文; 当未接收到来自所述路由设备的响应消息 时, 确认所述虚拟 MAC地址老化, 通过所述交换机的各端口向所述路由设备 发送所述第二类报文。
路由设备接收来自交换机的携带虚拟 MAC 地址和用户标识的第二类报 文,当所述第二类报文中的用户标识与接收第二类报文的物理成员端口所映射 的 TRUNK子接口信息中的用户标识不同, 或者, 第二类报文中的虚拟 MAC 地址与接收第二类报文的物理成员端口所映射的 TRUNK 子接口信息中的虚 拟 MAC地址不同时, 确认丢弃第二类报文; 判断单位时间段内被丢弃的第二 类报文是否达到阈值; 如果是, 根据所述被丢弃的第二类报文中的虚拟 MAC 地址与物理成员端口之间的对应关系,确认所述物理成员端口即第一物理成员 端口不可用; 将所述第一物理成员端口对应的虚拟 MAC地址发送给第二物理 成员端口; 向连接所述第二物理成员端口的交换机发送携带所述虚拟 MAC地 址的报文;
交换机记录所述虚拟 MAC地址与连接所述第二物理成员端口的交换机端 口的对应关系。
从以上分析可以看出, 本发明实施例具有如下有益效果:
本发明实施例在第一物理成员端口不可用时,将第一物理成员端口映射的 TRUN 子接口信息发送给第二物理成员端口, 并在向连接该第二物理成员端 口的交换机发送的报文中携带虚拟 MAC地址, 以实现路由设备物理成员端口 间的切换, 连接该第二物理成员端口的交换机保存虚拟 MAC地址和连接第二 物理成员端口的交换机端口的对应关系,后续该交换机接收到用户发送的携带 该虚拟 MAC地址的上行报文时, 能根据上述对应关系, 将用户的上行报文通 过与该虚拟 MAC地址对应的交换机端口发送到路由设备, 该路由设备通过第 二物理成员端口接收该上行报文, 即通过路由设备物理成员端口间的切换, 以 保证通讯的连续性和可靠性。
本发明实施例根据 TRUN 子接口信息中的用户标识,按照各物理成员端 口用户标识均衡的原则 , 将 TRUNK子接口信息映射到物理成员端口, 其中, TRUN 子接口信息包括: 为所述 TRUNK子接口分配的虚拟 MAC地址和用 户标识。 将不同的虚拟 MAC映射到对应的物理成员端口上, 并向用户发送携 带该虚拟 MAC地址的响应 艮文, 以实现用户在不同的物理成员端口的负载分 担。
以上对本发明实施例所提供的端口切换方法、网络设备及网络系统进行了 详细介绍, 对于本领域的一般技术人员, 依据本发明实施例的思想, 在具体实 施方式及应用范围上均会有改变之处, 综上所述, 本说明书内容不应理解为对 本发明的限制。

Claims

权 利 要 求
1、 一种端口切换方法, 其特征在于, 包括:
当确认第一物理成员端口不可用时, 选择第二物理成 端口;
将所述第一物理成员端口映射的端口汇聚 TRUNK 子接口信息发送给第 二物理成员端口; 所述 TRUNK子接口信息包括: 为所述 TRUNK子接口分配 的虛拟媒体接入控制 MAC地址和用户标识;
向连接所述第二物理成员端口的交换机发送携带所述虚拟 MAC地址的报 文。
2、 根据权利要求 1所述的方法, 其特征在于, 在确认第一物理成员端口 不可用之前, 该方法还包括:
为 TRUNK子接口分配虛拟 MAC地址和用户标识, 将 TRUNK子接口信 息映射到各物理成员端口。
3、 根据权利要求 2所述的方法, 其特征在于, 所述将 TRUNK子接口信 息映射到各物理成员端口具体为:
根据 TRUNK子接口信息中的用户标识,按照各物理成员端口用户标识均 衡的原则 , 将 TRUNK子接口信息映射到物理成员端口。
4、 根据权利要求 1所述的方法, 其特征在于, 所述确认第一物理成员端 口不可用具体为:
当路由设备接收的第二类报文中的用户标识与接收所述第二类报文的物 理成员端口所映射的 TRUNK子接口信息中的用户标识不同, 或者, 路由设备 接收的第二类报文中的虚拟 MAC地址与接收第二类报文的物理成员端口所映 射的 TRUNK子接口信息中的虚拟 MAC地址不同时, 所述路由设备确认丢弃 所述第二类报文;
当单位时间段内被丢弃的第二类报文达到阈值时,根据所述被丢弃的第二 类报文中的虚拟 MAC地址, 确认第二类报文中的虚拟 MAC地址所对应的物 理成员端口不可用, 所述第二类报文中的虚拟 MAC地址所对应的物理成员端 口为第一物理成员端口。
5、 根据权利要求 4所述的方法, 其特征在于, 在确认第一物理成员端口 不可用之前, 该方法还包括: 所述交换机接收用户发送的第二类报文, 根据第二类报文中的虛拟 MAC 地址和预存的虚拟 MAC地址与交换机端口的对应关系, 通过所述第二类报文 中的虚拟 MAC地址所对应的交换机端口向路由设备发送所述第二类报文; 所述交换机当未接收到来自所述路由设备的响应消息时,确认所述第二类 报文中的虚拟 MAC地址老化, 通过所述交换机的各端口向所述路由设备发送 所述第二类报文。
6、 根据权利要求 4所述的方法, 其特征在于, 在确认第一物理成员端口 不可用之前, 该方法还包括:
路由设备接收第一类报文,确认第一类报文中的用户标识是接收所述第一 类才艮文的物理成员端口所映射的 TRUNK子接口信息中的用户标识,通过交换 机向用户发送响应报文,所述响应报文中携带所映射的 TRUNK子接口信息中 的虚拟 MAC地址,使所述用户发送的第二类报文中携带所述虚拟 MAC地址。
7、 根据权利要求 6所述的方法, 其特征在于, 在通过交换机向用户发送 响应报文时, 该方法还包括: 所述交换机保存所述响应报文中的虚拟 MAC地 址与连接所述接收第一类报文的物理成员端口的交换机端口的对应关系。
8、 根据权利要求 1所述的方法, 其特征在于,
所述选择第二物理成员端口具体为:
根据映射到所述第一物理成员端口的 TRUNK子接口信息中的用户标识, 按照各物理成员端口的用户标识均衡的原则, 选择第二物理成员端口。
9、 根据权利要求 1所述的方法, 其特征在于, 在向连接所述第二物理成 员端口的交换机发送携带所述虚拟 MAC地址的报文之后, 该方法还包括: 所述交换机记录所述虚拟 MAC地址与连接所述第二物理成员端口的交换 机端口的对应关系。
10、 一种网络设备, 其特征在于, 包括:
确认单元, 用于确认第一物理成员端口不可用;
选择单元, 用于在确认第一物理成员端口不可用后, 选择第二物理成员端 口;
第一发送单元,用于将所述第一物理成员端口映射的 TRUNK子接口信息 发送给第二物理成员端口; 所述 TRUNK子接口信息包括: 为所述 TRUNK子 接口分配的虛拟 MAC地址和用户标识;
第二发送单元,用于向连接所述第二物理成员端口的交换机发送携带所述 虚拟 MAC地址的报文。
11、 根据权利要求 10所述的设备, 其特征在于, 该设备还包括: 分配单元, 用于为 TRUNK子接口分配虚拟 MAC地址和用户标识; 映射单元, 用于将 TRUNK子接口信息映射到物理成员端口。
12、 根据权利要求 11所述的设备, 其特征在于,
所述确认单元包括: 第二类报文接收单元, 用于接收第二类报文;
丢弃报文确认单元,用于当所述第二类报文中的用户标识与接收第二类报 文的物理成员端口所映射的 TRUNK子接口信息中的用户标识不同, 或者, 第 二类报文中的虚拟 MAC 地址与接收第二类报文的物理成 端口所映射的 TRUN 子接口信息中的虚拟 MAC地址不同时, 确认丟弃所述第二类报文; 阈值判断单元, 用于判断单位时间段内被丟弃的第二类报文是否达到阈 值; 端口不可用确认单元, 用于当所述阈值判断单元的判断结果为是时,根据 所述被丢弃的第二类报文中的虚拟 MAC地址,确认第二类报文中的虚拟 MAC 地址所对应的物理成员端口不可用, 所述第二类报文中的虚拟 MAC地址所对 应的物理成员端口为所述第一物理成员端口。
13、 根据权利要求 12所述的设备, 其特征在于, 该设备还包括: 第一类报文接收单元, 用于接收第一类报文;
判断单元,用于判断所述第一类报文中的用户标识是否是接收所述第一类 文的物理成员端口所映射的 TRUNK子接口信息中的用户标识;
响应报文发送单元, 用于当所述判断单元的判断结果为是时, 向所述用户 发送响应报文, 所述响应报文中携带所述 TRUNK子接口信息中的虚拟 MAC 地址。
14、 根据权利要求 10所述的设备, 其特征在于, 所述选择单元,用于根据映射到所述第一物理成员端口的 TRUNK子接口 信息中的用户标识, 按照各物理成员端口的用户标识均衡的原则, 选择第二物 理成员端口。
15、 一种网络系统, 其特征在于, 包括: 路由设备和交换机,
所述路由设备, 用于确认第一物理成员端口不可用, 选择第二物理成员端 口,将所述第一物理成员端口对应的虚拟 MAC地址发送给第二物理成员端口; 所述第一物理成员端口对应的虚拟 MAC地址是: 为映射到所述第一物理成员 端口的 TRUNK子接口所分配的虚拟 MAC地址; 向接所述第二物理成员端口 的交换机发送携带所述虚拟 MAC地址的报文;
所述交换机, 用于接收携带所述虚拟 MAC地址的报文。
PCT/CN2009/072146 2008-06-13 2009-06-05 端口切换方法、网络设备及网络系统 WO2009149646A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN 200810111286 CN101299718B (zh) 2008-06-13 2008-06-13 端口切换方法、网络设备及网络系统
CN200810111286.5 2008-06-13

Publications (1)

Publication Number Publication Date
WO2009149646A1 true WO2009149646A1 (zh) 2009-12-17

Family

ID=40079410

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/072146 WO2009149646A1 (zh) 2008-06-13 2009-06-05 端口切换方法、网络设备及网络系统

Country Status (2)

Country Link
CN (1) CN101299718B (zh)
WO (1) WO2009149646A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107682277A (zh) * 2017-10-11 2018-02-09 郑州云海信息技术有限公司 一种设备fc端口间的通信方法、装置及介质
CN111092782A (zh) * 2018-10-24 2020-05-01 迈普通信技术股份有限公司 被测通信设备、通信设备端口数据转发测试系统及方法
CN113206751A (zh) * 2021-03-15 2021-08-03 新华三技术有限公司合肥分公司 一种端口的配置、切换方法、虚拟机和服务器

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101299718B (zh) * 2008-06-13 2011-04-13 华为技术有限公司 端口切换方法、网络设备及网络系统
CN102136931B (zh) 2010-09-20 2013-12-04 华为技术有限公司 虚端口网络策略配置方法、一种网络管理中心和相关设备
CN102137009B (zh) * 2011-01-31 2015-01-07 华为技术有限公司 网络中的二层业务处理方法和系统以及设备
CN102413052B (zh) * 2011-11-30 2015-08-19 华为技术有限公司 一种接入网络的方法、装置及系统
WO2014089746A1 (zh) * 2012-12-10 2014-06-19 华为技术有限公司 报文转发方法及装置
CN104320282B (zh) * 2014-10-31 2017-12-15 新华三技术有限公司 虚拟边缘端口汇聚系统中虚拟机主备切换方法及物理主机
CN109246007A (zh) * 2017-07-10 2019-01-18 杭州达乎科技有限公司 聚合接口的主备端口切换方法、存储装置和网络设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1809032A (zh) * 2006-02-20 2006-07-26 杭州华为三康技术有限公司 媒体接入控制层地址的动态学习方法
CN1996925A (zh) * 2006-12-25 2007-07-11 华为技术有限公司 链路聚合方法、装置、mac帧收发方法和系统
JP2008060831A (ja) * 2006-08-30 2008-03-13 Nippon Telegr & Teleph Corp <Ntt> エッジスイッチ、コアスイッチ、ネットワークシステムおよびフレーム転送方法
CN101155109A (zh) * 2006-09-30 2008-04-02 华为技术有限公司 一种以太网交换系统及设备
CN101299718A (zh) * 2008-06-13 2008-11-05 华为技术有限公司 端口切换方法、网络设备及网络系统

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6151324A (en) * 1996-06-03 2000-11-21 Cabletron Systems, Inc. Aggregation of mac data flows through pre-established path between ingress and egress switch to reduce number of number connections

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1809032A (zh) * 2006-02-20 2006-07-26 杭州华为三康技术有限公司 媒体接入控制层地址的动态学习方法
JP2008060831A (ja) * 2006-08-30 2008-03-13 Nippon Telegr & Teleph Corp <Ntt> エッジスイッチ、コアスイッチ、ネットワークシステムおよびフレーム転送方法
CN101155109A (zh) * 2006-09-30 2008-04-02 华为技术有限公司 一种以太网交换系统及设备
CN1996925A (zh) * 2006-12-25 2007-07-11 华为技术有限公司 链路聚合方法、装置、mac帧收发方法和系统
CN101299718A (zh) * 2008-06-13 2008-11-05 华为技术有限公司 端口切换方法、网络设备及网络系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LI, DESHUI: "Study on the principle of realizing the VLAN based on IEEE 802.1 Q frame tag", INFORMATION TECHNOLOGY, no. 10, October 2006 (2006-10-01), pages 68 - 70 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107682277A (zh) * 2017-10-11 2018-02-09 郑州云海信息技术有限公司 一种设备fc端口间的通信方法、装置及介质
CN111092782A (zh) * 2018-10-24 2020-05-01 迈普通信技术股份有限公司 被测通信设备、通信设备端口数据转发测试系统及方法
CN111092782B (zh) * 2018-10-24 2022-04-05 迈普通信技术股份有限公司 被测通信设备、通信设备端口数据转发测试系统及方法
CN113206751A (zh) * 2021-03-15 2021-08-03 新华三技术有限公司合肥分公司 一种端口的配置、切换方法、虚拟机和服务器
CN113206751B (zh) * 2021-03-15 2022-07-12 新华三技术有限公司合肥分公司 一种端口的配置、切换方法、虚拟机和服务器

Also Published As

Publication number Publication date
CN101299718B (zh) 2011-04-13
CN101299718A (zh) 2008-11-05

Similar Documents

Publication Publication Date Title
US11863625B2 (en) Routing messages between cloud service providers
WO2009149646A1 (zh) 端口切换方法、网络设备及网络系统
Del Piccolo et al. A survey of network isolation solutions for multi-tenant data centers
US7808994B1 (en) Forwarding traffic to VLAN interfaces built based on subscriber information strings
JP4587446B2 (ja) ネットワークシステム、並びにスイッチ装置及び経路管理サーバ及びそれらの制御方法、及び、コンピュータプログラム及びコンピュータ可読記憶媒体
EP1693996B1 (en) Automatic discovery of psuedo-wire peer addresses in ethernet-based networks
US20130185446A1 (en) Method and device for connecting to virtual private network across domains
WO2017215390A1 (zh) 一种纵向堆叠系统的数据转发端口选择方法及装置
US10523464B2 (en) Multi-homed access
WO2015014187A1 (zh) 一种支持多租户的数据转发方法和装置
WO2009132594A1 (zh) 实现私网之间转发数据的方法和系统
WO2009082905A1 (fr) Procédé système et dispositif commutateur permettant l&#39;établissement dynamique de réseau local virtuel de multidiffusion
WO2011153679A1 (zh) 业务配置方法、设备和系统
WO2011113393A2 (zh) 一种实现虚拟局域网标识转换的方法及装置
EP2466796B1 (en) User access method, system and access server, access device
WO2013071765A1 (zh) 为用户终端分配ip地址的方法、装置和系统
WO2013159549A1 (zh) 一种建立和使用浮动网段的方法、装置和系统
US7990871B2 (en) Packet flood control
WO2014124557A1 (zh) 光纤通道中实现节点端口虚拟化的方法,装置和系统
JP2005057693A (ja) ネットワーク仮想化システム
JP4946692B2 (ja) Vpnユーザ管理方法、vpnサービスネットワークシステム、vpn接続サーバ、vpn転送装置およびプログラム
WO2016107392A1 (zh) 连接实现方法、网络服务器和网关网元
WO2012122824A1 (zh) 报文注册的方法、交换机
KR100702783B1 (ko) 동일 mac 주소를 갖는 가입자 단말 처리 시스템 및 처리방법

Legal Events

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

Ref document number: 09761271

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 09761271

Country of ref document: EP

Kind code of ref document: A1