What is the interface scope (global vs. link) used for?











up vote
8
down vote

favorite
3












Routing table entries have an attribute scope. I would like to know how the change from global to link (or the other way round) affects the network system.










share|improve this question






















  • I can't chek but in the man ip(8) there's the value scope SCOPE_VALUE that can be global, link, site, host but it seems related to address and not route
    – Kiwy
    Apr 4 '14 at 8:12















up vote
8
down vote

favorite
3












Routing table entries have an attribute scope. I would like to know how the change from global to link (or the other way round) affects the network system.










share|improve this question






















  • I can't chek but in the man ip(8) there's the value scope SCOPE_VALUE that can be global, link, site, host but it seems related to address and not route
    – Kiwy
    Apr 4 '14 at 8:12













up vote
8
down vote

favorite
3









up vote
8
down vote

favorite
3






3





Routing table entries have an attribute scope. I would like to know how the change from global to link (or the other way round) affects the network system.










share|improve this question













Routing table entries have an attribute scope. I would like to know how the change from global to link (or the other way round) affects the network system.







linux networking routing






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Apr 4 '14 at 7:36









Hauke Laging

55.6k1285133




55.6k1285133












  • I can't chek but in the man ip(8) there's the value scope SCOPE_VALUE that can be global, link, site, host but it seems related to address and not route
    – Kiwy
    Apr 4 '14 at 8:12


















  • I can't chek but in the man ip(8) there's the value scope SCOPE_VALUE that can be global, link, site, host but it seems related to address and not route
    – Kiwy
    Apr 4 '14 at 8:12
















I can't chek but in the man ip(8) there's the value scope SCOPE_VALUE that can be global, link, site, host but it seems related to address and not route
– Kiwy
Apr 4 '14 at 8:12




I can't chek but in the man ip(8) there's the value scope SCOPE_VALUE that can be global, link, site, host but it seems related to address and not route
– Kiwy
Apr 4 '14 at 8:12










2 Answers
2






active

oldest

votes

















up vote
4
down vote













Let look at route scope definition in Linux:



The scope of a route in Linux is an indicator of the distance to the
destination network.

Host
A route has host scope when it leads to a destination address on the local host.
Link
A route has link scope when it leads to a destination address on the local network.
Universe
A route has universe scope when it leads to addresses more than one hop away.


So if you change the scope of a route, your computer probably can not connect to network in that route anymore. The router simply doesn't forward the packet which is send to destination belongs local network.



Note that the scope does not reflect the distinction between nonroutable (private) and routable (public) addresses.



Both 10.0.0.1 (private - non routeable) and 8.8.8.8 (public - routable) can be given either link or universe (global) scope. It is configured by system administrator.






share|improve this answer























  • So ... nothing to do with the BGP scope, aka route scoping for high-level routing protocols (sigh)
    – Ouki
    Apr 4 '14 at 12:09






  • 1




    Small nitpicking here: in IPv4, all addresses are routable, including 10.0.0.0/8 and 192.168.0.0/16 -- but 10.0.0.0/8 isn't routed in public networks. But you can still route them, for instance, inside your subnetted 10.0.0.0/8. Only with IPv6 there are unroutable addresses, namely ::1 and LLAs.
    – TheDiveO
    Apr 26 at 10:56


















up vote
2
down vote













The scope influences source address selection.



For connections/associations where the source address is not yet fixed (e.g. initiating a TCP connection, but not when reacting to an incoming packet), the source address will be selected depending on the scope of the route the packet is about to hit.



This is why addresses also have a scope attribute.



Example where no source address selection occurs: an incoming TCP connection initiation or ping packet will be answered with the IP addresses reversed (source → destination, destination → source), otherwise the other host would not recognize the packet as answer.



Example where source address selection occurs: ping xyz or telnet xyz. Common programs do not tell the operating system which source address to use (and that is a good habit). The OS needs to pick one and is prepared to do so: it tests the potential outgoing packet for the route it would hit (normal routing uses the destination address only, if you use advanced routing, the packet will not have a source address yet!). The resulting scope reduces the selection to addresses from the corresponding scope on the outgoing interface if any are available.






