TECHNIQUES FOR ROUTING AND FORWARDING BETWEEN MULTIPLE VIRTUAL ROUTERS IMPLEMENTED BY A SINGLE DEVICE
Techniques for routing and forwarding between multiple virtual routers implemented by a single device are described. A second virtual router is configured to learn routes from a first virtual router. A first route is inserted into a first routing table of the first virtual router, which includes a next hop corresponding to a physical network interface of the device leading to an external destination. The first route is distributed to a second virtual router to be installed in a second routing table as a second route, responsive to the second virtual router begin configured to learn routes from the first virtual router. Responsive to receiving a packet, the packet is forwarded according to a forwarding table entry corresponding to the second route of the second routing table to send the packet using the physical network interface to the external destination.
1 . A method in a virtual private network having a gateway, comprising:
instantiating a first virtual router in the virtual private network, wherein the first virtual router includes a routing table;
instantiating a second virtual router in the virtual private network, wherein the second virtual router includes a routing table;
peering the first virtual router and the second virtual router;
distributing a set of routes from the gateway to the first virtual router; and
distributing a set of routes from the gateway to the second virtual router.
2 . The method of claim 1 , wherein the first virtual router and the second virtual router are coupled across a subnetwork.
3 . The method of claim 1 , wherein the first virtual router and the second virtual router are assigned to different domains within the virtual private network.
4 . The method of claim 1 , wherein the routing table of the first virtual router is distributed to the routing table of the second virtual router.
5 . A method in a virtual private network, comprising:
instantiating a first virtual router with a routing table and establishing it as a gateway to the virtual private network;
instantiating a second virtual router with a routing table;
peering the first virtual router to the second virtual router in the virtual private network; and
monitoring by each of the first virtual router and the second virtual router the other one by means of a control protocol, wherein the second virtual router takes over as a gateway to the virtual private network if the first virtual router no longer functions as the gateway.
6 . The method of claim 5 , wherein the first virtual router and the second virtual router are coupled using a subnetwork.
7 . The method of claim 5 , wherein the first virtual router and the second virtual router are assigned to different domains within the virtual private network.
8 . The method of claim 5 , wherein the routing tables of the first virtual router and second virtual router are substantially similar.
9 . A method in a network comprising:
instantiating a gateway in the network;
instantiating a first virtual router and a second virtual router in the network;
peering the first virtual router to the second virtual router wherein the first and second virtual routers have separate routing tables; and
distributing a set of one or more routes through the gateway to the first virtual router and the second virtual router.
10 . The method of claim 9 , wherein the routes in the routing table of the first virtual router is distributed to the routing table of the second virtual router using a control protocol.
11 . The method of claim 9 , wherein the first virtual router is the gateway.
12 . The method of claim 11 , wherein the second virtual router becomes the gateway upon the failure of the first virtual router.
13 . The method of claim 9 , wherein the first virtual router and second virtual router have separate forwarding tables.
14 . The method of claim 13 , wherein the first virtual router and second virtual router are coupled to a subnet of the network.
15 . The method of claim 9 , wherein the network is a virtual private network.