CN114095476B - Method for inquiring router interface by electronic equipment, router and communication system - Google Patents

Method for inquiring router interface by electronic equipment, router and communication system Download PDF

Info

Publication number
CN114095476B
CN114095476B CN202010633237.9A CN202010633237A CN114095476B CN 114095476 B CN114095476 B CN 114095476B CN 202010633237 A CN202010633237 A CN 202010633237A CN 114095476 B CN114095476 B CN 114095476B
Authority
CN
China
Prior art keywords
interface
router
electronic device
target
physical interface
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
Application number
CN202010633237.9A
Other languages
Chinese (zh)
Other versions
CN114095476A (en
Inventor
张阔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device 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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202010633237.9A priority Critical patent/CN114095476B/en
Publication of CN114095476A publication Critical patent/CN114095476A/en
Application granted granted Critical
Publication of CN114095476B publication Critical patent/CN114095476B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/20Manipulation of established connections
    • H04W76/25Maintenance of established connections

Abstract

The application relates to the technical field of communication, and discloses a method for inquiring a router interface of electronic equipment, a method for determining a router interface connected with the electronic equipment by a router, the router and a communication system. Even if cables of a plurality of clients connected to the router interface are interwoven, a user can quickly find a target physical interface connected to the client according to the position of the target physical interface indicated by the router on the router. When a user needs to remove a certain client, the router is correspondingly searched directly based on the indicated position of the target physical interface, and the interface connected with the client is operated. Other clients are not disconnected with the router, and the user experience is improved.

Description

Method for inquiring router interface by electronic equipment, router and communication system
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method for querying a router interface of an electronic device, a method for a router to determine a router interface connected to the electronic device, a router, and a communication system.
Background
The router is a device for connecting each local area network and wide area network in the internet, and automatically selects and sets a route according to the condition of a channel, and sends signals in a front-back sequence by using an optimal path. The main interfaces of the router are a local area network interface, a wide area network interface and a router configuration interface. The LAN interface types include standard network interfaces such as Ethernet, fast Ethernet, gigabit Ethernet M, etc. In each network, interfaces with different media standards, such as RJ-45 interfaces, optical fiber interfaces, thick coaxial cable interfaces, etc., can be supported. The WAN interface includes synchronous serial interface and asynchronous serial interface. The configuration interface has a control interface Console, which is generally used to connect the interface with a computer using a dedicated connection line when the router is basically configured.
Because the router has a plurality of ports, a plurality of computers are connected with the ports of the router through cables. For a router, it can bind the MAC address of the computer to which it is connected and the IP address it assigns to the computer. The total number of computers connected with the binding computer and the parameters of the computers (such as the MAC address and the IP address of the computer) are provided for the computers connected with the binding computer by binding the MAC address and the IP address of the computer. A user can connect more computers through the ports of the router, which in turn increases the number of cables. When the computer is too far from the router, the length of the cable is also increased accordingly. When a user needs to remove a computer, it is difficult for the user to accurately find the physical interface of the router connected to the computer due to the excessive or lengthy cables connecting the router. It is not possible to operate with respect to the physical interface to which the computer is connected. When a user searches for a port connected with the computer, other computers and the router are easily disconnected directly, and user experience is affected.
Disclosure of Invention
The invention aims to provide a method for inquiring a router interface by electronic equipment, a method for determining a router interface connected with the electronic equipment by a router, the router and a communication system, which are convenient for a user to search a port connected with a computer, avoid disconnection of other computers and the router and improve the experience of the user.
In a first aspect, an embodiment of the present application discloses a method for querying a router interface by an electronic device, where the router is connected to at least one electronic device, and allocates an IP address to each electronic device.
A first electronic device of the at least one electronic device sends an interface query request to the router, the interface query request at least for querying the router for a location of a physical interface of the router to which a target electronic device of the at least one electronic device connected to the router in a wired manner is connected.
The first electronic device may be an electronic device having administrator authority or a target electronic device. The first electronic device having the administrator authority may request the router to inquire physical interface information of any one or more target electronic devices connected to the router. A first electronic device, which is a target electronic device connected to a physical interface of a router, may request the router to query its own physical interface information.
And the router determines a target virtual interface associated with the IP address of the target electronic equipment according to the interface query request, and determines a target physical interface corresponding to the target virtual interface according to a preset mapping relation between the virtual interface and the physical interface.
The mapping of the virtual interface and the physical interface is specifically as follows: the router identifies a virtual interface from which the IP request of the current electronic device is reported, and then binds the MAC address carried in the IP request with the virtual interface (as a target virtual interface). Or the interface management module binds the IP address allocated by the DHCP server with the virtual interface. Or the router binds the MAC address carried in the IP request and the IP address distributed by the DHCP server with the virtual interface. In this way, the virtual interface parameters of the virtual interface include, but are not limited to, the physical interface information of the target physical interface bound to the target virtual interface, the MAC address of the electronic device carried in the IP request, and the IP address allocated by the DHCP server.
The router sends physical interface information associated with the target physical interface to the first electronic device, the physical interface information indicating at least a location of the target electronic device at the physical interface on the router.
The first electronic device may display the physical interface information in a picture form on the display screen, and may also play the physical interface information through the electronic device. Thereby facilitating the user to find the specific physical interface of the target electronic device.
The physical interface information includes an interface identifier (such as an interface number, a type, and a function parameter) of the target electronic device, a picture of a position (interface schematic diagram) of a target physical interface of the target electronic device on the router, and the like.
In a first aspect of embodiments of the present application, a method for querying a router interface by an electronic device is disclosed, where the router is capable of providing a location of a target physical interface of the router on the router for a client connected to the target physical interface. Even if cables of a plurality of clients connected to the router interface are interwoven, a user can quickly find a target physical interface connected to the client according to the position of the target physical interface indicated by the router on the router. When a user needs to remove a certain client, the router is correspondingly searched directly based on the indicated position of the target physical interface, and the interface connected with the client is operated. Other clients are not disconnected with the router, and the user experience is improved.
According to some embodiments of the first aspect of the present application, the physical interface information comprises an interface identification of the associated target physical interface.
According to some embodiments of the first aspect of the present application, the physical interface information includes an interface identification associated with the target physical interface, and the router provides the interface schematic to the first electronic device based on the physical interface information and displays the location of the target physical interface on the router in the form of a graph.
According to some embodiments of the first aspect of the application, the target electronic device is the first electronic device itself.
According to some embodiments of the first aspect of the present application, at least one electronic device connects to a physical interface of a router, and sends an IP request to the router,
the router allocates a virtual interface for at least one piece of electronic equipment, receives an IP request through the virtual interface and sends an IP address allocated based on the IP request to the electronic equipment, wherein the IP request carries the MAC address of the electronic equipment.
According to some embodiments of the first aspect of the present application, the virtual interface parameters of the target virtual interface include physical interface information of the target physical interface, a MAC address of the target electronic device, and an IP address of the target electronic device.
According to some embodiments of the first aspect of the application, the router binds the IP address and the target virtual interface;
the router inquires a target virtual interface corresponding to the IP address based on the IP address, and determines physical interface information of the target physical interface based on the virtual interface parameter.
According to some embodiments of the first aspect of the present application, after the electronic device is removed from the target physical interface of the router, the router erases the binding information of the IP address and the target virtual interface.
According to some embodiments of the first aspect of the present application, the interface query request comprises an IP address and/or a MAC address.
According to some embodiments of the first aspect of the application, the IP address and the MAC address are bound.
According to some embodiments of the first aspect of the application, the router binds the MAC address and the target virtual interface;
the router inquires an IP address associated with the MAC address based on the MAC address;
the router inquires a target virtual interface corresponding to the MAC address based on the MAC address, and determines physical interface information of the target physical interface based on the virtual interface parameter.
According to some embodiments of the first aspect of the present application, after the electronic device is removed from the target physical interface of the router, the router erases the MAC address of the electronic device and the binding information of the associated virtual interface.
According to some embodiments of the first aspect of the present application, the physical interface information further comprises a MAC address of the electronic device.
According to some embodiments of the first aspect of the present application, the physical interface information further includes a number of all electronic devices connected to the router.
In a second aspect, an embodiment of the present application discloses a method for a router to determine a router interface connected to an electronic device, where the router is connected to at least one electronic device and allocates an IP address to each electronic device, and the method includes:
determining a target virtual interface associated with the IP address of the target electronic equipment based on the interface query request, and determining a target physical interface corresponding to the target virtual interface according to a preset mapping relation between the virtual interface and the physical interface;
the method comprises the steps that an interface query request is sent to a router by a first electronic device in at least one electronic device, and the interface query request is at least used for querying the router for the position of a physical interface of a router connected with a target electronic device, connected with the router in a wired mode, in the at least one electronic device;
and sending physical interface information associated with the target physical interface to the first electronic equipment, wherein the physical interface information at least indicates the position of the physical interface of the target electronic equipment on the router.
A second aspect of embodiments of the present application discloses a method for a router to determine a router interface connected to an electronic device, where the router is capable of providing a location of a target physical interface of the router on the router for a client connected to the target physical interface. Even if cables of a plurality of clients connected to the router interface are interwoven, a user can quickly find a target physical interface connected to the client according to the position of the target physical interface indicated by the router on the router. When a user needs to remove a certain client, the router is correspondingly searched directly based on the indicated position of the target physical interface, and the interface connected with the client is operated. And other clients are not disconnected from the router, so that the user experience is improved.
According to some embodiments of the second aspect of the present application, the physical interface information of the target electronic device is determined based on an interface query request from the target electronic device connected to the router.
In a third aspect, an embodiment of the present application discloses a router, where the router is connected with at least one electronic device and allocates an IP address to each electronic device, and the router includes: at least one memory and at least one processor;
at least one memory having instructions stored therein;
the instructions, when executed by the at least one processor, cause the router to:
determining a target virtual interface associated with the IP address of the target electronic equipment based on the interface query request, and determining a target physical interface corresponding to the target virtual interface according to a preset mapping relation between the virtual interface and the physical interface;
the method comprises the steps that an interface query request is sent to a router by a first electronic device in at least one electronic device, and the interface query request is at least used for querying the router for the position of a physical interface of a router connected with a target electronic device, connected with the router in a wired mode, in the at least one electronic device;
and sending physical interface information associated with the target physical interface to the first electronic equipment, wherein the physical interface information at least indicates the position of the physical interface of the target electronic equipment on the router.
In a third aspect of embodiments of the present application, a router is disclosed, which is capable of providing a location of a target physical interface of the router on the router for a client connected to the target physical interface. Even if cables of a plurality of clients connected to the router interface are interwoven, a user can quickly find a target physical interface connected to the client according to the position of the target physical interface indicated by the router on the router. When a user needs to remove a certain client, the router is correspondingly searched directly based on the indicated position of the target physical interface, and the interface connected with the client is operated. And other clients are not disconnected from the router, so that the user experience is improved.
In a fourth aspect, an embodiment of the present application discloses a communication system, including: at least one electronic device and a router;
the router is connected with at least one electronic device and allocates IP addresses for the electronic devices;
a first electronic device in the at least one electronic device sends an interface query request to a router, wherein the interface query request is at least used for querying the router about the position of a physical interface of the router connected with a target electronic device in the at least one electronic device, and the target electronic device is accessed to the router in a wired mode;
the router determines a target virtual interface associated with the IP address of the target electronic equipment according to the interface query request, and determines a target physical interface corresponding to the target virtual interface according to a preset mapping relation between the virtual interface and the physical interface;
the router sends physical interface information associated with the target physical interface to the first electronic device, the physical interface information indicating at least a location of the target electronic device at the physical interface on the router.
In a communication system disclosed in the fourth aspect of the embodiments of the present application, a router can provide a location of a target physical interface of the router on the router for a client connected to the target physical interface. Even if cables of a plurality of clients connected to the router interface are interwoven, a user can quickly find a target physical interface connected to the client according to the position of the target physical interface indicated by the router on the router. When a user needs to remove a certain client, the router is correspondingly searched directly based on the indicated position of the target physical interface, and the interface connected with the client is operated. And other clients are not disconnected from the router, so that the user experience is improved.
Additional features and corresponding advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
Fig. 1 is a schematic structural diagram of a communication system formed by a router and a client in an application scenario according to an embodiment of the present application;
fig. 2 (a) is a schematic hardware structure diagram of a router in an application scenario according to an embodiment of the present application;
fig. 2 (b) is a schematic software framework diagram of a router in an application scenario according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a client in an application scenario according to an embodiment of the present application;
fig. 4 (a) is a signal flow diagram illustrating a specific implementation of allocating an IP address to a client by a router in an application scenario according to an embodiment of the present application;
fig. 4 (b) is a schematic structural diagram of a specific implementation that a router allocates an IP address to a client in an application scenario according to an embodiment of the present application;
fig. 4 (c) is a schematic structural diagram of a specific implementation that a router in an application scenario provides interface display information to a client according to an embodiment of the present application;
fig. 5 (a) is a schematic structural diagram of a system composed of a client and a router interface and implementing IP allocation according to an embodiment of the present application;
fig. 5 (b) is a schematic structural diagram of implementing interface information query for a system composed of a client and a router interface according to an embodiment of the present application;
fig. 5 (c) is a schematic flowchart of a method for a client to query a router interface according to an embodiment of the present application;
fig. 5 (d) is a schematic diagram of a client display router interface according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a router disclosed in an embodiment of the present application;
fig. 7 is a schematic structural diagram of an SOC disclosed in an embodiment of the present application.
Detailed Description
In some embodiments of the present application, a connection method between an electronic device and a router provided in an embodiment of the present application is described by taking the electronic device as a client. It can be understood that the router referred to in the present application may be a Hilink router, and may also be other electronic devices with a routing function, such as a computer with a routing function and an intelligent home device. The client referred to in this application may be a computer, a mobile phone, a tablet, a laptop, etc.
Fig. 1 is a schematic structural diagram of a communication system formed by a router and a client in an application scenario according to an embodiment of the present application.
The communication system composed of the router and the clients shown in fig. 1 includes a router 30, and a plurality of clients 40 connected to the router 30 by cables 501, and as shown in the figure, 3 clients 40 are connected to the router 30 by wires.
The three clients 40 are each connected to the lan interface 30301, the lan interface 30302, and the lan interface 30303 of the lan interface 3030 by a cable 501.
Interfaces 303 (physical interfaces) of router 30 include, but are not limited to, a local area network interface 3030, a wide area network interface 3031, and a router configuration interface 3032. It is noted that the number of the local area network interface 3030, the wide area network interface 3031, and the router configuration interface 3032 is not limited to one. For example, three local area network interfaces 3030 in the application scenario in fig. 1 provided in this embodiment of the present application are a local area network interface 30301, a local area network interface 30302, and a local area network interface 30303, respectively. Wan interface 3031 includes three interfaces and router configuration interface 3032 includes one interface
According to some embodiments herein, the local area network interface 3030, the wide area network interface 3031, and the router configuration interface 3032 of the router 30 are used to connect the clients 40, respectively.
In the case of the router 30 as being capable of wireless routing, there may also be a client 50 connected to the router 30 by wireless means 500.
Whether the client is connected to the router in a wired or wireless manner, the client can inquire the physical interface information of the client connected with the router and other electronic equipment under the permission condition. For example, when a device is operating as an administrator of the router, it may query the physical interface information of all electronic devices connected to the router. The following describes specific structures of the router and the client included in fig. 1 in the embodiment of the present application:
referring to fig. 2 (a), fig. 2 (a) is a schematic diagram of a hardware structure of a router 30 disclosed in the embodiment of the present application.
The router 30 includes: memory 301, processor 302, interface 303 (physical interface), power module 306, and switch 307. The interfaces 303 (physical interfaces) include, but are not limited to, a local area network interface 3030, a wide area network interface 3031, and a router configuration interface 3032. Router configuration interface 3032 includes console ports and auxiliary ports.
It is to be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation to the router 30. In other embodiments of the present application, router 30 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
In some embodiments of the present application, the memory 301 may be a non-volatile memory, a random access memory, a flash memory, and a read-only memory.
The router is characterized in that the random access memory discards information when the router is started or power supply is interrupted, the read-only memory stores starting software of the router, the starting software is first software operated by the router and is responsible for the router to enter a normal working state, and the router stores a complete operating system as a backup in the random access memory so as to be used as a backup when the operating system cannot be used. The router 30 has a Dynamic Host Configuration Protocol (DHCP) server.
The random access memory may be a storage device for the IP pool, and when the client 40 requests the router 30 to assign an IP address, the DHCP server of the router 30 selects an IP address from the IP pool and assigns it to the client 40. The random access memory may store various parameters such as the MAC address of the client 40, the IP address assigned to the client 40 by the router 30, and the binding relationship between the MAC address and the IP address of the client 40.
In addition, the random access memory may also store picture resource data (location of the LAN interface on the router, interface parameters, appearance, etc.) of a virtual interface (virtual LAN interface of the LAN interface) corresponding to a physical interface (such as the LAN interface) of the router 30, a mapping relationship between the physical interface and the virtual interface, and the like.
The ROM is usually mounted on one or more chips soldered to the motherboard of the router
The main purpose of the flash memory is to store the operating system of the router 30, and maintain the normal operation of the router, and if the router is installed with the flash memory, the flash memory is mainly used to boot the default location of the operating system of the router, so long as the capacity of the flash memory is sufficient, multiple operating system images can be saved to provide multiple boot options, wherein the operating system of the router 30 adopts the Linux operating system.
The main purpose of the non-volatile memory is to store configuration data (boot configuration) that is read in when the operating system boots. The random access memory is mainly used as an operating system table and a buffer storage area, and the operating system can meet all conventional storage requirements through the random access memory so that the router can quickly access the information, wherein the storage speed of the random access memory is superior to the three types mentioned above.
It is understood that parameters such as IP pool of router, parameters of client 40, picture resource data, and binding relationship between MAC address and IP address of client 40 may also be stored in a non-volatile memory or other types of memories, and the embodiments of the present application are not limited herein.
The processor 302 may include one or more Processing units, for example, a Processing module or Processing circuit that may include a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Digital Signal Processor (DSP), a Micro-programmed Control Unit (MCU), an Artificial Intelligence (AI) processor, or a Programmable logic device (FPGA), among others. The different processing units may be separate devices or may be integrated into one or more processors. A memory unit may be provided in processor 302 for storing instructions and parameters associated with router 30 and parameters associated with client 40.
A processing unit in processor 302, which may be referred to as a MAC processing unit (including a hardware portion (which may be referred to as GMAC hardware) and a software portion (which may be referred to as GMAC software), may convert packets from router 30 into a bitstream for transmission to switch 307. Switch 307 parses the bitstream from the MAC processing unit to obtain a MAC address for the client. Router 30 looks up client 40 to which the MAC address corresponds and transmits corresponding data (e.g., an IP address) to a corresponding physical interface for transmission to client 40 over the physical interface.
As shown in fig. 2 (a), processor 302 interfaces switch 307 and interface 303, with switch 307 and interface 303 connected. Processor 302 interfaces with client 40 through switch 307 and interface 303.
The interfaces 303 of the router 30 include, but are not limited to, a local area network interface 3030, a wide area network interface 3031, and a router configuration interface 3032. It is noted that the number of the lan interface 3030, the wan interface 3031 and the router configuration interface 3032 is not limited to one. For example, three local area network interfaces 3030 in the application scenario in fig. 1 provided in this embodiment of the present application are a local area network interface 30301, a local area network interface 30302, and a local area network interface 30303, respectively. The wide area network interface 3031 includes three interfaces and the router configuration interface 3032 includes one interface.
The interfaces 303 of the router 30 each have their own name and number, and the full name of an interface may be formed by the type identifier and number of the interface. Numbering starts from 0 and for routers 30 with fixed interfaces or routers 30 with modular interfaces, only one number is used in the full name of the interface and numbering is done according to its physical order at the router 30. For example, ethernet0 indicates the 1 st Ethernet interface, and Serial1 indicates the 2 nd Serial port. For a router supporting 'online plugging and deleting' or having a function of changing physical interface configuration, the full name of an interface at least comprises two numbers, and the middle is divided by a slash '/', wherein the 1 st number represents a slot number, and the 2 nd number represents a port number in an interface card. For a router supporting "universal interface processor", its interface number is in the form of "slot/port adapter/port number", e.g. Ethernet4/0/1 is the 2 nd Ethernet interface of the 1 st port adapter on slot number 4.
The type of local area network interface (LAN interface) 3030 is a standard network interface such as ethernet, fast ethernet, gigabit ethernet, and gigabit ethernet M. In each network, interfaces of different media standards, such as RJ45 interfaces, optical fiber interfaces, thick coaxial cable interfaces, etc., can be supported. Router 30 may interface with client 40 via an RJ45 interface to enable data communication with client 40.
A Wide area network interface (WAN) 3031 includes a synchronous serial interface and an asynchronous serial interface. The router 30 is connected to a wide area network through a WAN port to implement a data communication network of the wide area network across regions.
Console port Console is typically used to connect the interface to client 40 using a dedicated connection line when the router 30 is basically configured.
The configuration interface 3032 of the router 30 includes a Console port Console and an auxiliary port. Console port Console is typically used to connect the interface to client 40 using a dedicated connection line when the router 30 is basically configured. The console port is used for enabling a user or an administrator to communicate with the router 30 by using the network access equipment to complete the configuration of the router, and the port provides an EIA/TIA-232 asynchronous serial interface for configuration in the router 30.
An EIA/TIA-232 asynchronous serial interface is also provided as an auxiliary port, except that it is often used to connect modems to enable remote management of routers.
The power module 306 may include a power supply, power management components, and the like. The power management component is used for managing the charging of the power supply and the power supply of the power supply to other modules.
Optionally, for the wireless router, it also has a wireless communication module (not shown in the figure). Such that the wireless router may implement the client 50 shown in fig. 1 to implement wireless communications. The wireless communication module may provide a solution for wireless communication applied to the client, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (BT), near Field Communication (NFC), infrared (IR), and the like. The wireless communication module may be one or more devices integrating at least one communication processing module.
Referring to fig. 2 (b), fig. 2 (b) is a schematic software framework diagram of a router 30 according to an embodiment of the present disclosure.
The router 30 has an operating system kernel module 301, a driver module 302, a routing network module 303, and an application development framework module 304.
The operating system kernel module 301 includes a file system, memory management, process scheduling, and process communication.
The file system defines the data block information of all files in the operating system of the router 30, and establishes a file index according to the data block information, thereby providing support for inquiring and changing files for memory management, process scheduling and process communication.
The memory management provides an operating address space for the process scheduling module and manages data information related to the process scheduling module in operation.
The process scheduling module is responsible for processing application requests of an application program of the upper layer router.
And the process communication module is responsible for providing communication support for the operation of the process scheduling module.
The driver module 302 encapsulates all hardware in the operating system of the router 30 and opens an interface to the file system of the operating system, forming a file in the file system for upper layer calls. Such as processor 302 or other hardware of interface router 30.
The application development framework module 304 includes: and the virtual machine provides a running environment for the application program, calls lower-layer hardware according to application requirements and provides interface support of the kernel module of the operating system. In the embodiment of the present application, an application program and an Interface management module of a web product Interface module (WebUI) in the embodiment of the present application run in a virtual machine. The WebUI module provides physical interface information to the client 40 when accessed by the client 40. The interface management module is configured to manage a physical interface connected to the client 40 (for example, binding the physical interface and a corresponding virtual interface, and binding a physical Address (MAC) and an IP Address of the virtual interface and the corresponding client 40).
And the application development interface is used for carrying out objectification encapsulation on all functions in the operating system and providing an objectification interface for developing an application program of the intelligent router. For the physical interface of the router 30, a virtual interface corresponding to the physical interface is correspondingly established in the virtual machine, and the WebUI module and the interface management module in the virtual interface and application development framework module 304 perform data communication through the routing network module 303.
The routing network module 303 may communicate based on Transmission Control Protocol/Internet Protocol (TCP/IP) or other communication protocols. A Dynamic Host Configuration Protocol (DHCP) server in the routing network module 303 performs data communication based on a TCP/IP network Protocol.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a client in an application scenario according to an embodiment of the present application.
The client 40 includes: memory 401, processor 402, interface 403, power module 404, display screen 405. The interface 403 includes, but is not limited to, a Universal Serial Bus (USB) interface, an IEEE 1394 interface, an RJ45 cable interface, and the like.
In some embodiments of the present application, the memory 401 may be a non-volatile memory, a random access memory, a flash memory, and a read-only memory. The random access memory may have stored therein the MAC address of the client 40. When the DHCP client of the client 40 requests the router 30 to assign an IP address, the DHCP client of the client 40 transmits the MAC address to the router 30, and the DHCP server of the router 30 selects an IP address from the IP pool and assigns the IP address to the client 40, and stores the IP address in the random access memory of the client 40.
Further, the random access memory may store therein picture resource data (a position of the LAN interface on the router, interface parameters, an external shape, and the like) from a virtual interface (a virtual LAN interface of the LAN interface) corresponding to a physical interface (e.g., the LAN interface) connected to the router 30.
The display screen 405 is used to display images, videos, and the like. The display screen 405 includes a display panel.
The DHCP server of the router 30 transmits the picture resource of the virtual interface corresponding to the physical interface of the router 30 to which the client 40 is connected to the client 40. Parameters, location, connection status, etc. of the particular physical interface of router 30 to which client 40 is connected may be displayed on display screen 405 of client 40. At the same time, the number of clients connected on router 30 may also be displayed on display screen 405 of client 40.
The IEEE 1394 interface in the interface 403 is widely used as a formal name of a serial interface in a digital video camera, a network, and a storage device, and is a FireWire interface, which is a high-speed transmission interface.
The RJ45 network cable interface in the interface 403 is used to connect with the router 30 to realize data communication.
The client 50 has a wireless communication module (not shown) for wireless communication with the router 30, in addition to the components of the client 40 shown in fig. 3. The wireless communication module may provide a solution for wireless communication applied to the client, including Wireless Local Area Networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), near Field Communication (NFC), infrared (IR), and the like. The wireless communication module may be one or more devices integrating at least one communication processing module.
It is to be understood that the illustrated structure of the embodiment of the present application does not specifically limit the client 40 and the client 50. In other embodiments of the present application, clients 40 and 50 may include more or fewer components than shown, or combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The following describes a process of allocating an IP address to a client by a router according to an embodiment of the present application:
according to one implementation provided by the embodiment of the present application, after the client 40 accesses the physical interface of the router 30, the router 30 assigns an IP address to the client 40 so that the client 40 can access the internet via the router 30. For client 40, it has a MAC address and Dynamic Host Configuration Protocol (DHCP) client to confirm the location of client 40. For the router 30, it has a DHCP server and a pool of IP addresses configured by the DHCP server.
As shown in fig. 4 (a), the client 40 accesses the lan interface through the cable, and the client 40 sends an IP request to the router 30 (requesting the router 30 to assign an IP address), where the IP request carries the MAC address of the client 40. The router 30 receives the IP request and parses the IP request for a MAC address, and the DHCP server of the router 30 allocates an IP address from the IP pool and transmits to the client 40 based on the MAC address.
To further explain the process of the router 30 allocating an IP address to the client 40, the IP address allocation process shown in fig. 4 (a) will be described below with reference to fig. 4 (b).
As shown in fig. 4 (b), at the hardware level, the client 40 accesses a lan interface, such as the interface 30301 shown in the figure, via a cable, and the client 40 issues an IP request to the router. The IP request is sent in the form of a data packet to the switch 307 in the router. The switch 307 obtains the MAC address of the client 40 after analyzing the IP request, and sends the MAC address and the rest of the data carried in the IP request to the MAC processing unit in the processor 302 for processing. The MAC processing unit in processor 302 may include a hardware portion (which may be referred to as GMAC hardware) and a software portion (which may be referred to as GMAC software, and functions are implemented by a controller running corresponding code) that converts packets for router 30 into a bit stream. The data processed by the MAC processing unit in the processor 302, such as the MAC address and the rest of the data carried in the IP request, are transferred to the driver module 302 of the software layer, and then sent to the DHCP server through the virtual interface corresponding to the lan interface 30301 and the routing network module 303.
The DHCP server responds to the IP request and allocates an IP address from the address pool, and transmits data of the lan interface 30301 to the processor 302 in the form of a packet through the same virtual interface as that of the received IP request. The MAC processing unit in processor 302 converts the packet into a bit stream and sends it to switch 307. Switch 307 parses the MAC address of client 40 from the bitstream and sends the IP address based on the MAC address to local network interface 30301 for client 40 to access router 30 via the IP address.
Further, the router 30 transmits the MAC address of the client 40 at the local network interface 30301 to the interface management module, and the MAC address and the IP address of the client 40 are bound by the interface management module. The interface management module records the MAC address of client 40 at lan interface 30301. And the number of all clients 40 (i.e., the number of MAC addresses) connected to the interface 303 of the router 30 is recorded by the interface management module.
It will be appreciated that the remaining process of the client 40 requesting the router 30 to assign an IP address may be cross-referenced with respect to fig. 4 (a) and 4 (b).
After router 30 assigns an IP address to client 40 at lan interface 30301, it is convenient for client 40 to know the total number of clients connected to router 30 at that time or the MAC address of client 40 at lan interface 30301. Client 40 at lan interface 30301 may request that the WebUI module of router 30 provide it with the MAC address and the total number of clients connected to router 30 and display it on display screen 194 of client 40 in a manner preset in the WebUI module (the preset manner including graphical display, text display, etc.).
The process of the client 40 requesting the WebUI module of the router 30 to display information for the relevant interface of the electronic device to which the router is connected will be described below with reference to fig. 4 (c). For example, the MAC address and the total number of clients connected to the router 30 are displayed as interface display information.
According to some implementations of embodiments of the present application, the client 40 at the local network interface 30301 issues an interface query request to the router 30. The interface query request carries the MAC address of client 40 and/or the IP address assigned to it by router 30. The interface query request is sent to the WebUI module via the lan interface 30301, the switch 307, the MAC processing unit included in the processor 302, and the virtual interface corresponding to the lan interface 30301. The WebUI module acquires the number of the MAC addresses recorded in the interface management module from the interface management module. The number of MAC addresses and/or MAC address information of the client 40 at the local network interface 30301 is transmitted to the local network interface 30301 by the WebUI module. And is displayed on the display screen 194 of the client 40 at the local network interface 30301 in a manner preset by the WebUI module (the preset manner includes a picture display, a text display, and the like).
It should be noted that the processing procedure of the interface query request passing through the lan interface 30301, the switch 307, the MAC processing unit included in the processor 302 and the virtual interface corresponding to the lan interface 30301 is the same as the processing procedure of the IP request passing through the lan interface 30301, the switch 307, the MAC processing unit included in the processor 302 and the virtual interface corresponding to the lan interface 30301 shown in fig. 4 (b), and details of this embodiment are not repeated herein.
It is understood that the remaining clients 40 connected to the router 30 request the WebUI module of the router 30 to provide the MAC address thereto and the total number of clients connected to the router 30 can be cross-referenced with fig. 4 (c)).
It should be noted that in this embodiment, except that the client 40 is correspondingly connected to the lan interface 3030, the wan interface 3031 and the router configuration interface 3032, the router 30 is accessed. The client 40 having the administrator authority may request the DHCP server of the router 30 to allocate IP to the remaining clients connected to the router 30, or request the WebUI module to provide MAC addresses and the total number of clients connected to the router 30 to the remaining clients connected to the router 30.
With the above embodiment of the present application, the WebUI module of the router 30 may be able to provide the MAC address and the total number of clients connected to the router 30 to the clients 40 connected to the local area network interface 3030. However, such information as described above is not sufficient in some scenarios. For example, when there are too many cables connected to the lan interface 30301, the lan interface 30302 and the lan interface 30303, the cables are interlaced, and it is difficult for a user to find an interface of the client 40 and the router 30 to which each cable 501 is connected. When a user needs to remove a certain client 40, each cable 501 needs to be checked one by one, which easily causes other clients 40 to be directly disconnected from the router 30, and affects the user experience. Embodiments of the present application further provide a method for providing a location of a physical interface to a client, and the following describes some of the drawings referred to in further embodiments of the present application:
fig. 5 (a) is a schematic structural diagram of a system composed of a client and a router interface and implementing IP allocation according to an embodiment of the present application; fig. 5 (a) is a schematic structural diagram of a system comprising a client and a router interface, which implements interface information query according to an embodiment of the present application; fig. 5 (c) is a schematic flowchart of a method for a client to query a router interface according to an embodiment of the present application; fig. 5 (d) is a schematic diagram illustrating a router interface displayed on a client according to an embodiment of the present application.
Still taking the application scenario shown in fig. 1 as an example, the local area network interface 3030, the wide area network interface 3031, and the router configuration interface 3032 in the interface 303 are mapped with virtual interfaces correspondingly. The local area network interface 3030, the wide area network interface 3031, the router configuration interface 3032 and the virtual interface are directly mapped in such a way that when a router is designed, each physical interface in the interfaces 303 is respectively bound with one virtual interface. That is, the interface identifier of the corresponding physical interface is marked on the virtual interface, so that the physical interface corresponding to the virtual interface can be found through the interface identifier (such as the number, type, or function parameter of the physical interface).
The following describes a process in which the router 30 assigns an IP address to the client 40:
first, as shown in fig. 5 (a), the structure of the system of client and router interfaces to implement IP allocation includes the client 40 at the lan interface 30301, the switch 307, the processor 302, the virtual interface mapped to the lan interface 30301 and the virtual interface mapped to the physical interface of the remaining router, the DHCP server, the routing network module 303 (TCP/IP protocol), and the interface management module.
It should be noted that the processing procedure of the interface query request passing through the lan interface 30301, the switch 307, the MAC processing unit included in the processor 302, and the virtual interface corresponding to the lan interface 30301 is the same as the processing procedure of the IP request passing through the lan interface 30301, the switch 307, the MAC processing unit included in the processor 302, and the virtual interface corresponding to the lan interface 30301 shown in fig. 4 (b), and is not described herein again in this embodiment of the present application.
With respect to fig. 5 (a), the following describes a flow of the router 30 in fig. 5 (a) allocating an IP address to the client 40:
client 40 at lan interface 30301 sends an IP request to router 30, the IP request carrying the MAC address of client 40. The IP request is transmitted to the DHCP server and the interface management module of the router 30 via the lan interface 30301, the switch 307, the MAC processing unit included in the processor 302, and the virtual interface bound to the lan interface 30301.
The DHCP server assigns an IP address to client 40 at local network interface 30301. The IP address allocation specifically includes: the DHCP server responds to the IP request and allocates an IP address from the address pool, and sends the data of the lan interface 30301 to the processor 302 in the form of a packet through a virtual interface. The MAC processing unit in the processor 302 converts the data packet into a bit stream and sends the bit stream to the switch 307. Switch 307 parses the MAC address of client 40 from the bitstream and sends the IP address based on the MAC address to local network interface 30301 for client 40 to access router 30 via the IP address.
It should be noted that the processing procedure of the IP request passing through the lan interface 30301, the switch 307, the MAC processing unit included in the processor 302, and the virtual interface corresponding to the lan interface 30301 is the same as the processing procedure of the IP request passing through the lan interface 30301, the switch 307, the MAC processing unit included in the processor 302, and the virtual interface corresponding to the lan interface 30301 shown in fig. 4 (b), and is not described herein again in this embodiment of the present application.
The interface management module identifies the virtual interface from which the IP request of the current client 40 is reported, and then the interface management module binds the MAC address carried in the IP request with the virtual interface (as a target virtual interface). Or the interface management module binds the IP address allocated by the DHCP server with the virtual interface. Or the interface management module binds the MAC address carried in the IP request and the IP address allocated by the DHCP server with the virtual interface. In this way, the virtual interface parameters of the virtual interface include, but are not limited to, the physical interface information of the target physical interface bound to the target virtual interface, the MAC address carried in the IP request, and the IP address allocated by the DHCP server.
Further, to avoid tying up virtual interfaces of router 30 when client 40 is removed from an interface of router 30. In the embodiment of the present application, when the client 40 is removed from the interface of the router 30. And the router erases the binding information of the IP address and the target virtual interface, or the router erases the binding information of the MAC address and the target virtual interface of the client, or the router erases the binding information of the MAC address and the IP address of the client and the target virtual interface, so that the virtual interface resource of the router is prevented from being occupied. Further, the IP address and MAC address of the client 40 may also be erased by the router.
Next, a process of inquiring information of the lan interface 30301 of the router 30 for the client 40 will be described:
as shown in fig. 5 (b), the structure of the system of client and router interfaces implementing the interface information query includes the client 40 at the lan interface 30301, the switch 307, the processor 302, the virtual interface mapped with the lan interface 30301 and the virtual interface mapped with the physical interface of the remaining router, the WebUI module, the routing network module 303 (TCP/IP protocol), and the interface management module.
According to some implementations of embodiments of the present application, the client 40 at the local network interface 30301 issues an interface query request to the router 30. The interface query request carries the MAC address of client 40 and/or the IP address assigned to it by router 30. The interface query request is sent to the WebUI module via the lan interface 30301, the switch 307, the MAC processing unit included in the processor 302, and the virtual interface corresponding to the lan interface 30301. The WebUI module obtains the physical interface information of the router 30 corresponding to the IP address in the interface management module from the interface management module. The physical interface information is transmitted to the local area network interface 30301 by the WebUI module. And is displayed on the display screen 194 of the client 40 at the local network interface 30301 in a manner preset by the WebUI module (the preset manner includes a picture display, a text display, and the like).
With respect to fig. 5 (b), the following describes the procedure of interface information query of the local area network interface 30301 connected to the client 40 by the router 30 in fig. 5 (b) with reference to fig. 5 (c).
As shown in fig. 5 (c), the method for the client to query the router interface includes:
step S30: the client 40 (as the target electronic device) at the local network interface 30301 sends an interface query request to the router 30.
The MAC address of client 40 at lan interface 30301 and/or the IP address assigned to it by router 30 is carried in the interface query request. Clients or other devices connected to local network interface 30302 and local network interface 30303 or the remaining interfaces may act as the remaining electronic devices. It is noted that a client or other type of electronic device with administrator privileges may be used as the first electronic device in the embodiments of the present application to query the physical interface information of the client 40 connected to the rest of the electronic devices on the router 30 or at the lan interface 30301.
When the client 40 at the lan interface 30301 sends an interface query request to the router 30, the interface query request is transmitted to the WebUI module of the router 30 through the lan interface 30301, the switch 307, the MAC processing unit in the processor 302, and the virtual interface bound to the lan interface 30301.
It should be noted that the processing procedure of the interface query request passing through the lan interface 30301, the switch 307, the MAC processing unit included in the processor 302, and the virtual interface corresponding to the lan interface 30301 is the same as the processing procedure of the IP request passing through the lan interface 30301, the switch 307, the MAC processing unit included in the processor 302, and the virtual interface corresponding to the lan interface 30301 shown in fig. 4 (b), and is not described herein again in this embodiment of the present application.
Step S31: the router 30 determines a target virtual interface associated with the IP address of the client 40 at the local network interface 30301 based on the interface query request. Specifically, the interface management module obtains the IP address and the MAC address of the client 40 at the lan interface 30301 in the interface query request. The WebUI module of the router 30 requests the interface management module to query the virtual interface (as the target virtual interface) bound by the IP address and/or MAC address of the client 40.
Step S32: the router 30 determines a target physical interface corresponding to the target virtual interface according to a mapping relationship between a preset virtual interface and a preset physical interface. The preset mapping relationship between the virtual interface and the physical interface refers to that: and correspondingly configuring a virtual interface for each physical interface. The virtual interface parameters of the virtual interface comprise interface identifiers of the physical interfaces, and the virtual interface and the physical interfaces are mapped and configured in a one-to-one corresponding mode. A configuration file that records a mapping relationship between a virtual interface and a physical interface corresponding to the virtual interface is stored in a memory of the router. The process of determining the target physical interface corresponding to the target virtual interface specifically includes: and the interface management module of the router determines a target physical interface corresponding to the target virtual interface according to the interface identifier of the target physical interface preset in the target virtual interface.
Step S33: router 30 looks up the physical interface information of the target physical interface and sends the target physical interface of the target physical interface to client 40. The method comprises the following steps: the WebUI module of router 30 provides the physical interface information of the target physical interface to client 40 at lan interface 30301.
The client 40 at the lan interface 30301 may display the physical interface information in the form of a picture on the display screen 405, or may play the physical interface information through the client 40. Thereby facilitating the user to locate the local network interface 30301.
The physical interface information includes an interface identifier (such as an interface number, a model number, and a function parameter) of the lan interface 30301, a picture of a position (an interface schematic diagram) of the lan interface 30301 on the router 30, and the like.
As shown in fig. 5 (d), the client 40 displays basic information (the power amount information 101B and the time 101C) and physical interface information of the client 40 on the display screen 405. The physical interface information shows in the form of a picture the specific location of the lan interface 30301 on the router 30, the number of lan interfaces (e.g., 30301), the number of clients connected to the router (r is, for example, 3), the MAC addresses of the clients at the lan interfaces (e.g., 44-45-53-54-00-01), the names of the clients connected to the lan interface 30301 (e.g., bob), and the like. In this embodiment of the present application, a specific position of the lan interface 30301 on the router 30 is shown in a picture form, specifically, the rest of physical interfaces on the router 30 are used as references, and the lan interface 30301 is shown in a double color, and the number 30301 of the lan interface is also shown at the same time. It should be noted that the physical display information may be prompted on the client 40 in other manners, such as by voice broadcasting, text description, and the like, and the embodiment of the present application is not limited herein. The information displayed by the client 40 in the form of a picture on the display screen 405 is not limited to the example of fig. 5 (d).
It is to be noted that the physical interface information may also include the MAC address of the client 40 connected to the lan interface 30301, the number of all clients 40 connected to the router 30, and the like. The content included in the physical interface information is not limited in the embodiments of the present application.
Through the above embodiments of the present application, it can be seen that a router can provide a location of a target physical interface of the router on the router for a client connected to the target physical interface. Even if cables of a plurality of clients connected to the router interface are interwoven, a user can quickly find a target physical interface connected to the client according to the position of the target physical interface indicated by the router on the router. When a user needs to remove a certain client, the router is correspondingly searched directly based on the indicated position of the target physical interface, and the interface connected with the client is operated. And other clients are not disconnected from the router, so that the user experience is improved.
The router disclosed in the embodiment of the application is connected with at least one electronic device, and allocates an IP address to each electronic device. The method for determining the router interface connected with the electronic equipment by the router comprises the following steps:
and determining a target virtual interface associated with the IP address of the target electronic equipment based on the interface query request, and determining a target physical interface corresponding to the target virtual interface according to a preset mapping relation between the virtual interface and the physical interface.
The method comprises the steps that an interface query request is sent to a router by a first electronic device in at least one electronic device, and the interface query request is at least used for querying the router about the position of a physical interface of the router connected with a target electronic device in the at least one electronic device, wherein the target electronic device is accessed to the router in a wired mode.
And sending physical interface information associated with the target physical interface to the first electronic equipment, wherein the physical interface information at least indicates the position of the physical interface of the target electronic equipment on the router.
The first electronic device may be an electronic device having administrator authority or a target electronic device. The first electronic device having the administrator authority may request the router to query physical interface information of any one or more target electronic devices connected to the router. A first electronic device, which is a target electronic device connected to a physical interface of a router, may request the router to query its own physical interface information.
The specific process of allocating the IP address to the electronic device by the router is as follows: each electronic device connected to a physical interface of the router sends an IP request to the router. The IP request carries the MAC address of the router. The IP request is transmitted to a DHCP server and an interface management module of the router through the physical interface and a virtual interface bound with the physical interface.
The DHCP server assigns IP addresses to electronic devices connected at the physical interface. The IP address allocation specifically includes: and the DHCP server responds to the IP request, allocates an IP address from the address pool, and sends the IP address to the physical interface through the virtual interface bound to the physical interface based on the MAC address so that the electronic equipment can access the router through the IP address.
The interface management module identifies a virtual interface from which the IP request of the current electronic equipment is reported, and then the interface management module binds the MAC address carried in the IP request with the virtual interface (as a target virtual interface). Or the interface management module binds the IP address allocated by the DHCP server with the virtual interface. Or the interface management module binds the MAC address carried in the IP request and the IP address allocated by the DHCP server with the virtual interface. In this way, the virtual interface parameters of the virtual interface include, but are not limited to, the physical interface information of the target physical interface bound to the target virtual interface, the MAC address carried in the IP request, and the IP address allocated by the DHCP server.
Further, the interface query request carries the MAC address of the target electronic device connected to the target physical interface and/or the IP address assigned by the router. It should be noted that the electronic device with administrator authority may serve as the first electronic device in the embodiment of the present application, and query the physical interface information of the remaining electronic devices connected to the router.
When the first electronic equipment sends an interface query request, the interface query request is transmitted to a WebUI module of the router through a physical interface, a switch, a processor and a virtual interface bound with the physical interface.
And the router determines a target virtual interface associated with the IP address of the target electronic equipment at the target physical interface according to the interface query request. Specifically, the interface management module obtains the IP address and the MAC address of the target electronic device in the interface query request. The WebUI module of the router requests the interface management module to query the virtual interface (as the target virtual interface) bound by the IP address and/or MAC address of the target electronic device.
And the router determines a target physical interface corresponding to the target virtual interface according to the preset mapping relation between the virtual interface and the physical interface. The method comprises the following steps: and the interface management module of the router determines a target physical interface corresponding to the target virtual interface according to the interface identifier of the target physical interface preset in the target virtual interface.
The router searches for physical interface information of the target physical interface and sends the target physical interface of the target physical interface to the first electronic device. The method comprises the following steps: the WebUI module of the router provides the physical interface information of the target physical interface to the first electronic device that requests a query of the physical interface information of the target electronic device.
The first electronic device may display the physical interface information in a picture form on the display screen, and may also play the physical interface information through the electronic device. Thereby facilitating the user to find a specific physical interface of the target electronic device.
The physical interface information includes an interface identifier (such as an interface number, a type, and a function parameter) of the target electronic device, a picture of a position (an interface schematic diagram) of a target physical interface of the target electronic device on the router, and the like.
In some embodiments of the present application, there is also provided a router, as illustrated in fig. 2 (a), executing instructions to implement the method for determining a router interface connected to an electronic device by the router.
Referring now to fig. 7, fig. 7 is a schematic structural diagram of an SOC according to an embodiment of the present disclosure, and shows a block diagram of an SOC (system on chip) 1000 according to an embodiment of the present disclosure. In fig. 7, similar components have the same reference numerals. In addition, the dashed box is an optional feature of more advanced socs. The SoC may be used in a router according to an embodiment of the present application, and may implement corresponding functions according to instructions stored therein.
In fig. 7, the SoC1000 includes: an interconnect unit 1002 coupled to the processor 1001; a system agent unit 1006; a bus controller unit 1005; an integrated memory controller unit 1003; a set or one or more coprocessors 1007 which may include integrated graphics logic, an image processor, an audio processor, and a video processor; an Static Random Access Memory (SRAM) unit 1008; a Direct Memory Access (DMA) unit 1004. In one embodiment, the coprocessor 1007 comprises a special-purpose processor, such as, for example, a network or communication processor, compression engine, GPGPU, a high-throughput MIC processor, embedded processor, or the like.
Included in Static Random Access Memory (SRAM) unit 1008 may be one or more computer-readable media for storing data and/or instructions. A computer-readable storage medium may have stored therein instructions, in particular, temporary and permanent copies of the instructions.
When SoC1000 is applied to a router according to the present application, the computer-readable storage medium having instructions stored therein may include: the instructions, when executed by the at least one unit in the processor, cause the router to implement the router interface determining to connect with the electronic device as mentioned in the above embodiments. The instructions, when executed on the computer, cause the computer to execute the instructions described above for the router to determine a router interface to connect with the electronic device as mentioned in the above embodiments.
In addition, the embodiment of the present application also discloses a computer readable storage medium, on which a processing program is stored, and the processing program, when executed by a processor, implements the instruction of the router to determine the router interface connected with the electronic device as mentioned in the above embodiment.
The computer readable storage medium may be a read-only memory, a random access memory, a hard disk, or an optical disk, etc.

