Patent ID: 7751405

Claim:
A method comprising: receiving a routing advertisement from a network device, wherein the routing advertisement includes a destination reachable by the network device, and a tunnel attribute that specifies a type of network tunnel to be established to the network device for forwarding traffic to the destination, and wherein the routing advertisement specifies available routes within a network in accordance with a routing protocol; automatically establishing a network tunnel to the network device in accordance with the tunnel attribute; forwarding network traffic to the destination using the established network tunnel; maintaining a reference count for the established network tunnel; incrementing the reference count when network traffic associated with another destination is added to the established network tunnel in response to receiving subsequent routing advertisements having the same tunnel attribute from the same network device; receiving a routing advertisement that includes a request to withdraw a route associated with the established network tunnel; decrementing the reference count based on the request; and when the reference count is zero, tearing down the network tunnel.