CN102938711B - Network interface information configuring methods and the network equipment - Google Patents

Network interface information configuring methods and the network equipment Download PDF

Info

Publication number
CN102938711B
CN102938711B CN201210464440.3A CN201210464440A CN102938711B CN 102938711 B CN102938711 B CN 102938711B CN 201210464440 A CN201210464440 A CN 201210464440A CN 102938711 B CN102938711 B CN 102938711B
Authority
CN
China
Prior art keywords
network interface
address
network
routing table
mark
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
CN201210464440.3A
Other languages
Chinese (zh)
Other versions
CN102938711A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201210464440.3A priority Critical patent/CN102938711B/en
Publication of CN102938711A publication Critical patent/CN102938711A/en
Application granted granted Critical
Publication of CN102938711B publication Critical patent/CN102938711B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the present invention provides a kind of network interface information configuring methods and the network equipment.Method comprises: receive internet protocol address configuration is carried out in request the first configuring request to the first network interface, and this first configuring request comprises the mark of the first network interface and is the IP address that the first network interface configures; If an IP address is not identical with the IP address of other network interfaces except the first network interface, according to the mark of the first network interface, by direct-connected routing configuration corresponding for an IP address in the routing table of the first network interface, generate and store the mark of the first network interface, mapping relations between an IP address and the routing table of the first network interface.Adopt technical solution of the present invention, not only can solve the problem of route conflict, and the utilance of network address resources can be improved.

Description