Claims (18)

1. A method for an electronic device to query a router interface, the router having at least one electronic device connected thereto and assigning an IP address to each of the electronic devices,
a first electronic device in at least one electronic device sends an interface query request to the router, wherein the interface query request is at least used for querying the router about the position of a physical interface of the router connected with a target electronic device in at least one electronic device connected with the router in a wired mode, and the interface query request comprises identification information of a target virtual interface associated with an IP address of the target electronic device;
the router determines the target virtual interface associated with the IP address of the target electronic equipment according to the interface query request, and determines a target physical interface corresponding to the target virtual interface according to a mapping relation between a preset virtual interface and a preset physical interface;
the router sends physical interface information associated with the target physical interface to the first electronic device, wherein the physical interface information at least indicates the position of the physical interface of the target electronic device on the router, and the physical interface information provides the first electronic device with information which is convenient for a user to find the physical interface of the target electronic device on the router;
and the first electronic equipment presents the position of the physical interface of the target electronic equipment on the router according to the physical interface information.
2. The method of claim 1, wherein the physical interface information comprises an interface identification of the associated target physical interface.
3. The method of claim 2, wherein the physical interface information includes an interface identification associated with the target physical interface, and wherein the router provides an interface schematic to the first electronic device based on the physical interface information and graphically displays a location of the target physical interface on the router.
4. The method of electronic device querying a router interface of claim 1, wherein the target electronic device is the first electronic device itself.
5. The method of electronic device querying a router interface of claim 1,
at least one of the electronic devices connects to a physical interface of the router and sends an IP request to the router,
the router allocates a virtual interface for at least one piece of electronic equipment, receives the IP request through the virtual interface, and sends an IP address allocated based on the IP request to the electronic equipment, wherein the IP request carries the MAC address of the electronic equipment.
6. The method of claim 5, wherein the virtual interface parameters of the target virtual interface comprise physical interface information of the target physical interface, a MAC address of the target electronic device, and an IP address of the target electronic device.
7. The method of claim 6, wherein the router binds the IP address and the target virtual interface;
and the router inquires a target virtual interface corresponding to the IP address based on the IP address and determines the physical interface information of the target physical interface based on the virtual interface parameter.
8. The method of claim 7, wherein the router erases the binding information of the IP address and the target virtual interface after the electronic device is removed from the target physical interface of the router.
9. The method of electronic device querying a router interface of claim 6, wherein the interface query request includes the IP address and/or the MAC address.
10. The method of an electronic device querying a router interface of claim 9, wherein the IP address and the MAC address are bound.
11. The method of the electronic device querying a router interface of claim 10, wherein the router binds the MAC address and the target virtual interface;
the router querying an IP address associated with the MAC address based on the MAC address;
and the router inquires a target virtual interface corresponding to the MAC address based on the MAC address and determines the physical interface information of the target physical interface based on the virtual interface parameter.
12. The method of claim 11, wherein the router erases the MAC address of the electronic device and binding information of the associated virtual interface after the electronic device is removed from the target physical interface of the router.
13. The method of any one of claims 1-12, wherein the physical interface information further includes a MAC address of the electronic device.
14. The method of claim 13, wherein the physical interface information further includes the number of all electronic devices connected to the router.
15. A method for a router to determine a router interface for connection with an electronic device, the router having at least one electronic device connected thereto and being configured to assign an IP address to each of the electronic devices, the method comprising:
determining a target virtual interface associated with an IP address of target electronic equipment based on an interface query request, and determining a target physical interface corresponding to the target virtual interface according to a mapping relation between a preset virtual interface and a preset physical interface;
the interface query request is sent to the router by a first electronic device in at least one electronic device, the interface query request is at least used for querying the router about the position of a physical interface of the router connected with a target electronic device which accesses the router in a wired mode, and the interface query request comprises identification information of the target virtual interface associated with an IP address of the target electronic device;
sending physical interface information associated with the target physical interface to the first electronic device, wherein the physical interface information at least indicates the position of the physical interface of the target electronic device on the router, and the physical interface information provides the router with information which is convenient for a user to find the physical interface of the target electronic device on the router for the first electronic device, so that the first electronic device presents the position of the physical interface of the target electronic device on the router according to the physical interface information.
16. The method of router determination of a router interface to an electronic device according to claim 15, determining physical interface information of a target electronic device connected to the router based on the interface query request from the target electronic device.
17. A router to which at least one electronic device is connected and which assigns an IP address to each of the electronic devices, the router comprising: at least one memory and at least one processor;
at least one of the memories has instructions stored therein;
the instructions, when executed by at least one of the processors, cause the router to:
determining a target virtual interface associated with the IP address of the target electronic equipment based on the interface query request, and determining a target physical interface corresponding to the target virtual interface according to a preset mapping relation between the virtual interface and the physical interface;
the interface query request is sent to the router by a first electronic device in at least one electronic device, and the interface query request is at least used for querying the router about the position of a physical interface of a router connected to a target electronic device in at least one electronic device accessing the router in a wired manner, and the interface query request comprises identification information of the target virtual interface associated with an IP address of the target electronic device;
sending physical interface information associated with the target physical interface to the first electronic device, wherein the physical interface information at least indicates the position of the physical interface of the target electronic device on the router, and the physical interface information provides the router with information which is convenient for a user to find the physical interface of the target electronic device on the router for the first electronic device, so that the first electronic device presents the position of the physical interface of the target electronic device on the router according to the physical interface information.
18. A communication system, comprising: at least one electronic device and a router;
the router is connected with at least one electronic device and allocates an IP address for each electronic device;
a first electronic device in at least one electronic device sends an interface query request to the router, wherein the interface query request is at least used for querying the router about the position of a physical interface of a target electronic device connected with the router, and the target electronic device accesses the router in a wired manner;
the router determines the target virtual interface associated with the IP address of the target electronic equipment according to the interface query request, and determines a target physical interface corresponding to the target virtual interface according to a preset mapping relation between the virtual interface and the physical interface;
the router sends physical interface information associated with the target physical interface to the first electronic device, wherein the physical interface information at least indicates the position of a physical interface of the target electronic device on the router, and the physical interface information provides information which is convenient for a user to find out a physical interface of the target electronic device on the router for the router to the first electronic device;
and the first electronic equipment presents the position of the physical interface of the target electronic equipment on the router according to the physical interface information.
CN202010633237.9A 2020-07-02 2020-07-02 Method for inquiring router interface by electronic equipment, router and communication system Active CN114095476B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010633237.9A CN114095476B (en) 2020-07-02 2020-07-02 Method for inquiring router interface by electronic equipment, router and communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010633237.9A CN114095476B (en) 2020-07-02 2020-07-02 Method for inquiring router interface by electronic equipment, router and communication system