share|improve this answer























  • Do you have a literature reference for your statement "scope influences address selection" that explicitly links this to routes? My understanding of RFC 6724 is that only addresses have scope, but the RFC is silent on any scope property of routes. If there is in fact a scope defined for routes, it would be great if you could reference it in your answer. Thanks!
    – TheDiveO
    Apr 26 at 10:53










  • @TheDiveO That fact is already part of the question I'm answering here.
    – Robert Siemer
    Apr 26 at 22:26











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f123084%2fwhat-is-the-interface-scope-global-vs-link-used-for%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
4
down vote













Let look at route scope definition in Linux:



The scope of a route in Linux is an indicator of the distance to the
destination network.

Host
A route has host scope when it leads to a destination address on the local host.
Link
A route has link scope when it leads to a destination address on the local network.
Universe
A route has universe scope when it leads to addresses more than one hop away.


So if you change the scope of a route, your computer probably can not connect to network in that route anymore. The router simply doesn't forward the packet which is send to destination belongs local network.



Note that the scope does not reflect the distinction between nonroutable (private) and routable (public) addresses.



Both 10.0.0.1 (private - non routeable) and 8.8.8.8 (public - routable) can be given either link or universe (global) scope. It is configured by system administrator.






share|improve this answer























  • So ... nothing to do with the BGP scope, aka route scoping for high-level routing protocols (sigh)
    – Ouki
    Apr 4 '14 at 12:09






  • 1




    Small nitpicking here: in IPv4, all addresses are routable, including 10.0.0.0/8 and 192.168.0.0/16 -- but 10.0.0.0/8 isn't routed in public networks. But you can still route them, for instance, inside your subnetted 10.0.0.0/8. Only with IPv6 there are unroutable addresses, namely ::1 and LLAs.
    – TheDiveO
    Apr 26 at 10:56















up vote
4
down vote













Let look at route scope definition in Linux:



The scope of a route in Linux is an indicator of the distance to the
destination network.

Host
A route has host scope when it leads to a destination address on the local host.
Link
A route has link scope when it leads to a destination address on the local network.
Universe
A route has universe scope when it leads to addresses more than one hop away.


So if you change the scope of a route, your computer probably can not connect to network in that route anymore. The router simply doesn't forward the packet which is send to destination belongs local network.



Note that the scope does not reflect the distinction between nonroutable (private) and routable (public) addresses.



Both 10.0.0.1 (private - non routeable) and 8.8.8.8 (public - routable) can be given either link or universe (global) scope. It is configured by system administrator.






share|improve this answer























  • So ... nothing to do with the BGP scope, aka route scoping for high-level routing protocols (sigh)
    – Ouki
    Apr 4 '14 at 12:09






  • 1




    Small nitpicking here: in IPv4, all addresses are routable, including 10.0.0.0/8 and 192.168.0.0/16 -- but 10.0.0.0/8 isn't routed in public networks. But you can still route them, for instance, inside your subnetted 10.0.0.0/8. Only with IPv6 there are unroutable addresses, namely ::1 and LLAs.
    – TheDiveO
    Apr 26 at 10:56













up vote
4
down vote










up vote
4
down vote









Let look at route scope definition in Linux:



The scope of a route in Linux is an indicator of the distance to the
destination network.

Host
A route has host scope when it leads to a destination address on the local host.
Link
A route has link scope when it leads to a destination address on the local network.
Universe
A route has universe scope when it leads to addresses more than one hop away.


So if you change the scope of a route, your computer probably can not connect to network in that route anymore. The router simply doesn't forward the packet which is send to destination belongs local network.



Note that the scope does not reflect the distinction between nonroutable (private) and routable (public) addresses.



Both 10.0.0.1 (private - non routeable) and 8.8.8.8 (public - routable) can be given either link or universe (global) scope. It is configured by system administrator.






share|improve this answer














Let look at route scope definition in Linux:



The scope of a route in Linux is an indicator of the distance to the
destination network.

Host
A route has host scope when it leads to a destination address on the local host.
Link
A route has link scope when it leads to a destination address on the local network.
Universe
A route has universe scope when it leads to addresses more than one hop away.


So if you change the scope of a route, your computer probably can not connect to network in that route anymore. The router simply doesn't forward the packet which is send to destination belongs local network.



Note that the scope does not reflect the distinction between nonroutable (private) and routable (public) addresses.



Both 10.0.0.1 (private - non routeable) and 8.8.8.8 (public - routable) can be given either link or universe (global) scope. It is configured by system administrator.







share|improve this answer














share|improve this answer



share|improve this answer








edited Apr 4 '14 at 10:03

























answered Apr 4 '14 at 9:51









