CN110519407B - Port address configuration method, forwarding equipment and controller - Google Patents
Port address configuration method, forwarding equipment and controller Download PDFInfo
- Publication number
- CN110519407B CN110519407B CN201910781910.0A CN201910781910A CN110519407B CN 110519407 B CN110519407 B CN 110519407B CN 201910781910 A CN201910781910 A CN 201910781910A CN 110519407 B CN110519407 B CN 110519407B
- Authority
- CN
- China
- Prior art keywords
- identifier
- address
- port
- network
- address identifier
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 45
- 230000006855 networking Effects 0.000 claims description 12
- 238000013507 mapping Methods 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 18
- 230000006870 function Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000004744 fabric Substances 0.000 description 1
- 230000008569 process Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0876—Aspects of the degree of configuration automation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5007—Internet protocol [IP] addresses
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Automation & Control Theory (AREA)
- Small-Scale Networks (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application provides a port address configuration method, forwarding equipment and a controller, wherein the method comprises the following steps: a first forwarding device in the SDN sends device characteristic information of the first forwarding device to a controller through a management port; receiving a first address identifier distributed to a first service port by a controller according to the equipment characteristic information; receiving a first LLDP message sent by second forwarding equipment through a first service port, wherein the first LLDP message comprises a second address identifier of a second service port; if the first address identifier is larger than the second address identifier, the IP address mapped by the first address identifier is used as the IP address of the first service port; and if the first address identifier is not larger than the second address identifier, generating the IP address of the first service port according to the second address identifier. Therefore, unified automatic configuration of the service port address of the underlay network is realized, the complicated operation of manual configuration is avoided, and the risk of configuration errors is reduced.
Description
Technical Field
The present application relates to the field of network communication technologies, and in particular, to a port address configuration method, a forwarding device, and a controller.
Background
In a Software Defined Network (SDN), after a controller configures information such as an IP address, a hosting account, and a password of each forwarding device, the controller may issue configuration related to overlay Network service to the forwarding devices, so as to automatically manage and control the forwarding service of the overlay Network.
For an underlay network, however, the network is constructed by requiring an administrator to log onto the individual forwarding devices to manually configure the underlay network parameters. For example, in the stage of deploying forwarding devices online, an administrator is required to manually configure the IP addresses of the ports connected between the forwarding devices on each forwarding device. In a relatively large SDN network, the manner of manually configuring the forwarding device underlay network parameters is extremely inefficient and prone to errors.
Disclosure of Invention
The application provides a port address configuration method, forwarding equipment and a controller, and automatic allocation of service port addresses of the forwarding equipment can be realized through cooperation between the forwarding equipment and the controller.
In a first aspect, the present application provides a port address configuration method applied to a first forwarding device, where the first forwarding device is in a software defined network SDN, the first forwarding device includes a first service port, the first service port is correspondingly connected to a second service port included in a second forwarding device in the SDN, the SDN further includes a controller, and the method includes:
sending device characteristic information of the first forwarding device to the controller through a management port;
receiving a first address identifier allocated to the first service port by the controller according to the equipment characteristic information;
receiving, by the first service port, a first LLDP packet sent by the second forwarding device, where the first LLDP packet includes a second address identifier of the second service port;
if the first address identifier is larger than the second address identifier, taking the IP address mapped by the first address identifier as the IP address of the first service port;
and if the first address identifier is not larger than the second address identifier, generating the IP address of the first service port according to the second address identifier.
Optionally, the device feature information includes a network identity feature and a device identity feature of the first forwarding device, and a port identity feature of the first service port; the address identification comprises a network identification, an equipment identification and a port identification which respectively correspond to the network identity characteristic, the equipment identity characteristic and the port identity characteristic.
Optionally, after receiving the first LLDP packet sent by the second forwarding device, the method further includes:
if the network identifier of the first address identifier is larger than that of the second address identifier, judging that the first address identifier is larger than the second address identifier;
and if the network identifier of the first address identifier is equal to the network identifier of the second address identifier and the equipment identifier of the first address identifier is larger than the equipment identifier of the second address identifier, judging that the first address identifier is larger than the second address identifier.
Optionally, if the first address identifier is greater than the second address identifier, taking the IP address mapped by the first address identifier as the IP address of the first service port, including:
if the first address identifier is larger than the second address identifier, respectively mapping a network identifier, an equipment identifier, a port identifier and a preset first endpoint identifier in the first address identifier to different bits of an IP address to obtain the IP address of the first service port.
Optionally, if the first address identifier is not greater than the second address identifier, generating an IP address of the first service port according to the second address identifier, including:
if the first address identifier is not larger than the second address identifier, respectively mapping a network identifier, an equipment identifier, a port identifier and a preset second end point identifier in the second address identifier to different bits of an IP address to obtain the IP address of the first service port.
Optionally, the sending, to the controller through a management port, device feature information of the first forwarding device includes:
and when the first service port is detected to be enabled, sending the network identifier, the device identifier and the port identifier of the first service port of the forwarding device to the controller through the management port.
In a second aspect, the present application provides a port address configuration method, which is applied to a controller, where the controller is in a software defined network SDN, and the SDN further includes a forwarding device; the method comprises the following steps:
receiving device characteristic information sent by the forwarding device through a management port;
and allocating an address identifier for the service port of the forwarding device according to the device characteristic information and sending the address identifier to the forwarding device.
Optionally, the device feature information includes a network identity feature and a device identity feature of the first forwarding device, and a port identity feature of the first service port; the allocating an address identifier to the service port of the forwarding device according to the device feature information includes:
and allocating an address identifier to the service port of the forwarding device according to the network identity feature, the device identity feature and the port identity feature, wherein the address identifier comprises a network identifier, a device identifier and a port identifier which respectively correspond to the network identity feature, the device identity feature and the port identity feature.
Optionally, when the controller allocates the address identifier, a value of the network identifier corresponding to the core network is greater than a value of the network identifier corresponding to the branch network, and a value of the device identifier corresponding to the spine node is greater than a value of the device identifier corresponding to the leaf node.
In a third aspect, the present application provides a forwarding device, including a machine-readable storage medium and a processor, where the machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are executed by the processor, the forwarding device implements the port address configuration method provided in the present application.
In a fourth aspect, the present application provides a controller, including a machine-readable storage medium and a processor, where the machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are executed by the processor, the controller implements the port address configuration method provided in the present application.
Compared with the prior art, the method has the following beneficial effects:
according to the port address configuration method, the forwarding devices and the controller, the controller automatically allocates the address identifiers according to the device characteristic information of each forwarding device, and then the forwarding devices automatically negotiate and determine the IP addresses of the service ports according to the address identifiers. Therefore, unified automatic configuration of the service port address of the underlay network is realized, the complicated operation of manual configuration is avoided, and the risk of configuration errors is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic diagram of a connection between a controller and a forwarding device according to a first embodiment of the present application;
fig. 2 is a schematic flowchart illustrating steps of a port address configuration method according to a first embodiment of the present application;
fig. 3 is a schematic diagram of an IP address mapping method according to a first embodiment of the present application;
fig. 4 is a second schematic diagram illustrating an IP address mapping method according to the first embodiment of the present application;
fig. 5 is a schematic networking diagram of a forwarding device according to a first embodiment of the present application;
fig. 6 is a diagram illustrating a negotiation result of an IP address according to a first embodiment of the present application;
fig. 7 is a schematic diagram of a port address configuration method according to a second embodiment of the present application;
fig. 8 is a schematic diagram of a forwarding device according to a third embodiment of the present application;
fig. 9 is a schematic diagram of a port address configuration method according to a third embodiment of the present application;
FIG. 10 is a schematic diagram of a controller provided in a fourth embodiment of the present application;
fig. 11 is a schematic diagram of a port address configuration method according to a fourth embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Referring to fig. 1, fig. 1 is a schematic diagram of an SDN network system according to the present embodiment, where the SDN network system includes multiple forwarding devices (e.g., the core node 9, the spine node 11, the spine node 21, the leaf nodes 111, and the leaf nodes 112 shown in fig. 1) with different functions and a controller 400 respectively communicating with the multiple forwarding devices.
The forwarding device includes a management port and a service port, the management port is used for connecting with the controller, and the forwarding device can receive the configured information or control instruction by the controller through the management port in an out-of-band management (out-of-band management) manner, for example. The service port is usually connected to other forwarding devices for performing forwarding of service data.
To implement an Internet Protocol (IP) communication connection between forwarding devices, an IP address needs to be configured for a port where forwarding devices are connected to each other.
First embodiment
In this embodiment, one forwarding device in an SDN network may be regarded as a first forwarding device, and another forwarding device connected to the first forwarding device may be regarded as a second forwarding device, where a first service port of the first forwarding device is connected to a second service port of the second forwarding device. Referring to fig. 2, fig. 2 is a flowchart illustrating a port address configuration method applied to a first forwarding device, and the steps of the method are explained in detail below.
Step S110, sending the device feature information of the first forwarding device to the controller through a management port.
In this embodiment, the device feature information includes a network identity feature and a device identity feature of the first forwarding device, and a port identity feature of the first service port.
A plurality of physically relatively independent networking areas may be included in an SDN network, and these networking areas may generally include a core network and a plurality of branch networks, different networking areas may be distinguished using different network identity features, and the network identity feature of a forwarding device is used to indicate in which networking area the forwarding device is located.
Multiple forwarding devices may be generally included in the same network region, and these forwarding devices may have different roles, for example, in a branch network, a Fabric architecture is often adopted, and a branch network may include forwarding devices (such as the spine nodes 11 and 21 shown in fig. 1) as spine nodes and forwarding devices (such as the leaf nodes 111 and 112 shown in fig. 1) as leaf nodes; the core network generally includes a core node connected to a spine node of each branch network. Different role devices can be distinguished by using different device identity characteristics, and the device identity characteristics of the forwarding device are used for indicating the unique identity of the forwarding device in a networking area.
The forwarding device may be connected to other forwarding devices through different service ports, and different ports may be distinguished through different port identity characteristics, for example, the port identity characteristic may be a port number of the service port on the forwarding device.
It should be noted that, in this embodiment, one forwarding device can only belong to one networking area, and in different networking areas, there may be forwarding devices with the same device identity.
Optionally, in step S110, when detecting that the first service port is enabled (for example, when the state of the first service port is changed from disabled (down) to enabled (up)), the forwarding device may send, to the controller through the management port, the network identity feature, the device identity feature, and the port identity feature of the first service port for the first service port. In this way, the controller is requested to allocate addresses only for the enabled traffic ports, and useless address allocation actions on the traffic ports that are not enabled can be avoided.
Step S120, receiving a first address identifier allocated to the first service port by the controller according to the device feature information.
In this embodiment, the controller may pre-store the network identifier, the device identifier, and the port identifier corresponding to different network identity characteristics, device identity characteristics, and port identity characteristics.
The controller may allocate an address identifier to the first service port of the first forwarding device according to the network identity, the device identity, and the port identity of the first forwarding device, where the address identifier includes a network identifier, a device identifier, and a port identifier that respectively correspond to the network identity, the device identity, and the port identity.
Optionally, in this embodiment, when the controller allocates the address identifier, a value of a network identifier corresponding to the core network is greater than a value of a network identifier corresponding to the branch network, and a value of an equipment identifier corresponding to the spine node is greater than a value of an equipment identifier corresponding to the leaf node.
Step S130, receiving, through the first service port, a first LLDP packet sent by the second forwarding device, where the first LLDP packet includes a second address identifier of the second service port.
After the two forwarding devices are connected by the communication cable, Link Layer Discovery Protocol (LLDP) message interaction is performed to notify device status information mutually. In this embodiment, after obtaining the temporary address of the service port of the first forwarding device, the first forwarding device may notify the address identifier of the service port of the second forwarding device through an LLDP message.
For example, after obtaining a first address identifier of a first service port of a first forwarding device, the first forwarding device may send a first LLDP packet carrying the first address identifier to a second forwarding device through the first service port; and the first forwarding equipment also receives a second LLDP message which is sent by the second forwarding equipment and carries the second address identifier from the first service port of the first forwarding equipment.
Optionally, in this embodiment, after step S130, the first forwarding device may compare sizes of the network identifier and the device identifier in the first address identifier and the second address identifier, respectively.
And if the network identifier of the first address identifier is larger than that of the second address identifier, judging that the first address identifier is larger than the second address identifier.
And if the network identifier of the first address identifier is equal to the network identifier of the second address identifier and the equipment identifier of the first address identifier is larger than the equipment identifier of the second address identifier, judging that the first address identifier is larger than the second address identifier.
In other words, the first forwarding device may first compare the size of the network identifier in the first address identifier and the second address identifier.
And if the network identifier of the first address identifier is larger than that of the second address identifier, judging that the first address identifier is larger than the second address identifier.
And if the network identifier of the first address identifier is smaller than the network identifier of the second address identifier, judging that the first address identifier is not larger than the second address identifier.
And if the network identifier of the first address identifier is equal to the network identifier of the second address identifier, further comparing the sizes of the equipment identifiers in the first address identifier and the second address identifier.
And if the equipment identifier of the first address identifier is larger than that of the second address identifier, judging that the first address identifier is larger than the second address identifier.
And if the equipment identifier of the first address identifier is smaller than that of the second address identifier, judging that the first address identifier is not larger than the second address identifier.
Step S140, if the first address identifier is greater than the second address identifier, using the IP address mapped by the first address identifier as the IP address of the first service port.
In this embodiment, if the first address identifier is greater than the second address identifier, the network identifier, the device identifier, the port identifier, and the preset first endpoint identifier in the first address identifier are respectively mapped to different bits of an IP address, so as to obtain the IP address of the first service port. In this embodiment, the first endpoint identifier may be 1.
For example, referring to fig. 3, in one example, the network identifier, the device identifier, the port identifier, and the endpoint identifier may be mapped from high order to low order to different bit segments of 32 bits of the IP address, and each identified value corresponds to 8 bits (bits). If the value of the network identifier in the first address identifier is 3, the value of the device identifier is 1, the value of the port identifier is 2, and the value of the first endpoint identifier is 1, the IP address obtained after mapping is 3.1.2.1.
Referring to fig. 4, in another example, values of the network identifier, the device identifier, the port identifier and the endpoint identifier may correspond to different bit segments of 32 bits of the IP address from the upper bit to the lower bit, where the network identifier corresponds to 4 bits, the device identifier corresponds to 12 bits, the port identifier corresponds to 12 bits, and the endpoint identifier corresponds to 4 bits. If the network identifier value in the first address identifier is 3, the device identifier value is 1, the port identifier value is 2, and the first endpoint identifier value is 1, the IP address obtained after mapping is 00110000.00000001.00000000.00100001 in binary form, and after converting into a normal IP address expression mode, it is 48.1.0.33.
It should be noted that, in this embodiment, lengths of bit segments corresponding to the network identifier, the device identifier, the port identifier, and the endpoint identifier may be adaptively adjusted according to a requirement of field networking, which is not limited in this embodiment.
Step S150, if the first address identifier is not greater than the second address identifier, generating an IP address of the first service port according to the second address identifier.
In this embodiment, if the first address identifier is not greater than the second address identifier, mapping a network identifier, an equipment identifier, a port identifier, and a preset second endpoint identifier in the second address identifier to different bits of an IP address, respectively, to obtain an IP address of the first service port. In this embodiment, the second endpoint identifier may be 2.
For example, the network identifier, the device identifier, the port identifier, and the endpoint identifier may be mapped from high to low bits to different bit segments of 32 bits of the IP address, and the value of each identifier corresponds to 8 bits (bits). And if the first address identifier is not larger than the second address identifier, and the value of the network identifier, the value of the device identifier and the value of the port identifier in the second address identifier are 4, 2 and 2 respectively.
For the first forwarding device, because the first address identifier of the first forwarding device is smaller than the second address identifier of the second forwarding device at the opposite end, the first forwarding device maps the network identifier, the device identifier, the port identifier and the preset second end identifier in the second address identifier at the opposite end to different bits of the IP address respectively to obtain the IP address of the first service port, and the finally obtained IP address of the first service port is 4.2.2.2.
For the second forwarding device, because the second address identifier of the second forwarding device is larger than the first address identifier of the first forwarding device at the opposite end, the second forwarding device maps the network identifier, the device identifier, the port identifier and the preset first end identifier in the second address identifier of the second forwarding device to different bits of the IP address respectively to obtain the IP address of the second service port, and the finally obtained IP address of the second service port is 4.2.2.1.
Therefore, through the interaction of the first forwarding device and the second forwarding device, different IP addresses belonging to the same network segment are automatically configured for the first service port and the second service port which are connected with each other, so that the first forwarding device and the second forwarding device can smoothly and directly transmit data.
By executing the above steps, when the port address configuration method provided by this embodiment is adopted, the controller allocates the address identifiers according to the device characteristic information of each forwarding device, and then the forwarding devices automatically negotiate and determine the IP addresses of the service ports according to the address identifiers, so that unified and automatic configuration of the service port addresses of the underlay network is realized, the tedious operation of manual configuration is avoided, and the risk of configuration errors is reduced.
In order to facilitate understanding of the solutions provided in the present application, the solutions provided in the present embodiment are described below by way of an example.
Referring to fig. 5, in the networking architecture shown in fig. 5, a port 1 of a core node 9 of a core network is connected to a port 1 of a spine node 11 of a branch network 1, and a port 2 of the core node 9 is connected to a port 1 of a spine node 21 of a branch network 2. Port 2 and port 3 of the spine node 11 of the branch network 1 are connected to port 1 of the leaf node 111 and port 1 of the leaf node 112 of the branch network 1, respectively.
When the controller allocates the address identifier, the value of the network identifier corresponding to the network identity characteristic of the core network is 3, and the value of the network identifier corresponding to the network identity characteristic of the branch network is 1 or 2. The assignment range of the device identifier corresponding to the device identity of the core node is 1 to 124, the assignment range of the device identifier corresponding to the device identity of the spine node is 125 to 254, and the assignment range of the device identifier corresponding to the device identity of the leaf node is 1 to 124. The first endpoint is identified as 1 and the second endpoint is identified as 2.
After the port 1 and the port 2 of the core node 9 are started, the core node 9 reports the device characteristic information to the controller through the management port. The device characteristic information reported for port 1 includes that the network to which the device belongs is a core network (i.e., network identity characteristic), the device role is a core node (i.e., device identity characteristic), and the port number is 1 (i.e., port identity characteristic), and the device characteristic information reported for port 1 includes that the network to which the device belongs is a core network, the device role is a core node, and the port number is 2. The controller assigns the port 1 of the core node 9 with an address identifier, where the value of the network identifier is 3, the value of the device identifier is 1, and the value of the port identifier is 1; in the address identifier allocated to port 2 of the core node 9, the value of the network identifier is 3, the value of the device identifier is 1, and the value of the port identifier is 2.
Similarly, after the controller interacts with the spine node 11, the spine node 21, the leaf node 111, and the leaf node 112, the controller allocates the address identifier to each service port shown in fig. 5 as shown in table 1.
TABLE 1
Then, the service ports connected with each other notify the address identification through the LLDP message.
For example, as shown in fig. 5, the core node 9 notifies the address identifier of its port 1 to the spine node 11 through an LLDP packet, and the spine node 11 also notifies the address identifier of its port 1 to the core node 9 through an LLDP packet.
Then both the core node 9 and the spine node 11 perform a comparison of the size of the address identifier of the own service port with the address identifier of the opposite service port. According to the comparison result, if the address identifier of the port 1 of the core node 9 is greater than the address identifier of the port 1 of the spine node 11, the core node 9 maps the network identifier, the device identifier, the port identifier and the first end identifier of the port 1 of the core node 9 to different bits of the IP address, and the address 3.1.1.1 is obtained and used as the IP address of the port 1 of the core node 9; the spine node 11 maps the network identifier, the device identifier, the port identifier and the second end identifier of the port 1 of the core node 9 to different bits of the IP address, and obtains an address 3.1.1.2 as the IP address of the port 1 of the spine node 11.
Similarly, after the interconnected service ports of the core node 9, the spine node 11, the spine node 21, the leaf nodes 111 and 112 all perform the action of negotiating addresses with each other, the IP addresses of the service ports are obtained as shown in fig. 6 and table 2.
TABLE 2
Second embodiment
Referring to fig. 7, fig. 7 is a diagram illustrating an address configuration method applied to a controller, and the steps of the method are explained below.
Step S210, receiving the device feature information sent by the forwarding device through the management port.
Step S220, allocating an address identifier to the service port of the forwarding device according to the device feature information, and sending the address identifier to the forwarding device.
For a detailed interaction process between the controller and the forwarding device, reference may be made to the related description of the first embodiment, which is not described herein again.
Optionally, the device feature information includes a network identity feature and a device identity feature of the first forwarding device, and a port identity feature of the first service port. In step S210, the controller may allocate an address identifier to the service port of the forwarding device according to the network identity feature, the device identity feature, and the port identity feature, where the address identifier includes a network identifier, a device identifier, and a port identifier respectively corresponding to the network identity feature, the device identity feature, and the port identity feature.
Optionally, when the controller allocates the address identifier, a value of the network identifier corresponding to the core network is greater than a value of the network identifier corresponding to the branch network, and a value of the device identifier corresponding to the spine node is greater than a value of the device identifier corresponding to the leaf node.
Third embodiment
Referring to fig. 8, fig. 8 is a schematic diagram of a hardware structure of a forwarding device according to this embodiment. The server may include a processor 730 and a machine-readable storage medium 720. The processor 730 and the machine-readable storage medium 720 may communicate via a system bus. Also, the machine-readable storage medium 720 stores machine-executable instructions that, when executed by the processor 730, may cause the forwarding device to perform the address configuration method described in the first embodiment of the present application as the first forwarding device.
The machine-readable storage medium 720 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the machine-readable storage medium 720 may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
Referring to fig. 9, the present embodiment further provides an address configuration apparatus 710, where the address configuration apparatus 710 includes at least one functional module that can be stored in a machine-readable storage medium 720 in a software form. Functionally, the address configuration device 710 may include a feature sending module 711, an identity receiving module 712, an identity notification module 713, and an address configuration module 714.
The feature transmitting module 711 is configured to transmit the device feature information of the first forwarding device to the controller through the management port.
The identifier receiving module 712 is configured to receive a first address identifier allocated by the controller to the first service port according to the device feature information.
The identifier advertisement module 713 is configured to receive, through the first service port, a first LLDP packet sent by the second forwarding device, where the first LLDP packet includes a second address identifier of the second service port;
the address configuration module 714 takes the IP address mapped by the first address identifier as the IP address of the first service port if the first address identifier is greater than the second address identifier; and if the first address identifier is not larger than the second address identifier, generating the IP address of the first service port according to the second address identifier.
Optionally, the device feature information includes a network identity feature and a device identity feature of the first forwarding device, and a port identity feature of the first service port; the address identification comprises a network identification, an equipment identification and a port identification which respectively correspond to the network identity characteristic, the equipment identity characteristic and the port identity characteristic.
Optionally, the address configuration apparatus 710 further includes a comparison module.
The comparison module is used for respectively comparing the sizes of the network identifier and the equipment identifier in the first address identifier and the second address identifier; if the network identifier of the first address identifier is larger than that of the second address identifier, judging that the first address identifier is larger than the second address identifier; and if the network identifier of the first address identifier is equal to the network identifier of the second address identifier and the equipment identifier of the first address identifier is larger than the equipment identifier of the second address identifier, judging that the first address identifier is larger than the second address identifier.
Optionally, the address configuration module 714 is specifically configured to, when the first address identifier is greater than the second address identifier, map the network identifier, the device identifier, the port identifier, and a preset first endpoint identifier in the first address identifier to different bits of an IP address, respectively, to obtain the IP address of the first service port.
Optionally, the address configuration module 714 is specifically configured to, when the first address identifier is not greater than the second address identifier, map a network identifier, an equipment identifier, a port identifier, and a preset second endpoint identifier in the second address identifier to different bits of an IP address, respectively, to obtain the IP address of the first service port.
Optionally, the feature sending module 711 is specifically configured to send, to the controller through the management port, the network identifier of the forwarding device, the device identifier, and the port identifier of the first service port when it is detected that the first service port is enabled.
Fourth embodiment
Referring to fig. 10, fig. 10 is a schematic diagram of a hardware structure of a controller according to the present embodiment. The server may include a processor 830 and a machine-readable storage medium 820. The processor 830 and the machine-readable storage medium 820 may communicate via a system bus. Also, the machine-readable storage medium 820 stores machine-executable instructions that, when executed by the processor 830, may cause the controller to perform the address configuration method described in the second embodiment of the present application.
The machine-readable storage medium 820 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, machine-readable storage medium 820 may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
Referring to fig. 11, the present embodiment further provides an address configuration apparatus 810, where the address configuration apparatus 810 includes at least one functional module that can be stored in a machine-readable storage medium 820 in a software form. Functionally partitioned, the address configuration apparatus 810 may include a feature receiving module 811 and an identity assignment module 812.
The feature receiving module 811 is configured to receive device feature information sent by the forwarding device through the management port.
The identifier allocating module 812 is configured to allocate an address identifier to the service port of the forwarding device according to the device feature information and send the address identifier to the forwarding device.
Optionally, the device feature information includes a network identity feature and a device identity feature of the first forwarding device, and a port identity feature of the first service port. The identifier allocating module 812 is specifically configured to allocate an address identifier to the service port of the forwarding device according to the network identity feature, the device identity feature, and the port identity feature, where the address identifier includes a network identifier, a device identifier, and a port identifier that respectively correspond to the network identity feature, the device identity feature, and the port identity feature.
Optionally, when the identifier allocating module 812 allocates the address identifier, a value of a network identifier corresponding to the core network is greater than a value of a network identifier corresponding to the branch network, and a value of a device identifier corresponding to the spine node is greater than a value of a device identifier corresponding to the leaf node.
To sum up, according to the port address configuration method, the forwarding devices and the controller provided by the present application, the controller automatically allocates the address identifier according to the device feature information of each forwarding device, and then the forwarding devices automatically negotiate and determine the IP address of the service port according to the address identifier. Therefore, unified automatic configuration of the service port address of the underlay network is realized, the complicated operation of manual configuration is avoided, and the risk of configuration errors is reduced.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The above description is only for various embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the present application, and all such changes or substitutions are included in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (10)
1. A port address configuration method applied to a first forwarding device in a Software Defined Network (SDN), the first forwarding device including a first service port connected to a second service port included in a second forwarding device in the SDN, the SDN further including a controller, the method comprising:
sending device characteristic information of the first forwarding device to the controller through a management port;
receiving a first address identifier allocated to the first service port by the controller according to the equipment characteristic information;
receiving, by the first service port, a first LLDP packet sent by the second forwarding device, where the first LLDP packet includes a second address identifier of the second service port;
if the first address identifier is larger than the second address identifier, taking the IP address mapped by the first address identifier as the IP address of the first service port;
and if the first address identifier is not larger than the second address identifier, generating the IP address of the first service port according to the second address identifier.
2. The method of claim 1, wherein the device characteristic information comprises a network identity characteristic, a device identity characteristic, and a port identity characteristic of the first service port of the first forwarding device;
the address identification comprises a network identification, an equipment identification and a port identification which respectively correspond to the network identity characteristic, the equipment identity characteristic and the port identity characteristic.
3. The method of claim 2, wherein after receiving the first LLDP packet sent by the second forwarding device, the method further comprises:
if the network identifier included in the first address identifier is larger than the network identifier included in the second address identifier, determining that the first address identifier is larger than the second address identifier;
and if the network identifier included in the first address identifier is equal to the network identifier included in the second address identifier and the equipment identifier included in the first address identifier is greater than the equipment identifier included in the second address identifier, determining that the first address identifier is greater than the second address identifier.
4. The method of claim 2, wherein if the first address identifier is larger than the second address identifier, using the IP address mapped by the first address identifier as the IP address of the first service port comprises:
if the first address identifier is larger than the second address identifier, respectively mapping a network identifier, an equipment identifier, a port identifier and a preset first endpoint identifier in the first address identifier to different bits of an IP address to obtain the IP address of the first service port.
5. The method of claim 2, wherein generating the IP address of the first service port according to the second address identifier if the first address identifier is not greater than the second address identifier comprises:
if the first address identifier is not larger than the second address identifier, respectively mapping a network identifier, an equipment identifier, a port identifier and a preset second end point identifier in the second address identifier to different bits of an IP address to obtain the IP address of the first service port.
6. The method of claim 1, wherein sending the device characteristic information of the first forwarding device to the controller through a management port comprises:
and when detecting that the first service port is enabled, sending the network identifier, the device identifier and the port identifier of the first service port of the forwarding device to the controller through the management port.
7. A port address configuration method applied to a controller, the controller being in a Software Defined Network (SDN), the SDN including a forwarding device, the SDN further including a plurality of physically relatively independent networking areas, the networking areas including a core network and a plurality of branch networks, the branch networks including the forwarding device as a spine node and the forwarding device as a leaf node; the method comprises the following steps:
receiving device characteristic information sent by the forwarding device through a management port;
according to the equipment characteristic information, allocating an address identifier to a service port of the forwarding equipment and sending the address identifier to the forwarding equipment, wherein the equipment characteristic information comprises network identity characteristics and equipment identity characteristics of the forwarding equipment, and the address identifier comprises a network identifier and an equipment identifier which respectively correspond to the network identity characteristics and the equipment identity characteristics;
when the address identifier is allocated, the value of the network identifier corresponding to the core network is greater than the value of the network identifier corresponding to the branch network, and the value of the device identifier corresponding to the ridge node is greater than the value of the device identifier corresponding to the leaf node.
8. The method of claim 7, wherein the device characteristic information further includes a port identity characteristic of a service port of the forwarding device;
the allocating an address identifier to the service port of the forwarding device according to the device feature information includes:
allocating an address identifier for the service port of the forwarding equipment according to the network identity characteristic, the equipment identity characteristic and the port identity characteristic;
the address identifier further comprises a port identifier corresponding to the port identity characteristic.
9. A forwarding device comprising a machine-readable storage medium and a processor, the machine-readable storage medium having stored thereon machine-executable instructions that, when executed by the processor, implement the method of any of claims 1-6.
10. A controller comprising a machine-readable storage medium and a processor, the machine-readable storage medium having stored thereon machine-executable instructions that, when executed by the processor, implement the method of any one of claims 7 to 8.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910781910.0A CN110519407B (en) | 2019-08-23 | 2019-08-23 | Port address configuration method, forwarding equipment and controller |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910781910.0A CN110519407B (en) | 2019-08-23 | 2019-08-23 | Port address configuration method, forwarding equipment and controller |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN110519407A CN110519407A (en) | 2019-11-29 |
| CN110519407B true CN110519407B (en) | 2022-02-11 |
Family
ID=68626285
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910781910.0A Active CN110519407B (en) | 2019-08-23 | 2019-08-23 | Port address configuration method, forwarding equipment and controller |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN110519407B (en) |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103338274A (en) * | 2013-05-15 | 2013-10-02 | 中国科学技术大学苏州研究院 | Routing-oriented address assignment method in tree-shaped ubiquitous network |
| CN104618156A (en) * | 2015-01-26 | 2015-05-13 | 杭州华三通信技术有限公司 | Network configuration method and device |
| CN109495593A (en) * | 2017-09-11 | 2019-03-19 | 中兴通讯股份有限公司 | Address distribution method and system |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| ATE410875T1 (en) * | 2004-01-23 | 2008-10-15 | Siemens Ag | METHOD FOR ASSIGNING AN IP ADDRESS TO A DEVICE |
| US11522763B2 (en) * | 2017-11-29 | 2022-12-06 | Nicira, Inc. | Agent-based network scanning in software-defined networking (SDN) environments |
-
2019
- 2019-08-23 CN CN201910781910.0A patent/CN110519407B/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103338274A (en) * | 2013-05-15 | 2013-10-02 | 中国科学技术大学苏州研究院 | Routing-oriented address assignment method in tree-shaped ubiquitous network |
| CN104618156A (en) * | 2015-01-26 | 2015-05-13 | 杭州华三通信技术有限公司 | Network configuration method and device |
| CN109495593A (en) * | 2017-09-11 | 2019-03-19 | 中兴通讯股份有限公司 | Address distribution method and system |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110519407A (en) | 2019-11-29 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12143301B2 (en) | Network validation with dynamic tunneling | |
| EP3664420B1 (en) | Managing address spaces across network elements | |
| CN107733670B (en) | A forwarding strategy configuration method and device | |
| CN103312605B (en) | A kind of gateway device identity setting method and management gateway equipment | |
| US12199819B2 (en) | Dynamic network awareness | |
| CN102025630A (en) | Load balancing method and load balancing system | |
| CN104753697A (en) | Method, equipment and system for controlling provisioning of network equipment | |
| US9043492B2 (en) | Method to publish remote management services over link local network for zero-touch discovery, provisioning and management | |
| US20180054415A1 (en) | Internet Protocol Address Allocation Method and Router | |
| CN109842642A (en) | A kind of dispositions method and device, containerization group system of containerization group system | |
| US20150244586A1 (en) | Network Provisioning And Deployment | |
| WO2016202016A1 (en) | Device management method, apparatus and system | |
| CN109561004B (en) | Message forwarding method and device and switch | |
| WO2018161795A1 (en) | Routing priority configuration method, device, and controller | |
| CN106330492A (en) | A method, device and system for configuring user equipment forwarding table | |
| CN104935614B (en) | Data transmission method and device | |
| CN110519407B (en) | Port address configuration method, forwarding equipment and controller | |
| CN107370647A (en) | A kind of method interconnected between LAN system and its internal controller system | |
| CN111600795A (en) | Virtual edge device establishing method, controller and server | |
| CN111478937A (en) | Load balancing method and device | |
| CN107786682B (en) | Method and device for processing DHCP REQUEST message | |
| CN102420731A (en) | Network access control method and system | |
| CN109561170B (en) | Address pool creating method and device, address pool management system and storage medium | |
| WO2016127565A1 (en) | Method and apparatus for processing segment routing id (sid) | |
| CN104348927A (en) | Address field assignment method and apparatus |
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 |