Network interface information configuring methods and the network equipment
Technical field
The present invention relates to the communication technology, particularly relate to a kind of network interface information configuring methods and the network equipment.
Background technology
On a storage device, generally there is multiple network interface, comprise management network port and service network port, these network interfaces are all send based on transmission control protocol/Internet Protocol (Transmission ControlProtocol/Internet Protocol, referred to as TCP/IP) agreement or receive packet.User can to network interface configuration of IP address, when for network interface configuration of IP address, need to add a direct-connected route in the routing table of memory device, so-called direct-connected route refers to that destination address is the network address at place, joined IP address, in addition, user can also add network interface, delete other routes etc.
In prior art, if the IP address of multiple network interface is at the same network segment, then will there is the identical route table items of many destination addresses in the routing table of memory device, namely there is the problem of route conflict.Like this, when sending packet, memory device only can select Article 1 in routing table by the route table items in mating, and the network interface of specifying from this list item sends packet.In order to solve the problem of route conflict, prior art adopts the mode limited the IP address of network interface and the configuration of route, and described restriction comprises: (1) IP to be configured can not with configuration of IP at the same network segment; (2) IP to be configured can not with the destination address of the route configured at the same network segment; (3) destination address of route to be configured can not with the IP configured at the same network segment; (4) destination address of route to be configured can not with the destination address of the route configured at the same network segment; (5) to a network interface allocating default gateway, generally can only select management network port allocating default gateway.The configuration operation of this limited subscriber evades the method for route collision problem, can not make full use of network address resources.
Summary of the invention
The embodiment of the present invention provides a kind of network interface information configuring methods and the network equipment, in order to improve the utilance of network address resources.
First aspect provides a kind of network interface information configuring methods, comprise: the network equipment receives internet protocol address configuration is carried out in request the first configuring request to the first network interface, described first configuring request comprises the mark of described first network interface and the IP address for described first network interface configuration, and the described network equipment comprises described first network interface and other network interfaces; If a described IP address is not identical with the IP address of other network interfaces described, the described network equipment is according to the mark of described first network interface, by direct-connected routing configuration corresponding for a described IP address in the routing table of described first network interface, generate and store the mark of described first network interface, mapping relations between a described IP address and the routing table of described first network interface.
In the first possible implementation of first aspect, the described network equipment comprises after generating and storing the mark of described first network interface, mapping relations between a described IP address and the routing table of described first network interface: the described network equipment receives routing configuration is carried out in request the second configuring request to described first network interface, the mark that described second configuring request comprises described first network interface and the first routing iinformation added for described first network interface; Described first routing iinformation, according to the mark of described first network interface and the mark of described first network interface, the mapping relations between a described IP address and the routing table of described first network interface, adds in the routing table of described first network interface by the described network equipment.
In conjunction with the first possible implementation of first aspect or first aspect, in the implementation that the second of first aspect is possible, the described network equipment comprises after generating and storing the mark of described first network interface, mapping relations between a described IP address and the routing table of described first network interface: the described network equipment receives the 3rd configuring request of asking described first network interface to be carried out to routing configuration, the mark that described 3rd configuring request comprises described first network interface and the secondary route information of deleting for described first network interface; Described secondary route information, according to the mark of described first network interface and the mark of described first network interface, the mapping relations between a described IP address and the routing table of described first network interface, is deleted by the described network equipment from the routing table of described first network interface.
In conjunction with first aspect or the first possible implementation of first aspect or the possible implementation of the second of first aspect, in the third possible implementation of first aspect, the described network equipment generates and stores the mark of described first network interface, comprise after mapping relations between a described IP address and the routing table of described first network interface: the described network equipment is according to the mark of the source IP address of packet to be sent and described first network interface, mapping relations between a described IP address and the routing table of described first network interface, the 3rd routing iinformation in the object IP matching addresses of described packet to be sent is obtained from the routing table of described first network interface, the network interface that the described network equipment is specified from described 3rd routing iinformation sends described packet to be sent.
In conjunction with the third possible implementation of first aspect or the first possible implementation of first aspect or the possible implementation of the second of first aspect or first aspect, in the 4th kind of possible implementation of first aspect, the described network equipment is according to the mark of described first network interface, the routing table of direct-connected routing configuration corresponding for a described IP address to described first network interface is comprised: the described network equipment, according to the mark of described first network interface, judges whether the routing table of described first network interface exists; If judged result is yes, direct-connected route corresponding for a described IP address is directly configured in the routing table of described first network interface by the described network equipment; If judged result is no, the described network equipment creates the routing table of described first network interface, then by direct-connected routing configuration corresponding for a described IP address in the routing table of described first network interface.
In conjunction with the 4th kind of possible implementation of first aspect, in the 5th kind of possible implementation of first aspect, the described network equipment comprises before direct-connected route corresponding for a described IP address being directly configured in the routing table of described first network interface: the described network equipment is starting or when there being I/O card to insert the described network equipment, creating the routing table of described first network interface.
Second aspect provides a kind of network equipment, comprising:
Receiver module, for receiving first configuring request of asking the first network interface of the described network equipment to be carried out to internet protocol address configuration, described first configuring request comprises the mark of described first network interface and the IP address for described first network interface configuration;
Configuration module, for when a described IP address is not identical with the IP address of other network interfaces on the described network equipment except described first network interface, according to the mark of described first network interface, by direct-connected routing configuration corresponding for a described IP address in the routing table of described first network interface, generate and store the mark of described first network interface, mapping relations between a described IP address and the routing table of described first network interface.
In the first possible implementation of second aspect, described receiver module is also for after generating and storing the mark of described first network interface, mapping relations between a described IP address and the routing table of described first network interface at described configuration module, receive routing configuration is carried out in request the second configuring request to described first network interface, described second configuring request comprises the mark of described first network interface and the first routing iinformation for described first network interface interpolation; Described first routing iinformation also for according to the mark of described first network interface and the mark of described first network interface, the mapping relations between a described IP address and the routing table of described first network interface, adds in the routing table of described first network interface by described configuration module.
In conjunction with the first possible implementation of second aspect or second aspect, in the implementation that the second of second aspect is possible, described receiver module is also for after generating and storing the mark of described first network interface, mapping relations between a described IP address and the routing table of described first network interface at described configuration module, receive routing configuration is carried out in request the 3rd configuring request to described first network interface, described 3rd configuring request comprises the mark of described first network interface and the secondary route information for described first network interface deletion; Described secondary route information also for according to the mark of described first network interface and the mark of described first network interface, the mapping relations between a described IP address and the routing table of described first network interface, is deleted by described configuration module from the routing table of described first network interface.
In conjunction with second aspect or the first possible implementation of second aspect or the possible implementation of the second of second aspect, in the third possible implementation of second aspect, the described network equipment also comprises: acquisition module, for generating and storing the mark of described first network interface at described configuration module, after mapping relations between a described IP address and the routing table of described first network interface, according to the source IP address of packet to be sent and the mark of described first network interface, mapping relations between a described IP address and the routing table of described first network interface, the 3rd routing iinformation in the object IP matching addresses of described packet to be sent is obtained from the routing table of described first network interface, sending module, sends described packet to be sent for the network interface of specifying from described 3rd routing iinformation.
In conjunction with the third possible implementation of second aspect or the first possible implementation of second aspect or the possible implementation of the second of second aspect or second aspect, described configuration module is used for the mark according to described first network interface, the routing table of direct-connected routing configuration corresponding for a described IP address to described first network interface is comprised: described configuration module is specifically for the mark according to described first network interface, judge whether the routing table of described first network interface exists, when judged result is for being, direct-connected route corresponding for a described IP address is directly configured in the routing table of described first network interface, and when judged result is no, create the routing table of described first network interface, then by direct-connected routing configuration corresponding for a described IP address in the routing table of described first network interface.
In conjunction with the 4th kind of possible implementation of second aspect, in the 5th kind of possible implementation of second aspect, the described network equipment also comprises: creation module, before direct-connected route corresponding for a described IP address being directly configured in the routing table of described first network interface at described configuration module, start at the described network equipment or when there being I/O card to insert the described network equipment, create the routing table of described first network interface.
The network interface information configuring methods that the embodiment of the present invention provides and the network equipment, each network interface is used alone a routing table, when receiving request and carrying out the configuring request of IP address configuration to network interface, according to the mark of network interface in this configuring request, by direct-connected routing configuration corresponding for the IP address of request configuration in the routing table of this network interface, generate and store the mark of this network interface simultaneously, mapping relations between the IP address configured and the routing table of this network interface, condition is provided for this network interface configures route and carries out Packet Generation etc. based on the routing table of this network interface for follow-up, because each network interface is used alone a routing table, even if the route table items of different network interface clashes also, it doesn't matter, therefore, without the need to limiting the configuration of network interface information again, be conducive to making full use of network address resources, improve the utilance of network address resources.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
The flow chart of a kind of network interface information configuring methods that Fig. 1 provides for the embodiment of the present invention;
Corresponding relation schematic diagram between multiple network interface that Fig. 2 provides for the embodiment of the present invention and routing table;
The flow chart of the another kind of network interface information configuring methods that Fig. 3 provides for the embodiment of the present invention;
The flow chart of another network interface information configuring methods that Fig. 4 provides for the embodiment of the present invention;
The flow chart of another network interface information configuring methods that Fig. 5 provides for the embodiment of the present invention;
The structural representation of a kind of network equipment that Fig. 6 provides for the embodiment of the present invention;
The structural representation of the another kind of network equipment that Fig. 7 provides for the embodiment of the present invention;
The structural representation of another network equipment that Fig. 8 provides for the embodiment of the present invention.
Embodiment
For making the object of the embodiment of the present invention, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
In the prior art, the routing iinformation of each network interface of the network equipment is configured in same routing table, route collision problem may be there is in this, the IP address of multiple network interfaces of the such as network equipment is at the same network segment, then just there is the route table items that many destination addresses are identical in the routing table, the direct-connected route that such as these network interfaces are corresponding, because routing iinformation conflict can cause a port can only being had to be used to forwarding data bag in multiple ports of generation routing iinformation conflict, other ports cannot forwarding data bag, likely causes packet to forward mistake.In order to overcome above-mentioned route collision problem, prior art proposes to be limited by the configuration of various restrictive condition to network interface information, thus solves the method for route conflict, but this method can not make full use of network address resources.
In order to solve above-mentioned route collision problem and not affect the utilance of network address resources, following examples of the present invention give solution, the main thought of this solution is: each network interface is used alone a routing table, for each network interface, mapping relations between the IP address safeguard the mark of this network interface in for this network interface configuration of IP address process, configuring for this network interface and the routing table of this network interface are the process such as this network interface configuration route and the forwarding carrying out packet based on safeguarded mapping relations.Because each network interface is used alone a routing table, the forwarding of packet, based on different routing table, even if the routing iinformation of different network interface exists the forwarding that conflict does not affect packet yet, solves the problem of routing iinformation conflict; In addition, owing to allowing the routing iinformation of different port to there is conflict, make not need the configuration to network interface information to limit, network address resources can be made to be fully used, thus improve the utilance of network address resources.
The flow chart of a kind of network interface information configuring methods that Fig. 1 provides for the embodiment of the present invention.As shown in Figure 1, the method for the present embodiment comprises:
Step 101, the network equipment receive IP address configuration is carried out in request the first configuring request to the first network interface, this first configuring request comprises the mark of the first network interface and is the IP address that the first network interface configures, and the described network equipment comprises the first network interface and other network interfaces.
If step 102 the one IP address is not identical with the IP address of other network interfaces described, the network equipment is according to the mark of the first network interface, by direct-connected routing configuration corresponding for an IP address in the routing table of the first network interface, generate and store the mark of the first network interface, be first network interface configuration an IP address and the routing table of the first network interface between mapping relations.
In the present embodiment, the first network interface can be certain network interface on any network equipment with multiple network interface, such as, can be management network port or service network port.The described network equipment can be any equipment with multiple network interface, such as memory device, server or router etc.
Optionally, the network equipment can provide interactive interface to user, allows user to be configured each network interface on the network equipment by this interactive interface.Such as, user can send the configuring request of the IP address of request configuration first network interface to the network equipment by the interactive interface of the network equipment.Optionally, user can also pass through other equipment, the terminal equipment of such as user, sends request the configuring request to the first network interface configuration of IP address to the network equipment.Wherein, be that the configuring request of the first network interface configuration of IP address carries the mark of the first network interface of user's specified configuration and the IP address for the configuration of this first network interface.In order to distinguish with other configuring request follow-up, the configuring request being the first network interface configuration of IP address is here called the first configuring request, and the IP address for the first network interface configuration is called an IP address.
Optionally, the mark of the first network interface can be the numbering of the first network interface, but is not limited thereto.The network equipment can distribute a unique numbering for each network interface, and the numbering of each network interface is known concerning user.
Concrete, the network equipment receives IP address configuration is carried out in request the first configuring request to the first network interface.Then, obtain from the first configuring request the first network interface mark and be first network interface configuration an IP address, the network interface needing configuration of IP address is determined according to the mark of the first network interface, then judge that whether an IP address is identical with the IP address of other network interfaces, if judged result is no, illustrate not conflict with the IP address of other network interfaces in an IP address, then by an IP address configuration in the routing table of the first network interface, meanwhile, generate the mark of the first network interface, be the mapping relations between an IP address of the first network interface configuration and the routing table of the first network interface, and store this mapping relations.
If an IP address is identical with the IP address of other network interfaces, illustrate that the IP address of an IP address and other network interfaces clashes, optionally, the network equipment can point out corresponding error message, such as, point out IP address conflict etc.
Optionally, the network equipment generate the first network interface mark, to be the mode of mapping relations between an IP address of the first network interface configuration and the routing table of the first network interface can be: the network equipment uses a mapping table, in the mapping table corresponding stored first network interface mark, be an IP address of the first network interface configuration and the information for the routing table that identifies the first network interface.Or, the network equipment also can use different mapping tables, mapping table stores the mark of the first network interface and is the mapping relations of an IP address of the first network interface configuration, and another mapping table is stored as the mapping relations of an IP address of the first network interface configuration and the routing table of the first network interface.
In an Alternate embodiments, direct-connected routing configuration corresponding for an IP address, when an IP address is not identical with the IP address of other network interfaces except the first network interface, according to the mark of the first network interface, comprises to the process in the routing table of the first network interface by the network equipment:
The network equipment, according to the mark of the first network interface, judges whether the routing table of the first network interface exists; If judged result is yes, then direct-connected route corresponding for an IP address is directly configured in the routing table of the first network interface by the network equipment; If judged result is no, then first the network equipment creates the routing table of the first network interface, then by direct-connected routing configuration corresponding for an IP address in the routing table of the first network interface.
In an Alternate embodiments, the network equipment except creating the routing table of the first network interface in the process for the first network interface configuration of IP address, can also before for the first network interface configuration of IP address, such as when the network equipment starts or when there being I/O card to insert the network equipment, the routing table of the first network interface can be created.Based on this, the network equipment by direct-connected routing configuration corresponding for an IP address to the first network interface routing table before, first can judge whether the routing table of the first network interface exists.
In addition, the network equipment is the process of the first network interface configuration of IP address can be the first network interface configuration of IP address for the first time, can also be the first network interface configuration of IP address again, so when being the first network interface configuration of IP address again, on the first network interface can because before configuration of IP address process and there is routing table.Based on this, the network equipment by direct-connected routing configuration corresponding for an IP address to the first network interface routing table before, first can judge whether the routing table of the first network interface exists.
Suppose the network equipment there be n network interface, be respectively P0, P1, P2 ..., Pn; The corresponding routing table of each network interface, be respectively T0, T1, T2 ..., Tn, then adopt after the method for the present embodiment is each network interface configuration of IP address, the corresponding relation on the network equipment between network interface and routing table is as shown in Figure 2.
In an Alternate embodiments, as shown in Figure 3, described method also comprises after step 102:
Step 103, the network equipment receive routing configuration is carried out in request the second configuring request to the first network interface, and this second configuring request comprises the mark of the first network interface and is the first routing iinformation that the first network interface adds.
Step 104, the network equipment according to the mark of the mark of the first network interface and the first network interface of storing, be mapping relations between an IP address of the first network interface configuration and the routing table of the first network interface, the first routing iinformation is added in the routing table of the first network interface.
For the first network interface configuration the one IP address and after generating the mark of the first network interface, mapping relations between an IP address and the routing table of the first network interface, user can be the first network interface configuration route.Such as, it is the configuring request that the first network interface configures route that the interactive interface that user can be provided by the network equipment sends.Or it is the configuring request that the first network interface configures route that the terminal equipment that user also can be used by oneself sends to the network equipment.Wherein, this configuring request comprises the mark of the first network interface and is the first routing iinformation that the first network interface adds.Here the configuring request of adding route for the first network interface is the second configuring request.
The network equipment receives the second configuring request, obtains the mark of the first network interface and be the first routing iinformation that the first network interface adds from the second configuring request, and knowing according to the mark of the first network interface needs to add the network interface of routing iinformation.Then, the network equipment is according to the mapping relations between the routing table of the mark of each network interface of the identified query of the first network interface, the IP address of configuration and network interface, mapping relations between the routing table obtaining the mark of the first network interface of the mark correspondence of the first network interface, an IP address and the first network interface, and then find the routing table of the first network interface, then the first routing iinformation is added in the routing table of the first network interface.
In an Alternate embodiments, as shown in Figure 4, also comprise after step 102:
Step 105, the network equipment receive routing configuration is carried out in request the 3rd configuring request to the first network interface, and the 3rd configuring request comprises the mark of the first network interface and is the secondary route information that the first network interface is deleted.
Secondary route information, according to the mark of the first network interface and the mark of the first network interface, the mapping relations between an IP address and the routing table of the first network interface, is deleted by step 106, the network equipment from the routing table of the first network interface.
For the first network interface configuration the one IP address and after generating the mark of the first network interface, mapping relations between an IP address and the routing table of the first network interface, user can be the first network interface configuration route.Such as, it is the configuring request that the first network interface configures route that the interactive interface that user can be provided by the network equipment sends.Or it is the configuring request that the first network interface configures route that the terminal equipment that user also can be used by oneself sends to the network equipment.Wherein, this configuring request comprises the mark of the first network interface and is the secondary route information that the first network interface is deleted.Here the configuring request of deleting route for the first network interface is the 3rd configuring request.
The network equipment receives the 3rd configuring request, obtains the mark of the first network interface and be the secondary route information that the first network interface is deleted from the 3rd configuring request, and knowing according to the mark of the first network interface needs to delete the network interface of routing iinformation.Then, the network equipment is according to the mapping relations between the routing table of the mark of each network interface of the identified query of the first network interface, the IP address of configuration and network interface, mapping relations between the routing table obtaining the mark of the first network interface of the mark correspondence of the first network interface, an IP address and the first network interface, and then find the routing table of the first network interface, then secondary route information is deleted from the routing table of the first network interface.
Above-mentioned Fig. 3 and embodiment illustrated in fig. 4ly describe the process of the first network interface being carried out to routing configuration, this process comprises adds routing iinformation and deletes routing iinformation two kinds of situations.
In an Alternate embodiments, as shown in Figure 5, described method also comprises after step 102:
Step 107, the network equipment, according to the source IP address of packet to be sent and the mark of the first network interface, the mapping relations between an IP address and the routing table of the first network interface, obtain the 3rd routing iinformation in the object IP matching addresses of packet to be sent from the routing table of the first network interface.
The network interface that step 108, the network equipment are specified from the 3rd routing iinformation sends described packet to be sent.
Concrete, when the network equipment needs to send packet by the routing table of the first network interface, first according to source IP address and the mark of the first network interface, the mapping relations between an IP address and the routing table of the first network interface of packet to be sent, find the routing table of the first network interface, then the object IP address of packet is mated in the routing table of the first network interface, from the routing table of the first network interface, obtain the 3rd routing iinformation in the object IP matching addresses of this packet to be sent; This Packet Generation to be sent is gone out by the network interface of then specifying from the 3rd routing iinformation.
In the routing table, a corresponding route table items of routing iinformation.Article one, routing iinformation generally includes the information such as route destination address, gateway (direct-connected route does not have gateway), mask, network interface.
In this explanation, in above process, the routing table of the one IP address and the first network interface can be bound by the network equipment, mapping relations then between the routing table of the mark according to the first network interface, an IP address and the first network interface find in the process of the routing table of the first network interface, the network equipment can find an IP address according to the mark of the first network interface, and then finds the routing table of the first network interface according to an IP address.Or, in some applications, the routing table of the mark of the first network interface and the first network interface can directly be bound by the network equipment, mapping relations then between the routing table of the mark according to the first network interface, an IP address and the first network interface find in the process of the routing table of the first network interface, and the network equipment directly can find the routing table of the first network interface according to the mark of the first network interface.
From above-mentioned, in embodiments of the present invention, each network interface is used alone a routing table, when receiving request and carrying out the configuring request of IP address configuration to network interface, according to the mark of network interface in this configuring request, by direct-connected routing configuration corresponding for the IP address of request configuration in the routing table of this network interface, generate and store the mark of this network interface simultaneously, mapping relations between the IP address configured and the routing table of this network interface, follow-up based on safeguarded mapping relations, for this network interface configuration route and the transmission etc. carrying out packet based on the routing table of this network interface, because each network interface is used alone a routing table, even if the route table items of different network interface clashes also, it doesn't matter, the network equipment still can find correct network interface to send packet, therefore, without the need to limiting the configuration of network interface information again, be conducive to making full use of network address resources, improve the utilance of network address resources, in addition, owing to decreasing the restriction to network interface information configuration, the route destination address of each network interface can at the same network segment, and can allocating default gateway to each network interface, improves the flexibility of network equipment application.
The structural representation of a kind of network equipment that Fig. 6 provides for the embodiment of the present invention.As shown in Figure 6, the network equipment of the present embodiment comprises: receiver module 61 and configuration module 62.
Receiver module 61, for receiving first configuring request of asking the first network interface of the present embodiment network equipment to be carried out to IP address configuration, this first configuring request comprises the mark of the first network interface and is the IP address that the first network interface configures.The network equipment of the present embodiment comprises the first network interface and other network interfaces.
Configuration module 62, be connected with receiver module 61, when an IP address for receiving at receiver module 61 is not identical with the IP address of other network interfaces on the present embodiment network equipment except the first network interface, according to the mark of the first network interface, by direct-connected routing configuration corresponding for an IP address in the routing table of the first network interface, generate and store the mark of the first network interface, mapping relations between an IP address and the routing table of the first network interface.
In an Alternate embodiments, receiver module 61 is also for after generating and storing the mark of the first network interface, mapping relations between an IP address and the routing table of the first network interface at configuration module 62, receive routing configuration is carried out in request the second configuring request to the first network interface, this second configuring request comprises the mark of the first network interface and is the first routing iinformation that the first network interface adds.
First routing iinformation also for according to the mark of the first network interface and the mark of the first network interface, the mapping relations between an IP address and the routing table of the first network interface, adds in the routing table of the first network interface by configuration module 62.
In an Alternate embodiments, receiver module 61 is also for after generating and storing the mark of the first network interface, mapping relations between an IP address and the routing table of the first network interface at configuration module 62, receive routing configuration is carried out in request the 3rd configuring request to the first network interface, the 3rd configuring request comprises the mark of the first network interface and is the secondary route information that the first network interface is deleted.
Secondary route information also for according to the mark of the first network interface and the mark of the first network interface, the mapping relations between an IP address and the routing table of the first network interface, is deleted by configuration module 62 from the routing table of the first network interface.
In an Alternate embodiments, as shown in Figure 7, the network equipment of the present embodiment also comprises: acquisition module 63 and sending module 64.
Acquisition module 63, be connected with configuration module 62, for generate and store the mark of the first network interface, mapping relations between an IP address and the routing table of the first network interface at configuration module 62 after, according to source IP address and the mark of the first network interface, the mapping relations between an IP address and the routing table of the first network interface of packet to be sent, from the routing table of the first network interface, obtain the 3rd routing iinformation in the object IP matching addresses of packet to be sent.
Sending module 64, is connected with acquisition module 63, and the network interface that the 3rd routing iinformation for obtaining from acquisition module 63 is specified sends packet to be sent.
In an Alternate embodiments, configuration module 62 is for the mark according to the first network interface, the routing table of direct-connected routing configuration corresponding for one IP address to the first network interface is comprised: configuration module 62 is specifically for the mark according to the first network interface, judge whether the routing table of the first network interface exists, when judged result is for being, direct-connected route corresponding for one IP address is directly configured in the routing table of the first network interface, and when judged result is no, create the routing table of the first network interface, then by direct-connected routing configuration corresponding for an IP address in the routing table of the first network interface.
Based on above-mentioned, as shown in Figure 7, the network equipment of the present embodiment also comprises: creation module 65.
Creation module 65, be connected with configuration module 62, before direct-connected route corresponding for an IP address being directly configured in the routing table of the first network interface at configuration module 62, start at the present embodiment network equipment or when there being I/O card to insert the present embodiment network equipment, create the routing table of the first network interface.
The network equipment that the present embodiment provides has multiple network interface, and these network interfaces can be management network port or service network port, and the network equipment of the present embodiment can be any equipment with multiple network interface, such as, can be router, memory device or server etc.
Each functional module of the network equipment that the present embodiment provides can be used for the flow process performing network interface information configuring methods shown in Fig. 1 or Fig. 3 or Fig. 4 or Fig. 5, and its specific works principle repeats no more, and refers to the description of embodiment of the method.
The network equipment that the present embodiment provides, each network interface is allowed to be used alone a routing table, when receiving request and carrying out the configuring request of IP address configuration to network interface, according to the mark of network interface in this configuring request, by direct-connected routing configuration corresponding for the IP address of request configuration in the routing table of this network interface, generate and store the mark of this network interface simultaneously, mapping relations between the IP address configured and the routing table of this network interface, follow-up based on safeguarded mapping relations, for this network interface configuration route and the transmission etc. carrying out packet based on the routing table of this network interface, because each network interface is used alone a routing table, even if the route table items of different network interface clashes also, it doesn't matter, the network equipment still can find correct network interface to send packet, therefore, without the need to limiting the configuration of network interface information again, be conducive to making full use of network address resources, improve the utilance of network address resources, in addition, owing to decreasing the restriction to network interface information configuration, the route destination address of each network interface can at the same network segment, and can allocating default gateway to each network interface, improves the flexibility of network equipment application.
The structural representation of another network equipment that Fig. 8 provides for the embodiment of the present invention.As shown in Figure 8, the network equipment of the present embodiment comprises: communication interface 81, processor 82 and memory 83.
Communication interface 81, for receiving first configuring request of asking the first network interface of the present embodiment network equipment to be carried out to IP address configuration, this first configuring request comprises the mark of the first network interface and is the IP address that the first network interface configures.The network equipment of the present embodiment comprises the first network interface and other network interfaces.Optionally, communication interface 81 can be the arbitrary network interface on the present embodiment network equipment, other network interfaces that can be such as the first network interface can also be except the first network interface.
Memory 83, for depositing program.Particularly, program can comprise program code, and described program code comprises computer-managed instruction.Memory 83 may comprise high-speed RAM memory, still may comprise nonvolatile memory (non-volatile memory), such as at least one magnetic disc store.
Processor 82, for the program that execute store 83 is deposited, time not identical with the IP address of other network interfaces on the present embodiment network equipment except the first network interface for the IP address received in communication interface 81, according to the mark of the first network interface, by direct-connected routing configuration corresponding for an IP address in the routing table of the first network interface, generate and store the mark of the first network interface, mapping relations between an IP address and the routing table of the first network interface.
Processor 82 may be a central processing unit (Central Processing Unit, referred to as CPU), or specific integrated circuit (Application Specific Integrated Circuit, referred to as ASIC), or be configured to the one or more integrated circuits implementing the embodiment of the present invention.
In an Alternate embodiments, communication interface 81 is also for after generating and storing the mark of the first network interface, mapping relations between an IP address and the routing table of the first network interface at processor 82, receive routing configuration is carried out in request the second configuring request to the first network interface, this second configuring request comprises the mark of the first network interface and is the first routing iinformation that the first network interface adds.
First routing iinformation also for according to the mark of the first network interface and the mark of the first network interface, the mapping relations between an IP address and the routing table of the first network interface, adds in the routing table of the first network interface by processor 82.
In an Alternate embodiments, communication interface 81 is also for after generating and storing the mark of the first network interface, mapping relations between an IP address and the routing table of the first network interface at processor 82, receive routing configuration is carried out in request the 3rd configuring request to the first network interface, the 3rd configuring request comprises the mark of the first network interface and is the secondary route information that the first network interface is deleted.
Secondary route information also for according to the mark of the first network interface and the mark of the first network interface, the mapping relations between an IP address and the routing table of the first network interface, is deleted by processor 82 from the routing table of the first network interface.
In an Alternate embodiments, processor 82 is also for after generating and storing the mark of the first network interface, mapping relations between an IP address and the routing table of the first network interface, according to source IP address and the mark of the first network interface, the mapping relations between an IP address and the routing table of the first network interface of packet to be sent, from the routing table of the first network interface, obtain the 3rd routing iinformation in the object IP matching addresses of packet to be sent.
The network interface that communication interface 81 is also specified for the 3rd routing iinformation obtained from processor 82 sends packet to be sent.
Optionally, processor 82 is for the mark according to the first network interface, the routing table of direct-connected routing configuration corresponding for one IP address to the first network interface is comprised: processor 82 is specifically for the mark according to the first network interface, judge whether the routing table of the first network interface exists, when judged result is for being, direct-connected route corresponding for one IP address is directly configured in the routing table of the first network interface, and when judged result is no, create the routing table of the first network interface, then by direct-connected routing configuration corresponding for an IP address in the routing table of the first network interface.
In addition, processor 82, also for before being directly configured in the routing table of the first network interface by direct-connected route corresponding for an IP address, starting at the present embodiment network equipment or when inserting I/O card on the present embodiment network equipment, creates the routing table of the first network interface.
Optionally, realize if communication interface 81, processor 82 and memory 83 are independent, then communication interface 81, processor 82 and memory 83 can be interconnected by bus and complete mutual communicating.Described bus can be industry standard architecture (Industry Standard Architecture, referred to as ISA) bus, peripheral component interconnect (Peripheral Component, referred to as PCI) bus or extended industry-standard architecture (Extended Industry Standard Architecture, referred to as EISA) bus etc.Described bus can be divided into address bus, data/address bus, control bus etc.For ease of representing, only representing with a thick line in Fig. 8, but not representing the bus only having a bus or a type.
If communication interface 81, processor 82 and memory 83 is integrated realizes on one chip, then communication interface 81, processor 82 and memory 83 can complete mutual communicating by internal interface.
The network equipment that the present embodiment provides has multiple network interface, and these network interfaces can be management network port or service network port, and the network equipment of the present embodiment can be any equipment with multiple network interface, such as, can be router, memory device or server etc.
The network equipment that the present embodiment provides can be used for the flow process performing network interface information configuring methods shown in Fig. 1 or Fig. 3 or Fig. 4 or Fig. 5, and its specific works principle repeats no more, and refers to the description of embodiment of the method.
The network equipment that the present embodiment provides, each network interface is allowed to be used alone a routing table, when receiving request and carrying out the configuring request of IP address configuration to network interface, according to the mark of network interface in this configuring request, by direct-connected routing configuration corresponding for the IP address of request configuration in the routing table of this network interface, generate and store the mark of this network interface simultaneously, mapping relations between the IP address configured and the routing table of this network interface, follow-up based on safeguarded mapping relations, for this network interface configuration route and the transmission etc. carrying out packet based on the routing table of this network interface, because each network interface is used alone a routing table, even if the route table items of different network interface clashes also, it doesn't matter, the network equipment still can find correct network interface to send packet, therefore, without the need to limiting the configuration of network interface information again, be conducive to making full use of network address resources, improve the utilance of network address resources, in addition, owing to decreasing the restriction to network interface information configuration, the route destination address of each network interface can at the same network segment, and can allocating default gateway to each network interface, improves the flexibility of network equipment application.
One of ordinary skill in the art will appreciate that: all or part of step realizing above-mentioned each embodiment of the method can have been come by the hardware that program command is relevant.Aforesaid program can be stored in a computer read/write memory medium.This program, when performing, performs the step comprising above-mentioned each embodiment of the method; And aforesaid storage medium comprises: ROM, RAM, magnetic disc or CD etc. various can be program code stored medium.
Last it is noted that above each embodiment is only in order to illustrate technical scheme of the present invention, be not intended to limit; Although with reference to foregoing embodiments to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein some or all of technical characteristic; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the scope of various embodiments of the present invention technical scheme.

