IPv4 vs IPv6 Gateway Subnet Differences

ipv6prefixrouterroutingsubnet

I understand why for IPv4 the host and the gateway should be part of the same subnet, but for IPv6 I am a little bit confused. There are several types of IPv6 address assignment, but IPv6 requires the same thing.

Is it still a must to have the gateway in the same subnet?

Best Answer

A gateway is the host on a network that knows how to reach other networks. Your host would need a gateway just to reach a gateway on a network to which it is not directly connected.

An IPv6 host will know how to reach other hosts on any networks to which it is directly attached, but it still needs a gateway in order to reach other networks. While IPv4 uses ARP (broadcast) to resolve a layer-2 address from a layer-3 address, IPv6 uses ND (link-local multicast). Both of those protocols are confined to the local link. Each will give you the layer-2 address for a host on the same network as your host, but neither can tell your host how to route to a different network, other than pointing you to a gateway on your network.