Publications (2)

Publication Number Publication Date
CN114095476A CN114095476A (en) 2022-02-25
CN114095476B true CN114095476B (en) 2022-12-13

Family

ID=80294764

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010633237.9A Active CN114095476B (en) 2020-07-02 2020-07-02 Method for inquiring router interface by electronic equipment, router and communication system

Country Status (1)

Country Link
CN (1) CN114095476B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005057854A1 (en) * 2003-12-04 2005-06-23 France Telecom Method of constructing a database of physical connections of an information transmission network
US9059941B1 (en) * 2014-05-29 2015-06-16 Amazon Technologies, Inc. Providing router information according to a programmatic interface
US10630543B1 (en) * 2017-03-17 2020-04-21 Amazon Technologies, Inc. Wireless mesh network implementation for IOT devices

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7843923B2 (en) * 2002-01-08 2010-11-30 Verizon Services Corp. Methods and apparatus for determining the port and/or physical location of an IP device and for using that information
US8918841B2 (en) * 2011-08-31 2014-12-23 At&T Intellectual Property I, L.P. Hardware interface access control for mobile applications

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005057854A1 (en) * 2003-12-04 2005-06-23 France Telecom Method of constructing a database of physical connections of an information transmission network
US9059941B1 (en) * 2014-05-29 2015-06-16 Amazon Technologies, Inc. Providing router information according to a programmatic interface
US10630543B1 (en) * 2017-03-17 2020-04-21 Amazon Technologies, Inc. Wireless mesh network implementation for IOT devices