Claims (10)

1. a network interface information configuring methods, is characterized in that, comprising:
The network equipment receives internet protocol address configuration is carried out in request the first configuring request to the first network interface, described first configuring request comprises the mark of described first network interface and the IP address for described first network interface configuration, and the described network equipment comprises described first network interface and other network interfaces;
If a described IP address is not identical with the IP address of other network interfaces described, the described network equipment is according to the mark of described first network interface, by direct-connected routing configuration corresponding for a described IP address in the routing table of described first network interface, generate and store the mark of described first network interface, mapping relations between a described IP address and the routing table of described first network interface;
The described network equipment comprises after generating and storing the mark of described first network interface, mapping relations between a described IP address and the routing table of described first network interface:
The described network equipment receives routing configuration is carried out in request the second configuring request to described first network interface, and described second configuring request comprises the mark of described first network interface and the first routing iinformation for described first network interface interpolation;
Described first routing iinformation, according to the mark of described first network interface and the mark of described first network interface, the mapping relations between a described IP address and the routing table of described first network interface, adds in the routing table of described first network interface by the described network equipment.
2. network interface information configuring methods according to claim 1, is characterized in that, the described network equipment comprises after generating and storing the mark of described first network interface, mapping relations between a described IP address and the routing table of described first network interface:
The described network equipment receives routing configuration is carried out in request the 3rd configuring request to described first network interface, and described 3rd configuring request comprises the mark of described first network interface and the secondary route information for described first network interface deletion;
Described secondary route information, according to the mark of described first network interface and the mark of described first network interface, the mapping relations between a described IP address and the routing table of described first network interface, is deleted by the described network equipment from the routing table of described first network interface.
3. network interface information configuring methods according to claim 1, is characterized in that, the described network equipment comprises after generating and storing the mark of described first network interface, mapping relations between a described IP address and the routing table of described first network interface:
The described network equipment, according to the source IP address of packet to be sent and the mark of described first network interface, the mapping relations between a described IP address and the routing table of described first network interface, obtains the 3rd routing iinformation in the object IP matching addresses of described packet to be sent from the routing table of described first network interface;
The network interface that the described network equipment is specified from described 3rd routing iinformation sends described packet to be sent.
4. the network interface information configuring methods according to any one of claim 1-3, is characterized in that, the routing table of direct-connected routing configuration corresponding for a described IP address to described first network interface, according to the mark of described first network interface, comprises by the described network equipment:
The described network equipment, according to the mark of described first network interface, judges whether the routing table of described first network interface exists;
If judged result is yes, direct-connected route corresponding for a described IP address is directly configured in the routing table of described first network interface by the described network equipment;
If judged result is no, the described network equipment creates the routing table of described first network interface, then by direct-connected routing configuration corresponding for a described IP address in the routing table of described first network interface.
5. network interface information configuring methods according to claim 4, is characterized in that, the described network equipment comprises before direct-connected route corresponding for a described IP address being directly configured in the routing table of described first network interface:
The described network equipment is starting or when there being I/O card to insert in the described network equipment, is creating the routing table of described first network interface.
6. a network equipment, is characterized in that, comprising:
Receiver module, for receiving first configuring request of asking the first network interface of the described network equipment to be carried out to internet protocol address configuration, described first configuring request comprises the mark of described first network interface and the IP address for described first network interface configuration;
Configuration module, for when a described IP address is not identical with the IP address of other network interfaces on the described network equipment except described first network interface, according to the mark of described first network interface, by direct-connected routing configuration corresponding for a described IP address in the routing table of described first network interface, generate and store the mark of described first network interface, mapping relations between a described IP address and the routing table of described first network interface;
Described receiver module is also for after generating and storing the mark of described first network interface, mapping relations between a described IP address and the routing table of described first network interface at described configuration module, receive routing configuration is carried out in request the second configuring request to described first network interface, described second configuring request comprises the mark of described first network interface and the first routing iinformation for described first network interface interpolation;
Described first routing iinformation also for according to the mark of described first network interface and the mark of described first network interface, the mapping relations between a described IP address and the routing table of described first network interface, adds in the routing table of described first network interface by described configuration module.
7. the network equipment according to claim 6, it is characterized in that, described receiver module is also for after generating and storing the mark of described first network interface, mapping relations between a described IP address and the routing table of described first network interface at described configuration module, receive routing configuration is carried out in request the 3rd configuring request to described first network interface, described 3rd configuring request comprises the mark of described first network interface and the secondary route information for described first network interface deletion;
Described secondary route information also for according to the mark of described first network interface and the mark of described first network interface, the mapping relations between a described IP address and the routing table of described first network interface, is deleted by described configuration module from the routing table of described first network interface.
8. the network equipment according to claim 6, is characterized in that, also comprises:
Acquisition module, for generate and store the mark of described first network interface, mapping relations between a described IP address and the routing table of described first network interface at described configuration module after, according to source IP address and the mark of described first network interface, the mapping relations between a described IP address and the routing table of described first network interface of packet to be sent, from the routing table of described first network interface, obtain the 3rd routing iinformation in the object IP matching addresses of described packet to be sent;
Sending module, sends described packet to be sent for the network interface of specifying from described 3rd routing iinformation.
9. the network equipment according to any one of claim 6-8, is characterized in that, described configuration module is used for the mark according to described first network interface, the routing table of direct-connected routing configuration corresponding for a described IP address to described first network interface is comprised:
Described configuration module is specifically for the mark according to described first network interface, judge whether the routing table of described first network interface exists, when judged result is for being, direct-connected route corresponding for a described IP address is directly configured in the routing table of described first network interface, and when judged result is no, create the routing table of described first network interface, then by direct-connected routing configuration corresponding for a described IP address in the routing table of described first network interface.
10. the network equipment according to claim 9, is characterized in that, also comprises:
Creation module, before direct-connected route corresponding for a described IP address being directly configured in the routing table of described first network interface at described configuration module, start at the described network equipment or when there being I/O card to insert the described network equipment, create the routing table of described first network interface.
CN201210464440.3A 2012-11-16 2012-11-16 Network interface information configuring methods and the network equipment Active CN102938711B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210464440.3A CN102938711B (en) 2012-11-16 2012-11-16 Network interface information configuring methods and the network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210464440.3A CN102938711B (en) 2012-11-16 2012-11-16 Network interface information configuring methods and the network equipment

