CN104320277A - Method and device for allocating router identifier - Google Patents

Method and device for allocating router identifier Download PDF

Info

Publication number
CN104320277A
CN104320277A CN201410598617.8A CN201410598617A CN104320277A CN 104320277 A CN104320277 A CN 104320277A CN 201410598617 A CN201410598617 A CN 201410598617A CN 104320277 A CN104320277 A CN 104320277A
Authority
CN
China
Prior art keywords
interface
router distinguisher
router
address
routing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410598617.8A
Other languages
Chinese (zh)
Other versions
CN104320277B (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.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201410598617.8A priority Critical patent/CN104320277B/en
Publication of CN104320277A publication Critical patent/CN104320277A/en
Application granted granted Critical
Publication of CN104320277B publication Critical patent/CN104320277B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a method and device for allocating a router identifier. The method and device for allocating the router identifier are applied to a router. The method comprises the steps that an interface is selected from interfaces of the router and used as a target interface, and an internet protocol IP address of the target interface serves as the router identifier and is allocated to a routing process. The method and device for allocating the router identifier enable the router identifier to be automatically allocated, thereby simplifying deployment.

Description

Distribute method and the device of Router Distinguisher
Technical field
The present invention relates to network communication technology field, particularly relate to the method and device of distributing Router Distinguisher.
Background technology
Routing device is the important node equipment in network, by operation Routing Protocol for data retransmission provides optimal path.OSPF (Open Shortest Path First, ospf) is a kind of typical link-state routing protocol, and the routing device running this agreement distinguishes the identity of link-state information promoter by Router Distinguisher.In consolidated network, Router Distinguisher does not allow identical, otherwise cannot determine the position of link-state information promoter.
When running multiple ospf process in a routing device, need for each ospf process distributes independently Router Distinguisher, and the whole network is unique, to distinguish the ospf process sending link-state information.At present, the general mode of manual configuration that adopts is that ospf process distributes Router Distinguisher, although the method can ensure the uniqueness of Router Distinguisher, workload is large, is not easy to operation.
Summary of the invention
In view of this, this application provides a kind of method of distributing Router Distinguisher, be applied to routing device, the method comprises:
From the interface of routing device, select an interface as target interface;
Routing daemon is distributed to as Router Distinguisher in the Internet protocol IP address of target interface.
Present invention also provides a kind of device distributing Router Distinguisher, be applied to routing device, this device comprises:
Interface selected cell, for selecting an interface as target interface from the interface of routing device;
Mark allocation units, for distributing to routing daemon using the Internet protocol IP address of target interface as Router Distinguisher.
The application selects an interface from the interface of routing device, and corresponding routing daemon is distributed to as Router Distinguisher in the IP address of this interface, can realize the automatic distribution of Router Distinguisher, simplifies and disposes.
Accompanying drawing explanation
Fig. 1 is schematic network structure in the application's embodiment;
Fig. 2 is the process chart distributing Router Distinguisher method in the application's embodiment;
Fig. 3 is the process chart distributing Router Distinguisher method in another embodiment of the application;
Fig. 4 is the underlying hardware schematic diagram distributing Router Distinguisher device in a kind of embodiment of the application;
Fig. 5 is the structural representation distributing Router Distinguisher device in a kind of embodiment of the application.
Embodiment
For making the object of the application, technical scheme and advantage clearly understand, referring to accompanying drawing, the application's scheme is described in further detail.
The embodiment of the present application, for ospf protocol, introduce the process into ospf process distribution Router Distinguisher, but the application is not limited to route protocol type.
Figure 1 shows that a kind of schematic network structure.Two ospf process are run respectively in router one and router two.Each ospf process is when carrying out link-state information and exchanging, and by the identity of Router Distinguisher identification link-state information promoter, therefore, in consolidated network, the Router Distinguisher of each ospf process cannot repeat.
In prior art, by manual configuration, ensure as each ospf process distributes unique Router Distinguisher.Such as: in router one, the Router Distinguisher of process 1 is 1.1.1.1; In router one, the Router Distinguisher of process 2 is 2.2.2.2; In router two, the Router Distinguisher of process 1 is 3.3.3.3; In router two, the Router Distinguisher of process 2 is 4.4.4.4.But when there is a large amount of ospf process in network, the workload of manual configuration strengthens, length consuming time, and easily makes mistakes.
For the problems referred to above, the embodiment of the present application proposes a kind of method of distributing Router Distinguisher, from the interface of routing device, select an interface, and corresponding routing daemon is distributed to as Router Distinguisher in the IP address of this interface.
See Fig. 2, for the application distributes an embodiment flow chart of Router Distinguisher method, this embodiment is described the process of distributing Router Distinguisher.
Step 210, selects an interface as target interface from the interface of routing device.
When being configured routing device, multiple ospf process can be configured in a routing device, and the interface of routing device be added according to actual needs corresponding ospf process.Before distributing Router Distinguisher to ospf process, the interface of routing device can pass through DHCP (Dynamic Host Configuration Protocol, DHCP) server automatic acquisition IP address, and this IP address the whole network is unique.
When distributing Router Distinguisher to ospf process, first judging whether this ospf process is configured with Router Distinguisher, the mode of manual configuration usually can be adopted to be ospf process configuration router mark.If the Router Distinguisher of existing manual configuration in ospf process, then the Router Distinguisher of prioritizing selection manual configuration.
If there is no the Router Distinguisher of manual configuration in ospf process, then judge whether ospf process is provided with Router Distinguisher associated interface further, namely in ospf process, whether be provided with the incidence relation of Router Distinguisher and a certain interface of routing device, this Router Distinguisher associated interface can be the interface in this ospf process, also can be the interface in non-ospf process.According to judged result, point following two kinds of situations process:
When ospf process is provided with Router Distinguisher associated interface, select the Router Distinguisher associated interface of specifying as target interface.Such as: have interface 1 and interface 2 in the process 1 of router one, then can specified interface 1 be the Router Distinguisher associated interface of process 1, can specified interface 2 be also the Router Distinguisher associated interface of process 1.It should be noted that, the Router Distinguisher associated interface arranged in each ospf process cannot be identical, gets identical Router Distinguisher to prevent different process.
When ospf process does not arrange Router Distinguisher associated interface, can, by arranging Router Distinguisher automatic function selecting, select the interface of first operation in ospf process as target interface.Such as: in the process 2 of router one, have interface 3 and interface 4, when process 2 does not arrange Router Distinguisher associated interface, then process 2 can select an interface as target interface automatically, the principle selected is the interface that in process 2, first is run, suppose that interface 3 is first interface run, then interface 3 is the target interface that process 2 is selected.
Step 220, distributes to routing daemon using the Internet protocol IP address of target interface as Router Distinguisher.
After selected target interface, corresponding routing daemon can be distributed to as Router Distinguisher in the IP address of this target interface.From abovementioned steps 210, the IP address of the interface of known routing device is obtained by DHCP, this Dynamic Acquisition mode ensure that the uniqueness of interface IP address, therefore, corresponding routing daemon is distributed to as Router Distinguisher in the IP address of interfaces some in routing device, can ensure that Router Distinguisher the whole network of each process is unique.
Because the interface IP address of routing device adopts DHCP obtain manner, after routing device power down or fault are restarted, again to Dynamic Host Configuration Protocol server IP address requesting, therefore, the IP address of interface may change.When the IP address of selected target interface changes, the IP address of the target interface after change can be used to upgrade the Router Distinguisher of routing daemon.
The process of above-mentioned distribution Router Distinguisher is distributed according to the interface message of routing device, if do not arrange the function according to interface configuration Router Distinguisher in routing daemon, then whether can be configured with overall Router Distinguisher in query routing equipment, this overall Router Distinguisher is the unique identification for the distribution of each routing device before system cloud gray model.
When being configured with overall Router Distinguisher in routing device, for the routing device that there is multiple ospf process, the Router Distinguisher of its each ospf process is this overall Router Distinguisher.Visible, although can realize distributing Route Distinguisher to routing daemon in routing device according to overall Router Distinguisher, the uniqueness of Route Distinguisher cannot be ensured.
When not configuring overall Router Distinguisher in routing device, the IP address that in selection routing device total interface, IP address is maximum is as the Router Distinguisher of ospf process, and the IP address that in prioritizing selection loopback interface, IP address is maximum is as Router Distinguisher.When this method of salary distribution is come for the routing device that there is multiple ospf process, there is the situation that Router Distinguisher repeats equally.
Now for the process 1 of router one shown in Fig. 1, introduce the process into this course allocation Router Distinguisher, specific as follows:
Step 301, chooses process.
Choose the process 1 in router one, for process 1 distributes Router Distinguisher.
Whether step 302, be configured with Router Distinguisher.
To judge in process 1 whether manual configuration Router Distinguisher, if pre-configured Router Distinguisher, perform step 303; If non-configuration router mark, performs step 304.
Step 303, using the Router Distinguisher that the configured Router Distinguisher as process.
Suppose, pre-configured Router Distinguisher is 1.1.1.1, then when process 1 starts, using the Router Distinguisher of 1.1.1.1 as process 1.
Whether step 304, be configured with Router Distinguisher associated interface.
Judge whether be configured with Router Distinguisher associated interface in process 1, if be configured with Router Distinguisher associated interface, perform step 305; If non-configuration router mark associated interface, performs step 306.
Step 305, using the Router Distinguisher of the IP address of Router Distinguisher associated interface as process.
Suppose, presetting Router Distinguisher associated interface is interface 1, and interface 1 is 220.208.1.10 by the IP address that DHCP gets, then using the Router Distinguisher of 220.208.1.10 as process 1.
Whether step 306, be configured with and run order-assigned Router Distinguisher by interface.
Judge whether to be configured with in process 1 and run order-assigned Router Distinguisher by interface, run order-assigned Router Distinguisher if be configured with by interface, perform step 307; Run order-assigned Router Distinguisher if do not configure by interface, perform step 308.
Step 307, using the Router Distinguisher of the IP address of first runnable interface as process.
Suppose, in the interface 1 of process 1 and interface 2, interface 2 is first interface run, and interface 2 is 220.208.1.20 by the IP address that DHCP gets, then using the Router Distinguisher of 220.208.1.20 as process 1.
Whether step 308, be configured with overall Router Distinguisher.
When not doing any configuration about Router Distinguisher in process 1, judging whether be configured with overall Router Distinguisher in the router one at process 1 place, if be configured with overall Router Distinguisher, performing step 309; If do not configure overall Router Distinguisher, perform step 310.
Step 309, using the Router Distinguisher of overall Router Distinguisher as process.
Suppose, the overall Router Distinguisher pre-setting router one is 2.2.2.2, then using the Router Distinguisher of 2.2.2.2 as process 1.
Step 310, using the Router Distinguisher of maximum interface IP address as process.
As previously mentioned, suppose that the IP address of interface 1 is 220.208.1.10, the IP address of interface 2 is 220.208.1.20, and the IP address of interface 2 is greater than the IP address of interface 1, then using the Router Distinguisher of 220.208.1.20 as process 1.
Corresponding with the embodiment of aforementioned distribution Router Distinguisher method, the application also provides the embodiment of distributing Router Distinguisher device.
The embodiment that the application distributes Router Distinguisher device can be applied on routing device.Device embodiment can pass through software simulating, also can be realized by the mode of hardware or software and hardware combining.For software simulating, as the device on a logical meaning, be by the CPU of its place equipment, computer program instructions corresponding in nonvolatile memory is read operation in internal memory to be formed.Say from hardware view; as shown in Figure 4; for the application distributes a kind of hardware structure diagram of Router Distinguisher device place equipment, except the CPU shown in Fig. 4, internal memory and nonvolatile memory, in embodiment, the equipment at device place can also comprise other hardware usually.
Please refer to Fig. 5, is the structural representation of the distribution Router Distinguisher device in the application's embodiment.This distribution Router Distinguisher device comprises: selected cell 501 and allocation units 502, wherein:
Selected cell 501, for selecting an interface as target interface from the interface of routing device;
Allocation units 502, for distributing to routing daemon using the Internet protocol IP address of target interface as Router Distinguisher.
Selected cell 501, can specifically comprise: interface judge module and interface select module, wherein:
Interface judge module, for judging whether routing daemon arranges Router Distinguisher associated interface;
Interface selects module, during for arranging Router Distinguisher associated interface when routing daemon, selects Router Distinguisher associated interface as target interface.
Interface selects module, time also for not arranging Router Distinguisher associated interface when routing daemon, using the interface of first operation in routing daemon as target interface.
Distribute Router Distinguisher device, can also comprise:
Acquiring unit 503, for select the interface of selected cell from routing device an interface as target interface before, obtain the IP address of interface of routing device from DHCP Dynamic Host Configuration Protocol server.
Distribute Router Distinguisher device, can also comprise:
Acquiring unit 503, also for the IP address after the change from Dynamic Host Configuration Protocol server acquisition target interface;
Allocation units 502, also for the IP address after the change of target interface is reassigned to routing daemon as Router Distinguisher.
The embodiment of the distribution Router Distinguisher device shown in above-mentioned Fig. 5 can be applied in routing device.Its specific implementation process see the explanation of preceding method embodiment, can not repeat them here.
As can be seen from the embodiment of above method and apparatus, the application selects an interface from the interface of routing device, and corresponding routing daemon is distributed to as Router Distinguisher in the IP address of this interface, the automatic distribution of Router Distinguisher can be realized, simplify and dispose.
The foregoing is only the preferred embodiment of the application, not in order to limit the application, within all spirit in the application and principle, any amendment made, equivalent replacements, improvement etc., all should be included within scope that the application protects.

Claims (10)

1. distribute a method for Router Distinguisher, be applied to routing device, it is characterized in that, the method comprises:
From the interface of described routing device, select an interface as target interface;
Routing daemon is distributed to as Router Distinguisher in the Internet protocol IP address of described target interface.
2. the method for claim 1, is characterized in that, described from the interface of described routing device select an interface as target interface, comprising:
Judge whether described routing daemon arranges Router Distinguisher associated interface;
When described routing daemon arranges Router Distinguisher associated interface, select described Router Distinguisher associated interface as target interface.
3. method as claimed in claim 2, it is characterized in that, described method also comprises:
When described routing daemon does not arrange Router Distinguisher associated interface, using the interface of first operation in described routing daemon as target interface.
4. the method for claim 1, is characterized in that, described from the interface of described routing device select an interface as before target interface, also comprise:
The IP address of the interface of described routing device is obtained from DHCP Dynamic Host Configuration Protocol server.
5. the method as described in as arbitrary in Claims 1-4, it is characterized in that, described method also comprises:
The IP address after the change of described target interface is obtained from described Dynamic Host Configuration Protocol server;
IP address after the change of described target interface is reassigned to described routing daemon as described Router Distinguisher.
6. distribute a device for Router Distinguisher, be applied to routing device, it is characterized in that, this device comprises:
Selected cell, for selecting an interface as target interface in the interface from described routing device;
Allocation units, for distributing to routing daemon using the Internet protocol IP address of described target interface as Router Distinguisher.
7. device as claimed in claim 6, it is characterized in that, described selected cell, comprising:
Interface judge module, for judging whether described routing daemon arranges Router Distinguisher associated interface;
Interface selects module, for when described routing daemon arranges Router Distinguisher associated interface, selects described Router Distinguisher associated interface as target interface.
8. device as claimed in claim 7, it is characterized in that, described selected cell, also comprises:
Described interface selects module, also for when described routing daemon does not arrange Router Distinguisher associated interface, using the interface of first operation in described routing daemon as target interface.
9. device as claimed in claim 6, it is characterized in that, described device also comprises:
Acquiring unit, for the interface of described selected cell from described routing device select an interface as target interface before, obtain the IP address of the interface of described routing device from DHCP Dynamic Host Configuration Protocol server.
10. the device as described in as arbitrary in claim 6 to 9, it is characterized in that, described device also comprises:
Described acquiring unit, also for obtain described target interface from described Dynamic Host Configuration Protocol server change after IP address;
Described allocation units, also for the IP address after the change of described target interface is reassigned to described routing daemon as described Router Distinguisher.
CN201410598617.8A 2014-10-30 2014-10-30 Distribute the method and device of Router Distinguisher Active CN104320277B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410598617.8A CN104320277B (en) 2014-10-30 2014-10-30 Distribute the method and device of Router Distinguisher

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410598617.8A CN104320277B (en) 2014-10-30 2014-10-30 Distribute the method and device of Router Distinguisher

Publications (2)

Publication Number Publication Date
CN104320277A true CN104320277A (en) 2015-01-28
CN104320277B CN104320277B (en) 2018-09-04

Family

ID=52375452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410598617.8A Active CN104320277B (en) 2014-10-30 2014-10-30 Distribute the method and device of Router Distinguisher

Country Status (1)

Country Link
CN (1) CN104320277B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101350767A (en) * 2007-07-19 2009-01-21 华为技术有限公司 Method for transmitting parallel link packet as well as routing device
US20090175288A1 (en) * 2008-01-08 2009-07-09 Samsung Electronics Co., Ltd. System for setting router identifier in network supporting at least one protocol and method of controlling the same
CN101599849A (en) * 2008-06-06 2009-12-09 华为技术有限公司 Notifying method, system and the network equipment that network identity changes
CN102006202A (en) * 2010-11-25 2011-04-06 杭州华三通信技术有限公司 Router identification collision detection method and router

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101350767A (en) * 2007-07-19 2009-01-21 华为技术有限公司 Method for transmitting parallel link packet as well as routing device
US20090175288A1 (en) * 2008-01-08 2009-07-09 Samsung Electronics Co., Ltd. System for setting router identifier in network supporting at least one protocol and method of controlling the same
CN101599849A (en) * 2008-06-06 2009-12-09 华为技术有限公司 Notifying method, system and the network equipment that network identity changes
CN102006202A (en) * 2010-11-25 2011-04-06 杭州华三通信技术有限公司 Router identification collision detection method and router

Also Published As

Publication number Publication date
CN104320277B (en) 2018-09-04

Similar Documents

Publication Publication Date Title
US11704144B2 (en) Creating virtual machine groups based on request
US11895577B2 (en) Network slice selection method and apparatus
CN110221918B (en) Association method, device and system of NS and VNF
KR102022441B1 (en) Hardware Acceleration Methods and Related Devices
EP2866393A1 (en) Method and apparatus for determining virtual machine drifting
US9225671B2 (en) Auto management of a virtual device context enabled network infrastructure
CN102710811B (en) Realize method and the switch of dhcp address safety distribution
US9614789B2 (en) Supporting multiple virtual switches on a single host
US10439901B2 (en) Messaging queue spinning engine
WO2018218977A1 (en) Method for orchestrating software defined network, and sdn controller
CN104468368A (en) Method and device for allocating BGP neighbors
EP3787232A1 (en) Network configuration method, device, and system
CN102316043B (en) Port virtualization method, switch and communication system
WO2015147850A1 (en) Controlled node configuration
CN109561054B (en) Data transmission method, controller and access device
CN105791254B (en) Network request processing method and device and terminal
CN110474960B (en) Method and device for service deployment in virtual network
CN106302861A (en) A kind of address distribution method and device
CN107534678B (en) Method, device and system for establishing connection between VNFM and VIM
US20150109945A1 (en) On-demand transmission path providing system and method
US8855015B2 (en) Techniques for generic pruning in a trill network
CN108259345B (en) Port generation method and device
WO2017215381A1 (en) Method and device for indicating virtual expansion port, and storage medium
CN104320277A (en) Method and device for allocating router identifier
CN106559439A (en) A kind of method for processing business and equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant after: Xinhua three Technology Co., Ltd.

Address before: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant before: Huasan Communication Technology Co., Ltd.

GR01 Patent grant
GR01 Patent grant