I've been searching information concerning the meaning of scopes both in addresses and routes but I don't understand the documentation I've read so far. This is what I've been reading:

Is there other documentation I could read? Google for "iproute2 address scope" and similar was not helpful. What I thought an address scope would mean was how that address could be reached:

  • "host": only from localhost.
  • "link": only from other hosts directly attached to the network to which the corresponding device is attached to.
  • "global": "host" + "link".
  • Other scopes would be reserved for future usage.

I see no change in behavior if I change from "global" to "host", "link" or "3" the scope of the address my laptop is assigned through DHCP and the result was:

  • In all cases I could ping from my laptop to that address and to the Internet.
  • In all the cases I could ping from a virtual machine on the same laptop using a virtual NIC bridged to the same interface and with a manual network setup to that address.

Note that I'm only using IPv4.


One effect of address scope is to determine when the address will be selected for outgoing connections. https://tools.ietf.org/html/rfc3484#section-4 (via man gai.conf).

Looking at the examples, the first given seems to be that it avoids using a link-local address when contacting a globally unique address. https://tools.ietf.org/html/rfc3484#section-10.1

To be honest I don't remember finding any other significance of scopes in Linux. Presumably there was some reason they're available on routes though. The address selection is a userspace thing, so I expect it's distinct from the routing.

  • edit: I stared at the algorithm trying to think of an example. Eventually I remembered there's actually an example section. Suggested moral: worked examples make everything better :). – sourcejedi Apr 15 '16 at 12:00
  • RFC3484 stands for "Default Address Selection for Internet Protocol version 6 (IPv6)" and I'm working on IPv4. – Diego Augusto Molina Apr 15 '16 at 12:04
  • Scopes are (originally) an IPv6 concept. – sourcejedi Apr 15 '16 at 12:08
  • update: actually the RFC says "The destination address selection algorithm operates on both IPv6 and IPv4 addresses. For this purpose, IPv4 addresses should be represented as IPv4-mapped addresses" – sourcejedi Apr 15 '16 at 12:14
  • Exactly, but I'm dealing with the source address. – Diego Augusto Molina Apr 15 '16 at 13:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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