Publications (2)

Publication Number Publication Date
CN102938711A CN102938711A (en) 2013-02-20
CN102938711B true CN102938711B (en) 2015-08-19

Family

ID=47697583

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210464440.3A Active CN102938711B (en) 2012-11-16 2012-11-16 Network interface information configuring methods and the network equipment

Country Status (1)

Country Link
CN (1) CN102938711B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107026795A (en) * 2016-02-02 2017-08-08 上海格尔软件股份有限公司 A kind of method for returning bag extremely source network interface based on iptables and policybased routing
CN107707420B (en) * 2017-08-04 2021-04-09 郑州云海信息技术有限公司 Method for testing network cable plugging and unplugging stability
CN110113202B (en) * 2019-04-30 2022-02-25 新华三信息安全技术有限公司 IPsec diagnosis method and device and home terminal equipment
CN111478824B (en) * 2020-03-20 2022-04-26 苏州浪潮智能科技有限公司 Network card power consumption testing method, device and system
CN113746741B (en) * 2021-08-20 2023-07-18 苏州浪潮智能科技有限公司 Storage device network setting method, device, equipment and readable medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101710864A (en) * 2009-11-23 2010-05-19 中兴通讯股份有限公司 Collocation method and device for multi-gateway Linux server
CN102348107A (en) * 2011-10-27 2012-02-08 北京汉邦高科数字技术股份有限公司 Method for realizing plug and play of network monitoring video

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012103938A1 (en) * 2011-02-01 2012-08-09 Telefonaktiebolaget L M Ericsson (Publ) Routing traffic towards a mobile node

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101710864A (en) * 2009-11-23 2010-05-19 中兴通讯股份有限公司 Collocation method and device for multi-gateway Linux server
CN102348107A (en) * 2011-10-27 2012-02-08 北京汉邦高科数字技术股份有限公司 Method for realizing plug and play of network monitoring video

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘巍等.MD5500数据配置不当故障的分析.《通信管理与技术(运行维护)》.2004,(第4期),第52页. *

