技术领域technical field
本发明涉及网络通讯技术领域,特别是涉及一种调整家庭网关桥端口下设备配置的方法及装置。The invention relates to the technical field of network communication, in particular to a method and a device for adjusting equipment configuration under a bridge port of a home gateway.
背景技术Background technique
IPv4(Internet Protocol version 4,网际协议版本4)是互联网协议的第四版,也是第一个被广泛使用,构成现今互联网技术的基石的协议。随着IPv4地址的耗尽以及使用IP地址的设备越来越多,出现了下一代互联网协议IPv6(Internet Protocol Version 6,网际协议版本6),IPv6是IETF(InternetEngineering Task Force,互联网工程任务组)设计的用于替代现行版本IP协议(IPv4)的下一代IP协议。IPv6的设计被认为是IPv4革命性的一步,它继承、保留、修改、完善和扩展了IPv4协议,能够无限地增加IP(Internet Protocol,互联网协议)网络数量,拥有巨大的地址空间和卓越的网络安全等特点,不仅能够满足互联网飞速发展的需求,即插即用的接入方式、网络层的认证与加密、对服务质量和移动IP的支持,使其成为构造下一代互联网络的最佳选择。而用于将家庭网络和Internet连接起来的家庭网关在支持IPv6后,由于各种业务开展的需要,需要对家庭网关的LAN(Local Area Network,局域网)侧的桥端口和WAN(Wide Area Network,广域网)侧的WAN连接进行绑定,桥端口下的设备访问Internet时可以走不同WAN连接,从而开展各种各样的业务。在动态改变这些绑定关系后,由于绑定所做的工作仅仅是控制报文在桥内的转发,而桥端口下设备的网络参数如缺省路由、DNS(Domain Name System,域名系统)以及全局地址等都没有被及时更新,需要手动配置或者重启设备,增加了桥端口下设备使用网络的复杂度,以及给客户带来了不便。IPv4 (Internet Protocol version 4, Internet Protocol version 4) is the fourth version of the Internet protocol, and it is also the first widely used protocol that constitutes the cornerstone of today's Internet technology. With the exhaustion of IPv4 addresses and more and more devices using IP addresses, the next generation of Internet Protocol IPv6 (Internet Protocol Version 6, Internet Protocol Version 6) has emerged. IPv6 is an IETF (InternetEngineering Task Force, Internet Engineering Task Force) A next-generation IP protocol designed to replace the current version of the IP protocol (IPv4). The design of IPv6 is considered to be a revolutionary step of IPv4. It inherits, retains, modifies, improves and expands the IPv4 protocol, and can increase the number of IP (Internet Protocol, Internet Protocol) networks infinitely. It has a huge address space and excellent network Features such as security can not only meet the needs of the rapid development of the Internet, plug-and-play access methods, authentication and encryption at the network layer, support for quality of service and mobile IP, making it the best choice for constructing the next generation Internet . After the home gateway used to connect the home network and the Internet supports IPv6, due to the needs of various business development, it is necessary to check the bridge port on the LAN (Local Area Network, local area network) side of the home gateway and the WAN (Wide Area Network, The WAN connections on the WAN) side are bound, and the devices under the bridge port can use different WAN connections when accessing the Internet, so as to carry out various services. After dynamically changing these binding relationships, because the work done by the binding is only to control the forwarding of messages in the bridge, the network parameters of the devices under the bridge port, such as default routing, DNS (Domain Name System, Domain Name System) and The global address and so on have not been updated in time, requiring manual configuration or restarting the device, which increases the complexity of using the network for devices under the bridge port and brings inconvenience to customers.
发明内容Contents of the invention
本发明要解决的技术问题是提供一种调整家庭网关桥端口下设备配置的方法及装置,用以解决现有技术在桥端口与WAN连接的绑定关系发生变化后,需要手动配置桥端口下设备的网络参数或者重启设备的问题。The technical problem to be solved by the present invention is to provide a method and device for adjusting the configuration of devices under the bridge port of the home gateway, which is used to solve the problem of manual configuration of the device under the bridge port after the binding relationship between the bridge port and the WAN connection changes in the prior art. The network parameters of the device or the problem of restarting the device.
为解决上述技术问题,一方面,本发明提供一种调整家庭网关桥端口下设备配置的方法,所述方法包括以下步骤:In order to solve the above-mentioned technical problems, on the one hand, the present invention provides a method for adjusting the device configuration under the home gateway bridge port, the method includes the following steps:
当家庭网关桥端口与WAN连接的绑定关系发生变化时,根据绑定关系发生变化的情况,发送包含有配置信息的路由器通告报文;When the binding relationship between the home gateway bridge port and the WAN connection changes, send a router advertisement message containing configuration information according to the changing situation of the binding relationship;
家庭网关桥端口下设备接收所述路由器通告报文,根据所述路由器通告报文,对其网络参数进行配置。The device under the bridge port of the home gateway receives the router advertisement message, and configures its network parameters according to the router advertisement message.
进一步,根据绑定关系发生变化的情况,发送包含有配置信息的路由器通告报文,具体为:Further, according to the change of the binding relationship, a router advertisement message containing configuration information is sent, specifically:
当绑定关系改变前后WAN连接均为路由连接时,缺省路由时间为设定时间,源地址使用桥的地址;将在绑定关系改变前从WAN连接获取的DNS信息和前缀信息都设置无效标志,并包含在所述路由器通告报文中;将在绑定关系改变后从WAN连接获取的DNS信息和前缀信息包含在所述路由器通告报文中;在该桥端口上以组播形式发送所述路由器通告报文,发送设定次数之后,从所述路由器通告报文中将在绑定关系改变前从WAN连接获取的DNS信息和前缀信息去掉,继续发送所述路由器通告报文。When the WAN connection is a routing connection before and after the binding relationship is changed, the default routing time is the set time, and the source address uses the address of the bridge; the DNS information and prefix information obtained from the WAN connection before the binding relationship is changed are invalid. flag, and included in the router advertisement message; the DNS information and prefix information obtained from the WAN connection after the binding relationship is changed are included in the router advertisement message; sent in multicast form on the bridge port After the router advertisement message is sent for a set number of times, the DNS information and prefix information obtained from the WAN connection before the binding relationship is changed are removed from the router advertisement message, and the router advertisement message is continued to be sent.
进一步,根据绑定关系发生变化的情况,发送包含有配置信息的路由器通告报文,具体为:Further, according to the change of the binding relationship, a router advertisement message containing configuration information is sent, specifically:
当绑定关系改变前WAN连接是桥接方式,而绑定关系改变后WAN连接是路由连接时,所述路由器通告报文包括第一路由器通告报文和第二路由器通告报文;When the WAN connection is a bridging mode before the binding relationship is changed, and the WAN connection is a routing connection after the binding relationship is changed, the router advertisement message includes a first router advertisement message and a second router advertisement message;
将在绑定关系改变前从WAN连接监控到的DNS信息、缺省路由时间和前缀信息设置无效标志,并包含在所述第一路由器通告报文中;在该桥端口上以组播形式发送所述第一路由器通告报文,发送设定次数之后停止;Set the invalid flag on the DNS information, default routing time and prefix information monitored from the WAN connection before the binding relationship is changed, and include it in the first router advertisement message; send it in multicast form on the bridge port The first router advertisement message stops after sending a set number of times;
所述第二路由器通告报文包括在绑定关系改变后从WAN连接获取的DNS信息和前缀信息;源地址使用桥的地址,缺省路由时间为设定时间,在该桥端口上以组播形式发送所述第二路由器通告报文。The second router advertisement message includes DNS information and prefix information obtained from the WAN connection after the binding relationship is changed; the source address uses the address of the bridge, and the default routing time is the set time, and the bridge port is multicast Send the second router advertisement message in the form of.
进一步,根据绑定关系发生变化的情况,发送包含有配置信息的路由器通告报文,具体为:Further, according to the change of the binding relationship, a router advertisement message containing configuration information is sent, specifically:
当绑定关系改变前WAN连接是路由连接,而绑定关系改变后WAN连接是桥接方式时,将绑定关系改变前的DNS信息、缺省路由时间和前缀信息设置无效标志,并包含在所述路由器通告报文中;源地址是桥的地址,在该桥端口上以组播形式发送所述路由器通告报文,发送设定次数之后停止。When the WAN connection is a routing connection before the binding relationship is changed, and the WAN connection is a bridge connection after the binding relationship is changed, set the invalid flag for the DNS information, default routing time and prefix information before the binding relationship is changed, and include it in all In the router advertisement message; the source address is the address of the bridge, and the router advertisement message is sent in multicast form on the bridge port, and stops after sending a set number of times.
进一步,根据绑定关系发生变化的情况,发送包含有配置信息的路由器通告报文,具体为:Further, according to the change of the binding relationship, a router advertisement message containing configuration information is sent, specifically:
当绑定关系改变前后WAN连接都是桥接方式时,将在绑定关系改变前从WAN连接监控到的DNS信息、缺省路由时间和前缀信息设置无效标志,并包含在所述路由器通告报文中;在该桥端口上以组播形式发送所述路由器通告报文,发送设定次数之后停止。When the WAN connection is in bridging mode before and after the binding relationship is changed, the DNS information, default routing time and prefix information monitored from the WAN connection before the binding relationship is changed will be set with an invalid flag, and included in the router advertisement message Medium; send the router advertisement message in the form of multicast on the bridge port, and stop after sending the set number of times.
进一步,还包括:Further, it also includes:
在桥上接收路由器请求报文,获取接收所述路由器请求报文的桥端口,当前绑定的是路由连接,在该桥端口以组播形式发送路由器通告报文进行回复。Receive the router request message on the bridge, obtain the bridge port receiving the router request message, and currently bind the router connection, and send a router advertisement message in multicast form on the bridge port to reply.
进一步,所述器通告报文的源地址是桥的地址,报文中的DNS信息地址和前缀信息是从当前绑定的WAN连接获取的DNS信息和前缀信息。Further, the source address of the router notification message is the address of the bridge, and the DNS information address and prefix information in the message are DNS information and prefix information obtained from the currently bound WAN connection.
另外,本发明还提供一种调整家庭网关桥端口下设备配置的装置,所述装置包括:In addition, the present invention also provides a device for adjusting the device configuration under the home gateway bridge port, the device includes:
绑定关系管理模块,用于监控家庭网关桥端口和WAN连接之间的绑定关系;A binding relationship management module, configured to monitor the binding relationship between the home gateway bridge port and the WAN connection;
路由器通告模块,用于当家庭网关桥端口与WAN连接的绑定关系发生变化时,根据绑定关系发生变化的情况,发送包含有配置信息的路由器通告报文;The router notification module is used to send a router notification message containing configuration information according to the change in the binding relationship when the binding relationship between the home gateway bridge port and the WAN connection changes;
家庭网关桥端口下设备接收所述路由器通告报文,根据所述路由器通告报文,对其网络参数进行配置。The device under the bridge port of the home gateway receives the router advertisement message, and configures its network parameters according to the router advertisement message.
进一步,所述装置还包括:桥内WAN接口路由器通告报文监控模块,用于监控桥接类型的WAN连接上的路由器通告报文,保存所述路由器通告报文中的DNS信息、前缀信息以及缺省路由时间,并清除带有无效标志的DNS信息、前缀信息或缺省路由时间;Further, the device also includes: a router advertisement message monitoring module of the WAN interface in the bridge, which is used to monitor the router advertisement message on the WAN connection of the bridge type, and save the DNS information, prefix information and missing information in the router advertisement message. Save routing time, and clear DNS information, prefix information or default routing time with invalid flags;
DNS管理模块,用于收集各个路由类型的WAN连接上获取的DNS信息;A DNS management module, configured to collect DNS information obtained on WAN connections of various routing types;
前缀管理模块,用于收集各个路由类型的WAN连接上获取的前缀信息。The prefix management module is configured to collect prefix information obtained on WAN connections of various route types.
进一步,所述路由器通告模块在桥上接收路由器请求报文,获取接收所述路由器请求报文的桥端口,如果当前绑定的是路由连接,在该桥端口以组播形式发送路由器通告报文进行回复;所述路由器通告报文的源地址是桥的地址,报文中的DNS信息和前缀信息是在当前绑定的WAN连接获取的DNS信息和前缀信息。Further, the router advertisement module receives the router request message on the bridge, obtains the bridge port receiving the router request message, and if the current binding is a routing connection, sends the router advertisement message in multicast form on the bridge port Reply; the source address of the router advertisement message is the address of the bridge, and the DNS information and prefix information in the message are the DNS information and prefix information obtained from the currently bound WAN connection.
本发明有益效果如下:The beneficial effects of the present invention are as follows:
本发明在家庭网关改变桥端口和WAN侧连接的绑定关系后,利用路由器通告的特点,自动更新桥端口下设备的网络参数;降低了桥端口下设备使用网络的复杂度,提升了用户体验。After the home gateway changes the binding relationship between the bridge port and the WAN side connection, the invention uses the characteristics of the router notification to automatically update the network parameters of the device under the bridge port; reduces the complexity of using the network for the device under the bridge port, and improves user experience .
附图说明Description of drawings
图1是本发明实施例中一种调整家庭网关桥端口下设备配置的方法的流程图;Fig. 1 is a flow chart of a method for adjusting device configuration under a home gateway bridge port in an embodiment of the present invention;
图2是本发明实施例中一种调整家庭网关桥端口下设备配置的装置的结构示意图;FIG. 2 is a schematic structural diagram of a device for adjusting device configuration under a home gateway bridge port in an embodiment of the present invention;
图3是本发明实施例中一种家庭网关桥端口和WAN连接的绑定关系变化前系统的组网图;FIG. 3 is a network diagram of the system before the binding relationship between a home gateway bridge port and a WAN connection changes in an embodiment of the present invention;
图4是本发明实施例中一种家庭网关桥端口和WAN连接的绑定关系变化后系统的组网图。Fig. 4 is a network diagram of the system after the binding relationship between the home gateway bridge port and the WAN connection is changed in the embodiment of the present invention.
具体实施方式Detailed ways
为了解决现有技术在桥端口与WAN连接的绑定关系发生变化后,需要手动配置桥端口下设备的网络参数或者重启设备的问题,本发明提供了一种调整家庭网关桥端口下设备配置的方法及装置,以下结合附图以及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不限定本发明。In order to solve the problem in the prior art that after the binding relationship between the bridge port and the WAN connection changes, it is necessary to manually configure the network parameters of the device under the bridge port or restart the device, the present invention provides a method for adjusting the configuration of the device under the bridge port of the home gateway The method and device will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
如图1所示,本发明实施例涉及一种调整家庭网关桥端口下设备配置的方法,方法包括以下步骤:As shown in Figure 1, the embodiment of the present invention relates to a method for adjusting the device configuration under the home gateway bridge port, the method includes the following steps:
步骤S101,当家庭网关桥端口与WAN连接的绑定关系发生变化时,根据绑定关系发生变化的情况,发送包含有配置信息的路由器通告报文;配置信息包括DNS信息、缺省路由时间和前缀信息。路由器通告报文中包括绑定关系改变前的DNS信息(DNS地址)、缺省路由时间和前缀信息(前缀的首选时间和有效时间),并给上述信息设置无效标志;对于绑定关系改变后WAN连接是路由连接的,路由器通告报文中还包括在绑定关系改变后从WAN连接获取的DNS信息和前缀信息。Step S101, when the binding relationship between the home gateway bridge port and the WAN connection changes, according to the changing situation of the binding relationship, send a router advertisement message containing configuration information; the configuration information includes DNS information, default routing time and prefix information. The router advertisement message includes the DNS information (DNS address) before the binding relationship is changed, the default routing time and prefix information (preferred time and valid time of the prefix), and sets the invalid flag for the above information; The WAN connection is a routing connection, and the router advertisement message also includes DNS information and prefix information obtained from the WAN connection after the binding relationship is changed.
步骤S102,家庭网关桥端口下设备接收所述路由器通告报文,根据所述路由器通告报文,对其网络参数进行配置。网络参数是指家庭网关桥端口下设备的DNS、缺省路由和前缀等参数。对于绑定关系改变后WAN连接是路由连接的,利用路由器通告的特点,自动更新桥端口下设备的网络参数;对于绑定关系改变后WAN连接是桥接方式的,家庭网关桥端口下设备可以自动更新网络参数。Step S102, the device under the bridge port of the home gateway receives the router advertisement message, and configures its network parameters according to the router advertisement message. Network parameters refer to parameters such as DNS, default route, and prefix of the device under the bridge port of the home gateway. If the WAN connection is routed after the binding relationship is changed, the network parameters of the device under the bridge port will be automatically updated by using the characteristics of the router notification; if the WAN connection is bridged after the binding relationship is changed, the device under the bridge port of the home gateway can be automatically updated. Update network parameters.
在上述步骤S101中,当绑定关系改变前后WAN连接均为路由连接时,路由器通告报文中的缺省路由时间时间为设定时间,源地址为桥的地址;将在绑定关系改变前从WAN连接获取的DNS信息和前缀信息都设置无效标志,并包含在路由器通告报文中;将在绑定关系改变后从WAN连接获取的DNS信息和前缀信息包含在路由器通告报文中;在该桥端口上以组播形式发送路由器通告报文,发送设定次数(可配置,默认为2次)之后,从路由器通告报文中将在绑定关系改变前从WAN连接获取的DNS信息和前缀信息去掉,继续发送路由器通告报文。对DNS信息和前缀信息都设置无效标志,可以通过将DNS信息和前缀信息设置为0(二进制)来实现,以下无效标志的设置,也可以采用该方法,也可以采用其它方法。In the above step S101, when the WAN connection before and after the binding relationship is changed is a routing connection, the default routing time in the router advertisement message is the set time, and the source address is the address of the bridge; The DNS information and prefix information obtained from the WAN connection are all set with an invalid flag and included in the router advertisement message; the DNS information and prefix information obtained from the WAN connection after the binding relationship is changed are included in the router advertisement message; The router advertisement message is sent in multicast form on the bridge port. After sending the set number of times (configurable, the default is 2 times), the DNS information obtained from the WAN connection before the binding relationship is changed and the DNS information and The prefix information is removed, and the router advertisement message is continued to be sent. Setting the invalid flag for both the DNS information and the prefix information can be realized by setting the DNS information and the prefix information to 0 (binary). The setting of the following invalid flags can also use this method or other methods.
在上述步骤S101中,当绑定关系改变前WAN连接是桥接方式,而绑定关系改变后WAN连接是路由连接时,路由器通告报文包括第一路由器通告报文和第二路由器通告报文;首先获取绑定关系改变前的WAN连接上监控到的路由器通告报文信息,该信息包括包括源地址、DNS信息以及前缀信息,根据这些信息,构造第一路由器通告报文,且将在绑定关系改变前从WAN连接获取的DNS信息、缺省路由时间和前缀信息设置无效标志,并包含在第一路由器通告报文中;在该桥端口上以组播形式定期发送第一路由器通告报文,发送设定次数(可配置,默认为2次)之后停止;同时,将在绑定关系改变后从WAN连接获取的DNS信息和前缀信息包含在第二路由器通告报文,源地址使用桥的地址,在该桥端口上以组播形式定期发送第二路由器通告报文。In the above step S101, when the WAN connection is a bridge connection before the binding relationship is changed, and the WAN connection is a routing connection after the binding relationship is changed, the router advertisement message includes a first router advertisement message and a second router advertisement message; First obtain the router advertisement message information monitored on the WAN connection before the binding relationship is changed, this information includes source address, DNS information and prefix information, according to these information, construct the first router advertisement message, and will be in the binding The DNS information, default routing time and prefix information obtained from the WAN connection before the relationship is changed are set with an invalid flag and included in the first router advertisement message; the first router advertisement message is regularly sent in multicast form on the bridge port , stop after sending the set number of times (configurable, 2 times by default); at the same time, include the DNS information and prefix information obtained from the WAN connection after the binding relationship is changed in the second router advertisement message, and the source address uses the bridge's address, and periodically send the second router advertisement message in multicast form on the bridge port.
在上述步骤S101中,当绑定关系改变前WAN连接是路由连接,而绑定关系改变后WAN连接是桥接方式时,将在绑定关系改变前从WAN连接获取的DNS信息和前缀信息设置无效标志,缺省路由的时间设置为无效标志,并包含在路由器通告报文中。报文中含有一个字段lifetime,即缺省路由时间,0表示无效。当设备看到该字段不是0时,将报文的源地址取出来,作为缺省路由。源地址是桥的地址,在该桥端口上以组播形式发送路由器通告报文,发送设定次数(可配置,默认为2次)之后停止。In the above step S101, when the WAN connection is a routing connection before the binding relationship is changed, and the WAN connection is a bridge connection after the binding relationship is changed, the DNS information and prefix information obtained from the WAN connection before the binding relationship is changed are invalid. flag, the time of the default route is set to an invalid flag, and included in the router advertisement message. The message contains a field lifetime, which is the default routing time, and 0 means invalid. When the device sees that this field is not 0, it extracts the source address of the packet as the default route. The source address is the address of the bridge, and the router advertisement message is sent in multicast form on the bridge port, and stops after sending the set number of times (configurable, 2 times by default).
在上述步骤S101中,当绑定关系改变前后WAN连接都是桥接方式时,首先获取绑定关系改变前的WAN连接上监控到的路由器通告报文信息,该信息包括包括源地址、DNS信息以及前缀信息,根据这些信息,构造第一路由器通告报文,且将在绑定关系改变前从WAN连接获取的DNS信息、缺省路由时间和前缀信息设置无效标志,并包含在路由器通告报文中;在该桥端口上以组播形式发送路由器通告报文,发送设定次数(可配置,默认为2次)之后停止。In the above step S101, when the WAN connection before and after the binding relationship is changed is in the bridging mode, first obtain the router advertisement message information monitored on the WAN connection before the binding relationship is changed, the information includes source address, DNS information and Prefix information, based on these information, construct the first router advertisement message, and set the invalid flag on the DNS information, default routing time and prefix information obtained from the WAN connection before the binding relationship is changed, and include it in the router advertisement message ;Send router advertisement messages in multicast form on the bridge port, and stop after sending the set number of times (configurable, 2 times by default).
另外,家庭网关在桥上接收路由器请求报文,获取接收路由器请求报文的桥端口,当前绑定的WAN连接是路由连接时,在该桥端口以组播形式发送路由器通告报文进行回复;当前绑定的WAN连接是桥连接时,对该路由器请求报文不响应。器通告报文的源地址是桥的地址,报文中的DNS信息地址和前缀信息是在绑定关系改变后从WAN连接获取的DNS信息和前缀信息。In addition, the home gateway receives the router request message on the bridge, obtains the bridge port that receives the router request message, and when the currently bound WAN connection is a routing connection, sends a router notification message in multicast form on the bridge port to reply; When the currently bound WAN connection is a bridge connection, it does not respond to the router solicitation message. The source address of the router notification message is the address of the bridge, and the DNS information address and prefix information in the message are the DNS information and prefix information obtained from the WAN connection after the binding relationship is changed.
如图2所示,本发明实施例还涉及一种调整家庭网关桥端口下设备配置的装置,该装置包括:As shown in Figure 2, the embodiment of the present invention also relates to a device for adjusting the device configuration under the home gateway bridge port, the device includes:
绑定关系管理模块202,用于监控家庭网关桥端口和WAN连接之间的绑定关系;A binding relationship management module 202, configured to monitor the binding relationship between the home gateway bridge port and the WAN connection;
路由器通告模块201,用于当家庭网关桥端口与WAN连接的绑定关系发生变化时,根据绑定关系发生变化的情况,发送包含有配置信息的路由器通告报文;The router notification module 201 is used to send a router notification message containing configuration information according to the situation of the binding relationship changing when the binding relationship between the home gateway bridge port and the WAN connection changes;
家庭网关桥端口下设备接收所述路由器通告报文,根据所述路由器通告报文,对其网络参数进行配置。The device under the bridge port of the home gateway receives the router advertisement message, and configures its network parameters according to the router advertisement message.
另外,该装置还包括:桥内WAN接口路由器通告报文监控模块203、DNS管理模块204和前缀管理模块205。In addition, the device also includes: a monitoring module 203 of WAN interface router advertisement messages in the bridge, a DNS management module 204 and a prefix management module 205 .
其中,路由器通告模块201负责根据绑定关系管理模块202提供的绑定信息在指定的桥端口上以组播形式定期发送包含配置信息(DNS、前缀以及缺省路由)的路由器通告报文;同时,在桥上接收路由器请求报文,并找出接收路由器请求报文的原始桥端口,并在该桥端口上以组播形式回复包含配置信息(DNS、前缀以及缺省路由)的路由器通告报文。Wherein, the router advertisement module 201 is responsible for regularly sending the router advertisement message containing the configuration information (DNS, prefix and default route) in multicast form on the specified bridge port according to the binding information provided by the binding relationship management module 202; , receive the router solicitation message on the bridge, find out the original bridge port receiving the router solicitation message, and reply the router advertisement report containing the configuration information (DNS, prefix and default route) in multicast form on the bridge port arts.
绑定关系管理模块202主要负责记录桥端口和WAN连接的绑定关系,并提供查询接口供其它模块查询,以及在绑定关系发生改变后通知相关模块。The binding relationship management module 202 is mainly responsible for recording the binding relationship between the bridge port and the WAN connection, providing a query interface for other modules to query, and notifying the relevant modules when the binding relationship changes.
桥内WAN接口路由器通告报文监控模块203负责监控桥接类型的WAN连接上的路由器通告报文,将其中DNS信息、前缀信息以及缺省路由时间提取出来保存,并提供查询接口供其它模块查询。如果监控到该WAN连接上的路由器通告将DNS、前缀或者缺省路由的时间设置为0时,将记录中对应的信息清除;否则记录下来,可能会存在多条记录。The WAN interface router advertisement message monitoring module 203 in the bridge is responsible for monitoring the router advertisement message on the bridge type WAN connection, extracting and saving DNS information, prefix information and default routing time, and providing a query interface for other modules to query. If it is monitored that the router advertisement on the WAN connection sets the time of DNS, prefix or default route to 0, clear the corresponding information in the record; otherwise, there may be multiple records.
DNS管理模块204负责收集各个路由类型的WAN连接上获取的DNS信息,提供查询接口供其它模块查询,并在DNS信息发生变化后通知相关模块。The DNS management module 204 is responsible for collecting DNS information obtained from WAN connections of various routing types, providing query interfaces for other modules to query, and notifying relevant modules when DNS information changes.
前缀管理模块205负责收集各个路由类型的WAN连接上获取的前缀信息,提供查询接口供其它模块查询,并在前缀信息发生变化后通知相关模块。The prefix management module 205 is responsible for collecting the prefix information acquired on the WAN connection of each route type, providing a query interface for other modules to query, and notifying the relevant modules after the prefix information changes.
下面,以具体实例对该装置各模块的功能进行介绍。In the following, the functions of each module of the device will be introduced with specific examples.
如图3所示,图中,WAN侧连接WAN1、WAN2是路由连接,WAN3是桥接方式。As shown in Figure 3, in the figure, the WAN side is connected to WAN1 and WAN2 by routing, and WAN3 is bridged.
桥端口eth0接PC1,绑定走WAN1,PC1的缺省网关是桥的地址;PC1的DNS地址是WAN1上获取的DNS地址;PC1全局地址的前缀是WAN1上获取的前缀,以上信息都是通过路由器通告方式获取。The bridge port eth0 is connected to PC1 and bound to WAN1. The default gateway of PC1 is the address of the bridge; the DNS address of PC1 is the DNS address obtained from WAN1; the prefix of the global address of PC1 is the prefix obtained from WAN1. The above information is obtained through Obtained by router advertisement.
桥端口eth1接PC2,绑定走WAN2,PC2的缺省网关是桥的地址;PC2的DNS地址是WAN2上获取的DNS地址;PC2全局地址的前缀是WAN2上获取的前缀,以上信息都是通过路由器通告方式获取。The bridge port eth1 is connected to PC2 and bound to WAN2. The default gateway of PC2 is the address of the bridge; the DNS address of PC2 is the DNS address obtained from WAN2; the prefix of the global address of PC2 is the prefix obtained from WAN2. The above information is obtained through Obtained by router advertisement.
桥端口eth2接PC3,绑定走WAN3,PC3的缺省网关是WAN3上路由器通告中的地址;PC3的DNS地址是WAN3上路由器通告中携带的DNS地址,PC3的全局地址采用无状态地址自动配置,前缀来之WAN3上路由器通告中。The bridge port eth2 is connected to PC3, bound to WAN3, the default gateway of PC3 is the address in the router advertisement on WAN3; the DNS address of PC3 is the DNS address carried in the router advertisement on WAN3, and the global address of PC3 adopts stateless address automatic configuration , the prefix comes from the router advertisement on WAN3.
绑定关系变化前,参与模块的工作情况:路由器通告模块从绑定关系管理模块获取桥端口和WAN连接绑定情况,分别从DNS管理模块和前缀管理模块获取DNS地址和前缀信息。Before the binding relationship changes, the working conditions of the participating modules: the router notification module obtains the binding status of the bridge port and WAN connection from the binding relationship management module, and obtains the DNS address and prefix information from the DNS management module and the prefix management module respectively.
路由器通告模块在桥端口eth0上以组播的形式定时发送路由器通告,通告中的源地址是桥的地址,报文中包含的DNS地址和前缀是从WAN1上获取的DNS地址和前缀。The router notification module regularly sends router notifications in the form of multicast on the bridge port eth0. The source address in the notification is the address of the bridge, and the DNS address and prefix contained in the message are the DNS addresses and prefixes obtained from WAN1.
路由器通告模块在桥端口eth1上以组播的形式定时发送路由器通告,通告中的源地址是桥的地址,报文中包含的DNS地址和前缀是从WAN2上获取的DNS地址和前缀。The router notification module regularly sends router notifications in the form of multicast on the bridge port eth1. The source address in the notification is the address of the bridge, and the DNS address and prefix contained in the message are the DNS addresses and prefixes obtained from WAN2.
路由器通告模块在桥上接收路由器请求报文,并找出原始接收到报文的桥端口,如果来之桥端口eth0,以组播形式的路由器通告响应,通告中的源地址是桥的地址,报文中包含的DNS地址和前缀是从WAN1上获取的DNS地址和前缀;如果来之eth1,以组播形式的路由器通告响应,通告中的源地址是桥的地址,报文中包含的DNS地址和前缀是从WAN2上获取的DNS地址和前缀;如果来之eth2,不响应。The router advertisement module receives the router request message on the bridge, and finds out the bridge port that originally received the message. If it comes from the bridge port eth0, it responds with a multicast router advertisement. The source address in the advertisement is the address of the bridge. The DNS address and prefix contained in the message are the DNS address and prefix obtained from WAN1; if it comes from eth1, it responds with a multicast router advertisement, the source address in the advertisement is the address of the bridge, and the DNS address contained in the message The address and prefix are the DNS address and prefix obtained from WAN2; if it comes from eth2, no response.
桥内WAN接口路由器通告报文监控模块负责监控WAN3上发送给PC3的路由器通告报文,并做相应的记录和处理。The router advertisement message monitoring module of the WAN interface in the bridge is responsible for monitoring the router advertisement message sent to PC3 on WAN3, and making corresponding records and processing.
对缺省路由的处理为:如果缺省路由的时间不是0,记录下来;如果缺省路由的时间是0,在记录中找到这条记录将其清空,如果找不到记录则不作处理。The processing of the default route is: if the time of the default route is not 0, record it; if the time of the default route is 0, find this record in the record and clear it, if no record is found, it will not be processed.
对DNS地址信息的处理为:如果DNS信息的时间不为0,记录下来;如果DNS信息的时间是0,在记录中找到这条记录将其清空,如果找不到记录则不作处理。The processing of DNS address information is: if the time of DNS information is not 0, record it; if the time of DNS information is 0, find this record in the record and clear it, if no record is found, then do not process.
对前缀信息的处理为:如果前缀信息的时间(首选时间和有效时间)不为0,记录下来;如果前缀信息的时间为0,在记录中找到这条记录将其清空,如果找不到记录则不处理。The processing of the prefix information is: if the time of the prefix information (preferred time and valid time) is not 0, record it; if the time of the prefix information is 0, find this record in the record and clear it, if no record is found is not processed.
DNS管理模块负责管理从各个路由类型的WAN连接获取DNS地址,发生变化时通知路由器通告模块以及其他关心DNS地址变化的模块。The DNS management module is responsible for managing the acquisition of DNS addresses from WAN connections of various routing types, and notifying the router notification module and other modules concerned with DNS address changes when changes occur.
前缀管理模块负责管理从各个路由类型的WAN连接获取前缀信息,发生变化时通知路由器通告模块以及其他关心前缀变化的模块。The prefix management module is responsible for managing the acquisition of prefix information from WAN connections of various routing types, and notifying the router notification module and other modules concerned with prefix changes when changes occur.
绑定关系维护模块负责管理配置的绑定关系。The binding relationship maintenance module is responsible for managing the configured binding relationship.
图4是家庭网关中桥端口绑定关系变化后系统的组网图,图中,WAN侧连接WAN1、WAN2是路由连接,WAN3是桥接方式。Figure 4 is a network diagram of the system after the binding relationship of the bridge port in the home gateway is changed. In the figure, the WAN side is connected to WAN1 and WAN2 by routing, and WAN3 is bridged.
桥端口eth0接PC1,绑定走WAN2,PC1的缺省网关是桥的地址;PC1的DNS地址是WAN2上获取的DNS地址;PC1的全局地址的前缀是WAN2上获取的前缀,以上信息都是通过路由器通告方式获取。The bridge port eth0 is connected to PC1 and bound to WAN2. The default gateway of PC1 is the address of the bridge; the DNS address of PC1 is the DNS address obtained from WAN2; the prefix of the global address of PC1 is the prefix obtained from WAN2. The above information is Obtained through router advertisement.
桥端口eth1接PC2,绑定走WAN3,PC2的缺省网关是WAN3上路由器通告中的地址;PC2的DNS地址是WAN3上路由器通告中的DNS地址,PC2的全局地址采用无状态地址自动配置,前缀来自WAN3上的路由器通告中。The bridge port eth1 is connected to PC2 and bound to WAN3. The default gateway of PC2 is the address in the router advertisement on WAN3; the DNS address of PC2 is the DNS address in the router advertisement on WAN3, and the global address of PC2 adopts stateless address automatic configuration. The prefix comes from the router advertisement on WAN3.
桥端口eth2接PC3,绑定走WAN1,PC3的缺省网关是桥的地址;PC3的DNS地址是WAN1上获取的DNS地址;PC3的全局地址的前缀是WAN1上获取的前缀,以上信息都是通过路由器通告方式获取。The bridge port eth2 is connected to PC3 and bound to WAN1. The default gateway of PC3 is the address of the bridge; the DNS address of PC3 is the DNS address obtained from WAN1; the prefix of the global address of PC3 is the prefix obtained from WAN1. The above information is Obtained through router advertisement.
绑定关系变化时,参与模块的工作情况:绑定关系维护模块通知路由器通告模块以及其他关心绑定关系变化的模块。When the binding relationship changes, the working conditions of the participating modules: the binding relationship maintenance module notifies the router notification module and other modules concerned with the binding relationship change.
路由器通告模块在桥端口eth0上以组播的形式定期发送路由器通告报文,报文中的缺省路由时间不变,源地址是桥的地址;报文中包含的绑定关系变化前从WAN1获取的DNS地址和前缀的时间为0;报文中同时还包含当前从WAN2获取的DNS地址和前缀。发送N(N可配置,默认为2)次后,绑定关系变化前从WAN1获取的DNS地址和前缀信息从报文中去掉,继续发送路由器通告报文。The Router Advertisement module regularly sends Router Advertisement messages in the form of multicast on the bridge port eth0. The default routing time in the messages remains unchanged, and the source address is the address of the bridge; the binding relationship contained in the messages changes from WAN1 The time of the obtained DNS address and prefix is 0; the message also contains the current DNS address and prefix obtained from WAN2. After sending N (N is configurable, the default is 2) times, the DNS address and prefix information obtained from WAN1 before the binding relationship changes are removed from the message, and the router advertisement message is continued to be sent.
路由器通告模块在桥端口eth1上以组播的形式定期发送路由器通告报文,源地址为桥的地址,缺省路由时间为0;报文中包含的绑定关系变化前从WAN2获取的DNS地址和前缀的时间为0,发送N(N可配置,默认为2)次后,停止发送。The router notification module regularly sends router notification messages in the form of multicast on the bridge port eth1, the source address is the address of the bridge, and the default routing time is 0; the DNS address obtained from WAN2 before the binding relationship contained in the message is changed and prefix time is 0, after sending N (N is configurable, the default is 2) times, stop sending.
路由器通告模块从桥内WAN接口路由器通告报文监控模块获取WAN3上的信息,如果有多个缺省路由地址,那么对每一个缺省路由地址构造一个路由器通告报文,每一个报文的缺省路由的时间为0。在其中一个报文中将记录的DNS地址和前缀的时间都设置成0,并在桥端口eth3上以组播形式定期发送出去。发送N(N可配置,默认为2)次后,停止发送。同时构造一个路由器报文,报文的源地址是桥的地址,DNS地址和前缀信息是当前从WAN1上获取的DNS地址和前缀信息。以组播报文的形式定期在桥端口eth2上发送。The router advertisement module obtains the information on WAN3 from the router advertisement message monitoring module of the WAN interface in the bridge. If there are multiple default routing addresses, a router advertisement message is constructed for each default routing address. The time for provincial routing is 0. In one of the messages, set the time of the recorded DNS address and prefix to 0, and send it out periodically in multicast form on the bridge port eth3. After sending N (N is configurable, the default is 2) times, stop sending. Construct a router message at the same time, the source address of the message is the address of the bridge, and the DNS address and prefix information are the DNS address and prefix information currently obtained from WAN1. It is periodically sent on the bridge port eth2 in the form of multicast packets.
路由器通告模块在桥上接收路由器请求报文,并找出原始接收到报文的桥端口,如果来之桥端口eth0,以组播形式的路由器通告响应,报文中的源地址是桥的地址,报文中的DNS地址和前缀是从WAN2上获取的DNS地址和前缀;如果来之桥端口eth2,以组播形式的路由器通告响应,报文中的源地址是桥的地址,报文中的DNS地址和前缀是从WAN1上获取的DNS地址和前缀;如果来之桥端口eth1,不响应。The router advertisement module receives the router request message on the bridge, and finds out the bridge port that originally received the message. If it comes from the bridge port eth0, it responds with a multicast router advertisement. The source address in the message is the address of the bridge. , the DNS address and prefix in the message are the DNS address and prefix obtained from WAN2; if it comes from the bridge port eth2, it responds with a multicast router advertisement, the source address in the message is the address of the bridge, and the message in The DNS address and prefix are those obtained from WAN1; if the bridge port is eth1, it will not respond.
由上述实施例可以看出:本发明发明解决了在家庭网关改变桥端口和WAN侧连接的绑定关系(即业务应用改变)后,桥端口下设备网络配置不能立即更新的问题,利用路由器通告的特点,自动更新桥端口下设备的网络参数。降低了桥端口下设备使用网络的复杂度,提升了用户体验。It can be seen from the above embodiments that the present invention solves the problem that the network configuration of devices under the bridge port cannot be updated immediately after the home gateway changes the binding relationship between the bridge port and the WAN side connection (that is, the service application changes). The feature of automatically updating the network parameters of the device under the bridge port. It reduces the complexity of using the network for devices under the bridge port and improves user experience.
尽管为示例目的,已经公开了本发明的优选实施例,本领域的技术人员将意识到各种改进、增加和取代也是可能的,因此,本发明的范围应当不限于上述实施例。Although preferred embodiments of the present invention have been disclosed for illustrative purposes, those skilled in the art will appreciate that various modifications, additions and substitutions are possible, and therefore, the scope of the present invention should not be limited to the above-described embodiments.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201010154078.0ACN101834741B (en) | 2010-04-23 | 2010-04-23 | Method and device for adjusting configuration of equipment under bridge port of home gateway |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201010154078.0ACN101834741B (en) | 2010-04-23 | 2010-04-23 | Method and device for adjusting configuration of equipment under bridge port of home gateway |
| Publication Number | Publication Date |
|---|---|
| CN101834741A CN101834741A (en) | 2010-09-15 |
| CN101834741Btrue CN101834741B (en) | 2014-07-16 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201010154078.0AExpired - Fee RelatedCN101834741B (en) | 2010-04-23 | 2010-04-23 | Method and device for adjusting configuration of equipment under bridge port of home gateway |
| Country | Link |
|---|---|
| CN (1) | CN101834741B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102694752B (en)* | 2011-03-21 | 2015-03-11 | 国基电子(上海)有限公司 | Gateway equipment |
| CN102447618B (en)* | 2011-10-31 | 2016-06-08 | 杭州华三通信技术有限公司 | Route switching method in a kind of LISP network and device thereof |
| CN103457823B (en)* | 2013-09-27 | 2017-02-08 | 上海市共进通信技术有限公司 | Method for achieving double-stack protocol bridge dialing |
| CN104581747A (en)* | 2015-01-22 | 2015-04-29 | 小米科技有限责任公司 | Network expansion method and device |
| CN106452853B (en)* | 2016-09-27 | 2019-11-29 | 上海斐讯数据通信技术有限公司 | Wireless router independently detects the method and system of binding server failure cause |
| CN108092841B (en)* | 2016-11-22 | 2022-09-02 | 中兴通讯股份有限公司 | Method, device and system for maintaining gateway routing information |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2004104850A1 (en)* | 2003-05-13 | 2004-12-02 | Kiyon, Inc. | System and method for routing packets in a wired or wireless network |
| CN101442566A (en)* | 2009-01-08 | 2009-05-27 | 中国电信股份有限公司 | Method and apparatus for implementing dynamic domain name update |
| CN101502049A (en)* | 2006-08-23 | 2009-08-05 | 汤姆森许可贸易公司 | Method and device for identifying and selecting an interface to access a network |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2004104850A1 (en)* | 2003-05-13 | 2004-12-02 | Kiyon, Inc. | System and method for routing packets in a wired or wireless network |
| CN101502049A (en)* | 2006-08-23 | 2009-08-05 | 汤姆森许可贸易公司 | Method and device for identifying and selecting an interface to access a network |
| CN101442566A (en)* | 2009-01-08 | 2009-05-27 | 中国电信股份有限公司 | Method and apparatus for implementing dynamic domain name update |
| Publication number | Publication date |
|---|---|
| CN101834741A (en) | 2010-09-15 |
| Publication | Publication Date | Title |
|---|---|---|
| CN1985470B (en) | System, network entities for configuration management of a dynamic host configuration protocol framework | |
| US8363663B2 (en) | Methods and apparatus for routing data to nodes | |
| CN100521660C (en) | Method for implementing integrated network mobile switch management | |
| EP2066080B1 (en) | The method and device for managing route information and retransmitting data in accessing device | |
| CN1813454B (en) | System and method for mobile unit session management across a wireless communication network | |
| EP1759519B1 (en) | Discovering a network element in a communication system | |
| US9179447B2 (en) | Routing traffic towards a mobile node | |
| US20140325090A1 (en) | Discovery and disconnection of client addresses in an access node for an ip network | |
| CN101834741B (en) | Method and device for adjusting configuration of equipment under bridge port of home gateway | |
| CN102984295B (en) | A kind of mobile terminal and address distribution method thereof | |
| CN101547383A (en) | Access authentication method, access authentication system and related equipment | |
| JP5424007B2 (en) | Method for providing information, home gateway and home network system | |
| CN101471898A (en) | Protection method, system and virtual access edge node for access network | |
| CA2660711A1 (en) | System and method for routing and domain name system support of a mobile node | |
| EP3583751B1 (en) | Method for an improved deployment and use of network nodes of a switching fabric of a data center or within a central office point of delivery of a broadband access network of a telecommunications network | |
| CN100499669C (en) | Network address reconstruction method in IPv6 switch-in network | |
| CN102447703B (en) | A kind of heat backup method and system, CGN equipment | |
| US20060184692A1 (en) | Home link setting method, home gateway device, and mobile terminal | |
| WO2013026308A1 (en) | Service node and inter-service node user protocol message synchronization method | |
| CN102377623A (en) | User terminal and method for establishing dial-up connection by same | |
| CN102186168B (en) | Private network access method, device and system | |
| CN101674665A (en) | Wireless transmission interface building method and wireless transmission network element | |
| CN103414646B (en) | A kind of multicast service negotiation method and device | |
| KR20010073827A (en) | Method for expanding address for internet protocol version 4 in internet edge router | |
| CN103329507A (en) | Method for addressing messages in a computer network |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | Granted publication date:20140716 | |
| CF01 | Termination of patent right due to non-payment of annual fee |