WO2013182166A1 - Method and device for automatic, seamless network port switching - Google Patents

Method and device for automatic, seamless network port switching Download PDF

Info

Publication number
WO2013182166A1
WO2013182166A1 PCT/CN2013/079924 CN2013079924W WO2013182166A1 WO 2013182166 A1 WO2013182166 A1 WO 2013182166A1 CN 2013079924 W CN2013079924 W CN 2013079924W WO 2013182166 A1 WO2013182166 A1 WO 2013182166A1
Authority
WO
WIPO (PCT)
Prior art keywords
network port
wireless data
network
data card
information
Prior art date
Application number
PCT/CN2013/079924
Other languages
French (fr)
Chinese (zh)
Inventor
张可
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2013182166A1 publication Critical patent/WO2013182166A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • H04W36/0011Control or signalling for completing the hand-off for data sessions of end-to-end connection
    • H04W36/0019Control or signalling for completing the hand-off for data sessions of end-to-end connection adapted for mobile IP [MIP]

Definitions

  • the present invention relates to the field of network access of a network terminal, and in particular, to a method and an apparatus for automatically and seamlessly switching a network port. Background technique
  • the network port of the wireless network card of the data processing device is set as the default gateway, when the wireless data card is connected to the network, the user name and password of the web authentication need to be re-entered, which requires first breaking the data processing.
  • the network port of the device's own wireless network card will have a wireless data card connected to the network.
  • the networking method using the existing wireless data card has the following defects:
  • the object of the embodiments of the present invention is to provide a method for automatically and seamlessly switching a network port.
  • the method can automatically switch the data processing device from the network port of the wireless network card that is provided to the data processing device without the user performing the network disconnection operation.
  • the network port of the wireless data card is to provide a method for automatically and seamlessly switching a network port.
  • an embodiment of the present invention provides a method for automatically and seamlessly switching a network port.
  • the network data is automatically switched to the wireless data card, and the method includes: modifying the IP route according to the network port information of the wireless data card by acquiring the network port information of the wireless data card and the routing information of the IP routing table.
  • the metric values for the wireless data card and other NICs in the table to adjust the default gateway.
  • the wireless data card when used, if the customized key value in the detection registry of the wireless data card is obtained, it is determined that the wireless data card is connected to the network port.
  • the obtaining the network port information of the wireless data card includes: acquiring network port information of each network port, and obtaining, by using a network port of the wireless data card, a network port name of the network port that connects the wireless data card, according to the network port
  • the network port information of the wireless data card is obtained from the network port information of each network port.
  • the obtaining the network port information of the wireless data card is obtained by establishing an index number of the network port information of the wireless data card from the network port information of each network port.
  • the obtaining the routing information of the IP routing table includes: acquiring a function of the IP routing table to obtain all the routing information, and searching for routing information corresponding to the network destination address of the specified route in all the routing information.
  • the metric value of the wireless data card and other network cards in the IP routing table is modified according to the network port information of the wireless data card to adjust the default gateway, including:
  • the metric value in the routing information corresponding to the wireless data card in the IP routing table is modified by modifying the function of the specified routing information, and the metric value in the routing information corresponding to the other network port in the IP routing table is modified to correspond to the wireless data card.
  • the metric value in the routing information is smaller than the metric value in the routing information corresponding to other network ports.
  • the method further comprises the following operations:
  • Establishing the data group E searching for the routing information corresponding to the wireless data card in the data group D by using the index number in the data group B, and storing the routing information in the data group E;
  • the metric value in the corresponding routing information is not limited to the wireless data card in the IP routing table.
  • an embodiment of the present invention provides an apparatus for automatically and seamlessly switching a network port, including:
  • the information obtaining module is configured to obtain the network port information of the wireless data card and the routing information of the IP routing table;
  • the network port switching module is configured to modify the metric value of the wireless data card and other network cards in the IP routing table according to the network port information of the wireless data card to adjust the default gateway.
  • the device further comprises:
  • the detecting module is configured to: when the wireless data card is used, if the customized key value in the detection registry of the wireless data card is obtained, it is determined that the wireless data card is connected to the network port.
  • the information acquiring module is configured to obtain the network port information of the wireless data card, including: acquiring the network port information of each network port, and obtaining the network port of the network port that connects the wireless data card by using the network port of the wireless data card
  • the network port information of the wireless data card is obtained in the network port information of each network port according to the network port name.
  • the information obtaining module is configured to obtain the network port information of the wireless data card, and is obtained by establishing an index number of the network port information of the wireless data card from the network port information of each network port.
  • the information obtaining module is configured to obtain routing information of the IP routing table, including: obtaining Take the function of the IP routing table to obtain all the routing information, and find the routing information corresponding to the network destination address of the specified route in all routing information.
  • the network port switching module is configured to modify the metric value of the wireless data card and other network cards in the IP routing table according to the network port information of the wireless data card to adjust the default gateway, including:
  • the metric value in the routing information corresponding to the card is smaller than the metric value in the routing information corresponding to the other network port.
  • the method and the device of the embodiment of the present invention modify the network data of the wireless data card and the routing information of the IP routing table, and modify the metric value of the wireless data card and other network cards in the IP routing table according to the network port information of the wireless data card.
  • the default gateway automatically jumps to the IP address of the wireless data card, so that the gateway of the wireless data card can be seamlessly switched to achieve the effect of automatically matching the network port. Therefore, the user does not need to disconnect the network through the method.
  • the network operation can realize that the data processing device automatically switches from the network port of its own wireless network card to the network port of the wireless data card.
  • FIG. 1 is a flowchart of a method for automatically and seamlessly switching a network port according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for automatically and seamlessly switching a network port according to an embodiment of the present invention
  • FIG. 3 is a structural diagram of an apparatus for automatically and seamlessly switching a network port according to an embodiment of the present invention.
  • the method for automatically and seamlessly switching the network port of the embodiment of the present invention is used for switching between a network port of a data processing device such as a notebook computer and a network port of a wireless data card, so as to access the broadband through the mobile data network of the operator by using the wireless data card. service.
  • a network port of a data processing device such as a notebook computer
  • a network port of a wireless data card so as to access the broadband through the mobile data network of the operator by using the wireless data card. service.
  • the method for automatically and seamlessly switching network ports in the embodiment of the present invention is as follows:
  • S2 Modify the metric value of the wireless data card and other network cards in the IP routing table according to the network port information of the wireless data card to adjust the default gateway.
  • Step S101 After connecting the wireless data card to the data processing device, start a user interface (UI) installed in the data processing device.
  • the UI obtains a customized key value in the detection registry of the wireless data card. If the customized key value is obtained, it is determined that the wireless data card is detected, otherwise it is determined that the wireless data card is not detected, so that it can be determined. Whether the wireless data card has been connected to the data processing device;
  • Step S102 after determining that the wireless data card has been connected to the data processing device, the UI acquires a function of the network adapter of the data processing device and each network port information, where the network port information includes: a network port name, an index, a physical address, and a device description. And the related information, and the UI saves the acquired network port information.
  • the UI establishes the data group A and saves the obtained network port information in the data group A;
  • Step S103 the UI obtains the name of the network port that connects the wireless data card by acquiring the network port driver of the wireless data card, and the network port driver of the wireless data card is usually provided by the device manufacturer and installed on the data processing device;
  • Step S104 After obtaining the network port name of the wireless data card, the UI obtains the network port information corresponding to the network port of the wireless data card in the data group A by using the network port name, and establishes an index number of the network port information. Therefore, the mapping relationship between the index number and the network port information of the wireless data card stored in the data group A is established.
  • the UI establishes a data group B and saves the index number in the data group B.
  • Step S105 The UI obtains all the routing information and saves it by acquiring a function of the IP routing table, and the routing information includes information related to the routing, such as an IP address, a metric value, a gateway, and the like.
  • the UI is established. a data group C and storing the routing information in the data group C;
  • Step S106 the UI searches the data group C for the network destination address of the specified route (ie, 0.0.0.0)
  • the corresponding routing information and the UI establishes a data group D and saves the routing information corresponding to the network target address in the data group D, and searches for the wireless data card in the data group D through the index number in the data group B.
  • the routing information, and the routing information corresponding to the wireless data card and the routing information of the other network ports are separately saved.
  • the UI establishes a data group E and a data group F, and the routing information corresponding to the wireless data card is Stored in data group E, and save routing information of other network ports in data group F;
  • Step S107 the UI modifies the metric value in the data group E and the data group F by modifying the function of the specified routing information, setting the metric value of the data group E to 10, and setting the metric value in the data group F to 30;
  • Step S108 setting a metric value of each network port in the IP routing table of the data processing device according to the metric value of the data group E and the metric value in the data group F, using a function for creating the specified routing information;
  • Step S109 after the foregoing steps are completed, the data processing device automatically adjusts the default gateway according to the size of the Metric value set in the IP routing table.
  • Step S110 after the user disconnects the network of the wireless data card, the UI invokes the routing information in the data group C and uses the function of creating the specified routing information to set the metric value of each network port of the IP routing table, thereby restoring the data processing device.
  • the original routing information of the IP routing table is used to set the network port of the data processing device as the default gateway.
  • an embodiment of the present invention further provides an apparatus for automatically and seamlessly switching a network port, including:
  • the information obtaining module is configured to obtain the network port information of the wireless data card and the routing information of the IP routing table;
  • the network port switching module is configured to modify the metric value of the wireless data card and other network cards in the IP routing table according to the network port information of the wireless data card to adjust the default gateway.
  • the device further comprises:
  • the detecting module is configured to: when the wireless data card is used, if the customized key value in the detection registry of the wireless data card is obtained, it is determined that the wireless data card is connected to the network port.
  • the information acquiring module is configured to obtain the network port information of the wireless data card, including: obtaining network port information of each network port, and obtaining a network port name of the network port that connects the wireless data card by using a network port driver of the wireless data card And obtaining the network port information of the wireless data card in the network port information of each network port according to the network port name.
  • the information obtaining module is configured to obtain the network port information of the wireless data card, and is obtained by establishing an index number of the network port information of the wireless data card from the network port information of each network port.
  • the information obtaining module is configured to obtain the routing information of the IP routing table, including: acquiring a function of the IP routing table to obtain all routing information, and searching for the network destination address corresponding to the specified route in all the routing information. Routing information.
  • the network port switching module is configured to modify the metric value of the wireless data card and other network cards in the IP routing table according to the network port information of the wireless data card to adjust the default gateway, including:
  • the metric value in the routing information corresponding to the card is smaller than the metric value in the routing information corresponding to the other network port.
  • the method and device of the embodiment of the present invention acquires the network port information of the wireless data card and the routing information of the IP routing table through the UI, and modifies the wireless data card in the IP routing table and the metric of the other network card according to the network port information of the wireless data card.
  • the value is used to adjust the default gateway, so that the default gateway automatically jumps to the IP address of the wireless data card, so that the gateway of the wireless data card can be seamlessly switched to achieve the effect of automatically matching the network port. Therefore, the method and the device do not need to be performed by the user.
  • the network connection operation can realize that the data processing device automatically switches from the network port of its own wireless network card to the network port of the wireless data card.
  • the network information of the wireless data card and the routing information of the IP routing table are obtained, and the metric value of the wireless data card and other network cards in the IP routing table is modified according to the network port information of the wireless data card to adjust the default gateway.
  • the default gateway automatically jumps to the IP address of the wireless data card, so that the gateway of the wireless data card can be seamlessly switched to achieve the effect of automatically matching the network port. Therefore, the method does not require the user to perform the network disconnection operation.
  • the data processing device automatically switches from the network port of the wireless network card that is provided to the network port of the wireless data card.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

A method and a device for automatic, seamless network port switching, used for automatically switching to a connected state of a wireless data card when the wireless data card is being used. The method obtains network port information of a wireless data card and routing information of an IP routing table, and alters Metric values of the wireless data card and other network cards in the IP routing table according to the network port information of the wireless data card, so as to adjust a default gateway. The method and device in the embodiments of the present invention can adjust Metric values of a wireless data card and other network cards to adjust a default gateway, so that the default gateway automatically jumps to the IP address of the wireless data card. Therefore, by means of this method, a user can implement automatic switching of a data processing device from a network port of a wireless network card in the data processing device to a network port of a wireless data card without performing disconnection and connection operations on a network.

Description

一种网口自动无缝切换的方法及装置  Method and device for automatically switching seamlessly of network port
技术领域 Technical field
本发明涉及网络终端的网络接入领域, 具体涉及一种网口自动无缝切换 的方法及装置。 背景技术  The present invention relates to the field of network access of a network terminal, and in particular, to a method and an apparatus for automatically and seamlessly switching a network port. Background technique
目前, 为实现笔记本电脑等数据处理装置的无线上网功能, 这些数据处 理装置都自带有无线网卡。 然而, 由于应用场景或目的的不同, 数据处理装 置也会使用外接的具有上网功能的网卡装置, 特别是随着移动通信技术的发 展, 如移动数据卡、 联通数据卡等具有 Wi-Fi模块的无线数据卡的应用更是 越来越普及。  Currently, in order to realize the wireless Internet access function of data processing devices such as notebook computers, these data processing devices all have their own wireless network cards. However, due to different application scenarios or purposes, the data processing device also uses an external network card device with Internet access function, especially with the development of mobile communication technologies, such as mobile data cards, Unicom data cards, etc. with Wi-Fi modules. The application of wireless data cards is becoming more and more popular.
然而,由于数据处理装置的自带的无线网卡的网口被设置成为默认网关, 当将无线数据卡连入网络时, 需要重新输入 Web鉴权的用户名和密码, 这就 需要先断掉数据处理装置的自带的无线网卡的网口再将具有无线数据卡连接 入网络。  However, since the network port of the wireless network card of the data processing device is set as the default gateway, when the wireless data card is connected to the network, the user name and password of the web authentication need to be re-entered, which requires first breaking the data processing. The network port of the device's own wireless network card will have a wireless data card connected to the network.
因此使用现有无线数据卡的连网方式存在以下缺陷:  Therefore, the networking method using the existing wireless data card has the following defects:
首先, 在用户使用无线数据卡时, 需要用户进行断网的操作, 不方便用 户的使用;  First, when the user uses the wireless data card, the user needs to perform the operation of disconnecting the network, which is inconvenient for the user;
其次, 在断开和连接数据处理装置的网口时, 需要耗费很长的时间才能 断掉或者连接网络, 造成等待时间长, 用户体验差。 发明内容  Secondly, when disconnecting and connecting the network port of the data processing device, it takes a long time to disconnect or connect to the network, resulting in long waiting time and poor user experience. Summary of the invention
本发明实施例的目的在于提供一种网口自动无缝切换的方法, 通过该方 法无需用户进行断网连网操作即可实现数据处理装置自动的从其自带的无线 网卡的网口切换到无线数据卡的网口。  The object of the embodiments of the present invention is to provide a method for automatically and seamlessly switching a network port. The method can automatically switch the data processing device from the network port of the wireless network card that is provided to the data processing device without the user performing the network disconnection operation. The network port of the wireless data card.
为实现上述目的, 本发明实施例提供一种网口自动无缝切换的方法, 用 于在使用无线数据卡时自动切换到无线数据卡的连网状态, 该方法包括: 通 过获取无线数据卡的网口信息和 IP路由表的路由信息,根据无线数据卡的网 口信息修改 IP路由表中的无线数据卡和其它网卡的 Metric值以调整默认网 关。 To achieve the above object, an embodiment of the present invention provides a method for automatically and seamlessly switching a network port. When the wireless data card is used, the network data is automatically switched to the wireless data card, and the method includes: modifying the IP route according to the network port information of the wireless data card by acquiring the network port information of the wireless data card and the routing information of the IP routing table. The metric values for the wireless data card and other NICs in the table to adjust the default gateway.
优选的, 在使用无线数据卡时, 如果获取到无线数据卡的检测注册表中 的自定义的键值, 则确定该无线数据卡已接入网口。  Preferably, when the wireless data card is used, if the customized key value in the detection registry of the wireless data card is obtained, it is determined that the wireless data card is connected to the network port.
优选的, 所述获取无线数据卡的网口信息包括: 获取各网口的网口信息 以及通过无线数据卡的网口驱动获得连接该无线数据卡的网口的网口名称, 根据该网口名称在各网口的网口信息中获得该无线数据卡的网口信息。  Preferably, the obtaining the network port information of the wireless data card includes: acquiring network port information of each network port, and obtaining, by using a network port of the wireless data card, a network port name of the network port that connects the wireless data card, according to the network port The network port information of the wireless data card is obtained from the network port information of each network port.
优选的, 所述获取无线数据卡的网口信息是通过建立从各网口的网口信 息中索引该无线数据卡的网口信息的索引号的方式获得的。  Preferably, the obtaining the network port information of the wireless data card is obtained by establishing an index number of the network port information of the wireless data card from the network port information of each network port.
优选的, 所述获取 IP路由表的路由信息包括: 获取 IP路由表的函数以 获取所有的路由信息, 并在所有的路由信息中查找指定路由的网络目标地址 所对应的路由信息。  Preferably, the obtaining the routing information of the IP routing table includes: acquiring a function of the IP routing table to obtain all the routing information, and searching for routing information corresponding to the network destination address of the specified route in all the routing information.
优选的, 所述根据无线数据卡的网口信息修改 IP路由表中的无线数据卡 和其它网卡的 Metric值以调整默认网关, 包括:  Preferably, the metric value of the wireless data card and other network cards in the IP routing table is modified according to the network port information of the wireless data card to adjust the default gateway, including:
根据所述索引号在所述指定路由的网络目标地址所对应的路由信息中查 找与所述无线数据卡对应的路由信息; 以及  And searching, according to the index number, routing information corresponding to the wireless data card in routing information corresponding to the network destination address of the specified route; and
通过修改指定路由信息的函数修改 IP路由表中与该无线数据卡对应的路 由信息中的 Metric值以及修改 IP路由表中与其它网口对应的路由信息中的 Metric值, 使与无线数据卡对应的路由信息中的 Metric值小于与其它网口对 应的路由信息中的 Metric值。  The metric value in the routing information corresponding to the wireless data card in the IP routing table is modified by modifying the function of the specified routing information, and the metric value in the routing information corresponding to the other network port in the IP routing table is modified to correspond to the wireless data card. The metric value in the routing information is smaller than the metric value in the routing information corresponding to other network ports.
优选的, 该方法还包括如下操作:  Preferably, the method further comprises the following operations:
建立数据组 A, 将所述获取的各网口的网口信息保存在该数据组 A中; 建立数据组 B, 将所述索引号保存在该数据组 B中, 通过该索引号在数 据组 A中索引无线数据卡的网口信息;  Establishing the data group A, and storing the obtained network port information of each network port in the data group A; establishing a data group B, storing the index number in the data group B, and using the index number in the data group Indexing the network port information of the wireless data card in A;
建立数据组 C, 将所述通过获取 IP路由表的函数以获取到的所有的路由 信息保存在该数据组 C中; Establishing data group C, and obtaining all the routes obtained by acquiring the function of the IP routing table Information is stored in the data set C;
建立数据组 D, 将所述在所有的路由信息中查找到的指定路由的网络目 标地址所对应的路由信息保存在该数据组 D中;  Establishing the data group D, and storing the routing information corresponding to the network target address of the specified route found in all the routing information in the data group D;
建立数据组 E, 通过数据组 B中的索引号在数据组 D中查找与无线数据 卡对应的路由信息并将该路由信息保存在数据组 E中;  Establishing the data group E, searching for the routing information corresponding to the wireless data card in the data group D by using the index number in the data group B, and storing the routing information in the data group E;
建立数据组 F, 将其它网口的路由信息保存在该数据组 F中;  Establish a data group F, and save routing information of other network ports in the data group F;
修改数据组 E和数据组 F中的 Metric值,使数据组 E中的 Metric值小于 数据组 F中的 Metric值; 以及  Modify the metric value in data set E and data set F so that the metric value in data set E is less than the metric value in data set F;
根据数据组 E的 Metric值和数据组 F中的 Metric值,通过修改指定路由 信息的函数修改 IP路由表中与无线数据卡对应的路由信息中的 Metric值以及 修改 IP路由表中与其它网口对应的路由信息中的 Metric值。  Modify the metric value in the routing information corresponding to the wireless data card in the IP routing table and modify the IP routing table with other network ports by modifying the metric value of the data group E and the metric value in the data group F. The metric value in the corresponding routing information.
为实现上述目的, 本发明实施例提供一种网口自动无缝切换的装置, 包 括:  To achieve the above objective, an embodiment of the present invention provides an apparatus for automatically and seamlessly switching a network port, including:
信息获取模块,设置为通过获取无线数据卡的网口信息和 IP路由表的路 由信息;  The information obtaining module is configured to obtain the network port information of the wireless data card and the routing information of the IP routing table;
网口切换模块,设置为根据无线数据卡的网口信息修改 IP路由表中的无 线数据卡和其它网卡的 Metric值以调整默认网关。  The network port switching module is configured to modify the metric value of the wireless data card and other network cards in the IP routing table according to the network port information of the wireless data card to adjust the default gateway.
优选的, 该装置还包括:  Preferably, the device further comprises:
检测模块, 设置为在使用无线数据卡时, 如果获取到无线数据卡的检测 注册表中的自定义的键值, 则确定该无线数据卡已接入网口。  The detecting module is configured to: when the wireless data card is used, if the customized key value in the detection registry of the wireless data card is obtained, it is determined that the wireless data card is connected to the network port.
优选的, 所述信息获取模块, 设置为获取无线数据卡的网口信息包括: 获取各网口的网口信息以及通过无线数据卡的网口驱动获得连接该无线 数据卡的网口的网口名称, 根据该网口名称在所述各网口的网口信息中获得 该无线数据卡的网口信息。  Preferably, the information acquiring module is configured to obtain the network port information of the wireless data card, including: acquiring the network port information of each network port, and obtaining the network port of the network port that connects the wireless data card by using the network port of the wireless data card The network port information of the wireless data card is obtained in the network port information of each network port according to the network port name.
优选的, 所述信息获取模块, 设置为获取无线数据卡的网口信息, 是通 过建立从各网口的网口信息中索引该无线数据卡的网口信息的索引号的方式 获得。  Preferably, the information obtaining module is configured to obtain the network port information of the wireless data card, and is obtained by establishing an index number of the network port information of the wireless data card from the network port information of each network port.
优选的, 所述信息获取模块, 设置为获取 IP路由表的路由信息包括: 获 取 IP路由表的函数以获取到所有的路由信息, 并在所有的路由信息中查找指 定路由的网络目标地址所对应的路由信息。 Preferably, the information obtaining module is configured to obtain routing information of the IP routing table, including: obtaining Take the function of the IP routing table to obtain all the routing information, and find the routing information corresponding to the network destination address of the specified route in all routing information.
优选的, 所述网口切换模块, 设置为根据无线数据卡的网口信息修改 IP 路由表中的无线数据卡和其它网卡的 Metric值以调整默认网关, 包括:  Preferably, the network port switching module is configured to modify the metric value of the wireless data card and other network cards in the IP routing table according to the network port information of the wireless data card to adjust the default gateway, including:
根据所述索引号在所述指定路由的网络目标地址所对应的路由信息中查 找与所述无线数据卡对应的路由信息; 以及  And searching, according to the index number, routing information corresponding to the wireless data card in routing information corresponding to the network destination address of the specified route; and
通过修改指定路由信息的函数修改 IP路由表中与该无线数据卡对应的路 由信息中的 Metric值以及修改 IP路由表中与其它网口对应的路由信息中的 Metric值, 使与所述无线数据卡对应的路由信息中的 Metric值小于与所述其 它网口对应的路由信息中的 Metric值。  Modifying the metric value in the routing information corresponding to the wireless data card in the IP routing table and modifying the metric value in the routing information corresponding to the other network port in the IP routing table by modifying the function of the specified routing information, so as to make the wireless data The metric value in the routing information corresponding to the card is smaller than the metric value in the routing information corresponding to the other network port.
由于, 本发明实施例的方法及装置通过获取无线数据卡的网口信息和 IP 路由表的路由信息,根据无线数据卡的网口信息修改 IP路由表中的无线数据 卡和其它网卡的 Metric值以调整默认网关, 使默认网关自动跳转到无线数据 卡的 IP地址,从而可以无缝切换到无线数据卡的网关以实现自动匹配网口的 效果, 因此, 通过该方法无需用户进行断网连网操作即可实现数据处理装置 自动的从其自带的无线网卡的网口切换到无线数据卡的网口。  The method and the device of the embodiment of the present invention modify the network data of the wireless data card and the routing information of the IP routing table, and modify the metric value of the wireless data card and other network cards in the IP routing table according to the network port information of the wireless data card. In order to adjust the default gateway, the default gateway automatically jumps to the IP address of the wireless data card, so that the gateway of the wireless data card can be seamlessly switched to achieve the effect of automatically matching the network port. Therefore, the user does not need to disconnect the network through the method. The network operation can realize that the data processing device automatically switches from the network port of its own wireless network card to the network port of the wireless data card.
附图概述 BRIEF abstract
图 1为本发明实施例网口自动无缝切换的方法流程图;  1 is a flowchart of a method for automatically and seamlessly switching a network port according to an embodiment of the present invention;
图 2为本发明实施例网口自动无缝切换的方法流程图;  2 is a flowchart of a method for automatically and seamlessly switching a network port according to an embodiment of the present invention;
图 3为本发明实施例网口自动无缝切换的装置结构图。  FIG. 3 is a structural diagram of an apparatus for automatically and seamlessly switching a network port according to an embodiment of the present invention.
本发明的较佳实施方式 Preferred embodiment of the invention
为了详细说明本发明的技术内容、 所达成的目的及效果, 下面将结合具 体实施例并配合附图, 对本发明的技术方案进行清楚、 完整地描述。  The technical solutions of the present invention will be clearly and completely described in conjunction with the specific embodiments and the accompanying drawings.
本发明实施例网口自动无缝切换的方法用于笔记本电脑等数据处理装置 自带的网口和无线数据卡的网口的切换, 以利用无线数据卡通过运营商的移 动数据网络接入宽带服务。 如图 1所示, 本发明实施例网口自动无缝切换的方法如下:The method for automatically and seamlessly switching the network port of the embodiment of the present invention is used for switching between a network port of a data processing device such as a notebook computer and a network port of a wireless data card, so as to access the broadband through the mobile data network of the operator by using the wireless data card. service. As shown in FIG. 1 , the method for automatically and seamlessly switching network ports in the embodiment of the present invention is as follows:
S1 : 在无线数据卡连网时, 获取无线数据卡的网口信息和 IP路由表的路 由信息; S1: Obtaining the network port information of the wireless data card and the routing information of the IP routing table when the wireless data card is connected to the network;
S2:根据无线数据卡的网口信息修改 IP路由表中的无线数据卡和其它网 卡的 Metric值以调整默认网关。  S2: Modify the metric value of the wireless data card and other network cards in the IP routing table according to the network port information of the wireless data card to adjust the default gateway.
如图 2所示, 本发明实施例网口自动无缝切换的方法具体流程如下: 步骤 S101 , 当将无线数据卡连接到数据处理装置上后, 启动安装在数据 处理装置的用户界面(UI ) , UI会获取无线数据卡的检测注册表中的自定义 的键值, 如果获取到该自定义的键值则判断检测到该无线数据卡, 否则判断 没有检测到该无线数据卡, 从而可以确定该无线数据卡是否已经连接入该数 据处理装置上;  As shown in FIG. 2, the specific process of the method for automatically and seamlessly switching the network port of the embodiment of the present invention is as follows: Step S101: After connecting the wireless data card to the data processing device, start a user interface (UI) installed in the data processing device. The UI obtains a customized key value in the detection registry of the wireless data card. If the customized key value is obtained, it is determined that the wireless data card is detected, otherwise it is determined that the wireless data card is not detected, so that it can be determined. Whether the wireless data card has been connected to the data processing device;
步骤 S102,在确定无线数据卡已经连接入该数据处理装置后, UI获取数 据处理装置之网络适配器的函数以及各网口信息, 该网口信息包括: 网口名 称、索引、物理地址、设备描述等等相关信息,且 UI将获取的网口信息保存, 在本实施例中, UI建立数据组 A并将获取的各网口信息保存在该数据组 A 中;  Step S102, after determining that the wireless data card has been connected to the data processing device, the UI acquires a function of the network adapter of the data processing device and each network port information, where the network port information includes: a network port name, an index, a physical address, and a device description. And the related information, and the UI saves the acquired network port information. In this embodiment, the UI establishes the data group A and saves the obtained network port information in the data group A;
步骤 S103 , UI通过获取无线数据卡的网口驱动获得连接该无线数据卡的 网口名称, 无线数据卡的网口驱动通常由设备厂商自己提供并已安装在数据 处理装置上;  Step S103, the UI obtains the name of the network port that connects the wireless data card by acquiring the network port driver of the wireless data card, and the network port driver of the wireless data card is usually provided by the device manufacturer and installed on the data processing device;
步骤 S104, UI在获得无线数据卡的网口名称后,通过该网口名称在数据 组 A中获得与该无线数据卡的网口对应的网口信息并建立索引该网口信息的 索引号, 从而建立索引号与保存在数据组 A中的无线数据卡的网口信息的映 射关系,在本实施例中, UI建立一数据组 B并将索引号保存在该数据组 B中; 步骤 S105 , UI通过获取 IP路由表的函数以获取到所有的路由信息并保 存, 该路由信息包含有与路由相关的信息, 如 IP地址、 Metric值、 网关等等 的信息, 在本实施例中, UI建立一数据组 C并将该路由信息保存在该数据组 C中;  Step S104: After obtaining the network port name of the wireless data card, the UI obtains the network port information corresponding to the network port of the wireless data card in the data group A by using the network port name, and establishes an index number of the network port information. Therefore, the mapping relationship between the index number and the network port information of the wireless data card stored in the data group A is established. In this embodiment, the UI establishes a data group B and saves the index number in the data group B. Step S105 The UI obtains all the routing information and saves it by acquiring a function of the IP routing table, and the routing information includes information related to the routing, such as an IP address, a metric value, a gateway, and the like. In this embodiment, the UI is established. a data group C and storing the routing information in the data group C;
步骤 S106, UI在数据组 C中查找指定路由的网络目标地址 (即 0.0.0.0 ) 所对应的路由信息, 并且 UI建立一数据组 D并将网络目标地址所对应的路 由信息保存在该数据组 D中,通过数据组 B中的索引号在数据组 D中查找与 无线数据卡对应的路由信息, 并分开保存与无线数据卡对应的路由信息和其 它网口的路由信息, 在本实施例中, UI建立一数据组 E和一数据组 F, 将与 无线数据卡对应的路由信息保存在数据组 E中, 将其它网口的路由信息保存 在数据组 F中; Step S106, the UI searches the data group C for the network destination address of the specified route (ie, 0.0.0.0) The corresponding routing information, and the UI establishes a data group D and saves the routing information corresponding to the network target address in the data group D, and searches for the wireless data card in the data group D through the index number in the data group B. The routing information, and the routing information corresponding to the wireless data card and the routing information of the other network ports are separately saved. In this embodiment, the UI establishes a data group E and a data group F, and the routing information corresponding to the wireless data card is Stored in data group E, and save routing information of other network ports in data group F;
步骤 S107, UI通过修改指定路由信息的函数, 修改数据组 E和数据组 F 中的 Metric值, 将数据组 E的 Metric值设置为 10、 将数据组 F中的 Metric 值设置为 30;  Step S107, the UI modifies the metric value in the data group E and the data group F by modifying the function of the specified routing information, setting the metric value of the data group E to 10, and setting the metric value in the data group F to 30;
步骤 S108, 根据数据组 E的 Metric值和数据组 F中的 Metric值, 使用 创建指定路由信息的函数设置数据处理装置的 IP路由表中各网口的 Metric 值;  Step S108, setting a metric value of each network port in the IP routing table of the data processing device according to the metric value of the data group E and the metric value in the data group F, using a function for creating the specified routing information;
步骤 S109, 完成上述步骤后, 数据处理装置会根据 IP路由表中设置的 Metric值的大小, 自动调整默认网关, Metric值越小, 优先级越大, 从而把 无线数据卡的路由设置成为默认的网关;  Step S109, after the foregoing steps are completed, the data processing device automatically adjusts the default gateway according to the size of the Metric value set in the IP routing table. The smaller the metric value is, the larger the priority is, so that the routing of the wireless data card is set to the default. Gateway
步骤 S110, 当用户断开无线数据卡的网络以后, UI调用数据组 C中的 路由信息并使用创建指定路由信息的函数设置 IP路由表的各网口的 Metric 值, 从而以恢复数据处理装置的 IP路由表原来的路由信息, 从而将数据处理 装置自带的网口设置为默认网关。  Step S110, after the user disconnects the network of the wireless data card, the UI invokes the routing information in the data group C and uses the function of creating the specified routing information to set the metric value of each network port of the IP routing table, thereby restoring the data processing device. The original routing information of the IP routing table is used to set the network port of the data processing device as the default gateway.
如图 3所示, 本发明实施例还提供了一种网口自动无缝切换的装置, 包 括:  As shown in FIG. 3, an embodiment of the present invention further provides an apparatus for automatically and seamlessly switching a network port, including:
信息获取模块,设置为通过获取无线数据卡的网口信息和 IP路由表的路 由信息;  The information obtaining module is configured to obtain the network port information of the wireless data card and the routing information of the IP routing table;
网口切换模块,设置为根据无线数据卡的网口信息修改 IP路由表中的无 线数据卡和其它网卡的 Metric值以调整默认网关。  The network port switching module is configured to modify the metric value of the wireless data card and other network cards in the IP routing table according to the network port information of the wireless data card to adjust the default gateway.
其中, 该装置还包括:  Wherein, the device further comprises:
检测模块, 设置为在使用无线数据卡时, 如果获取到无线数据卡的检测 注册表中的自定义的键值, 则确定该无线数据卡已接入网口。 其中, 所述信息获取模块, 设置为获取无线数据卡的网口信息包括: 获取各网口的网口信息以及通过无线数据卡的网口驱动获得连接该无线 数据卡的网口的网口名称, 根据该网口名称在所述各网口的网口信息中获得 该无线数据卡的网口信息。 The detecting module is configured to: when the wireless data card is used, if the customized key value in the detection registry of the wireless data card is obtained, it is determined that the wireless data card is connected to the network port. The information acquiring module is configured to obtain the network port information of the wireless data card, including: obtaining network port information of each network port, and obtaining a network port name of the network port that connects the wireless data card by using a network port driver of the wireless data card And obtaining the network port information of the wireless data card in the network port information of each network port according to the network port name.
其中, 所述信息获取模块, 设置为获取无线数据卡的网口信息, 是通过 建立从各网口的网口信息中索引该无线数据卡的网口信息的索引号的方式获 付。  The information obtaining module is configured to obtain the network port information of the wireless data card, and is obtained by establishing an index number of the network port information of the wireless data card from the network port information of each network port.
其中, 所述信息获取模块, 设置为获取 IP路由表的路由信息包括: 获取 IP路由表的函数以获取到所有的路由信息, 并在所有的路由信息中查找指定 路由的网络目标地址所对应的路由信息。  The information obtaining module is configured to obtain the routing information of the IP routing table, including: acquiring a function of the IP routing table to obtain all routing information, and searching for the network destination address corresponding to the specified route in all the routing information. Routing information.
其中, 所述网口切换模块, 设置为根据无线数据卡的网口信息修改 IP路 由表中的无线数据卡和其它网卡的 Metric值以调整默认网关, 包括:  The network port switching module is configured to modify the metric value of the wireless data card and other network cards in the IP routing table according to the network port information of the wireless data card to adjust the default gateway, including:
根据所述索引号在所述指定路由的网络目标地址所对应的路由信息中查 找与所述无线数据卡对应的路由信息; 以及  And searching, according to the index number, routing information corresponding to the wireless data card in routing information corresponding to the network destination address of the specified route; and
通过修改指定路由信息的函数修改 IP路由表中与该无线数据卡对应的路 由信息中的 Metric值以及修改 IP路由表中与其它网口对应的路由信息中的 Metric值, 使与所述无线数据卡对应的路由信息中的 Metric值小于与所述其 它网口对应的路由信息中的 Metric值。  Modifying the metric value in the routing information corresponding to the wireless data card in the IP routing table and modifying the metric value in the routing information corresponding to the other network port in the IP routing table by modifying the function of the specified routing information, so as to make the wireless data The metric value in the routing information corresponding to the card is smaller than the metric value in the routing information corresponding to the other network port.
由于,本发明实施例的方法及装置通过 UI获取无线数据卡的网口信息和 IP路由表的路由信息,根据无线数据卡的网口信息修改 IP路由表中的无线数 据卡和其它网卡的 Metric值以调整默认网关, 使默认网关自动跳转到无线数 据卡的 IP地址,从而可以无缝切换到无线数据卡的网关以实现自动匹配网口 的效果, 因此, 通过该方法及装置无需用户进行断网连网操作即可实现数据 处理装置自动的从其自带的无线网卡的网口切换到无线数据卡的网口。 参照前述实施例对本发明实施例进行了详细的说明, 本领域的普通技术人员 应当理解: 其依然可以对前述各实施例所记载的技术方案进行修改, 或者对 其中部分技术特征进行等同替换; 而这些修改或者替换, 并不使相应技术方 案的本质脱离本发明实施例各实施例技术方案的精神和范围。 The method and device of the embodiment of the present invention acquires the network port information of the wireless data card and the routing information of the IP routing table through the UI, and modifies the wireless data card in the IP routing table and the metric of the other network card according to the network port information of the wireless data card. The value is used to adjust the default gateway, so that the default gateway automatically jumps to the IP address of the wireless data card, so that the gateway of the wireless data card can be seamlessly switched to achieve the effect of automatically matching the network port. Therefore, the method and the device do not need to be performed by the user. The network connection operation can realize that the data processing device automatically switches from the network port of its own wireless network card to the network port of the wireless data card. The embodiments of the present invention are described in detail with reference to the foregoing embodiments, and those skilled in the art should understand that the technical solutions described in the foregoing embodiments may be modified, or some of the technical features may be equivalently replaced. These modifications or substitutions do not make the corresponding technical party The essence of the present invention departs from the spirit and scope of the technical solutions of the embodiments of the embodiments of the present invention.
工业实用性 Industrial applicability
本发明实施例中,通过获取无线数据卡的网口信息和 IP路由表的路由信 息,根据无线数据卡的网口信息修改 IP路由表中的无线数据卡和其它网卡的 Metric值以调整默认网关, 使默认网关自动跳转到无线数据卡的 IP地址, 从 而可以无缝切换到无线数据卡的网关以实现自动匹配网口的效果, 因此, 通 过该方法无需用户进行断网连网操作即可实现数据处理装置自动的从其自带 的无线网卡的网口切换到无线数据卡的网口。  In the embodiment of the present invention, the network information of the wireless data card and the routing information of the IP routing table are obtained, and the metric value of the wireless data card and other network cards in the IP routing table is modified according to the network port information of the wireless data card to adjust the default gateway. The default gateway automatically jumps to the IP address of the wireless data card, so that the gateway of the wireless data card can be seamlessly switched to achieve the effect of automatically matching the network port. Therefore, the method does not require the user to perform the network disconnection operation. The data processing device automatically switches from the network port of the wireless network card that is provided to the network port of the wireless data card.

Claims

权 利 要 求 书 claims
1、 一种网口自动无缝切换的方法, 包括: 通过获取无线数据卡的网口信息和 IP路由表的路由信息,根据无线数据 卡的网口信息修改 IP路由表中的无线数据卡和其它网卡的 Metric值以调整默 认网关。 1. A method for automatic and seamless switching of network ports, including: obtaining the network port information of the wireless data card and the routing information of the IP routing table, and modifying the wireless data card and the routing information in the IP routing table according to the network port information of the wireless data card. Metric values of other network cards to adjust the default gateway.
2、 如权利要求 1所述的网口自动无缝切换的方法, 还包括: 在使用无线 数据卡时, 如果获取到无线数据卡的检测注册表中的自定义的键值, 则确定 该无线数据卡已接入网口。 2. The method for automatic and seamless switching of network ports as claimed in claim 1, further comprising: when using a wireless data card, if a customized key value in the detection registry of the wireless data card is obtained, then determining the wireless data card. The data card has been connected to the network port.
3、 如权利要求 1所述的网口自动无缝切换的方法, 其中: 所述获取无线 数据卡的网口信息包括: 3. The method for automatic and seamless switching of network ports as claimed in claim 1, wherein: the obtaining the network port information of the wireless data card includes:
获取各网口的网口信息以及通过无线数据卡的网口驱动获得连接该无线 数据卡的网口的网口名称, 根据该网口名称在所述各网口的网口信息中获得 该无线数据卡的网口信息。 Obtain the network port information of each network port and obtain the network port name of the network port connected to the wireless data card through the network port driver of the wireless data card, and obtain the wireless network port from the network port information of each network port according to the network port name. Network port information of the data card.
4、 如权利要求 3所述的网口自动无缝切换的方法, 其中: 所述获取无线 数据卡的网口信息是通过建立从各网口的网口信息中索引该无线数据卡的网 口信息的索引号的方式获得的。 4. The method for automatic and seamless switching of network ports as claimed in claim 3, wherein: obtaining the network port information of the wireless data card is by indexing the network port of the wireless data card from the network port information of each network port. The information is obtained by the index number.
5、 如权利要求 4所述的网口自动无缝切换的方法, 其中: 所述获取 IP 路由表的路由信息包括: 获取 IP路由表的函数以获取到所有的路由信息, 并 在所有的路由信息中查找指定路由的网络目标地址所对应的路由信息。 5. The method for automatic and seamless switching of network ports according to claim 4, wherein: the obtaining routing information of the IP routing table includes: obtaining a function of the IP routing table to obtain all routing information, and in all routing Search the information for the routing information corresponding to the network destination address of the specified route.
6、 如权利要求 5所述的网口自动无缝切换的方法, 其中: 所述根据无线 数据卡的网口信息修改 IP路由表中的无线数据卡和其它网卡的 Metric值以调 整默认网关, 包括: 6. The method for automatic and seamless switching of network ports as claimed in claim 5, wherein: modifying the Metric values of the wireless data card and other network cards in the IP routing table according to the network port information of the wireless data card to adjust the default gateway, include:
根据所述索引号在所述指定路由的网络目标地址所对应的路由信息中查 找与所述无线数据卡对应的路由信息; 以及 Search the routing information corresponding to the wireless data card in the routing information corresponding to the network target address of the specified route according to the index number; and
通过修改指定路由信息的函数修改 IP路由表中与该无线数据卡对应的路 由信息中的 Metric值以及修改 IP路由表中与其它网口对应的路由信息中的 Metric值, 使与所述无线数据卡对应的路由信息中的 Metric值小于与所述其 它网口对应的路由信息中的 Metric值。 Modify the Metric value in the routing information corresponding to the wireless data card in the IP routing table by modifying the function of the specified routing information and modify the Metric value in the routing information corresponding to other network ports in the IP routing table, so that the wireless data The Metric value in the routing information corresponding to the card is smaller than the Metric value in the routing information corresponding to the other network ports.
7、 如权利要求 6所述的网口自动无缝切换的方法, 还包括: 建立数据组 A, 将所述获取的各网口的网口信息保存在该数据组 A中; 建立数据组 B, 将所述索引号保存在该数据组 B中, 通过该索引号在数 据组 A中索引无线数据卡的网口信息; 7. The method for automatic and seamless switching of network ports as claimed in claim 6, further comprising: establishing a data group A, and storing the acquired network port information of each network port in the data group A; establishing a data group B. , save the index number in the data group B, and use the index number to index the network port information of the wireless data card in the data group A;
建立数据组 C, 将所述通过获取 IP路由表的函数以获取到的所有的路由 信息保存在该数据组 C中; Establish a data group C, and save all the routing information obtained by the function of obtaining the IP routing table in the data group C;
建立数据组 D, 将所述在所有的路由信息中查找到的所述指定路由的网 络目标地址所对应的路由信息保存在该数据组 D中; Establish a data group D, and save the routing information corresponding to the network target address of the designated route found in all routing information in the data group D;
建立数据组 E, 通过所述数据组 B中的索引号在所述数据组 D中查找与 所述无线数据卡对应的路由信息并将该路由信息保存在数据组 E中; Establish data group E, search the routing information corresponding to the wireless data card in the data group D through the index number in the data group B and save the routing information in the data group E;
建立数据组 F, 将所述其它网口的路由信息保存在该数据组 F中; 修改所述数据组 E和所述数据组 F中的 Metric值, 使所述数据组 E中的 Metric值小于所述数据组 F中的 Metric值; 以及 Establish a data group F, and save the routing information of the other network ports in the data group F; Modify the data group E and the Metric values in the data group F so that the Metric value in the data group E is less than Metric values in the data set F; and
根据所述数据组 E的 Metric值和所述数据组 F中的 Metric值,通过修改 指定路由信息的函数修改 IP路由表中与所述无线数据卡对应的路由信息中的 Metric值以及修改 IP路由表中与所述其它网口对应的路由信息中的 Metric 值。 According to the Metric value in the data group E and the Metric value in the data group F, modify the Metric value in the routing information corresponding to the wireless data card in the IP routing table and modify the IP route through a function that modifies the specified routing information. Metric value in the routing information corresponding to the other network ports in the table.
8、 一种网口自动无缝切换的装置, 包括: 8. A device for automatic and seamless switching of network ports, including:
信息获取模块,设置为通过获取无线数据卡的网口信息和 IP路由表的路 由信息; The information acquisition module is configured to obtain the network port information of the wireless data card and the routing information of the IP routing table;
网口切换模块,设置为根据无线数据卡的网口信息修改 IP路由表中的无 线数据卡和其它网卡的 Metric值以调整默认网关。 The network port switching module is configured to modify the Metric values of the wireless data card and other network cards in the IP routing table based on the network port information of the wireless data card to adjust the default gateway.
9、 如权利要求 8所述的装置, 还包括: 9. The device of claim 8, further comprising:
检测模块, 设置为在使用无线数据卡时, 如果获取到无线数据卡的检测 注册表中的自定义的键值, 则确定该无线数据卡已接入网口。 The detection module is configured to determine that when a wireless data card is used, if a custom key value in the detection registry of the wireless data card is obtained, the wireless data card has been connected to the network port.
10、 如权利要求 8所述的装置, 其中: 所述信息获取模块, 设置为获取 无线数据卡的网口信息包括: 获取各网口的网口信息以及通过无线数据卡的网口驱动获得连接该无线 数据卡的网口的网口名称, 根据该网口名称在所述各网口的网口信息中获得 该无线数据卡的网口信息。 10. The device according to claim 8, wherein: the information acquisition module configured to obtain the network port information of the wireless data card includes: Obtain the network port information of each network port and obtain the network port name of the network port connected to the wireless data card through the network port driver of the wireless data card, and obtain the wireless network port from the network port information of each network port according to the network port name. Network port information of the data card.
11、 如权利要求 10所述的装置, 其中: 所述信息获取模块, 设置为获取 无线数据卡的网口信息, 是通过建立从各网口的网口信息中索引该无线数据 卡的网口信息的索引号的方式获得的。 11. The device according to claim 10, wherein: the information acquisition module is configured to obtain the network port information of the wireless data card by indexing the network port of the wireless data card from the network port information of each network port. The information is obtained by the index number.
12、 如权利要求 11所述的装置, 其中: 12. The device of claim 11, wherein:
所述信息获取模块, 设置为获取 IP路由表的路由信息包括: 获取 IP路 由表的函数以获取到所有的路由信息, 并在所有的路由信息中查找指定路由 的网络目标地址所对应的路由信息。 The information acquisition module is configured to obtain routing information of the IP routing table, including: obtaining a function of the IP routing table to obtain all routing information, and searching for routing information corresponding to the network target address of the specified route in all routing information. .
13、 如权利要求 12所述的装置, 其中: 13. The device of claim 12, wherein:
所述网口切换模块,设置为根据无线数据卡的网口信息修改 IP路由表中 的无线数据卡和其它网卡的 Metric值以调整默认网关, 包括: The network port switching module is configured to modify the Metric values of the wireless data card and other network cards in the IP routing table according to the network port information of the wireless data card to adjust the default gateway, including:
根据所述索引号在所述指定路由的网络目标地址所对应的路由信息中查 找与所述无线数据卡对应的路由信息; 以及 Search the routing information corresponding to the wireless data card in the routing information corresponding to the network target address of the specified route according to the index number; and
通过修改指定路由信息的函数修改 IP路由表中与该无线数据卡对应的路 由信息中的 Metric值以及修改 IP路由表中与其它网口对应的路由信息中的 Metric值, 使与所述无线数据卡对应的路由信息中的 Metric值小于与所述其 它网口对应的路由信息中的 Metric值。 Modify the Metric value in the routing information corresponding to the wireless data card in the IP routing table by modifying the function of the specified routing information and modify the Metric value in the routing information corresponding to other network ports in the IP routing table, so that the wireless data The Metric value in the routing information corresponding to the card is smaller than the Metric value in the routing information corresponding to the other network ports.
PCT/CN2013/079924 2012-10-31 2013-07-23 Method and device for automatic, seamless network port switching WO2013182166A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210428141.4 2012-10-31
CN201210428141.4A CN103796266B (en) 2012-10-31 2012-10-31 A kind of method of network interface automatic seamless switching

