Nothing Special   »   [go: up one dir, main page]

CN108989114A - A kind of method and device configuring router - Google Patents

A kind of method and device configuring router Download PDF

Info

Publication number
CN108989114A
CN108989114A CN201810824419.7A CN201810824419A CN108989114A CN 108989114 A CN108989114 A CN 108989114A CN 201810824419 A CN201810824419 A CN 201810824419A CN 108989114 A CN108989114 A CN 108989114A
Authority
CN
China
Prior art keywords
router
lower extension
address
wan
configuration
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
CN201810824419.7A
Other languages
Chinese (zh)
Other versions
CN108989114B (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.)
New H3C Information Technologies Co Ltd
Original Assignee
New 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 New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN201810824419.7A priority Critical patent/CN108989114B/en
Publication of CN108989114A publication Critical patent/CN108989114A/en
Application granted granted Critical
Publication of CN108989114B publication Critical patent/CN108989114B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B3/00Line transmission systems
    • H04B3/02Details
    • H04B3/36Repeater circuits
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/60Router architectures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]

Landscapes

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

Abstract

The problem of the embodiment of the present application provides a kind of method and device for configuring router, is related to field of communication technology, needs user's manual configuration when hanging wireless router under use.When the scheme of the embodiment of the present application includes: router startup, the dynamic host configuration protocol DHCP server capability of router is closed, is line relay mode by configuration of routers if router is lower extension router.

Description