Also Published As

Publication number Publication date
CN102938711A (en) 2013-02-20

Similar Documents

Publication Publication Date Title
CN107579951B (en) Service data processing method, service processing method and equipment
CN102938711B (en) Network interface information configuring methods and the network equipment
CN106664261A (en) Method, device, and system for configuring flow entries
CN111010329B (en) Message transmission method and device
CN103346970B (en) A kind of SpaceWire dynamic routing implementation method
CN102857414A (en) Forwarding table writing method and device and message forwarding method and device
CN104995902A (en) Methods and systems for seamless network communication between IPV4 and IPV6 devices
CN102792651B (en) At the device of MAC layer application service path Route Selection
CN104184664A (en) Router forwarding entry generation method and apparatus
US20120096136A1 (en) Method and apparatus for sharing contents using information of group change in content oriented network environment
CN103618801A (en) Method, device and system for sharing P2P (Peer-to-Peer) resources
CN106330553A (en) Message forwarding method and device
CN102333039A (en) Method for forwarding message, and method and device for generating table entry
CN104639348A (en) Network device and configuration method thereof
CN105450585A (en) Information transmission method and device
CN108259348B (en) Message transmission method and device
CN101710864A (en) Collocation method and device for multi-gateway Linux server
US20150095469A1 (en) Identifier-based communication method using application program interface
CN106789664B (en) Route aggregation method and device
CN104780201A (en) Data packet processing method and device for use in IPVS (Internet Protocol Virtual Server) cluster
CN114024886A (en) Cross-resource-pool network intercommunication method, electronic equipment and readable storage medium
CN104539538A (en) IP address matching method and data package forwarding method of router
CN105207904A (en) Message processing method, device and router
CN102045254B (en) Extended processing method, device and network equipment of routing table
CN112910776B (en) Data forwarding method, device, equipment and medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant