IPv6 routing operation
A switch moves packets within the same local network or subnet. A router moves packets between networks or subnets. When a router receives a packet, it matches the packet's destination address to a route in its routing table. This route specifies the gateway, or next-hop, through which the router must forward the packet to enable it to move toward its destination. The gateway is specified as either the next-hop link-local address on a shared VLAN, the ID of that VLAN (vid), or a global unicast address.
For example, in the following figure, the gateway for a packet moving through router "D" to the 2001:db8:0:9::/64 network (router "A") is either VLAN 3 or the link-local address FE80::3:2/64 in VLAN 3 on router "C."
A routing switch maintains a routing table containing the best routes to the destinations it has acquired. The routing table can be built from statically configured routes. Static routes must be manually configured, and are best suited for small networks having few routes and where topology changes are infrequent. The best route to a given destination may change over time, and dynamic routing protocols can react to such changes by replacing routes in the routing table. Dynamic routing also adapts to changes in network topology, while static routing requires manual configuration changes to support topology changes.