Publications (1)

Publication Number Publication Date
WO2013182166A1 true WO2013182166A1 (en) 2013-12-12

Family

ID=49711420

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/079924 WO2013182166A1 (en) 2012-10-31 2013-07-23 Method and device for automatic, seamless network port switching

Country Status (2)

Country Link
CN (1) CN103796266B (en)
WO (1) WO2013182166A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101710864A (en) * 2009-11-23 2010-05-19 中兴通讯股份有限公司 Collocation method and device for multi-gateway Linux server
CN102222207A (en) * 2011-05-23 2011-10-19 深圳市共进电子有限公司 Method for realizing networking by switching 3G data card working modes in Linux system
CN102546154A (en) * 2011-12-19 2012-07-04 上海顶竹通讯技术有限公司 Mobile communication network and switching method of terminal
CN102752825A (en) * 2012-07-19 2012-10-24 德明通讯(上海)有限公司 Seamless switch fusion method for mobile terminal in long term evolution (LTE) network and wireless fidelity (Wi-Fi) hot spot network

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080080440A1 (en) * 2006-09-30 2008-04-03 Yarvis Mark D Device interfaces to integrate cooperative diversity and mesh networking
CN101110832A (en) * 2007-08-20 2008-01-23 华为技术有限公司 Routing device and method for transmitting routing
CN101951658A (en) * 2010-09-16 2011-01-19 北京邮电大学 Mobile self-networking Internet gateway routing selection method based on path quality perception
CN102098763A (en) * 2010-12-29 2011-06-15 中兴通讯股份有限公司 Dual-mode wireless terminal and handover method thereof
CN102231878B (en) * 2011-06-21 2017-09-29 中兴通讯股份有限公司 Data card start-up method and data card

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101710864A (en) * 2009-11-23 2010-05-19 中兴通讯股份有限公司 Collocation method and device for multi-gateway Linux server
CN102222207A (en) * 2011-05-23 2011-10-19 深圳市共进电子有限公司 Method for realizing networking by switching 3G data card working modes in Linux system
CN102546154A (en) * 2011-12-19 2012-07-04 上海顶竹通讯技术有限公司 Mobile communication network and switching method of terminal
CN102752825A (en) * 2012-07-19 2012-10-24 德明通讯(上海)有限公司 Seamless switch fusion method for mobile terminal in long term evolution (LTE) network and wireless fidelity (Wi-Fi) hot spot network