cuonglm

102k23198299




102k23198299












  • So ... nothing to do with the BGP scope, aka route scoping for high-level routing protocols (sigh)
    – Ouki
    Apr 4 '14 at 12:09






  • 1




    Small nitpicking here: in IPv4, all addresses are routable, including 10.0.0.0/8 and 192.168.0.0/16 -- but 10.0.0.0/8 isn't routed in public networks. But you can still route them, for instance, inside your subnetted 10.0.0.0/8. Only with IPv6 there are unroutable addresses, namely ::1 and LLAs.
    – TheDiveO
    Apr 26 at 10:56


















  • So ... nothing to do with the BGP scope, aka route scoping for high-level routing protocols (sigh)
    – Ouki
    Apr 4 '14 at 12:09






  • 1




    Small nitpicking here: in IPv4, all addresses are routable, including 10.0.0.0/8 and 192.168.0.0/16 -- but 10.0.0.0/8 isn't routed in public networks. But you can still route them, for instance, inside your subnetted 10.0.0.0/8. Only with IPv6 there are unroutable addresses, namely ::1 and LLAs.
    – TheDiveO
    Apr 26 at 10:56
















So ... nothing to do with the BGP scope, aka route scoping for high-level routing protocols (sigh)
– Ouki
Apr 4 '14 at 12:09




So ... nothing to do with the BGP scope, aka route scoping for high-level routing protocols (sigh)
– Ouki
Apr 4 '14 at 12:09




1




1




Small nitpicking here: in IPv4, all addresses are routable, including 10.0.0.0/8 and 192.168.0.0/16 -- but 10.0.0.0/8 isn't routed in public networks. But you can still route them, for instance, inside your subnetted 10.0.0.0/8. Only with IPv6 there are unroutable addresses, namely ::1 and LLAs.
– TheDiveO
Apr 26 at 10:56




Small nitpicking here: in IPv4, all addresses are routable, including 10.0.0.0/8 and 192.168.0.0/16 -- but 10.0.0.0/8 isn't routed in public networks. But you can still route them, for instance, inside your subnetted 10.0.0.0/8. Only with IPv6 there are unroutable addresses, namely ::1 and LLAs.
– TheDiveO
Apr 26 at 10:56












up vote
2
down vote













The scope influences source address selection.



For connections/associations where the source address is not yet fixed (e.g. initiating a TCP connection, but not when reacting to an incoming packet), the source address will be selected depending on the scope of the route the packet is about to hit.



This is why addresses also have a scope attribute.



Example where no source address selection occurs: an incoming TCP connection initiation or ping packet will be answered with the IP addresses reversed (source → destination, destination → source), otherwise the other host would not recognize the packet as answer.



Example where source address selection occurs: ping xyz or telnet xyz. Common programs do not tell the operating system which source address to use (and that is a good habit). The OS needs to pick one and is prepared to do so: it tests the potential outgoing packet for the route it would hit (normal routing uses the destination address only, if you use advanced routing, the packet will not have a source address yet!). The resulting scope reduces the selection to addresses from the corresponding scope on the outgoing interface if any are available.






share|improve this answer























  • Do you have a literature reference for your statement "scope influences address selection" that explicitly links this to routes? My understanding of RFC 6724 is that only addresses have scope, but the RFC is silent on any scope property of routes. If there is in fact a scope defined for routes, it would be great if you could reference it in your answer. Thanks!
    – TheDiveO
    Apr 26 at 10:53










  • @TheDiveO That fact is already part of the question I'm answering here.
    – Robert Siemer
    Apr 26 at 22:26















up vote
2
down vote













The scope influences source address selection.



For connections/associations where the source address is not yet fixed (e.g. initiating a TCP connection, but not when reacting to an incoming packet), the source address will be selected depending on the scope of the route the packet is about to hit.



This is why addresses also have a scope attribute.



Example where no source address selection occurs: an incoming TCP connection initiation or ping packet will be answered with the IP addresses reversed (source → destination, destination → source), otherwise the other host would not recognize the packet as answer.



Example where source address selection occurs: ping xyz or telnet xyz. Common programs do not tell the operating system which source address to use (and that is a good habit). The OS needs to pick one and is prepared to do so: it tests the potential outgoing packet for the route it would hit (normal routing uses the destination address only, if you use advanced routing, the packet will not have a source address yet!). The resulting scope reduces the selection to addresses from the corresponding scope on the outgoing interface if any are available.






