CN111447295A - Hardware address negotiation method and device - Google Patents

Hardware address negotiation method and device Download PDF

Info

Publication number
CN111447295A
CN111447295A CN202010133798.2A CN202010133798A CN111447295A CN 111447295 A CN111447295 A CN 111447295A CN 202010133798 A CN202010133798 A CN 202010133798A CN 111447295 A CN111447295 A CN 111447295A
Authority
CN
China
Prior art keywords
hardware address
evpn gateway
negotiation
local
evpn
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.)
Granted
Application number
CN202010133798.2A
Other languages
Chinese (zh)
Other versions
CN111447295B (en
Inventor
郭振华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Security Technologies Co Ltd
Original Assignee
New H3C Security Technologies Co Ltd
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 New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN202010133798.2A priority Critical patent/CN111447295B/en
Publication of CN111447295A publication Critical patent/CN111447295A/en
Application granted granted Critical
Publication of CN111447295B publication Critical patent/CN111447295B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5046Resolving address allocation conflicts; Testing of addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing

Landscapes

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

Abstract

The invention provides a hardware address negotiation method and a device, wherein the method comprises the following steps: sending a hardware address detection message according to the hardware address negotiation period; identifying hardware address detection messages sent by other EVPN gateways in the same virtual forwarding instance based on the virtual forwarding instance identification carried by each received hardware address detection message; determining that the EVPN gateway network address carried by the identified hardware address detection message is consistent with the local EVPN gateway network address; when the EVPN gateway hardware address carried by the identified hardware address detection message is inconsistent with the local EVPN gateway hardware address, if the local EVPN gateway hardware address has high priority, sending a response message with a main identifier according to a negotiation response period; and if the EVPN gateway hardware address carried by the identified hardware address detection message has high priority, replacing the local EVPN gateway hardware address, and sending a response message with a slave identifier according to a negotiation response period.

Description

Hardware address negotiation method and device
Technical Field
The present invention relates to communication technologies, and in particular, to a method and an apparatus for hardware address negotiation.
Background
AN EVPN (Ethernet Virtual Private Network) is a two-layer VPN technology, where a control plane uses MP-BGP to advertise routing information of the EVPN, a data plane uses VX L AN (Virtual extensible local Area Network) protocol to encapsulate forwarded data packets, and the EVPN gateway provides two-layer interconnection for users of the same VSI (Virtual Switch Instance) and three-layer interconnection for users of different subnets in the VSI and provides three-layer interconnection with AN external Network, so that the same hardware address needs to be configured for the distributed gateways of the same VSI, as shown in fig. 1, when the distributed gateways receive data packets addressed to terminals in the VSI, the hardware addresses of multiple distributed gateways in the same VSI are not consistent, and the terminals in the VSI learn the same hardware address of the same VSI on one port, and the MAC addresses of different VSIs migrated, resulting in migration of different hardware addresses.
Disclosure of Invention
The invention aims to provide a hardware address negotiation method and a device, which can make the hardware addresses of distributed gateways in one VSI instance in an EVPN network consistent.
In order to achieve the above object, the present invention provides a hardware address negotiation method, wherein the method comprises: sending a hardware address detection message according to the hardware address negotiation period; the virtual forwarding instance VSI identifier is carried in the virtual forwarding instance VSI; a local EVPN gateway network address; a local EVPN gateway hardware address; identifying hardware address detection messages sent by other EVPN gateways in the same virtual forwarding instance based on the virtual forwarding instance identification carried by each received hardware address detection message; determining that the EVPN gateway network address carried by the identified hardware address detection message is consistent with the local EVPN gateway network address; comparing the EVPN gateway hardware address carried by the identified hardware address detection message with the local EVPN gateway hardware address; if not, comparing the EVPN gateway hardware address carried by the identified hardware address detection message with the local EVPN gateway hardware address; when the hardware address priority of the local EVPN gateway is high, sending a response message with a main identifier according to a negotiation response period; when the EVPN gateway hardware address carried by the identified hardware address detection message has high priority, replacing the local EVPN gateway hardware address; and sending a response message with the slave identification.
In order to achieve the above object, the present invention further provides a hardware address negotiation apparatus, wherein the apparatus includes a detection module, configured to send a hardware address detection packet according to a hardware address negotiation period; the virtual forwarding instance VSI identifier is carried in the virtual forwarding instance VSI; a local EVPN gateway network address; a local EVPN gateway hardware address; the receiving module is used for identifying hardware address detection messages sent by other EVPN gateways in the same virtual forwarding instance based on the virtual forwarding instance identification carried by each received hardware address detection message; the network address identification module is used for determining that the EVPN gateway network address carried by the identified hardware address detection message is consistent with the local EVPN gateway network address; the negotiation module is used for comparing the EVPN gateway hardware address carried by the identified hardware address detection message with the local EVPN gateway hardware address; if not, comparing the EVPN gateway hardware address carried by the identified hardware address detection message with the local EVPN gateway hardware address; when the hardware address priority of the local EVPN gateway is high, sending a response message with a main identifier according to a negotiation response period; when the EVPN gateway hardware address carried by the identified hardware address detection message has high priority, replacing the local EVPN gateway hardware address; and sending a response message with the slave identification.
The invention has the advantages that the hardware addresses of a plurality of distributed gateways in the same VSI of the EVPN network are the same, and the MAC migration of terminals in the VSI caused by ARP messages sent by the gateways due to different hardware addresses is avoided.
Drawings
Fig. 1 is a schematic diagram of an EVPN network architecture;
FIG. 2 is a flowchart of an embodiment of a hardware address negotiation method provided in the present invention;
FIG. 3 is a flowchart of another embodiment of a hardware address negotiation method provided in the present invention;
FIG. 4 is a flowchart of a hardware address negotiation method according to another embodiment of the present invention;
fig. 5 is a schematic diagram of an embodiment of a hardware address negotiation apparatus according to the present invention.
Detailed Description
A detailed description will be given of a number of examples shown in a number of figures. In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. Well-known methods, procedures, components and circuits have not been described in detail so as not to obscure the examples.
The term "including" as that term is used is meant to include, but is not limited to; the term "comprising" means including but not limited to; the terms "above," "within," and "below" include the instant numbers; the terms "greater than" and "less than" mean that the number is not included. The term "based on" means based on at least a portion thereof.
Fig. 2 shows a hardware address negotiation method according to an embodiment of the present invention, where the method includes the following steps:
step 201, sending a hardware address detection message according to the hardware address negotiation period.
Carrying a virtual forwarding instance (VSI) identifier; a local EVPN gateway network address; local EVPN gateway hardware address.
Step 202, identifying hardware address detection messages sent by other EVPN gateways in the same virtual forwarding instance based on the virtual forwarding instance identifier carried by each received hardware address detection message.
Step 203, determining that the network address of the EVPN gateway carried by the identified hardware address detection message is consistent with the network address of the local EVPN gateway.
Step 204, comparing the EVPN gateway hardware address carried by the identified hardware address detection message with the local EVPN gateway hardware address; and determining that the two are inconsistent.
Step 205, comparing whether the priority of the EVPN gateway hardware address carried by the identified hardware address detection message is higher than the priority of the local EVPN gateway hardware address; if yes, go to step 206, otherwise go to step 207.
Step 206, replacing the local EVPN gateway hardware address; and sending a response message with the slave identification.
Step 207, sending the response message with the main identifier according to the negotiation response period.
The invention has the advantages that the hardware addresses of a plurality of distributed gateways in the same VSI of the EVPN network are the same, and the MAC migration of terminals in the VSI caused by ARP messages sent by the gateways due to different hardware addresses is avoided.
Fig. 3 shows a hardware address negotiation method according to another embodiment of the present invention, which includes the following steps:
step 301, sending a hardware address detection message according to the hardware address negotiation period.
Carrying a virtual forwarding instance (VSI) identifier; a local EVPN gateway network address; local EVPN gateway hardware address.
Step 302, identifying hardware address detection messages sent by other EVPN gateways in the same virtual forwarding instance based on the virtual forwarding instance identifier carried by each received hardware address detection message.
Step 303, determining that the EVPN gateway network address carried by the identified hardware address detection packet is consistent with the local EVPN gateway network address.
Step 304, comparing the EVPN gateway hardware address carried by the identified hardware address detection message with the local EVPN gateway hardware address; the two are determined to be consistent.
Step 305, entering a hardware address negotiation silent period, and stopping sending the hardware address detection message.
Step 306, determining whether the hardware address negotiation silence period is stopped, if yes, returning to step 301, and if not, returning to step 305.
The method has the advantages that when the hardware addresses of a plurality of distributed gateways in the same VSI of the EVPN network in the current hardware address negotiation period are the same, the detection is continuously carried out in the VSI after the detection is carried out for a period of time in a silent mode, the detection times are reduced, and the condition that whether the inconsistent VSI gateway hardware addresses needing negotiation exist or not in the follow-up discovery mode or not can be ensured to send the ARP message to cause the MAC migration of the terminal in the VSI can be ensured.
Fig. 4 is a hardware address negotiation method according to another embodiment of the present invention, which includes the following steps:
step 401, sending a hardware address detection message according to the hardware address negotiation period.
Carrying a virtual forwarding instance (VSI) identifier; a local EVPN gateway network address; local EVPN gateway hardware address.
Step 402, identifying hardware address detection messages sent by other EVPN gateways in the same virtual forwarding instance based on the virtual forwarding instance identifier carried by each received hardware address detection message.
Step 403, determining that the EVPN gateway network address carried by the identified hardware address detection packet is consistent with the local EVPN gateway network address.
Step 404, comparing the EVPN gateway hardware address carried by the identified hardware address detection message with the local EVPN gateway hardware address; and determining that the two are inconsistent.
Step 405, comparing whether the priority of the EVPN gateway hardware address carried by the identified hardware address detection message is higher than the priority of the local EVPN gateway hardware address; if yes, go to step 406, otherwise go to step 409.
Step 406, replacing the local EVPN gateway hardware address; and sending a response message with the slave identification.
Step 407, no reply message with the primary identifier is received in a plurality of consecutive negotiation reply periods.
Step 408, determining that the connection is lost, and sending a hardware address detection message without a slave identifier according to the hardware address negotiation period;
step 409, sending the response message with the main identifier according to the negotiation response period.
Step 410, no response message with slave identification is received in a plurality of continuous negotiation response periods.
Step 411, determining that the connection is lost, and sending the hardware address detection message without the main identifier according to the hardware address negotiation period.
Fig. 5 shows a hardware address negotiation apparatus 500 according to an embodiment of the present invention, where the apparatus 500 is disposed in an EVPN gateway. The apparatus 500 comprises:
a detection module 501, configured to send a hardware address detection packet according to a hardware address negotiation period; the virtual forwarding instance VSI identifier is carried in the virtual forwarding instance VSI; a local EVPN gateway network address; local EVPN gateway hardware address.
A receiving module 502, configured to identify, based on the virtual forwarding instance identifier carried in each received hardware address detection packet, a hardware address detection packet sent by another EVPN gateway in the same virtual forwarding instance.
And the network address identification module 503 is configured to determine that an EVPN gateway network address carried by the identified hardware address detection packet is consistent with a local EVPN gateway network address.
The negotiation module 504 is used for comparing the EVPN gateway hardware address carried by the identified hardware address detection message with the local EVPN gateway hardware address; if not, comparing the EVPN gateway hardware address carried by the identified hardware address detection message with the local EVPN gateway hardware address; when the hardware address priority of the local EVPN gateway is high, sending a response message with a main identifier according to a negotiation response period; when the EVPN gateway hardware address carried by the identified hardware address detection message has high priority, replacing the local EVPN gateway hardware address; and sending a response message with the slave identification.
After the negotiation module 504 sends the response message with the master identifier, it is further configured to determine that the response message with the slave identifier is not received in a plurality of consecutive negotiation response periods, determine that the connection is lost, and notify the detection module; the detection module 502 is further configured to send a hardware address detection packet without a primary identifier; the virtual forwarding instance VSI identifier is carried in the virtual forwarding instance VSI; a local EVPN gateway network address; local EVPN gateway hardware address.
After the negotiation module 504 sends the response message with the slave identifier, it is further configured to determine that the response message with the master identifier is not received in a plurality of consecutive hardware address negotiation periods, and if the connection is determined to be lost, notify the detection module; the detection module 502 further sends a hardware address detection message without a slave identifier; the virtual forwarding instance VSI identifier is carried in the virtual forwarding instance VSI; a local EVPN gateway network address; local EVPN gateway hardware address.
The negotiation module 504 is further configured to determine that an EVPN gateway hardware address carried by the identified hardware address detection packet is consistent with a local EVPN gateway hardware address, and notify the detection module not to send a hardware address detection packet within a hardware address negotiation silence period; the detecting module 502 is further configured to determine that the hardware address negotiation silence period is ended, and send the hardware address detection packet.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for hardware address negotiation, the method comprising:
sending a hardware address detection message according to the hardware address negotiation period; the virtual forwarding instance VSI identifier is carried in the virtual forwarding instance VSI; a local EVPN gateway network address; a local EVPN gateway hardware address;
identifying hardware address detection messages sent by other EVPN gateways in the same virtual forwarding instance based on the virtual forwarding instance identification carried by each received hardware address detection message;
determining that the EVPN gateway network address carried by the identified hardware address detection message is consistent with the local EVPN gateway network address;
comparing the EVPN gateway hardware address carried by the identified hardware address detection message with the local EVPN gateway hardware address;
if the hardware address is inconsistent with the EVPN gateway hardware address, comparing the EVPN gateway hardware address carried by the identified hardware address detection message with the local EVPN gateway hardware address;
when the hardware address priority of the local EVPN gateway is high, sending a response message with a main identifier according to a negotiation response period;
when the hardware address priority of the EVPN gateway carried by the identified hardware address detection message is high, replacing the hardware address of the local EVPN gateway; and sending a response message with the slave identification.
2. The method according to claim 1, wherein when the local EVPN gateway hardware address has a high priority, sending a reply message with a primary identifier; the method further comprises the following steps:
if the response message with the slave identification is not received in a plurality of continuous negotiation response periods, determining that the connection is lost, and sending a hardware address detection message without the master identification; the virtual forwarding instance VSI identifier is carried in the virtual forwarding instance VSI; a local EVPN gateway network address; local EVPN gateway hardware address.
3. The method according to claim 1, wherein when the EVPN gateway hardware address carried by the identified hardware address detection packet has a high priority, the local EVPN gateway hardware address is replaced; sending a response message with a slave identifier; the method further comprises the following steps:
if the response message with the main identification is not received in a plurality of continuous hardware address negotiation periods, the connection is confirmed to be lost; sending a hardware address detection message without a slave identifier; the virtual forwarding instance VSI identifier is carried in the virtual forwarding instance VSI; a local EVPN gateway network address; local EVPN gateway hardware address.
4. The method of claim 1, further comprising:
when the EVPN gateway hardware address carried by the identified hardware address detection message is consistent with the local EVPN gateway hardware address,
and not sending the hardware address detection message in the hardware address negotiation silent period.
5. The method of claim 4, further comprising:
and determining that the hardware address negotiation silence period is ended, and sending the hardware address detection message.
6. A hardware address negotiation apparatus, the apparatus comprising:
the detection module is used for sending a hardware address detection message according to the hardware address negotiation period; the virtual forwarding instance VSI identifier is carried in the virtual forwarding instance VSI; a local EVPN gateway network address; a local EVPN gateway hardware address;
the receiving module is used for identifying hardware address detection messages sent by other EVPN gateways in the same virtual forwarding instance based on the virtual forwarding instance identification carried by each received hardware address detection message;
the network address identification module is used for determining that the EVPN gateway network address carried by the identified hardware address detection message is consistent with the local EVPN gateway network address;
the negotiation module is used for comparing the EVPN gateway hardware address carried by the identified hardware address detection message with the local EVPN gateway hardware address; if the hardware address is inconsistent with the EVPN gateway hardware address, comparing the EVPN gateway hardware address carried by the identified hardware address detection message with the local EVPN gateway hardware address; when the hardware address priority of the local EVPN gateway is high, sending a response message with a main identifier according to a negotiation response period; when the hardware address priority of the EVPN gateway carried by the identified hardware address detection message is high, replacing the hardware address of the local EVPN gateway; and sending a response message with the slave identification.
7. The apparatus of claim 6, wherein after the negotiation module sends the response message with the master identifier, the negotiation module is further configured to determine that the response message with the slave identifier is not received in a plurality of consecutive negotiation response periods, determine that the connection is lost, and notify the detection module;
the detection module is further used for sending a hardware address detection message without a main identifier; the virtual forwarding instance VSI identifier is carried in the virtual forwarding instance VSI; a local EVPN gateway network address; local EVPN gateway hardware address.
8. The apparatus according to claim 6, wherein after the negotiation module sends the response packet with the slave identifier, the negotiation module is further configured to determine that no response packet with the master identifier is received in a plurality of consecutive hardware address negotiation periods, and if the connection is determined to be lost, notify the detection module;
the detection module is further used for sending a hardware address detection message without a slave identifier; the virtual forwarding instance VSI identifier is carried in the virtual forwarding instance VSI; a local EVPN gateway network address; local EVPN gateway hardware address.
9. The apparatus of claim 6, wherein the negotiation module is further configured to determine that an EVPN gateway hardware address carried in the identified hardware address detection packet is consistent with a local EVPN gateway hardware address, and notify the detection module not to send the hardware address detection packet in a hardware address negotiation silence period.
10. The apparatus of claim 9, wherein the detection module is further configured to determine that the hardware address negotiation silence period ends, and send the hardware address detection packet.
CN202010133798.2A 2020-02-29 2020-02-29 Hardware address negotiation method and device Active CN111447295B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010133798.2A CN111447295B (en) 2020-02-29 2020-02-29 Hardware address negotiation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010133798.2A CN111447295B (en) 2020-02-29 2020-02-29 Hardware address negotiation method and device

Publications (2)

Publication Number Publication Date
CN111447295A true CN111447295A (en) 2020-07-24
CN111447295B CN111447295B (en) 2022-04-01

Family

ID=71653983

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010133798.2A Active CN111447295B (en) 2020-02-29 2020-02-29 Hardware address negotiation method and device

Country Status (1)

Country Link
CN (1) CN111447295B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103227757A (en) * 2012-08-31 2013-07-31 杭州华三通信技术有限公司 Message forwarding method and equipment
CN103873339A (en) * 2014-03-17 2014-06-18 杭州华三通信技术有限公司 Method and device for distributing virtual gateway router
CN104219340A (en) * 2014-09-25 2014-12-17 杭州华三通信技术有限公司 ARP (Address Resolution Protocol) response proxy method and apparatus
US20140376550A1 (en) * 2013-06-24 2014-12-25 Vmware, Inc. Method and system for uniform gateway access in a virtualized layer-2 network domain
CN107612834A (en) * 2017-09-13 2018-01-19 杭州迪普科技股份有限公司 A kind of EVPN route renewing methods based on virtual unit migration

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103227757A (en) * 2012-08-31 2013-07-31 杭州华三通信技术有限公司 Message forwarding method and equipment
US20140376550A1 (en) * 2013-06-24 2014-12-25 Vmware, Inc. Method and system for uniform gateway access in a virtualized layer-2 network domain
CN103873339A (en) * 2014-03-17 2014-06-18 杭州华三通信技术有限公司 Method and device for distributing virtual gateway router
CN104219340A (en) * 2014-09-25 2014-12-17 杭州华三通信技术有限公司 ARP (Address Resolution Protocol) response proxy method and apparatus
CN107612834A (en) * 2017-09-13 2018-01-19 杭州迪普科技股份有限公司 A kind of EVPN route renewing methods based on virtual unit migration

Also Published As

Publication number Publication date
CN111447295B (en) 2022-04-01

Similar Documents

Publication Publication Date Title
CN111740899B (en) ARP request message forwarding method, cross-device link aggregation group and network device
CN107612808B (en) Tunnel establishment method and device
CN110830371B (en) Message redirection method and device, electronic equipment and readable storage medium
WO2006053459A1 (en) Reception of redundant and non-redundant frames
CN108259635B (en) ARP (Address resolution protocol) table item learning method and DR (digital radiography) equipment
KR20090028531A (en) Mac address learning in a distributed bridge
JP2014090468A (en) Ethernet oam at intermediate nodes in pbt network
KR20020017265A (en) Communication method for plural virtual lan consisted in identical ip subnet
US5649091A (en) Local area network redundant pieces of interconnection equipment a false physical address and a logical address in common to form a unique entity
CN107332772B (en) Forwarding table item establishing method and device
CN110300057B (en) Method, computer readable medium and provider edge device for agent advertisement
CN112671642A (en) Message forwarding method and device
US20120243521A1 (en) Gateway device
CN113746717A (en) Network equipment communication method and network equipment communication device
CN113726632B (en) Message forwarding method and device
CN103200107B (en) Message transmitting method and message transmitting equipment
CN111447295B (en) Hardware address negotiation method and device
US10063675B2 (en) Performing duplicate address detection for an integrated routing and bridging device
CN106713142B (en) Method for transmitting IP message on CAN bus and IP local area network constructed by CAN bus network
CN113794615B (en) Message forwarding method and device
Cisco Configuring the CDDI/FDDI Module
Cisco Configuring the CDDI/FDDI Module
Cisco Configuring the CDDI/FDDI Module
Cisco Configuring the CDDI/FDDI Module
Cisco Configuring the CDDI/FDDI Module

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant