An apparatus and method for encapsulating and forwarding packets on a
network are disclosed. The network can include a first subnetwork such as
a virtual private network connected to a larger public network such as
the Internet. An encapsulating header is attached to a packet to be
transferred across the public network from a source node on the private
network to a destination node on the private network, such that the
packet can be transferred across the public network. The encapsulating
header includes a value which is derived from the private header on the
packet used to transfer the packet along the private network. The value
is therefore associated with a source/destination pair within the private
network. The value can be derived by performing a hash operation on the
private network header. After the public network header containing the
value derived from the private network header is attached to the packet,
it can be forwarded across the public network. A logical operation such
as a hash operation can be performed on the public network header to
select one of a plurality of possible paths on the public network to
forward the packet. As a result, each source/destination pair within the
private network will be associated with a path within the public network.
Traffic from the private network can therefore be distributed over
multiple paths in the public network, thus reducing or eliminating
traffic congestion and overload.