A method for supporting different types of networks or multiple logical networks within the same network. Every router in the network is capable of supporting several protocol stacks or several routing tables rather than requiring a router for each one. It enables virtual subnets within the network, each independent of the other. Virtual subnets combine the logical subdivision provided by layer 2 virtual LANs (VLANs) with the filtering and firewall benefits of layer 3 routing. In addition, virtual routing often allows the entire network to be viewed from a single management console.