Also Published As

Publication number Publication date
CN114095476A (en) 2022-02-25

Similar Documents

Publication Publication Date Title
CN109600246B (en) Network slice management method and device
CN111885075B (en) Container communication method, device, network equipment and storage medium
CN109768871B (en) Method for configuring multiple virtual network cards, host machine and storage medium
CN106302839B (en) Internet protocol IP address allocation method and device
CN109496415B (en) Method and system for accessing remote acceleration equipment by virtual machine
KR102388195B1 (en) BRAS system-based message packaging method and device
EP3070887A1 (en) Communication method, device and system for virtual extensible local area network
US8417848B2 (en) Method and apparatus for implementing multiple service processing functions
JP2019527988A (en) Packet transmission
EP2428897B1 (en) Server device connecting with usb device and device sharing method
EP3367612A1 (en) Dial testing method, dial testing system, and compute node
CN112910685B (en) Method and device for realizing unified management of container network
CN112583910B (en) Equipment access method and device of Internet of things platform, electronic equipment and storage medium
KR102329095B1 (en) Network access method, related devices and systems
CN112583655B (en) Data transmission method and device, electronic equipment and readable storage medium
CN104506368A (en) Method and equipment for managing switchboard equipment in unified manner
WO2022052496A1 (en) Address reservation method, network device, and system
CN114095476B (en) Method for inquiring router interface by electronic equipment, router and communication system
CN110636149B (en) Remote access method, device, router and storage medium
CN109889421B (en) Router management method, device, terminal, system and storage medium
TW201818699A (en) Data transmission method, equipment, device and system
US20130086259A1 (en) Method for acquiring an ip address and network access device
CN110838966B (en) Equipment connection control method and device
WO2017215381A1 (en) Method and device for indicating virtual expansion port, and storage medium
CN113904871A (en) Network slice access method, PCF entity, terminal and communication system

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