[0001] This application claims priority to Chinese Patent Application No.
201310066030.8, filed with the Chinese Patent Office on February 28, 2013 and entitled "MULTILINK-BASED
DATA TRANSMISSION METHOD AND DEVICE", which is incorporated herein by reference in
its entirety.
TECHNICAL FIELD
[0002] The present invention relates to the communications field, and in particular, to
a multilink-based data transmission method and device.
BACKGROUND
[0003] Currently, a network device that supports multiple links is more widely applied,
for example, a network device that supports both a digital subscriber line (Digital
Subscriber Line, DSL) network link and a Long Term Evolution (Long Term Evolution,
LTE) network link. The most extensive implementation manner applied by the current
network device that supports multiple links is to fixedly bear different services
on different links. For example, a network television service and an Internet service
are borne on the DSL network link, and a voice service is borne on the LTE network
link.
[0004] However, in the foregoing technical solutions, because the links supported by the
network device fixedly bear some services and services used by a user are not fixed,
for example, the network television service is more frequently used while the voice
service is less used by the user in a time segment A; as a result, a load of a link
used to bear the network television service is extremely heavy, and a load of a link
used to bear the voice service is extremely light; therefore, a utilization rate of
the links supported by the network device is extremely low.
[0005] Embodiments of the present invention provide a multilink-based data transmission
method and device, which can improve a utilization rate of links supported by a network
device.
[0006] According to a first aspect, an embodiment of the present invention provides a multilink-based
data transmission method, and the method includes:
establishing separately, by the first device, first tunnels in multiple different
types of links in which the first device and the second device have established a
communication connection;
establishing, by the first device, a second tunnel that crosses the first tunnels
established in the multiple different types of links;
analyzing, by the first device, a load state of each first tunnel crossed by the second
tunnel, and selecting a first tunnel used to transmit a target packet; and
encapsulating, by the first device, the target packet into the second tunnel, and
sending, to the second device, through the first tunnel used to transmit the target
packet, the packet encapsulated into the second tunnel.
[0007] In a first possible implementation manner, the sending, to the second device, through
the first tunnel used to transmit the target packet, the packet encapsulated into
the second tunnel includes:
encapsulating, by the first device, into the first tunnel used to transmit the target
packet, the packet encapsulated into the second tunnel, and sending, to the second
device through the first tunnel, the packet that is encapsulated into the first tunnel
used to transmit the target packet.
[0008] With reference to the first possible implementation manner of the first aspect, the
first tunnel is a tunnel that crosses a virtual link, and in a second possible implementation
manner, the sending, to the second device through the first tunnel, the packet that
is encapsulated into the first tunnel used to transmit the target packet includes:
encapsulating, by the first device, into the virtual link crossed by the first tunnel,
the packet that is encapsulated into the first tunnel used to transmit the target
packet, and sending a packet encapsulated into the virtual link to the second device.
[0009] With reference to any one of the foregoing implementation manners, in a third possible
implementation manner, a connection between the first device and the second device
includes:
links established by the first device with the second device by using different interfaces;
or
links established by the second device with different interfaces on the second device
by using a same interface.
[0010] According to a second aspect, an embodiment of the present invention provides a data
transmission device, and the device includes a first establishing unit, a second establishing
unit, an analyzing unit, and a sending unit, where:
the first establishing unit is configured to separately establish first tunnels in
multiple different types of links in which the data transmission device and the second
device have established a communication connection;
the second establishing unit is configured to establish a second tunnel that crosses
the first tunnels established in the multiple different types of links;
the analyzing unit is configured to analyze a load state of each first tunnel crossed
by the second tunnel, and select a first tunnel used to transmit a target packet;
and
the sending unit is configured to encapsulate the target packet into the second tunnel,
and send, to the second device, through the first tunnel used to transmit the target
packet, the packet encapsulated into the second tunnel.
[0011] In a first possible implementation manner, the sending unit is further configured
to encapsulate, into the first tunnel used to transmit the target packet, the packet
encapsulated into the second tunnel, and send, to the second device through the first
tunnel, the packet that is encapsulated into the first tunnel used to transmit the
target packet.
[0012] With reference to the first possible implementation manner of the second aspect,
in a second possible implementation manner, the first tunnel is a tunnel that crosses
a virtual link, and the sending unit encapsulates, into the virtual link crossed by
the first tunnel, the packet that is encapsulated into the first tunnel used to transmit
the target packet, and sends a packet encapsulated into the virtual link to the second
device.
[0013] With reference to any one of the foregoing implementation manners, in a third possible
implementation manner, a connection between the data transmission device and the second
device includes:
links established by the data transmission device with the second device by using
different interfaces; or
links established by the second device with different interfaces on the second device
by using a same interface.
[0014] According to a third aspect, an embodiment of the present invention further provides
a multilink-based data transmission system, and the system includes a first device
and a second device, where:
the first device is configured to separately establish first tunnels in multiple different
types of links in which the first device and the second device have established a
communication connection, and establish a second tunnel that crosses the first tunnels
established in the multiple different types of links; analyze a load state of each
first tunnel crossed by the second tunnel, and select a first tunnel used to transmit
a target packet; and encapsulate the target packet into the second tunnel, and send,
to the second device, through the first tunnel used to transmit the target packet,
a packet encapsulated into the second tunnel; and
the second device is configured to receive, through the first tunnel used to transmit
the target packet, the packet sent by the first device, and decapsulate the packet,
so as to obtain the target packet.
[0015] In a first possible implementation manner, the first device is further configured
to: encapsulate, into the first tunnel used to transmit the target packet, the packet
encapsulated into the second tunnel, and send, to the second device through the first
tunnel, the packet that is encapsulated into the first tunnel used to transmit the
target packet.
[0016] In the foregoing technical solutions, a first device separately establishes first
tunnels in multiple different types of links in which the first device and the second
device have established a communication connection; the first device establishes a
second tunnel that crosses the first tunnels established in the multiple different
types of links; the first device analyzes a load state of each first tunnel crossed
by the second tunnel, and selects a first tunnel used to transmit a target packet;
and the first device encapsulates the target packet into the second tunnel, and sends,
to the second device, through the first tunnel used to transmit the target packet,
a packet encapsulated into the second tunnel. That is, the first tunnel for transmitting
the packet is selected according to a load state of the first tunnels. Therefore,
a transmission path is properly allocated. In this way, a utilization rate of links
supported by a network device can be improved.
BRIEF DESCRIPTION OF DRAWINGS
[0017] To describe the technical solutions in the embodiments of the present invention or
in the prior art more clearly, the following briefly introduces the accompanying drawings
required for describing the embodiments or the prior art. Apparently, the accompanying
drawings in the following description show merely some embodiments of the present
invention, and a person of ordinary skill in the art may still derive other drawings
from these accompanying drawings without creative efforts.
FIG. 1 is a schematic flowchart of a multilink-based data transmission method according
to an embodiment of the present invention;
FIG. 2 is a schematic flowchart of another multilink-based data transmission method
according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a data transmission device according to
an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of another data transmission device according
to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a multilink-based data transmission system
according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a data transmission device according to
an embodiment of the present invention; and
FIG. 7 is a schematic structural diagram of another data transmission device according
to an embodiment of the present invention.
DESCRIPTION OF EMBODIMENTS
[0018] The following clearly and completely describes the technical solutions in the embodiments
of the present invention with reference to the accompanying drawings in the embodiments
of the present invention. Apparently, the described embodiments are merely a part
rather than all of the embodiments of the present invention. All other embodiments
obtained by a person of ordinary skill in the art based on the embodiments of the
present invention without creative efforts shall fall within the protection scope
of the present invention.
[0019] FIG. 1 is a schematic flowchart of a multilink-based data transmission method according
to an embodiment of the present invention, and as shown in FIG. 1, the method includes:
101. A first device separately establishes first tunnels in multiple different types
of links in which the first device and a second device have established a communication
connection.
102. The first device establishes a second tunnel that crosses the first tunnels established
in the multiple different types of links.
103. The first device analyzes a load state of each first tunnel crossed by the second
tunnel, and selects a first tunnel used to transmit a target packet.
104. The first device encapsulates the target packet into the second tunnel, and sends,
to the second device, through the first tunnel used to transmit the target packet,
a packet encapsulated into the second tunnel.
[0020] As an optional implementation manner, the first device may be a home gateway device
and the second device may be a server, such as an aggregation server. The packet in
this implementation manner may be an uplink packet sent by a device connected to the
home gateway device.
[0021] As an optional implementation manner, the first device may be a server device, such
as an aggregation server, and the second device may be a home gateway device. The
packet in this implementation manner may be a downlink packet sent by a network side.
[0022] In the foregoing technical solution, a first device separately establishes first
tunnels in multiple different types of links in which the first device and the second
device have established a communication connection; the first device establishes a
second tunnel that crosses the first tunnels established in the multiple different
types of links; the first device analyzes a load state of each first tunnel crossed
by the second tunnel, and selects a first tunnel used to transmit a target packet;
and the first device encapsulates the target packet into the second tunnel, and sends,
to the second device, through the first tunnel used to transmit the target packet,
a packet encapsulated into the second tunnel. That is, the first tunnel for transmitting
the packet is selected according to a load state of the first tunnels. Therefore,
a transmission path is properly allocated. In this way, a utilization rate of links
supported by a network device can be improved.
[0023] FIG. 2 is a schematic flowchart of another multilink-based data transmission method
according to an embodiment of the present invention, and as shown in FIG. 2, the method
includes:
[0024] 201. A first device separately establishes first tunnels in multiple different types
of links in which the first device and the second device have established a communication
connection.
[0025] Optionally, the links that connect the first device and the second device may include:
a digital subscriber line (Digital Subscriber Line, DSL) link and a Long Term Evolution
(Long Term Evolution, LTE) link. Certainly, the DSL link and the LTE link are only
examples in this embodiment of the present invention, and in this embodiment of the
present invention, the number of links, a layer of a link, a form of a link, and a
path of a link are not limited.
[0026] Optionally, the first tunnel may be Generic Routing Encapsulation (Generic Route
Encapsulation, GRE) tunnels. Certainly, the first tunnels may also be other point
to point tunnels, such as virtual private network (Virtual Private Network, VPN) tunnels.
202. The first device establishes a second tunnel that crosses the first tunnels established
in the multiple different types of links.
[0027] Optionally, the crossing indicates that the second tunnel is borne on the first tunnels
established in the multiple different types of links, and that a packet at a source
point of the second tunnel may be transmitted to an end point of the second tunnel
through any first tunnel crossed by the second tunnel.
[0028] Optionally, for establishing first tunnels in the links, whether other tunnels can
further be established after one first tunnel is established in one link is not limited
in this embodiment of the present invention.
[0029] Optionally, the second tunnel may be a virtual tunnel that crosses the first tunnels
established in the multiple different types of links, such as a Layer 2 Tunneling
Protocol (Layer 2 Tunneling Protocol, L2TP) VPN tunnel. The encapsulating the target
packet into the second tunnel may refer to performing L2TP encapsulation on the target
packet.
203. The first device analyzes a load state of each first tunnel crossed by the second
tunnel, and selects a first tunnel used to transmit a target packet.
[0030] Optionally, the analyzing may be analyzing the load state borne by each link, or
may be analyzing a load state about efficiency and the like of a transmission load
of each link, or analyzing a network parameter and a device status that relate to
packet transmission.
[0031] 204. The first device encapsulates the target packet into the second tunnel, encapsulates,
into the first tunnel used to transmit the target packet, the packet encapsulated
into the second tunnel, and sends, to the second device through the first tunnel,
the packet that is encapsulated into the first tunnel used to transmit the target
packet.
[0032] Optionally, when the first tunnel is a GRE tunnel, the encapsulating, into the first
tunnel used to transmit the target packet, the packet encapsulated into the second
tunnel refers to performing GRE encapsulation on the packet encapsulated into the
second tunnel.
[0033] As an optional implementation manner, before step 201, the method may further include:
translating, by the first device, the target packet into a target packet with a public
IP address.
[0034] Optionally, the translating the target packet into a target packet of a public IP
address is translating an IP address of the target packet into the public IP address,
such as performing network address translation (Network Address Translation, NAT)
on the target packet.
[0035] The public IP address may be a public IP address acquired from a Dynamic Host Configuration
Protocol (Dynamic Host Configuration Protocol, DHCP) server, or may be a public IP
address acquired from a PPPoE server. In this implementation manner, the first device
may be a home gateway device, and the second device may be a server, that is, the
target packet is an uplink packet.
[0036] As an optional implementation manner, the first tunnel is a tunnel that crosses a
virtual link, and the sending, to the second device through the first tunnel, the
packet that is encapsulated into the first tunnel used to transmit the target packet
in step 204 may include:
encapsulating, by the first device, into the virtual link crossed by the first tunnel,
the packet that is encapsulated into the first tunnel used to transmit the target
packet, and sending a packet encapsulated into the virtual link to the second device.
[0037] In this way, three-layer encapsulation on the target packet may be implemented, and
the virtual link may include:
a Point-to-Point Protocol (Point to Point Protocol, PPP) link or a Point-to-Point
Protocol over Ethernet (point to point protocol over Ethernet, PPPoE) link.
[0038] Optionally, the links that connect the first device and the second device include:
multiple links established by the first device with the second device by using different
interfaces. That is, each link established by the first device and the second device
is over an independent interface on the first device. For example, the links that
connect the first device and the second device include a DSL link and an LTE link;
and therefore, the first device includes a DSL interface which is configured to establish
a DSL link with the second device, and the first device further includes the LTE link
which is configured to establish an LTE link with the second device. Each link established
by the first device and the second device may be over a same interface on the second
device. That is, one interface on the second device separately establishes multiple
links with multiple interfaces on the first device. For example, when the links are
a DSL link and an LTE link, the establishing first tunnels in links that connect the
first device and the second device in step 201 may be that the DSL interface and the
LTE interface on the first device separately establish the first tunnels with the
second device. The first device may be a home gateway device, and the second device
may be a server, that is, the target packet is an uplink packet.
[0039] Optionally, the links that connect the first device and the second device include:
multiple links established by the first device with different interfaces on the second
device by using a same interface. That is, each link established by the first device
and the second device is over a same interface on the first device. For example, the
links that connect the first device and the second device include a DSL link and an
LTE link, and therefore, the first device may have only one interface which is configured
to establish a DSL link and an LTE link with the second device. Each link established
by the first device and the second device may be over an independent interface on
the second device. That is, multiple interfaces on the second device separately establish
multiple links with one interface on the first device. For example, when the links
are a DSL link and an LTE link, step 201 may be that an interface on the first device
establishes first tunnels with a DSL interface and an LTE interface on the second
device. The first device may be a server, and the second device may be a home gateway
device, that is, the target packet is a downlink packet.
[0040] As an optional implementation manner, after the first device sends the target packet
encapsulated into the first tunnel to the second device, the second device performs
decapsulation, corresponding to the first tunnel, on an acquired encapsulation packet
to acquire an encapsulation packet that includes the target packet and is corresponding
to the second tunnel; then the second device performs packet reassembly on the encapsulation
packet, and then performs decapsulation, corresponding to the second tunnel, on the
reassembled packet, so as to extract the target packet. The decapsulation corresponding
to the first tunnel is in one-to-one correspondence with encapsulation in step 204
in a one-to-one manner. For example, when the first tunnel is a GRE tunnel, the decapsulation
is GRE decapsulation. The removing encapsulation, corresponding to the second tunnel,
of the reassembled encapsulation packet is in one-to-one correspondence with the encapsulation
in step 204. For example, when the second tunnel is an L2TP tunnel, the removing is
removing L2TP encapsulation.
[0041] When the second device is a server, the second device may send the acquired target
packet to a destination address corresponding to the target packet.
[0042] When the second device is a home gateway device and after the second device extracts
the target packet, the second device may further perform NAT on the target packet,
that is, translate a public IP address of the target packet into an IP address of
a device connected to the second device and send the translated target packet to the
device connected to the second device.
[0043] Based on the foregoing embodiment, the foregoing technical solutions introduce multiple
optional implementation manners of improving a utilization rate of links supported
by a network device.
[0044] The following is apparatus embodiments of the present invention, and the apparatus
embodiments of the present invention are used to execute the methods implemented in
method Embodiment 1 and Embodiment 2 of the present invention. For ease of description,
only a part related to this embodiment of the present invention is shown. For specific
technical details that are not disclosed, refer to Embodiment 1 and Embodiment 2 of
the present invention.
[0045] FIG. 3 is a schematic structural diagram of a data transmission device according
to an embodiment of the present invention, and as shown in FIG. 3, the device includes
a first establishing unit 31, a second establishing unit 32, an analyzing unit 33,
and a sending unit 34, where:
the first establishing unit 31 is configured to separately establish first tunnels
in multiple different types of links in which the data transmission device and a second
device have established a communication connection;
the second establishing unit 32 is configured to establish a second tunnel that crosses
the first tunnels established in the multiple different types of links;
the analyzing unit 33 is configured to analyze a load state of each first tunnel crossed
by the second tunnel, and select a first tunnel used to transmit a target packet;
and
the sending unit 34 is configured to encapsulate the target packet into the second
tunnel, and send, to the second device, through the first tunnel used to transmit
the target packet, a packet encapsulated into the second tunnel.
[0046] As an optional implementation manner, the data transmission device may be a home
gateway device, and the second device may be a server, such as an aggregation server.
The target packet in this implementation manner may be an uplink packet sent by a
device connected to the home gateway device.
[0047] As an optional implementation manner, the data transmission device may be a server
device, such as an aggregation server, and the second device may be a home gateway
device. The target packet in this implementation manner may be a downlink packet sent
by a network side.
[0048] In the foregoing technical solutions, a data transmission device establishes a first
tunnel in each link in which the data transmission device and the second device have
established a communication connection; the data transmission device establishes,
with the second device, a second tunnel that crosses the first tunnel established
in each link; the data transmission device analyzes a load state of each first tunnel
crossed by the second tunnel, and selects a first tunnel used to transmit a target
packet; and the data transmission device encapsulates the target packet into the second
tunnel, and sends, to the second device, through the first tunnel used to transmit
the target packet, a packet encapsulated into the second tunnel. That is, the first
tunnel for transmitting the packet is selected according to a load state of the first
tunnels. Therefore, a transmission path is properly allocated. In this way, a utilization
rate of links supported by a network device can be improved.
[0049] FIG. 4 is a schematic structural diagram of a data transmission device according
to an embodiment of the present invention, and as shown in FIG. 4, the device includes
a first establishing unit 41, a second establishing unit 42, an analyzing unit 43,
and a sending unit 44, where:
the first establishing unit 41 is configured to separately establish first tunnels
in multiple different types of links in which the data transmission device and the
second device have established a communication connection;
the second establishing unit 42 is configured to establish a second tunnel that crosses
the first tunnels established in the multiple different types of links;
the analyzing unit 43 is configured to analyze a load state of each first tunnel crossed
by the second tunnel, and select a first tunnel used to transmit a target packet;
and
the sending unit 44 is configured to encapsulate the target packet into the second
tunnel, encapsulate, into the first tunnel used to transmit the target packet, the
packet encapsulated into the second tunnel, and send, to the second device through
the first tunnel, the packet that is encapsulated into the first tunnel used to transmit
the target packet.
[0050] Optionally, the links that connect the data transmission device and the second device
may include:
a DSL link and an LTE link. Certainly, the DSL link and the LTE link are only examples
in this embodiment of the present invention, and the number of links, a layer of a
link, a form of a link, and a path of a link are not limited in this embodiment of
the present invention.
[0051] Optionally, the first tunnels may be GRE tunnels. Certainly, the first tunnels may
also be other tunnels, such as VPN tunnels.
[0052] Optionally, the second tunnel may be a virtual tunnel that crosses each link connecting
the data transmission device and the second device, such as a Layer 2 Tunneling Protocol
(Layer 2 Tunneling Protocol, L2TP) VPN tunnel. The encapsulating the target packet
into the second tunnel may refer to performing L2TP encapsulation on the target packet.
[0053] Optionally, the analyzing may be analyzing the load state borne by each link, or
may be analyzing a load state about efficiency and the like of a transmission load
of each link, or analyzing a network parameter and a device status that relate to
packet transmission.
[0054] As an optional implementation manner, the data transmission device may further include:
a translating unit (not shown in the figure), configured to translate the target packet
into a target packet of a public IP address.
[0055] Optionally, the translating the target packet into a target packet of a public IP
address is translating an IP address of the target packet into the public IP address,
such as performing NAT on the target packet.
[0056] The public IP address may be a public IP address acquired from a DHCP server, or
may be a public IP address acquired from a PPP server. In this implementation manner,
the data transmission device may be a home gateway device, and the second device may
be a server, that is, the target packet is an uplink packet.
[0057] As an optional implementation manner, the first tunnel is a tunnel that crosses a
virtual link, and the sending unit 44 may further be configured to encapsulate, into
the virtual link crossed by the first tunnel, the packet that is encapsulated into
the first tunnel used to transmit the target packet, and send a packet encapsulated
into the virtual link to the second device.
[0058] In this way, three-layer encapsulation for the target packet may be implemented,
and the first virtual link may include:
a PPP link or a PPPoE link.
[0059] Optionally, the links that connect the data transmission device and the second device
include:
multiple links established by the data transmission device with the second device
by using different interfaces. That is, each link established by the data transmission
device and the second device is over an independent interface on the data transmission
device. For example, the links that connect the data transmission device and the second
device include a DSL link and an LTE link; and therefore, the data transmission device
includes a DSL interface which is configured to establish a DSL link with the second
device, and the data transmission device further includes the LTE link which is configured
to establish an LTE link with the second device. Each link established by the data
transmission device and the second device may be over a same interface on the second
device. That is, one interface on the second device separately establishes multiple
links with multiple interfaces on the data transmission device. In this implementation
manner, the data transmission device may be a home gateway device, and the second
device may be a server, that is, the target packet is an uplink packet.
[0060] Optionally, the links that connect the data transmission device and the second device
include:
multiple links established by the data transmission device with different interfaces
on the second device by using a same interface. That is, each link established by
the data transmission device and the second device is over the same interface on the
data transmission device. For example, the links that connect the data transmission
device and the second device include a DSL link and an LTE link; and therefore, the
data transmission device may have only one interface which is configured to establish
a DSL link and an LTE link with the second device. over the data transmission device
and the second device may be an independent interface on the second device. That is,
multiple interfaces on the second device separately establish multiple links with
one interface on the data transmission device. In this implementation manner, the
data transmission device may be a server, and the second device may be a home gateway
device, that is, the target packet is a downlink packet.
[0061] As an optional implementation manner, after the data transmission device sends the
target packet encapsulated into the first tunnel to the second device, the second
device performs decapsulation, corresponding to the first tunnel, on an acquired encapsulation
packet to acquire an encapsulation packet that includes the target packet and is corresponding
to the second tunnel; then the second device performs packet reassembly on the encapsulation
packet, and then removes encapsulation, corresponding to the second tunnel, of the
reassembled encapsulation packet so as to extract the target packet.
[0062] When the second device is a server, the second device may send the acquired target
packet to a destination address corresponding to the target packet.
[0063] When the second device is a home gateway device and after the second device extracts
the target packet, the second device may further perform NAT on the target packet,
that is, translate a public IP address of the target packet into an IP address of
a device connected to the second device, and send the translated target packet to
the device connected to the second device.
[0064] Based on the foregoing embodiment, the foregoing technical solutions introduce multiple
optional implementation manners of improving a utilization rate of links supported
by a network device.
[0065] FIG. 5 is a schematic structural diagram of a multilink-based data transmission system
according to an embodiment of the present invention, and as shown in FIG. 5, the system
includes a first device 51 and a second device 52, where:
the first device 51 is configured to separately establish first tunnels in multiple
different types of links in which the first device 51 and the second device 52 have
established a communication connection, and establish a second tunnel that crosses
the first tunnels established in the multiple different types of links; analyze a
load state of each first tunnel crossed by the second tunnel, and select a first tunnel
used to transmit a target packet; and encapsulate the target packet into the second
tunnel, and send, to the second device, through the first tunnel used to transmit
the target packet, a packet encapsulated into the second tunnel 52; and
the second device 52 is configured to receive, through the first tunnel used to transmit
the target packet, the packet sent by the first device, and decapsulate the packet,
so as to obtain the target packet.
[0066] As an optional implementation manner, the first device 51 may further be configured
to encapsulate, into the first tunnel used to transmit the target packet, the packet
encapsulated into the second tunnel, and send, to the second device through the first
tunnel, the packet that is encapsulated into the first tunnel used to transmit the
target packet.
[0067] As an optional implementation manner, the first device may be a home gateway device,
and the second device may be a server, such as an aggregation server. The packet in
this implementation manner may be an uplink packet sent by a device connected to the
home gateway device.
[0068] As an optional implementation manner, the first device may be a server device, such
as an aggregation server, and the second device may be a home gateway device. The
packet in this implementation manner may be a downlink packet sent by a network side.
[0069] In the foregoing technical solutions, a first device separately establishes first
tunnels in multiple different types of links in which the first device and the second
device have established a communication connection; the first device establishes a
second tunnel that crosses the first tunnels established in the multiple different
types of links; the first device analyzes a load state of each first tunnel crossed
by the second tunnel, and selects a first tunnel used to transmit a target packet;
and the first device encapsulates the target packet into the second tunnel, and sends,
to the second device, through the first tunnel used to transmit the target packet,
a packet encapsulated into the second tunnel. That is, the first tunnel for transmitting
the packet is selected according to a load state of the first tunnels. Therefore,
a transmission path is properly allocated. In this way, a utilization rate of links
supported by a network device can be improved.
[0070] FIG. 6 is a schematic structural diagram of another data transmission device according
to an embodiment of the present invention, and as shown in FIG. 6, the device includes
a memory 61, a transmitter 6, and a processor 63 that is connected to the memory 61
and the transmitter 62, where the memory 61 stores a set of program code, and the
processor 63 is configured to invoke a program stored in the memory to perform the
following operations:
establishing separately first tunnels in multiple different types of links in which
the data transmission device and a second device have established a communication
connection;
establishing a second tunnel that crosses the first tunnels established in the multiple
different types of links;
analyzing a load state of each first tunnel crossed by the second tunnel, and selecting
a first tunnel used to transmit a target packet; and
encapsulating the target packet into the second tunnel, and sending, by using the
transmitter 62 to the second device, through the first tunnel used to transmit the
target packet, a packet encapsulated into the second tunnel.
[0071] As an optional implementation manner, the data transmission device may be a home
gateway device, and the second device may be a server, such as an aggregation server.
The packet in this implementation manner may be an uplink packet sent by a device
connected to the home gateway device.
[0072] As an optional implementation manner, the data transmission device may be a server
device, such as an aggregation server, and the second device may be a home gateway
device. The packet in this implementation manner may be a downlink packet sent by
a network side.
[0073] In the foregoing technical solutions, a data transmission device separately establishes
first tunnels in multiple different types of links in which the data transmission
device and the second device have established a communication connection; the data
transmission device establishes a second tunnel that crosses the first tunnels established
in the multiple different types of links; the first device analyzes a load state of
each first tunnel crossed by the second tunnel, and selects a first tunnel used to
transmit a target packet; and the data transmission device encapsulates the target
packet into the second tunnel, and sends, to the second device, through the first
tunnel used to transmit the target packet, a packet encapsulated into the second tunnel.
That is, the first tunnel for transmitting the packet is selected according to a load
state of the first tunnels. Therefore, a transmission path is properly allocated.
In this way, a utilization rate of links supported by a network device can be improved.
[0074] FIG. 7 is a schematic structural diagram of another data transmission device according
to an embodiment of the present invention, and as shown in FIG. 7, the device includes
a memory 71, a transmitter 72, and a processor 73 that is connected to the memory
71 and the transmitter 72, where the memory 71 stores a set of program code, and the
processor 73 is configured to invoke a program stored in the memory to perform the
following operations:
establishing separately first tunnels in multiple different types of links in which
the data transmission device and the second device have established a communication
connection;
establishing a second tunnel that crosses the first tunnels established in the multiple
different types of links;
analyzing a load state of each first tunnel crossed by the second tunnel, and selecting
a first tunnel used to transmit a target packet; and
encapsulating the target packet into the second tunnel, encapsulating, into the first
tunnel used to transmit the target packet, the packet encapsulated into the second
tunnel, and sending by using the transmitter 72, to the second device through the
first tunnel, the packet that is encapsulated into the first tunnel used to transmit
the target packet.
[0075] Optionally, the links that connect the data transmission device and the second device
may include:
a DSL link and an LTE link. Certainly, the DSL link and the LTE link are only examples
in this embodiment of the present invention, and the number of links, a layer of a
link, a form of a link, and a path of a link are not limited in this embodiment of
the present invention.
[0076] Optionally, the first tunnels may be GRE tunnels. Certainly, the first tunnels may
also be other point to point tunnels, such as VPN tunnels.
[0077] Optionally, the second tunnel may be a virtual tunnel that crosses each link connecting
the data transmission device and the second device, such as an L2TP VPN tunnel. The
encapsulating the target packet into the second tunnel may refer to performing L2TP
encapsulation on the target packet.
[0078] Optionally, the analyzing may be analyzing the load state borne by each link, or
may be analyzing a load state about efficiency and the like of a transmission load
of each link, or analyzing a network parameter and a device status that relate to
packet transmission.
[0079] As an optional implementation manner, before performing the operation of establishing
first tunnels in each link connecting the data transmission device and the second
device, the processor 73 may further be configured to execute the following operation:
translating the target packet into a target packet of a public IP address.
[0080] Optionally, the translating the target packet into a target packet of a public IP
address is translating an IP address of the target packet into the public IP address,
such as performing network address translation (Network Address Translation, NAT)
on the target packet.
[0081] The public IP address may be a public IP address acquired from a Dynamic Host Configuration
Protocol (Dynamic Host Configuration Protocol, DHCP) server, or may be a public IP
address acquired from a PPPoE server. In this implementation manner, the data transmission
device may be a home gateway device, and the second device may be a server, that is,
the target packet is an uplink packet.
[0082] As an optional implementation manner, the first tunnel is a tunnel that crosses a
virtual link, and the sending, which is performed by the processor 73 using the transmitter
72, to the second device through the first tunnel, the packet that is encapsulated
into the first tunnel used to transmit the target packet may include:
encapsulating, into the virtual link crossed by the first tunnel, the packet that
is encapsulated into the first tunnel used to transmit the target packet, and sending,
by using the transmitter 72, a packet encapsulated into the virtual link to the second
device.
[0083] In this way, three-layer encapsulation for the target packet may be implemented,
and the virtual link may include:
a Point-to-Point Protocol (Point to Point Protocol, PPP) link or a Point-to-Point
Protocol over Ethernet (point to point protocol over Ethernet, PPPoE) link.
[0084] Optionally, the links that connect the data transmission device and the second device
include:
multiple links established by the data transmission device with the second device
by using different interfaces.
[0085] Optionally, the links that connect the data transmission device and the second device
include:
multiple links established by the data transmission device with different interfaces
on the second device by using a same interface.
[0086] When the second device is a server, the second device may send the acquired target
packet to a destination address corresponding to the target packet.
[0087] When the second device is a home gateway device and after the second device extracts
the target packet, the second device may further perform NAT on the target packet,
that is, translate a public IP address of the target packet into an IP address of
a device connected to the second device and send the translated target packet to the
device connected to the second device.
[0088] Based on the foregoing embodiment, the foregoing technical solutions introduce multiple
optional implementation manners of improving a utilization rate of links supported
by a data transmission device.
[0089] A person of ordinary skill in the art may understand that all or a part of the processes
of the methods in the embodiments may be implemented by a computer program instructing
relevant hardware. The program may be stored in a computer readable storage medium.
When the program runs, the processes of the methods in the embodiments are performed.
The foregoing storage medium may include a magnetic disk, an optical disc, a read-only
memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM).
[0090] The disclosed are merely exemplary embodiments of the present invention, but are
not intended to limit the scope of the present invention. Equivalent variation figured
out according to the claims shall fall within the protection scope of the present
invention.