A kind of method and device configuring router
Technical field
This application involves fields of communication technology, more particularly to a kind of method and device for configuring router.
Background technique
In order to obtain the coverage area of bigger wireless signal, multiple wireless routers can be connected into networking, such as Fig. 1 institute Show, outlet wireless router is led to by wide area network (Wide Area Network, WAN) mouth connection internet (Internet) Cross the lower WAN mouth for hanging wireless router of local area network (Local Area Network, LAN) mouth connection of itself.
If network protocol (the Internet that outlet wireless router and the lower LAN mouth for hanging wireless router use Protocol, IP) address belongs to identical network segment, and lower WAN mouth for hanging wireless router is obtained from the LAN mouth for exporting wireless router Network segment belonging to the IP address taken, will be identical as network segment belonging to the IP address of the lower LAN mouth for hanging wireless router, leads to terminal It can not be surfed the Internet by lower extension wireless router, user is needed to hang the ground of wireless router in the case where configuring page manual configuration at this time Location, but general user not will do it these configurations, make troubles for user's use.
Summary of the invention
The embodiment of the present application is designed to provide a kind of method and device for configuring router, is being not necessarily to user to realize Lower extension wireless router is used in the case where manual configuration.Specific technical solution is as follows:
In a first aspect, a kind of method for configuring router of embodiments herein, comprising:
When router startup, the dynamic host configuration protocol DHCP server capability of the router is closed;
It is line relay mode by the configuration of routers if the router is lower extension router.
In one possible implementation, described after the dhcp server functionality for closing the router Method further include:
Judge whether the automatic line relay function of the router is in the open state;
If it is not, then opening the dhcp server functionality of the router;
If so, judging whether the router is lower extension router.
In one possible implementation, the method also includes:
If the router is not lower extension router, the dhcp server functionality of the router is opened.
It is in one possible implementation, described to judge whether the router is lower extension router, comprising:
The router obtains first network Protocol IP address by wide area network WAN mouthfuls of dhcp client function;
Judge whether first IP address is public network IP address;
If so, determining that the router is not lower extension router;
If it is not, being then the salty newly-generated MAC Address of the WAN;
The router obtains the second IP address by described WAN mouthfuls of dhcp client function according to the MAC Address;
The router judges whether to get second IP address;
If second IP address has not been obtained in the router, it is determined that the router is not lower extension router;
If the router gets second IP address, it is determined that the router is lower extension router.
It is in one possible implementation, described to judge whether the router is lower extension router, further includes:
If the router does not judge whether the router is lower extension router in the first preset time, it is determined that The router is not lower extension router.
In one possible implementation, it is described by the configuration of routers be line relay mode, comprising:
If the WAN mouth of the router and local network LAN mouth, will be WAN mouthfuls described not in the same exchanger core on piece With the LAN mouthfuls of bridging;
Delete described WAN mouthfuls of the information for realizing routing function.
In one possible implementation, it is described by the configuration of routers be line relay mode, comprising:
If the WAN mouth of the router and local network LAN mouth in the same exchanger core on piece, by described WAN mouthfuls from It is deleted in virtual LAN VLAN where itself;
By described WAN mouthfuls be added in the VLAN at the place LAN mouthfuls of;
Delete described WAN mouthfuls of the information for realizing routing function.
Second aspect, the embodiment of the present application provide a kind of device for configuring router, comprising:
Closedown module, for closing the dynamic host configuration protocol DHCP service of the router when router startup Device function;
The configuration of routers is line relay mould if being lower extension router for the router by configuration module Formula.
In one possible implementation, described device further include: judgment module and opening module;
Whether judgment module, the automatic line relay function for judging the router are in the open state;
The opening module, if determining that the automatic line relay function of the router is not in for the judgment module Open state then opens the dhcp server functionality of the router;
The judgment module, if being also used to the judgment module determines that the automatic line relay function of the router is in Open state then judges whether the router is lower extension router.
In one possible implementation, the opening module, if being also used to the judgment module determines the routing Device is not lower extension router, then opens the dhcp server functionality of the router.
In one possible implementation, the judgment module, specifically for passing through wide area network WAN mouthfuls of DHCP client Function is held to obtain the first IP address;Judge whether first IP address is public network IP address;If so, determining the router It is not lower extension router;If it is not, being then the salty newly-generated MAC Address of the WAN;Passed through according to the MAC Address described WAN mouthfuls of dhcp client function obtains the second IP address;Judge whether to get second IP address;If institute has not been obtained State the second IP address, it is determined that the router is not lower extension router;If getting second IP address, it is determined that described Router is lower extension router.
In one possible implementation, the judgment module, if being also used to the judgment module when first is default It is interior not judge whether the router is lower extension router, it is determined that the router is not lower extension router.
In one possible implementation, the configuration module, if specifically for the WAN mouth and local of the router LAN mouthfuls of net is not in the same exchanger core on piece, then by described WAN mouthfuls and the LAN mouthfuls of bridging;Delete WAN mouthfuls of the use In the information for realizing routing function.
In one possible implementation, the configuration module, if specifically for the WAN mouth and local of the router LAN mouthfuls of net will then be deleted in the same exchanger core on piece in the WAN mouthfuls of virtual LAN VLAN where itself;It will Described WAN mouthfuls is added in the VLAN where LAN mouthfuls;Delete described WAN mouthfuls of the information for realizing routing function.
The third aspect, embodiments herein provide a kind of router, which includes: processor and machine readable deposit Storage media, the machine readable storage medium are stored with the machine-executable instruction that can be executed by the processor, the place Reason device is promoted by the machine-executable instruction: the method for realizing the configuration router in first aspect.
Fourth aspect, the embodiment of the present application also provides a kind of computer readable storage medium, the computer-readable storages Dielectric memory contains computer program, and configuration road described in first aspect is realized when the computer program is executed by processor By the method for device.
5th aspect, the embodiment of the present application also provides a kind of computer program products comprising instruction, when it is being calculated When being run on machine, so that computer executes the method for configuring router described in above-mentioned first aspect.
The method and device of configuration router provided by the embodiments of the present application, router can close the Dynamic Host Configuration Protocol server of itself Function, and judge automatically whether itself is that lower extension router if lower extension router then configures line relay for itself automatically Mode, i.e., lower router of hanging only have relay function, do not have routing function, can expand the covering model of wireless signal in this way It encloses, egress router and the lower LAN mouth for hanging router will not occur can not be led to using terminal caused by identical address network segment The problem of hanging router online is spent down, the lower configuration for hanging router is completed in the case where being not necessarily to user's manual configuration.
Certainly, implement the application any product or method it is not absolutely required to and meanwhile reach all the above excellent Point.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of networking schematic diagram for wireless router that background technique provides;
Fig. 2 is a kind of structural schematic diagram for communication system that embodiments herein provides;
Fig. 3 is a kind of flow chart of the method for configuration router that embodiments herein provides;
Fig. 4 is the flow chart of the method for another configuration router that embodiments herein provides;
Fig. 5 is the flow chart of the method for another configuration router that embodiments herein provides;
Fig. 6 is a kind of structural schematic diagram of the device for configuration router that embodiments herein provides;
Fig. 7 is the structural schematic diagram of the device for another configuration router that embodiments herein provides;
Fig. 8 is a kind of structural schematic diagram for router that embodiments herein provides.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall in the protection scope of this application.
Router is hung under use without user's manual configuration in order to realize, the embodiment of the present application provides one The method of kind configuration router can first close the dynamic host configuration protocol (Dynamic of router in router startup Host Configuration Protocol, DHCP) server capability, and then if it is determined that router be lower extension router, then may be used It is line relay mode by configuration of routers.As it can be seen that in this way, router can judge automatically whether itself is lower extension routing Device then itself will be configured to line relay mode automatically if lower extension router, i.e., lower router of hanging only has relay function, Without routing function, the coverage area of wireless signal can be expanded in this way, egress router and the routing of lower extension will not occur The problem of LAN mouth of device can not be surfed the Internet using terminal caused by identical address network segment by lower extension router is being not necessarily to user The lower configuration for hanging router is completed in the case where manual configuration.
Method provided by the embodiments of the present application is applied in communication system as shown in Figure 2, in the system includes one and goes out Mouth router and at least one lower extension router, the lower WAN mouth for hanging router may connect to the LAN mouth of egress router, Fig. 2 In schematically illustrate and hang router under three, these three are lower to hang routers can be connected to egress router different LAN mouthfuls.
Optionally, lower extension router can also use cascade mode, for example, the lower LAN mouth for hanging router 4 is connected to down Hang the WAN mouth of router 1.
The method of configuration router provided by the embodiments of the present application is specifically addressed below.
It should be noted that router involved in the embodiment of the present application, egress router and lower extension router are nothing Line router, each message name and each parameter name in the embodiment of the present application are only as an example, can also be in specific implementation For other titles, it is described collectively herein.
Communication system as shown in connection with fig. 2, the embodiment of the present application provides a kind of method for configuring router, such as Fig. 3 institute Show, this method comprises:
When S301, router startup, the dhcp server functionality of router is closed.
Wherein, the LAN mouth of router generally has the function of Dynamic Host Configuration Protocol server (server) that is, router can pass through LAN mouthfuls IP address is distributed for client.It is not determined after router startup in the case where itself whether being lower extension router, first by itself Dhcp server functionality keep in off position, if the dhcp server functionality of router is not opened, maintain DHCP service The closed state of device closes the dhcp server functionality of router if the DHCP function of router has turned on.
It is line relay mode by configuration of routers if S302, router are lower extension router.
Wherein, line relay mode refers to, which only provides relay function, does not provide routing function, at this time The lower extension router can be regarded as an interchanger, the lower extension router is in subsequent use process, LAN mouthfuls of Dynamic Host Configuration Protocol server Function remains off.
It is also understood that terminal can access network, but the IP used when accessing terminal to network by lower extension router Address is that egress router provides.Specifically, lower extension router can incite somebody to action after terminal issues DHCP discover message DHCP discover message is forwarded to egress router, and then egress router will carry IP address for terminal distribution DHCP offer message is sent to lower extension router, then the DHCP offer message is sent to terminal by lower extension router, into And terminal can be surfed the Internet by lower extension router, but practical lower router of hanging only provides line relay, there is no as DHCP Sever is terminal distribution IP address.
Using the method for configuration router provided by the embodiments of the present application, router can close the Dynamic Host Configuration Protocol server function of itself Can, and judge automatically whether itself is lower extension router, if lower extension router, then it itself will be configured to line relay mould automatically Formula, i.e., lower router of hanging only have relay function, do not have routing function, can expand the coverage area of wireless signal in this way, Egress router will not occur and the lower LAN mouth for hanging router can not be under using terminal caused by identical address network segment The problem of hanging router online completes the lower configuration for hanging router in the case where being not necessarily to user's manual configuration.
Further, since lower extension router is configured as line relay mode, do not have routing function, so under terminal passes through Hang router online when, will not lower extensions router progress network address translation (Network Address Translation, NAT), speed of surfing the Internet will not be reduced terminal accesses network by lower extension router.If also, lower extension router has road By function, then the LAN mouth of the lower LAN mouth for hanging router and egress router uses different address network segments, if two terminals point Not Tong Guo lower extension router and egress router online, the two terminals cannot be used cooperatively, for example, if terminal computer passes through Lower extension router accesses network, and projector accesses network by egress router, if computer need to pass through the side of wireless communication Display interface is passed through projector by formula, but computer and projector are surfed the Internet by different network segments, and projector just can not be to electricity The display interface of brain is projected, but uses embodiments herein, and lower extension router does not provide routing function, only provides relaying Function, so the same local area network is still used by lower extension router and by the terminal that egress router accesses network, it will not There is the problem of cannot being used cooperatively.
It is understood that above-mentioned router may be lower extension router, it is also possible to be egress router, the application is implemented Example has different processing methods to lower extension router and egress router, this is based on, to configuration in another embodiment of the application The method of router is described in detail, as shown in figure 4, this method comprises:
When S401, router startup, the dynamic host configuration protocol DHCP server capability of router is closed.
S402, judge whether the automatic line relay function of router is in the open state.
The configuration information about automatic line relay function of itself storage can be read in router, is sentenced according to the configuration information Whether automatic line relay function of breaking is in the open state.
If so, executing S403;If it is not, illustrating that the router can not be used as lower extension router, it is believed that the router is Egress router then executes S405.
S403, judge whether router is lower extension router.
If so, executing S404;If it is not, then executing S405.
It should be noted that can star a timer while starting the judgment step of S403, if timer is super When, do not judge whether router is lower extension router, then terminates to judge process yet, it is believed that the router is not lower extension routing Device executes S405.
It is line relay mode by configuration of routers if S404, router are lower extension router.
In one implementation, if the WAN mouth of router and LAN mouthfuls are not in the same exchanger core on piece, by WAN Mouth and LAN mouthfuls of bridgings create a bridge, then WAN mouthfuls and LAN mouthfuls are added on this bridge, to realize WAN mouthfuls and LAN The bridging of mouth.Then WAN mouthfuls of the information for realizing routing function is deleted, wherein for realizing the packet of routing function Include routing rule, safety regulation, service quality (Quality of Service, QoS) information, firewall information etc..
In another implementation, if the WAN mouth of router and LAN mouthful are in the same exchanger core on piece, due to friendship LAN and WAN in changing planes can be generally isolated by VLAN, and the routing function of the router is closed in the embodiment of the present application Can, and wired repeater mode is set by the router, exchanger core on piece can be deleted about WAN mouthfuls of virtual LAN (Virtual Local Area Network, VLAN) configuration information, then by WAN mouthfuls be added to LAN mouthfuls belonging in VLAN, And the WAN mouthfuls of information for realizing routing function is deleted, belonging between same WAN mouthfuls and LAN mouthful so directly to transmit Data, without carrying out NAT conversion.
S405, the dhcp server functionality for opening router.
Wherein, if the router is egress router, the dhcp server functionality and router of router are opened Nat feature, the egress router carry out normal online dialing process.
Using method provided by the embodiments of the present application, when router startup, it can judge automatically whether itself is the road Xia Gua Line relay mode then itself will be configured to if lower extension router by device, if not lower extension router, then open itself Dhcp server functionality, to realize the function of egress router, it is seen that automatically configuring for router may be implemented using this method. Since lower extension router is configured as line relay mode, do not have routing function, so terminal is surfed the Internet by lower extension router When, NAT conversion will not be carried out in lower extension router, upper network speed will not be reduced terminal accesses network by lower extension router Rate.
In addition, if lower extension router has routing function, the LAN mouth of lower the LAN mouth for hanging router and egress router Using different address network segments, if two terminals pass through lower extension router and egress router online respectively, the two terminals will It cannot be used cooperatively, for example, projector accesses net by egress router if terminal computer accesses network by lower extension router Network, if display interface need to be passed through projector by way of wireless communication by computer, but computer and projector pass through Different network segment online, projector can not just project the display interface of computer, but use embodiments herein, lower extension Router does not provide routing function, only provides relay function, so accessing net by lower extension router and by egress router The terminal of network still uses the same local area network, is not in the problem of cannot being used cooperatively.
Below to above-mentioned S403, judge router whether be it is lower hang router method be described in detail, such as Fig. 5 institute Show, this method comprises:
S501, router obtain the first IP address by WAN mouthfuls of dhcp client (client) function.
Specifically, router can be used as DHCP client for WAN mouthfuls, by DHCP protocol to upstream gateway application first IP address.
S502, judge whether the first IP address is public network IP address.
Wherein, lan address generally comprises three address network segments, is respectively as follows: 10.0.0.0-10.255.255.255; 172.16.0.0-172.31.255.255;192.168.0.0-192.168.255.255.If the first IP address belong to this three Any one in a address network segment, it is determined that the first IP address is LAN IP address;If the first IP address is not belonging to above-mentioned Three address network segments, it is determined that the first IP address is public network IP address.
If so, executing S503;If it is not, then executing S504.
S503, to determine router not be lower extension router.
If router is not lower extension router, illustrate that the router is egress router, then the outlet router continues Realize normal router feature.
It S504, is the salty newly-generated MAC Address of WAN.
S505, router obtain the second IP address by WAN mouthfuls of dhcp client function according to MAC Address.
Router will WAN mouthfuls be used as dhcp client, new MAC Address is disguised oneself as WAN mouthfuls of MAC Address, is passed through DHCP protocol is to the second IP address of upstream gateway application.
S506, router judge whether to get the second IP address.
If so, executing S507;If it is not, then executing S503.
If router, which has not been obtained, illustrates that upstream gateway limits the IP address distribution of the router to the second IP address System, i.e., the router can only obtain an IP address, IP address that cannot be new by new MAC Address application, and upstream gateway is Carrier gateway, the router are egress router, which can not carry out line relay.
Conversely, illustrating that upstream gateway does not distribute the IP address of the router if router gets the second IP address It is limited, which can apply for multiple IP address, so the upstream gateway of the router is not carrier gateway, the road Have the condition for carrying out line relay by device, and then can determine that the router is lower extension router.
S507, determine that router is lower extension router.
As it can be seen that can be judged automatically using method provided by the embodiments of the present application, after router startup itself whether be under Router is hung, and then itself can be matched according to the lower configuration rule for hanging router automatically if itself is lower extension router It sets, the lower function of hanging router is realized in the case where being not necessarily to user's manual configuration.
Corresponding to above method embodiment, embodiments herein also provides a kind of device for configuring router, such as Fig. 6 institute Show, which includes: closedown module 601 and configuration module 602.
Closedown module 601, for closing the dynamic host configuration protocol DHCP server of router when router startup Function;
Configuration of routers is line relay mode if being lower extension router for router by configuration module 602.
Optionally, as shown in fig. 7, the device further include: judgment module 603 and opening module 604.
Whether judgment module 603, the automatic line relay function for judging router are in the open state;
Opening module 604, if determining that the automatic line relay function of router is not in opening state for judgment module 603 State then opens the dhcp server functionality of router;
Judgment module 603, if being also used to judgment module 603 determines that the automatic line relay function of router is in opening state State then judges whether router is lower extension router.
Optionally, opening module opens router if being also used to judgment module to determine router not to be lower extension router Dhcp server functionality.
Optionally, judgment module 603, specifically for obtaining the first IP by wide area network WAN mouthfuls of dhcp client function Address;Judge whether the first IP address is public network IP address;If so, determining that router is not lower extension router;If it is not, being then The salty newly-generated MAC Address of WAN;The second IP address is obtained by WAN mouthfuls of dhcp client function according to MAC Address; Judge whether to get the second IP address;If having not been obtained to the second IP address, it is determined that router is not lower extension router;If obtaining Get the second IP address, it is determined that router is lower extension router.
Optionally, judgment module 603, if being also used to judgment module 603 does not judge router in the first preset time It whether is lower extension router, it is determined that router is not lower extension router.
In one possible implementation, configuration module 602, if specifically for the WAN mouth and local network LAN of router Mouth is not in the same exchanger core on piece, then by WAN mouthfuls and LAN mouthfuls of bridgings;Delete WAN mouthfuls of the letter for realizing routing function Breath.
In alternatively possible implementation, configuration module 602, if specifically for the WAN mouth and local area network of router LAN mouthfuls in the same exchanger core on piece, then will delete in the WAN mouthfuls of virtual LAN VLANs where itself;By WAN mouthfuls In VLAN where being added to LAN mouthfuls;Delete WAN mouthfuls of the information for realizing routing function.
The embodiment of the present application also provides a kind of routers, as shown in figure 8, including processor 801, communication interface 802, depositing Reservoir 803 and communication bus 804, wherein processor 801, communication interface 802, memory 803 are completed by communication bus 804 Mutual communication,
Memory 803, for storing computer program;
Processor 801 when for executing the program stored on memory 803, realizes following steps:
When router startup, the dynamic host configuration protocol DHCP server capability of router is closed;
It is line relay mode by configuration of routers if router is lower extension router.
Processor 801 is also used to realize other steps in above method embodiment, can refer in above method embodiment Description, details are not described herein again.
The communication bus that above-mentioned router is mentioned can be Peripheral Component Interconnect standard (Peripheral Component Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control bus etc..For just It is only indicated with a thick line in expression, figure, it is not intended that an only bus or a type of bus.
Communication interface is for the communication between above-mentioned router and other equipment.
Memory may include random access memory (Random Access Memory, RAM), also may include non-easy The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also To be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processing, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete Door or transistor logic, discrete hardware components.
In another embodiment provided by the present application, a kind of computer readable storage medium is additionally provided, which can It reads to be stored with computer program in storage medium, the computer program realizes any of the above-described configuration routing when being executed by processor The step of method of device.
In another embodiment provided by the present application, a kind of computer program product comprising instruction is additionally provided, when it When running on computers, so that the method that computer executes any configuration router in above-described embodiment.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.The computer program Product includes one or more computer instructions.When loading on computers and executing the computer program instructions, all or It partly generates according to process or function described in the embodiment of the present application.The computer can be general purpose computer, dedicated meter Calculation machine, computer network or other programmable devices.The computer instruction can store in computer readable storage medium In, or from a computer readable storage medium to the transmission of another computer readable storage medium, for example, the computer Instruction can pass through wired (such as coaxial cable, optical fiber, number from a web-site, computer, server or data center User's line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or Data center is transmitted.The computer readable storage medium can be any usable medium that computer can access or It is comprising data storage devices such as one or more usable mediums integrated server, data centers.The usable medium can be with It is magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state hard disk Solid State Disk (SSD)) etc..
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device reality For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method Part explanation.
The foregoing is merely the preferred embodiments of the application, are not intended to limit the protection scope of the application.It is all Any modification, equivalent replacement, improvement and so within spirit herein and principle are all contained in the protection scope of the application It is interior.

Claims (10)

1. a kind of method for configuring router characterized by comprising
When router startup, the dynamic host configuration protocol DHCP server capability of the router is closed;
It is line relay mode by the configuration of routers if the router is lower extension router.
2. the method according to claim 1, wherein in the dhcp server functionality for closing the router Later, the method also includes:
Judge whether the automatic line relay function of the router is in the open state;
If it is not, then opening the dhcp server functionality of the router;
If so, judging whether the router is lower extension router.
3. according to the method described in claim 2, it is characterized in that, the method also includes:
If the router is not lower extension router, the dhcp server functionality of the router is opened.
4. according to the method described in claim 3, it is characterized in that, described judge whether the router is lower extension router, Include:
The router obtains first network Protocol IP address by wide area network WAN mouthfuls of dhcp client function;
Judge whether first IP address is public network IP address;
If so, determining that the router is not lower extension router;
If it is not, being then the salty newly-generated MAC Address of the WAN;
The router obtains the second IP address by described WAN mouthfuls of dhcp client function according to the MAC Address;
The router judges whether to get second IP address;
If second IP address has not been obtained in the router, it is determined that the router is not lower extension router;
If the router gets second IP address, it is determined that the router is lower extension router.
5. according to the method described in claim 4, it is characterized in that, described judge whether the router is lower extension router, Further include:
If the router does not judge whether the router is lower extension router in the first preset time, it is determined that described Router is not lower extension router.
6. according to the method described in claim 5, it is characterized in that, it is described by the configuration of routers be line relay mode, Include:
If the WAN mouth of the router and local network LAN mouth be not in the same exchanger core on piece, by described WAN mouthfuls and institute State LAN mouthfuls of bridgings;
Delete described WAN mouthfuls of the information for realizing routing function.
7. according to the method described in claim 5, it is characterized in that, it is described by the configuration of routers be line relay mode, Include:
If the WAN mouth of the router and local network LAN mouth are in the same exchanger core on piece, by described WAN mouthfuls from itself It is deleted in the virtual LAN VLAN at place;
By described WAN mouthfuls be added in the VLAN at the place LAN mouthfuls of;
Delete described WAN mouthfuls of the information for realizing routing function.
8. a kind of device for configuring router characterized by comprising
Closedown module, for closing the dynamic host configuration protocol DHCP server function of the router when router startup Energy;
The configuration of routers is line relay mode if being lower extension router for the router by configuration module.
9. a kind of router, which is characterized in that including processor and machine readable storage medium, the machine readable storage medium It is stored with the machine-executable instruction that can be executed by the processor, the processor is promoted by the machine-executable instruction Make: realizing method and step as claimed in claim 1 to 7.
10. a kind of machine readable storage medium, which is characterized in that be stored with machine-executable instruction, by processor call and When execution, the machine-executable instruction promotes the processor: realizing method and step as claimed in claim 1 to 7.
CN201810824419.7A 2018-07-25 2018-07-25 Method and device for configuring router Active CN108989114B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810824419.7A CN108989114B (en) 2018-07-25 2018-07-25 Method and device for configuring router

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810824419.7A CN108989114B (en) 2018-07-25 2018-07-25 Method and device for configuring router

Publications (2)

Publication Number Publication Date
CN108989114A true CN108989114A (en) 2018-12-11
CN108989114B CN108989114B (en) 2021-08-06

Family

ID=64550481

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810824419.7A Active CN108989114B (en) 2018-07-25 2018-07-25 Method and device for configuring router

Country Status (1)

Country Link
CN (1) CN108989114B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109618019A (en) * 2018-12-25 2019-04-12 深圳创维数字技术有限公司 Dynamic address allocation service configuration method, apparatus, equipment and storage medium
CN110098968A (en) * 2019-05-20 2019-08-06 李德鱼 A kind of wired bridge joint of router realizes the automatic setting method of radio roaming
CN112217917A (en) * 2020-10-12 2021-01-12 深圳市友华软件科技有限公司 IP obtaining method and device for mounting terminal in bridge mode
CN113037652A (en) * 2021-03-24 2021-06-25 深圳市乙辰科技股份有限公司 Network connection method and device based on distributed networking system and computer equipment
CN113098797A (en) * 2021-03-24 2021-07-09 深圳市乙辰科技股份有限公司 Network connection method and device based on distributed networking system and computer equipment
CN113489618A (en) * 2021-09-06 2021-10-08 卡斯柯信号(北京)有限公司 Configuration method and device for three-layer routing of switch in railway system
CN115883349A (en) * 2021-09-26 2023-03-31 华为技术有限公司 Network configuration method, router, storage medium, and program product

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080052384A1 (en) * 2004-12-07 2008-02-28 Brett Marl Network administration tool
CN103888294A (en) * 2014-02-28 2014-06-25 广州视睿电子科技有限公司 Method and device for assigning router in Android system
CN105071852A (en) * 2015-08-27 2015-11-18 杨珊珊 Intelligent relaying system and intelligent relaying method implemented by unmanned aerial vehicle
CN106231616A (en) * 2016-06-28 2016-12-14 上海斐讯数据通信技术有限公司 A kind of method configuring wireless relay and wireless router

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080052384A1 (en) * 2004-12-07 2008-02-28 Brett Marl Network administration tool
CN103888294A (en) * 2014-02-28 2014-06-25 广州视睿电子科技有限公司 Method and device for assigning router in Android system
CN105071852A (en) * 2015-08-27 2015-11-18 杨珊珊 Intelligent relaying system and intelligent relaying method implemented by unmanned aerial vehicle
CN106231616A (en) * 2016-06-28 2016-12-14 上海斐讯数据通信技术有限公司 A kind of method configuring wireless relay and wireless router

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109618019A (en) * 2018-12-25 2019-04-12 深圳创维数字技术有限公司 Dynamic address allocation service configuration method, apparatus, equipment and storage medium
CN109618019B (en) * 2018-12-25 2021-10-22 深圳创维数字技术有限公司 Dynamic address allocation service configuration method, device, equipment and storage medium
CN110098968A (en) * 2019-05-20 2019-08-06 李德鱼 A kind of wired bridge joint of router realizes the automatic setting method of radio roaming
CN112217917A (en) * 2020-10-12 2021-01-12 深圳市友华软件科技有限公司 IP obtaining method and device for mounting terminal in bridge mode
CN113037652A (en) * 2021-03-24 2021-06-25 深圳市乙辰科技股份有限公司 Network connection method and device based on distributed networking system and computer equipment
CN113098797A (en) * 2021-03-24 2021-07-09 深圳市乙辰科技股份有限公司 Network connection method and device based on distributed networking system and computer equipment
CN113489618A (en) * 2021-09-06 2021-10-08 卡斯柯信号(北京)有限公司 Configuration method and device for three-layer routing of switch in railway system
CN115883349A (en) * 2021-09-26 2023-03-31 华为技术有限公司 Network configuration method, router, storage medium, and program product

Also Published As

Publication number Publication date
CN108989114B (en) 2021-08-06

Similar Documents

Publication Publication Date Title
CN108989114A (en) A kind of method and device configuring router
CN104243210B (en) The method and system of remote access router administration page
EP3151509B1 (en) Enhanced evpn mac route advertisement having mac (l2) level authentication, security and policy control
CN100440846C (en) Dynamic connection method for virtual private network
EP3151510B1 (en) Mac (l2) level authentication, security and policy control
CN103476023B (en) The collocation method of access point apparatus, access controller and communication system
US10263808B2 (en) Deployment of virtual extensible local area network
US9369448B2 (en) Network security parameter generation and distribution
EP2760174A1 (en) Virtual private cloud access authentication method and related apparatus
CN106134129A (en) Zero contact of the many tenants service in home network environment is disposed
CN107493297B (en) VxLAN tunnel access authentication method
CN106452857A (en) Method for generating configuration information and network control unit
CN101022340A (en) Intelligent control method for realizing city Ethernet exchanger switch-in security
CN107592270A (en) The treating method and apparatus and system of FlowSpec message
CN109691026A (en) Method and apparatus for updating multiple multiprotocol label switching (MPLS) two-way converting detection (BFD) sessions
WO2011147342A1 (en) Method, equipment and system for exchanging routing information
CN107547665A (en) A kind of method, equipment and the system of dhcp address distribution
CN104184708A (en) Method of inhabiting MAC address attack in EVI (Ethernet Virtualization Interconnection) network and ED (edge device)
US20190215191A1 (en) Deployment Of Virtual Extensible Local Area Network
CN106789725A (en) It is a kind of to realize the methods, devices and systems that flow is redirected
CN107820262A (en) Method for parameter configuration, apparatus and system
CN109412850A (en) Message subscribing control method and device
EP2890052A1 (en) Method and system for dynamic network configuration and access to services of devices
CN108809767A (en) MAC Address processing method, equipment and cascading networking system
ES2944621T3 (en) Technique for executing a service in a local network through an extended communication network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20230529

Address after: 310052 11th Floor, 466 Changhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: H3C INFORMATION TECHNOLOGY Co.,Ltd.

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

Patentee before: NEW H3C TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right