Method for automatically configuring router through ONU
Technical Field
The invention relates to the technical field of router configuration, in particular to a method for automatically configuring a router through an ONU.
Background
Fiber To The Home (FTTH) has become the mainstream internet broadband access technology worldwide. The China Internet broadband optical fiber access user is 4.75 hundred million households, and is mainly an optical fiber access user of China telecom operators (China telecom, China Mobile, China Unicom and China radio and television).
For a home user, an optical fiber to the home generally needs to be connected to a home information box, an Optical Network Unit (ONU) is placed in the home information box, and the ONU is connected to an Optical Line Terminal (OLT) through the optical fiber and an ODN network to complete physical network connection for broadband access.
An Optical Network Unit (ONU) placed in the household information box is connected with a WAN port of the wireless router device through a CAT5 network twisted pair by using an RJ45 network port, and the wireless router device completes household wireless signal and wired signal coverage through a WIFI antenna and an RJ45 LAN port.
An Optical Network Unit (ONU) is classified into a routing mode and a bridging mode according to its operation mode. The modes of configuring user internet authentication by an Optical Network Unit (ONU) in the two modes are different. In a routing mode of an Optical Network Unit (ONU), a WAN port of the ONU completes broadband access in three modes, namely PPPoE dialing, dynamic address acquisition and static address configuration. The PPPoE dialing mode needs to input a user name and a password generated by an operator broadband authentication server, and the IP addresses acquired by the three modes are different from the IP address network segment at the LAN port side of an Optical Network Unit (ONU). In the Optical Network Unit (ONU) bridging mode, the device is in the two-layer switch mode, and the three-layer forwarding function needs to be performed on the Optical Line Terminal (OLT) or the three-layer switch.
The household wireless router also has two working modes, including a route expanding mode and a bridging mode. The same working mode as an Optical Network Unit (ONU), the opening of the user broadband service and the access of the home wireless network require that the ONU and the home wireless router are respectively configured in different working modes and different IP address acquisition modes, the technical performance is strong, the common user can not finish the operation, and an operator needs to send a special operation and maintenance engineer to the user home to respectively configure the ONU and the home wireless router, so that the user broadband service opening and the home wireless access are finished. The method consumes operation and maintenance manpower and has higher time cost. And subsequent users move and update Optical Network Units (ONUs) and home wireless routers, which are inconvenient again.
Disclosure of Invention
In order to overcome the above-mentioned drawbacks of the prior art, the present invention provides a method for automatically configuring a router through an ONU, so as to solve the problems mentioned in the above background art.
The technical scheme adopted by the invention for solving the problems in the prior art is as follows: a method of automatically configuring a router by an ONU, comprising;
an optical network unit obtains authorization from an optical line terminal and obtains the working mode configuration of the optical network unit, wherein the working mode of the optical network unit is a routing mode or a bridging mode;
the ACS server sends login information or IP address information of broadband access to the optical network unit according to the working mode of the optical network unit;
the optical network unit sends configuration information of the optical network unit to a router, wherein the configuration information comprises a working mode of the optical network unit and login information or IP address information; and
the router self-configures the working mode of the router and the IP address obtaining mode of the WAN port according to the configuration information of the optical network unit.
It can be seen that the method can automatically complete the automatic configuration of the Optical Network Unit (ONU) and the router, and can greatly reduce the operation and maintenance cost of the telecom operator. The operation and maintenance personnel can complete the broadband signal coverage of the user family without going to the door, and the method is transparent to the user, and the user can complete the service opening only by connecting the Optical Network Unit (ONU) in the family with the household router by using the network cable. The user does not need to reserve operation and maintenance personnel of an operator through a telephone or a network, and can open and use the family wireless broadband access after waiting for a plurality of days.
As a preferred embodiment of the present invention, the ACS server sends login information or IP address information of broadband access to the optical network unit according to the working mode of the optical network unit, and further includes:
if the working mode configured by the optical network unit is a routing mode, the ACS server sends WAN port IP address acquisition mode configuration of the optical network unit to the optical network unit; and
and if the working mode configured by the optical network unit is the bridge mode, the ACS server sends the login information of the broadband access to the optical network unit.
As a preferred embodiment of the present invention, if the working mode of the optical network unit is the routing mode, the ACS server sends the WAN port IP address acquisition mode configuration of the optical network unit to the optical network unit, further comprising:
and the ACS server sends the WAN port IP address acquisition mode configuration of the optical network unit to the optical network unit through a TR069 protocol channel.
As a preferred embodiment of the present invention, if the working mode of the optical network unit is the bridge mode, the ACS server sends the login information of the broadband access to the optical network unit, further comprising:
and the ACS server sends the login information of the broadband access to the optical network unit through a TR069 protocol channel.
As a preferred scheme of the present invention, the configuration of the WAN port IP address acquisition mode of the onu includes dial-up acquisition or dynamic acquisition, wherein,
if the WAN port IP address of the optical network unit is obtained in a dialing mode, the ACS server matches login information of broadband access according to the characteristic information of the optical network unit and sends the login information to the optical network unit; and
and if the WAN port IP address of the optical network unit is obtained dynamically, the ACS server sends IP address information to the optical network unit.
As a preferred embodiment of the present invention, the sending, by the onu, configuration information of the onu to a router, where the configuration information includes an operating mode of the onu and login information or IP address information, and the sending includes:
if the working mode of the optical network unit is the bridge mode, the optical network unit sends login information to a router through a TR069 protocol channel, the router is self-configured into a routing mode according to the bridge mode of the optical network, configures a mode of acquiring an IP address from a WAN port of the router into dialing acquisition according to the login information, and fills the login information into the dialing acquisition configuration; and
if the working mode of the optical network unit is the routing mode, the router is also self-configured into the routing mode according to the routing mode of the optical network unit, the optical network unit sends IP address information to the router through a transmission protocol, and the router configures the mode of acquiring the IP address from the WAN port of the router into dynamic acquisition according to the IP address information.
As a preferred embodiment of the present invention, if the working mode of the optical network unit is a routing mode, the router is self-configured to the routing mode, and the optical network unit sends IP address information to the router through a transmission protocol, further comprising:
if the WAN port IP address acquisition mode of the optical network unit is dialing acquisition, the optical network unit fills the login information sent by the ACS server into dialing acquisition configuration and acquires IP address information, and the optical network unit sends the IP address information to a router through a transmission protocol;
and if the WAN port IP address of the optical network unit is obtained dynamically, the DHCP server at the lan port side of the optical network unit automatically distributes the IP address information sent by the ACS server to the router through a transmission protocol.
Preferably, the transmission protocol includes HTTP protocol, MQTT protocol, or ethernet.
As a preferred scheme of the present invention, the onu obtains authorization from an optical line terminal and obtains a working mode configuration of the onu, where the working mode of the onu is a routing mode or a bridging mode;
the ACS server sends the login information or the IP address information of the broadband access to the optical network unit according to the working mode of the optical network unit, and further includes:
and the optical network unit stores the working mode information and the login information or the IP address information into an optical network unit information notification configuration process file to form configuration information, reads the configuration information from the network unit information notification configuration process file through an optical network unit information notification configuration process, and sends the configuration information to the router.
As a preferred embodiment of the present invention, the router completes configuration of a WAN port for acquiring an IP address according to the configuration information of the onu, and further includes:
and the router self-configures the working mode of the router and the IP address obtaining mode of the WAN port according to the configuration information through the router self-configuration process.
As described above.
Drawings
FIG. 1 is a schematic diagram of a network system according to the present invention;
fig. 2 is a flowchart of a method for automatically configuring a router through an ONU according to the present invention.
Detailed Description
The following further describes embodiments of the present invention with reference to the drawings. It should be noted that the description of the embodiments is provided to help understanding of the present invention, but the present invention is not limited thereto.
In addition, the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
As shown in figure 1: the application provides a network system, which comprises an ACS server, a broadband access server, an optical line unit (OLT), an Optical Network Unit (ONU) and a router. The ACS server and the broadband access server are respectively connected with the optical line unit, for example, the ACS server and the broadband access server can be connected with the optical line unit through an optical fiber or a CAT5 network cable. The optical line unit is connected to the optical network unit, the optical network unit is connected to the router, for example, a PON port (WAN port) of the optical network unit is connected to the optical line unit through an optical fiber, and a WAN port of the router is connected to the optical network unit through a CAT5 network.
Furthermore, in some embodiments, the optical line unit may also be connected to the optical splitter through an optical fiber, and the plurality of groups of optical network units and routers are connected through the optical splitter.
Referring to fig. 2, the present application also provides a method for automatically configuring a router through an ONU, the method comprising the steps of:
step 100, an optical network unit obtains authorization from an optical line terminal and obtains a working mode configuration of the optical network unit, wherein the working mode of the optical network unit is a routing mode or a bridging mode.
After the optical network unit is powered on, a registration authentication request can be initiated to the optical line unit through a passive Ethernet protocol or a gigabit Ethernet protocol, after the authentication request is authorized by the optical line unit, the optical line unit can send a working mode configuration to the optical network unit through an OAM message or an OMCI message, the optical network unit configures the working mode into a routing mode or a bridging mode according to the message, and simultaneously stores the working mode information into an optical network unit information notification configuration process file (ONU router autoconfig file).
Step 200, the ACS server sends the login information or the IP address information of the broadband access to the optical network unit according to the working mode of the optical network unit.
In some embodiments, the ACS server sends login information for broadband access to the optical network unit according to its operating mode. The login information may include a user name and a password.
The ACS server can send login information or IP address information of broadband access to the optical network unit through a TR069 protocol channel according to the working mode of the optical network unit, and the optical network unit stores the login information or the IP address information to an optical network unit information notification configuration process file.
Further, if the working mode configured by the optical network unit according to the message sent by the optical line unit is the routing mode, the ACS server sends the WAN port IP address acquisition mode configuration of the optical network unit to the optical network unit.
The WAN port IP address acquisition mode comprises dialing acquisition or dynamic acquisition. In some embodiments, the dial acquisition may be a PPPoE dial acquisition; the dynamic acquisition may be an IP address dynamic acquisition.
When the ACS server sends the WAN port IP address acquisition mode of the optical network unit to be configured to dial for acquisition, the ACS server matches login information of broadband access according to the characteristic information of the optical network unit and sends the login information to the optical network unit, and the optical network unit stores the login information in an optical network unit information notification configuration process file. In some embodiments, the characteristic information of the optical network unit may be an SN number or MAC address information of the optical network unit.
And when the WAN port IP address of the optical network unit is obtained dynamically, the ACS server sends the IP address information to the optical network unit, and the optical network unit stores the IP address information to an optical network unit information notification configuration process file.
Further, if the working mode configured by the optical network unit is the bridge mode, the ACS server sends the login information of the broadband access to the optical network unit. The login information may include a user name and a password.
Specifically, after the ACS server sends the login information of the broadband access to the optical network unit, the optical network unit stores the login information in an optical network unit information notification configuration process file.
Step 300, the onu sends configuration information of the onu to a router, where the configuration information includes a working mode of the onu and login information or IP address information.
For example, the optical network unit may store the operating mode information, and the login information or the IP address information in an optical network unit information advertisement configuration process file to form configuration information, and the optical network unit reads the configuration information from the network unit information advertisement configuration process file through an optical network unit information advertisement configuration process and sends the configuration information to the router.
And if the working mode of the optical network unit is the bridge mode, the optical network unit sends login information to the router through a TR069 protocol channel.
And if the working mode of the optical network unit is the routing mode, the optical network unit transmits IP address information to the router through a transmission protocol. Wherein, the transmission protocol comprises HTTP protocol, MQTT protocol or Ethernet.
Specifically, when the WAN port IP address of the optical network unit is obtained by dialing, the optical network unit fills the login information sent by the ACS server into a dialing obtaining configuration and obtains IP address information, and the optical network unit sends the IP address information to a router through a transmission protocol.
And when the WAN port IP address of the optical network unit is obtained dynamically, the DHCP server at the lan port side of the optical network unit automatically distributes the IP address information sent by the ACS server to the router through a transmission protocol.
Step 400, the router self-configures the working mode of the router and the mode of obtaining the IP address of the WAN port according to the configuration information of the optical network unit.
For example, the router can self-configure the working mode of the router and the IP address obtaining mode of the WAN port according to the configuration information through the router self-configuration process.
If the working mode of the onu in step 300 is the bridge mode, the onu sends login information to the router through the TR069 protocol channel. The router is self-configured into a routing mode according to the bridge mode of the optical network unit, configures the mode of acquiring the IP address of the WAN port of the router into dialing acquisition according to the login information, and fills the login information sent by the optical network unit into the dialing acquisition configuration.
It can be understood that after the login information sent by the optical network unit is filled in the dial-up obtaining configuration of the router, the router can initiate an authentication process to the broadband access server, and after the broadband access server completes authentication, the router obtains the IP address information of the WAN port, that is, a user can access the internet through the router.
If the working mode of the onu in step 300 is the routing mode, the router also configures itself to the routing mode according to the routing mode of the onu, the onu sends IP address information to the router through a transport protocol, and the router configures a way of acquiring an IP address from a WAN port of the router to be dynamically acquired according to the IP address information. The transmission protocol may be HTTP protocol, MQTT protocol, or ethernet.
Further, when the working mode of the optical network unit is a routing mode and if the WAN port IP address acquisition mode of the optical network unit is dial acquisition, the optical network unit fills the login information sent by the ACS server into dial acquisition configuration and acquires IP address information, and the optical network unit sends the IP address information to a router through a transmission protocol.
It can be understood that after the optical network unit fills the login information sent by the ACS server into the dial-up acquisition configuration, the optical network unit may initiate an authentication procedure to the broadband access server, and after the broadband access server completes authentication, the optical network unit acquires the IP address information and sends the IP address information to the router, and the router acquires the IP address information and can access the internet.
And when the WAN port IP address of the optical network unit is obtained dynamically, the DHCP server at the lan port side of the optical network unit automatically distributes the IP address information sent by the ACS server to the router through a transmission protocol, and the router can access the Internet after obtaining the IP address information.
It can be seen that the method can automatically complete the automatic configuration of the Optical Network Unit (ONU) and the router, and can greatly reduce the operation and maintenance cost of the telecom operator. The operation and maintenance personnel can complete the broadband signal coverage of the user family without going to the door, and the method is transparent to the user, and the user can complete the service opening only by connecting the Optical Network Unit (ONU) in the family with the household router by using the network cable. The user does not need to reserve operation and maintenance personnel of an operator through a telephone or a network, and can open and use the family wireless broadband access after waiting for a plurality of days.
Finally, it should be noted that: although the present invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments described in the foregoing embodiments, or that certain features may be replaced by equivalents thereof; any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.