share|improve this answer























  • Do you have a literature reference for your statement "scope influences address selection" that explicitly links this to routes? My understanding of RFC 6724 is that only addresses have scope, but the RFC is silent on any scope property of routes. If there is in fact a scope defined for routes, it would be great if you could reference it in your answer. Thanks!
    – TheDiveO
    Apr 26 at 10:53










  • @TheDiveO That fact is already part of the question I'm answering here.
    – Robert Siemer
    Apr 26 at 22:26













up vote
2
down vote










up vote
2
down vote









The scope influences source address selection.



For connections/associations where the source address is not yet fixed (e.g. initiating a TCP connection, but not when reacting to an incoming packet), the source address will be selected depending on the scope of the route the packet is about to hit.



This is why addresses also have a scope attribute.



Example where no source address selection occurs: an incoming TCP connection initiation or ping packet will be answered with the IP addresses reversed (source → destination, destination → source), otherwise the other host would not recognize the packet as answer.



Example where source address selection occurs: ping xyz or telnet xyz. Common programs do not tell the operating system which source address to use (and that is a good habit). The OS needs to pick one and is prepared to do so: it tests the potential outgoing packet for the route it would hit (normal routing uses the destination address only, if you use advanced routing, the packet will not have a source address yet!). The resulting scope reduces the selection to addresses from the corresponding scope on the outgoing interface if any are available.






share|improve this answer














The scope influences source address selection.



For connections/associations where the source address is not yet fixed (e.g. initiating a TCP connection, but not when reacting to an incoming packet), the source address will be selected depending on the scope of the route the packet is about to hit.



This is why addresses also have a scope attribute.



Example where no source address selection occurs: an incoming TCP connection initiation or ping packet will be answered with the IP addresses reversed (source → destination, destination → source), otherwise the other host would not recognize the packet as answer.



Example where source address selection occurs: ping xyz or telnet xyz. Common programs do not tell the operating system which source address to use (and that is a good habit). The OS needs to pick one and is prepared to do so: it tests the potential outgoing packet for the route it would hit (normal routing uses the destination address only, if you use advanced routing, the packet will not have a source address yet!). The resulting scope reduces the selection to addresses from the corresponding scope on the outgoing interface if any are available.







share|improve this answer














share|improve this answer



share|improve this answer








edited 2 days ago

























answered May 11 '16 at 18:13









Robert Siemer

640718




640718












  • Do you have a literature reference for your statement "scope influences address selection" that explicitly links this to routes? My understanding of RFC 6724 is that only addresses have scope, but the RFC is silent on any scope property of routes. If there is in fact a scope defined for routes, it would be great if you could reference it in your answer. Thanks!
    – TheDiveO
    Apr 26 at 10:53










  • @TheDiveO That fact is already part of the question I'm answering here.
    – Robert Siemer
    Apr 26 at 22:26


















  • Do you have a literature reference for your statement "scope influences address selection" that explicitly links this to routes? My understanding of RFC 6724 is that only addresses have scope, but the RFC is silent on any scope property of routes. If there is in fact a scope defined for routes, it would be great if you could reference it in your answer. Thanks!
    – TheDiveO
    Apr 26 at 10:53










  • @TheDiveO That fact is already part of the question I'm answering here.
    – Robert Siemer
    Apr 26 at 22:26
















Do you have a literature reference for your statement "scope influences address selection" that explicitly links this to routes? My understanding of RFC 6724 is that only addresses have scope, but the RFC is silent on any scope property of routes. If there is in fact a scope defined for routes, it would be great if you could reference it in your answer. Thanks!
– TheDiveO
Apr 26 at 10:53




Do you have a literature reference for your statement "scope influences address selection" that explicitly links this to routes? My understanding of RFC 6724 is that only addresses have scope, but the RFC is silent on any scope property of routes. If there is in fact a scope defined for routes, it would be great if you could reference it in your answer. Thanks!
– TheDiveO
Apr 26 at 10:53












@TheDiveO That fact is already part of the question I'm answering here.
– Robert Siemer
Apr 26 at 22:26




@TheDiveO That fact is already part of the question I'm answering here.
– Robert Siemer
Apr 26 at 22:26


















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f123084%2fwhat-is-the-interface-scope-global-vs-link-used-for%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

サソリ

広島県道265号伴広島線

Accessing regular linux commands in Huawei's Dopra Linux