Also Published As

Publication number Publication date
CN103796266A (en) 2014-05-14
CN103796266B (en) 2017-11-24

Similar Documents

Publication Publication Date Title
US9444743B2 (en) Network system, switch and connected terminal detection method
EP3484196B1 (en) Method and apparatus for registering wireless device in wireless communication system
US8792371B2 (en) Method for determining a group owner in a wireless network
WO2016165235A1 (en) Wireless network connection method, device and terminal
WO2014161478A1 (en) Switching method for network interfaces, access device and computer storage medium
US8892030B2 (en) Wireless communication apparatus for wireless network and computer readable media
CN112119673B (en) Electronic device supporting multiple wireless communication protocols and method thereof
WO2019184805A1 (en) Network switching method, communication apparatus and communication device
CN103974376A (en) Network connection assisting system and method
US20180123891A1 (en) Method and apparatus for automatic networking of gateway device
WO2015196472A1 (en) Method, terminal, client, smart card and system for accessing wireless network
US10321494B2 (en) Method and apparatus for communicating in a wireless communication network
JP2013130920A (en) Communication system, network storage, server device, and program
TW201722191A (en) Method and system for setting network of connected device
CN104519482A (en) Equipment parameter configuration method and device
WO2015139401A1 (en) Establishment method and system for wireless network, and wireless routing device
US20160294465A1 (en) Information collection system, relay terminal, control method for relay terminal to connect to center system, sensor terminal, and control method for sensor terminal to connect to center system
WO2015149367A1 (en) Method and device for processing packet
CN104080193A (en) Information processing system, information processing apparatus, and computer-readable medium
CN104113582B (en) Communication equipment and its control method
WO2013182166A1 (en) Method and device for automatic, seamless network port switching
JP2017058881A (en) Communication apparatus, control method thereof, and program
TWI566553B (en) A Router and a Method for Establishing Network Connection Using the Router
US20120124652A1 (en) Synchronization apparatus and method
US11849339B2 (en) Selecting a role for an access point

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13800547

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13800547

Country of ref document: EP

Kind code of ref document: A1