CN111526044A - Method, device and medium for discovering link between switch and server - Google Patents

Method, device and medium for discovering link between switch and server Download PDF

Info

Publication number
CN111526044A
CN111526044A CN202010286029.6A CN202010286029A CN111526044A CN 111526044 A CN111526044 A CN 111526044A CN 202010286029 A CN202010286029 A CN 202010286029A CN 111526044 A CN111526044 A CN 111526044A
Authority
CN
China
Prior art keywords
switch
server
information
link
link information
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.)
Pending
Application number
CN202010286029.6A
Other languages
Chinese (zh)
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.)
Inspur Cisco Networking Technology Co Ltd
Original Assignee
Inspur Cisco Networking Technology 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 Inspur Cisco Networking Technology Co Ltd filed Critical Inspur Cisco Networking Technology Co Ltd
Priority to CN202010286029.6A priority Critical patent/CN111526044A/en
Publication of CN111526044A publication Critical patent/CN111526044A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0213Standardised network management protocols, e.g. simple network management protocol [SNMP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/20Support for services

Landscapes

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

Abstract

The application discloses a method, equipment and medium for discovering a link between a switch and a server. The method comprises the following steps: acquiring link information of a switch and network port information of a server through an SDN controller; and judging whether a link exists between the switch and the server or not by comparing the link information of the switch with the internet access information of the server. The method and the device can reliably discover the link between the switch and the server, and further manage the network topology better.

Description

Method, device and medium for discovering link between switch and server
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, a device, and a medium for discovering a link between a switch and a server.
Background
At present, a system platform is mostly realized by adopting JAVA technology and supports a B/S framework. Basically, a Simple Network Management Protocol (SNMP) method is used to collect Network Management information from the switch.
For automatic Link discovery, devices of different manufacturers use a Link Layer Discovery Protocol (LLDP) to interact with a directly connected server to manage Information such as addresses, device identifiers, interface identifiers, etc., the switch stores the Information in a Management Information Base (MIB) library, and the system queries the LLDP Information through an SNMP interface to determine Link status and Information.
However, most system platforms currently acquire link information based on link discovery between switches, and lack link discovery between switches and servers.
Disclosure of Invention
The embodiment of the application provides a method, a device and a medium for discovering a link between a switch and a server, which are used for solving the following technical problems in the prior art: most system platforms currently acquire link information based on link discovery between switches, but lack link discovery between switches and servers.
The embodiment of the application adopts the following technical scheme:
a method of link discovery between a switch and a server, the method comprising:
acquiring link information of a switch and gateway information of a server through a Network Defined Network (SDN) controller;
and judging whether a link exists between the switch and the server or not by comparing the link information of the switch with the internet access information of the server.
Optionally, acquiring, by the SDN controller, link information of the switch and portal information of the server includes:
and acquiring the link information of the switch and the network port information of the server through OpenDaylinght.
Optionally, obtaining link information of the switch and portal information of the server through opendayright includes:
and acquiring link information of the switch and network port information of the server through a southbound interface of OpenDaylight.
Optionally, the server is configured to advertise link information to switches to which it is connected.
Optionally, the switch is configured to advertise link information to servers to which it is connected.
Optionally, the determining whether a link exists between the switch and the server by comparing the link information of the switch with the portal information of the server includes:
comparing whether a local terminal MAC address in the link information of the switch is the same as an opposite terminal MAC address in the network port information of the server, and whether a corresponding local terminal port in the link information of the switch is the same as a corresponding opposite terminal port in the network port information of the server;
and if the comparison result is yes, judging that a link exists between the switch and the server.
Optionally, the determining whether a link exists between the switch and the server by comparing the link information of the switch with the portal information of the server includes:
comparing whether the opposite-end MAC address in the link information of the switch is the same as the home-end MAC address in the network port information of the server, and whether the corresponding opposite-end port in the link information of the switch is the same as the corresponding home-end port in the network port information of the server;
and if the comparison result is yes, judging that a link exists between the switch and the server.
Optionally, the method further comprises:
and if the link exists between the switch and the server, acquiring and storing the information of the link.
A link discovery apparatus between a switch and a server, the apparatus comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring link information of a switch and network port information of a server through an SDN controller;
and judging whether a link exists between the switch and the server or not by comparing the link information of the switch with the internet access information of the server.
A link discovery medium between a switch and a server, having stored thereon computer-executable instructions configured to:
acquiring link information of a switch and network port information of a server through an SDN controller;
and judging whether a link exists between the switch and the server or not by comparing the link information of the switch with the internet access information of the server.
The embodiment of the application adopts at least one technical scheme which can achieve the following beneficial effects: the link between the switch and the server can be reliably discovered, thereby better managing the network topology.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic flowchart of a method for discovering a link between a switch and a server according to some embodiments of the present application;
fig. 2 is a detailed flowchart of the method of fig. 1 in an application scenario provided by some embodiments of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. 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.
The application provides a scheme for realizing link discovery between a switch and a server based on an SDN controller, and the scheme can support link discovery of multiple protocols, so that better management of network topology is facilitated.
Fig. 1 is a schematic flowchart of a method for discovering a link between a switch and a server according to some embodiments of the present application.
The process in fig. 1, such as performed by an SDN controller or a cloud platform interfacing the SDN controller, includes the following steps:
s100: and acquiring link information of the switch and network port information of the server through the SDN controller.
In some embodiments of the present application, the SDN controller can shield differences of underlying physical forwarding devices (e.g., switches) through a southbound interface, implement resource virtualization, and open a flexible northbound interface for upper layer services to perform network configuration and call network resources as needed. Some embodiments of the present application use OpenDaylight as an SDN controller, and obtain link information of a switch and network port information of a server through OpenDaylight, and more specifically, obtain link information of a switch and network port information of a server through a southbound interface of OpenDaylight, where the southbound interface of OpenDaylight supports multiple protocols to obtain related information, which helps to reduce implementation cost of the solution, for example, the southbound interface of OpenDaylight supports obtaining link information of a switch through SNMP, and also supports obtaining network port information of a server through a Secure Shell (SHH) protocol, and so on.
In some embodiments of the present application, the link information of the switch includes an IP address, a port, and a MAC address of a local terminal (i.e., the switch), and an IP address, a port, and a MAC address of an opposite terminal (i.e., an opposite terminal device connected to the switch, which is mainly concerned here with a server of the opposite terminal); the network port information of the server includes a port, a MAC address, a device name, an IP address, and the like of an opposite terminal (an opposite terminal device connected to the server, which is mainly focused on a switch of the opposite terminal in this application).
S102: and judging whether a link exists between the switch and the server or not by comparing the link information of the switch with the internet access information of the server.
In some embodiments of the present application, the devices at two ends connected to each other record information, but the information at the two ends is not necessarily correctly corresponding, for example, assuming that the peer MAC address recorded by the switch includes the MAC address of the server, and the peer MAC address recorded by the server also includes the MAC address of the switch, the MAC addresses at the two ends may be considered correctly corresponding, and if the peer MAC address recorded by the server does not include the MAC address of the switch, the MAC addresses at the two ends may be considered incorrectly corresponding, so that it may be considered that no link exists between the switch and the server, because establishment of a link often requires correct correspondence of some information for addressing related at the two ends.
Based on this, whether a link exists between the switch and the server can be judged by comparing whether the information is correctly corresponding. The specific selection of the information depends on the definition of the link protocol used for the link, and generally, at least the MAC address of the link layer is guaranteed to be correctly corresponding, and the logical port or the physical port connected to the two ends can also be guaranteed to be corresponding.
It should be noted that in practical applications, this need not be so strict, but still depends on the definition of the link by the link protocol used. If the device at the local end correctly records some information for addressing of the device at the opposite end, the information may be considered to correctly correspond to the information, and then a link exists between the switch and the server. Some of the following examples are mainly illustrated in such cases.
More intuitively, some embodiments of the present application provide two specific schemes for determining that a link exists between a switch and a server in an application scenario, in which correct correspondence between MAC addresses and ports is mainly considered. The first method comprises the following steps: comparing whether a home terminal MAC address in the link information of the switch is the same as an opposite terminal MAC address in the network port information of the server, and whether a corresponding home terminal port in the link information of the switch is the same as a corresponding opposite terminal port in the network port information of the server; and if the comparison result is yes, judging that a link exists between the switch and the server. And the second method comprises the following steps: comparing whether the opposite-end MAC address in the link information of the switch is the same as the home-end MAC address in the network port information of the server, and whether the corresponding opposite-end port in the link information of the switch is the same as the corresponding home-end port in the network port information of the server; and if the comparison result is yes, judging that a link exists between the switch and the server.
Based on the method of fig. 1, the link between the switch and the server can be reliably discovered, thereby better managing the network topology.
Further, where a link is determined to exist between the switch and the server, information for that link may be extracted and stored in a database for later use as needed.
In some embodiments of the present application, in order to facilitate the switch and the server to efficiently obtain the relevant addressing information of the peer, the server and the switch may be configured such that they actively advertise the relevant addressing information to the peer.
More intuitively, some embodiments of the present application also provide a detailed flow diagram of the method of fig. 1 in an application scenario, as shown in fig. 2, in which a server is configured to advertise link information to a switch to which the server is connected, and the switch is configured to advertise link information to the server to which the switch is connected.
The process in fig. 2 includes the following steps:
s200: the server configures the install LLDP and advertises the link information to the peer switch.
For example, the server configures and installs the CentOS, and configures the network card accordingly as follows:
yum-y install lldpad
lldptool set-lldp-i ens34 adminStatus=rxtx;
lldptool-T-i ens34-V sysName enableTx=yes;
lldptool-T-i ens34-V portDesc enableTx=yes;
lldptool-T-i ens34-V sysDesc enableTx=yes;
lldptool-T-i ens34-V sysCap enableTx=yes;
lldptool-T-i ens34-V mngAddr enableTx=yes;
lldptool-T-i ens34-V mngAddr ipv4=manage ip
s202: the switch announces link information to the peer server through LLDP.
S204: and the SDN controller acquires link information of the switch and port information of the server through a southbound interface of OpenDaylight.
S206: whether a link exists between the server and the switch is judged by comparing whether the internet access information of the server and the link information of the switch can be correctly corresponding or not.
The scheme of fig. 2 realizes link discovery between the switch and the server based on Opendaylight, can realize network topology management based on Opendaylight, and supports link discovery of multiple protocols, thereby helping to better manage network topology.
Based on the same idea, some embodiments of the present application further provide devices and media corresponding to the above system.
A link discovery apparatus between a switch and a server, the apparatus comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring link information of a switch and network port information of a server through an SDN controller;
and judging whether a link exists between the switch and the server or not by comparing the link information of the switch with the internet access information of the server.
A link discovery medium between a switch and a server, having stored thereon computer-executable instructions configured to:
acquiring link information of a switch and network port information of a server through an SDN controller;
and judging whether a link exists between the switch and the server or not by comparing the link information of the switch with the internet access information of the server.
The embodiments in the present application are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the method, apparatus, and media embodiments are substantially similar to the system embodiments and therefore are described with relative ease, where relevant, with reference to the partial description of the system embodiments.
The device and the medium provided by the embodiment of the application correspond to the method, so the device and the medium also have similar beneficial technical effects with the corresponding method.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a system, apparatus, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method for discovering a link between a switch and a server, the method comprising:
acquiring link information of a switch and network port information of a server through a Software Defined Network (SDN) controller;
and judging whether a link exists between the switch and the server or not by comparing the link information of the switch with the internet access information of the server.
2. The method of claim 1, wherein obtaining, by the SDN controller, link information of the switch and portal information of the server comprises:
and acquiring the link information of the switch and the network port information of the server through OpenDaylinght.
3. The method of claim 2, wherein obtaining the link information of the switch and the portal information of the server through opendayright comprises:
and acquiring link information of the switch and network port information of the server through a southbound interface of OpenDaylight.
4. The method of claim 1, wherein the server is configured to advertise link information to switches to which it is connected.
5. The method of claim 1, wherein the switch is configured to advertise link information to servers to which it is connected.
6. The method of claim 1, wherein determining whether a link exists between the switch and the server by comparing the link information of the switch and the portal information of the server comprises:
comparing whether a local terminal MAC address in the link information of the switch is the same as an opposite terminal MAC address in the network port information of the server, and whether a corresponding local terminal port in the link information of the switch is the same as a corresponding opposite terminal port in the network port information of the server;
and if the comparison result is yes, judging that a link exists between the switch and the server.
7. The method of claim 1, wherein determining whether a link exists between the switch and the server by comparing the link information of the switch and the portal information of the server comprises:
comparing whether the opposite-end MAC address in the link information of the switch is the same as the home-end MAC address in the network port information of the server, and whether the corresponding opposite-end port in the link information of the switch is the same as the corresponding home-end port in the network port information of the server;
and if the comparison result is yes, judging that a link exists between the switch and the server.
8. The method of any one of claims 1 to 7, further comprising:
and if the link exists between the switch and the server, acquiring and storing the information of the link.
9. A link discovery device between a switch and a server, the device comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring link information of a switch and network port information of a server through a Software Defined Network (SDN) controller;
and judging whether a link exists between the switch and the server or not by comparing the link information of the switch with the internet access information of the server.
10. A link discovery medium between a switch and a server, having stored thereon computer-executable instructions configured to:
acquiring link information of a switch and network port information of a server through a Software Defined Network (SDN) controller;
and judging whether a link exists between the switch and the server or not by comparing the link information of the switch with the internet access information of the server.
CN202010286029.6A 2020-04-13 2020-04-13 Method, device and medium for discovering link between switch and server Pending CN111526044A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010286029.6A CN111526044A (en) 2020-04-13 2020-04-13 Method, device and medium for discovering link between switch and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010286029.6A CN111526044A (en) 2020-04-13 2020-04-13 Method, device and medium for discovering link between switch and server

Publications (1)

Publication Number Publication Date
CN111526044A true CN111526044A (en) 2020-08-11

Family

ID=71911288

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010286029.6A Pending CN111526044A (en) 2020-04-13 2020-04-13 Method, device and medium for discovering link between switch and server

Country Status (1)

Country Link
CN (1) CN111526044A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115185759A (en) * 2022-09-05 2022-10-14 平安银行股份有限公司 LLDP-based server wiring verification method, device and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103081409A (en) * 2010-09-09 2013-05-01 日本电气株式会社 Network system and network management method
EP3182648A1 (en) * 2014-09-05 2017-06-21 Huawei Technologies Co. Ltd. Method, apparatus and system for implementing software-defined networking (sdn)
CN109587005A (en) * 2018-12-26 2019-04-05 华为技术服务有限公司 Connecting detection method, apparatus, computer equipment and readable storage medium storing program for executing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103081409A (en) * 2010-09-09 2013-05-01 日本电气株式会社 Network system and network management method
EP3182648A1 (en) * 2014-09-05 2017-06-21 Huawei Technologies Co. Ltd. Method, apparatus and system for implementing software-defined networking (sdn)
CN109587005A (en) * 2018-12-26 2019-04-05 华为技术服务有限公司 Connecting detection method, apparatus, computer equipment and readable storage medium storing program for executing

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115185759A (en) * 2022-09-05 2022-10-14 平安银行股份有限公司 LLDP-based server wiring verification method, device and system
CN115185759B (en) * 2022-09-05 2023-09-29 平安银行股份有限公司 Method, device and system for checking server wiring based on LLDP

Similar Documents

Publication Publication Date Title
US20220078092A1 (en) Provisioning a service
US9507932B2 (en) Policy enforcement in a topology abstraction system
US10534600B2 (en) Method and system for uniform remote management of network devices
US20160352559A1 (en) Method and Apparatus For Configuring a Communication System
CN111245634A (en) Virtualization management method and device
CN113315848B (en) Access control method, device and equipment
CN113220484A (en) Micro-service calling method and device, electronic equipment and storage medium
US8929225B2 (en) Customer edge device problem identification
CN113938520A (en) Service registration method, device and storage medium
CN115086166B (en) Computing system, container network configuration method, and storage medium
CN113992657B (en) Cloud platform-based shared storage construction method, equipment and medium
CN115225709A (en) Data transmission system and method
CN113014406A (en) Equipment deployment method, device, server and storage medium
CN111526044A (en) Method, device and medium for discovering link between switch and server
US20230300215A1 (en) Proxy-Mediated Service Request Handling between Network Functions
CN114465791A (en) Method and device for establishing white list in network management equipment, storage medium and processor
CN107733727B (en) Zero configuration method, device and equipment
US20170237687A1 (en) Resource trees by management controller
KR101789894B1 (en) Method and system for virtualizing layer-3 (network) entities
WO2016042512A1 (en) Methods and apparatus in an m2m service provider network
CN115712545B (en) Method, device, equipment and medium for realizing service topology awareness of cluster
CN112583740A (en) Network communication method and device
CN113645315B (en) Method and system for automatically uploading static resources by code editor
CN113347040B (en) Configuration changing method and device and electronic equipment
US11729290B1 (en) Intelligent multicast proxy between container and outside network

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200811

RJ01 Rejection of invention patent application after publication