1

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?

2
  • Generally, yes. The host must be able to reach the gateway via layer 2. Since there are usually several IPv6 networks in place at the same time, only one (or two when transitioning addresses) usually have a gateway set.
    – Zac67
    Commented Aug 20, 2017 at 8:01
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer.
    – Ron Maupin
    Commented Feb 19, 2018 at 17:42

2 Answers 2

3

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.

1
  • Just imagine how many routes your computer world need to know to connect to every device in the world! That's where our gateways come in.
    – Fixitrod
    Commented Aug 20, 2017 at 13:45
0

At a fundamental level, the gateway must be reachable on the same layer 2 link.

With ipv4, the norm was to allocate a single block of IP addreses to a link, then to allocate the gateway an address from this block. This is not nessacerally the only possible configuration but it's the most common and most compatible.

On the other hand with IPv6 every interface has at least one link local address, it may also have other types of address. Statically configured IPv6 systems may use a global or unique-local addresses for the gateway, but automatically configured IPv6 systems will nearly always use link local addresses for the gateway.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.