How shall I understand the routing table “local”?How do I use man pages to learn how to use commands?Network connectivity trouble to non-routing multi-homed hosts?routing problem - arpBridge eth0 and wlan0Local and main routing table rulesCentOS routing between multiple subnetHow can I override systemd's choice of default route with two network interfaces?Routing traffic to my ipv4 routes except 0.0.0.0 address?How come one can successfully ping 127.0.0.2 on Linux?Why does a routing rule directing to a local network interface accept more than one destination IP addreses?Is there no routing entry for loopback addresses?
What is the logic behind how bash tests for true/false?
"which" command doesn't work / path of Safari?
I see my dog run
When blogging recipes, how can I support both readers who want the narrative/journey and ones who want the printer-friendly recipe?
Simulate Bitwise Cyclic Tag
Shell script can be run only with sh command
Can I interfere when another PC is about to be attacked?
How can the DM most effectively choose 1 out of an odd number of players to be targeted by an attack or effect?
Why don't electron-positron collisions release infinite energy?
Circuitry of TV splitters
I’m planning on buying a laser printer but concerned about the life cycle of toner in the machine
cryptic clue: mammal sounds like relative consumer (8)
How to determine if window is maximised or minimised from bash script
least quadratic residue under GRH: an EXPLICIT bound
What does "enim et" mean?
Example of a relative pronoun
Non-Jewish family in an Orthodox Jewish Wedding
Why is "Reports" in sentence down without "The"
What makes Graph invariants so useful/important?
How can I fix this gap between bookcases I made?
If Manufacturer spice model and Datasheet give different values which should I use?
Should I join an office cleaning event for free?
Is it legal to have the "// (c) 2019 John Smith" header in all files when there are hundreds of contributors?
Why does not dark matter gather and form celestial bodies?
How shall I understand the routing table “local”?
How do I use man pages to learn how to use commands?Network connectivity trouble to non-routing multi-homed hosts?routing problem - arpBridge eth0 and wlan0Local and main routing table rulesCentOS routing between multiple subnetHow can I override systemd's choice of default route with two network interfaces?Routing traffic to my ipv4 routes except 0.0.0.0 address?How come one can successfully ping 127.0.0.2 on Linux?Why does a routing rule directing to a local network interface accept more than one destination IP addreses?Is there no routing entry for loopback addresses?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
$ ip route show table local
broadcast 127.0.0.0 dev lo proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo proto kernel scope link src 127.0.0.1
broadcast 192.168.122.0 dev ens3 proto kernel scope link src 192.168.122.202
local 192.168.122.202 dev ens3 proto kernel scope host src 192.168.122.202
broadcast 192.168.122.255 dev ens3 proto kernel scope link src 192.168.122.202
In the first entry, does 127.0.0.0 represent the network of the loopback addresses? Is 127.0.0.0 a broadcast IP address?
What is the difference between the two loopback broadcast entries: the first one for 127.0.0.0.0 and the fourth for 127.255.255.255?
In the fifth entry, does 192.168.122.0 represent the network of the loopback addresses? Is 192.168.122.0 a broadcast IP address?
What is the difference between the two broadcast entries: the fifth one for 192.168.122.0 and the last for 192.168.122.255?
Is 127.0.0.1 an address in 127.0.0.0/8? Why is the third entry for 127.0.0.1 singled out of the second entry for 127.0.0.0/8?
Thanks.
ip routing
add a comment |
$ ip route show table local
broadcast 127.0.0.0 dev lo proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo proto kernel scope link src 127.0.0.1
broadcast 192.168.122.0 dev ens3 proto kernel scope link src 192.168.122.202
local 192.168.122.202 dev ens3 proto kernel scope host src 192.168.122.202
broadcast 192.168.122.255 dev ens3 proto kernel scope link src 192.168.122.202
In the first entry, does 127.0.0.0 represent the network of the loopback addresses? Is 127.0.0.0 a broadcast IP address?
What is the difference between the two loopback broadcast entries: the first one for 127.0.0.0.0 and the fourth for 127.255.255.255?
In the fifth entry, does 192.168.122.0 represent the network of the loopback addresses? Is 192.168.122.0 a broadcast IP address?
What is the difference between the two broadcast entries: the fifth one for 192.168.122.0 and the last for 192.168.122.255?
Is 127.0.0.1 an address in 127.0.0.0/8? Why is the third entry for 127.0.0.1 singled out of the second entry for 127.0.0.0/8?
Thanks.
ip routing
Hey @Tim . Have you taken a time to at least read the answer i've put some effort to create? Or are you flooding U&L with questions that you will never read the answer? You should comment if you agree, disagree or if there is another additional doubt that was not covered on peoples answers if you want them to keep colaborating with you and reach the ideal answer you are expecting from the community ;)
– nwildner
Apr 3 at 11:26
add a comment |
$ ip route show table local
broadcast 127.0.0.0 dev lo proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo proto kernel scope link src 127.0.0.1
broadcast 192.168.122.0 dev ens3 proto kernel scope link src 192.168.122.202
local 192.168.122.202 dev ens3 proto kernel scope host src 192.168.122.202
broadcast 192.168.122.255 dev ens3 proto kernel scope link src 192.168.122.202
In the first entry, does 127.0.0.0 represent the network of the loopback addresses? Is 127.0.0.0 a broadcast IP address?
What is the difference between the two loopback broadcast entries: the first one for 127.0.0.0.0 and the fourth for 127.255.255.255?
In the fifth entry, does 192.168.122.0 represent the network of the loopback addresses? Is 192.168.122.0 a broadcast IP address?
What is the difference between the two broadcast entries: the fifth one for 192.168.122.0 and the last for 192.168.122.255?
Is 127.0.0.1 an address in 127.0.0.0/8? Why is the third entry for 127.0.0.1 singled out of the second entry for 127.0.0.0/8?
Thanks.
ip routing
$ ip route show table local
broadcast 127.0.0.0 dev lo proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo proto kernel scope link src 127.0.0.1
broadcast 192.168.122.0 dev ens3 proto kernel scope link src 192.168.122.202
local 192.168.122.202 dev ens3 proto kernel scope host src 192.168.122.202
broadcast 192.168.122.255 dev ens3 proto kernel scope link src 192.168.122.202
In the first entry, does 127.0.0.0 represent the network of the loopback addresses? Is 127.0.0.0 a broadcast IP address?
What is the difference between the two loopback broadcast entries: the first one for 127.0.0.0.0 and the fourth for 127.255.255.255?
In the fifth entry, does 192.168.122.0 represent the network of the loopback addresses? Is 192.168.122.0 a broadcast IP address?
What is the difference between the two broadcast entries: the fifth one for 192.168.122.0 and the last for 192.168.122.255?
Is 127.0.0.1 an address in 127.0.0.0/8? Why is the third entry for 127.0.0.1 singled out of the second entry for 127.0.0.0/8?
Thanks.
ip routing
ip routing
asked Mar 27 at 18:07
TimTim
28.5k79269491
28.5k79269491
Hey @Tim . Have you taken a time to at least read the answer i've put some effort to create? Or are you flooding U&L with questions that you will never read the answer? You should comment if you agree, disagree or if there is another additional doubt that was not covered on peoples answers if you want them to keep colaborating with you and reach the ideal answer you are expecting from the community ;)
– nwildner
Apr 3 at 11:26
add a comment |
Hey @Tim . Have you taken a time to at least read the answer i've put some effort to create? Or are you flooding U&L with questions that you will never read the answer? You should comment if you agree, disagree or if there is another additional doubt that was not covered on peoples answers if you want them to keep colaborating with you and reach the ideal answer you are expecting from the community ;)
– nwildner
Apr 3 at 11:26
Hey @Tim . Have you taken a time to at least read the answer i've put some effort to create? Or are you flooding U&L with questions that you will never read the answer? You should comment if you agree, disagree or if there is another additional doubt that was not covered on peoples answers if you want them to keep colaborating with you and reach the ideal answer you are expecting from the community ;)
– nwildner
Apr 3 at 11:26
Hey @Tim . Have you taken a time to at least read the answer i've put some effort to create? Or are you flooding U&L with questions that you will never read the answer? You should comment if you agree, disagree or if there is another additional doubt that was not covered on peoples answers if you want them to keep colaborating with you and reach the ideal answer you are expecting from the community ;)
– nwildner
Apr 3 at 11:26
add a comment |
1 Answer
1
active
oldest
votes
I'll try to answer all your questions one at the time.
First of all, you should take a look at ip(8)
manpages and take a time to read the manpage as explained here. You can learn a lot by reading the manuals someone had put time and effort to share precious information inside Unix-like Operating Systems.
In the first entry, does 127.0.0.0 represent the network of the
loopback addresses? Is 127.0.0.0 a broadcast IP address?
Yes. The 127.0.0.0
address represent the Network address(first address of a network). This is a conceptual definition of ipv4.
What is the difference between the two loopback broadcast entries: the
first one for 127.0.0.0.0 and the fourth for 127.255.255.255?
Conceptual: They are different. Network and Broadcast addresses. You will have to read some books or google it and find yourself those differences since that is out of scope here at U&L. Maybe this question at SE Network Engineering can help you:
- Why couldn't a nework address be used as as broadcast address as well?
Real use case: They are almost the same on Linux Server scenarios so, are created as brodcast
types of address. Quoting the wonderful linux-ip document:
...The network address and broadcast address are both entered as
broadcast
type addresses on the interface to which they have been
bound. Conceptually, there is significance to the distinction between
a network and broadcast address, but practically, they are treated
analogously, by other networking gear as well as the linux kernel...
That is an axiom, and you will have to accept it as it is. On practical use cases of routing there will be little to no difference on where those 2 addresses are used.
In the fifth entry, does 192.168.122.0 represent the network of the
loopback addresses? Is 192.168.122.0 a broadcast IP address?
No. That is the network address of your ens3
interface. Take a look at the dev
on that line. local
table is a place where local routes are stored. That doesn't mean only loopback related routes are there. Just the ones where you will deliver data locally.
Quoting ip
manpage again:
At startup time the kernel configures the default RPDB consisting of three rules:
1. Priority: 0, Selector: match anything, Action: lookup routing table local (ID 255).
The local table is a special routing table containing high priority control routes for
local and broadcast addresses.
What is the difference between the two broadcast entries: the fifth
one for 192.168.122.0 and the last for 192.168.122.255?
Same as question 2, but for network 192.168.122.0/24
dev ens3
and not loopback device: Conceptual differences with same use cases for real world routing.
Is 127.0.0.1 an address in 127.0.0.0/8? Why is the third entry for
127.0.0.1 singled out of the second entry for 127.0.0.0/8?
To ensure that all traffic related to 127.0.0.0/8
will be delivered locally, and the origin will always be 127.0.0.1
. Manpage again:
local - the destinations are assigned to this host. The packets are looped back and
delivered locally.
broadcast - the destinations are broadcast addresses. The packets are sent as link
broadcasts.
My point of view here is that this will force any traffic destinated to 127.0.0.0/8
network come from 127.0.0.1
. This may initially sound dumb but, you could have another application/service inside linux using the 127.0.0.2
address and since local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1
route has 127.0.0.1
address as source (src
) this will avoid problems.
I have upvoted your post. I haven't get to finish understanding your post, so not yet accepted it. I have many questions, and sometimes I am overwhelmed. Thank you for your patience and understanding
– Tim
Apr 3 at 11:42
That's fine @Tim . Take your time cause this is a subject that will demand from you more than only Linux knowledge but also some Networking solid base as well. Maybe a book about networking should be a good start :) . The TCP/IP Guide is a good start, and have a good free content on it - tcpipguide.com
– nwildner
2 days ago
add a comment |
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',
autoActivateHeartbeat: false,
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f509051%2fhow-shall-i-understand-the-routing-table-local%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I'll try to answer all your questions one at the time.
First of all, you should take a look at ip(8)
manpages and take a time to read the manpage as explained here. You can learn a lot by reading the manuals someone had put time and effort to share precious information inside Unix-like Operating Systems.
In the first entry, does 127.0.0.0 represent the network of the
loopback addresses? Is 127.0.0.0 a broadcast IP address?
Yes. The 127.0.0.0
address represent the Network address(first address of a network). This is a conceptual definition of ipv4.
What is the difference between the two loopback broadcast entries: the
first one for 127.0.0.0.0 and the fourth for 127.255.255.255?
Conceptual: They are different. Network and Broadcast addresses. You will have to read some books or google it and find yourself those differences since that is out of scope here at U&L. Maybe this question at SE Network Engineering can help you:
- Why couldn't a nework address be used as as broadcast address as well?
Real use case: They are almost the same on Linux Server scenarios so, are created as brodcast
types of address. Quoting the wonderful linux-ip document:
...The network address and broadcast address are both entered as
broadcast
type addresses on the interface to which they have been
bound. Conceptually, there is significance to the distinction between
a network and broadcast address, but practically, they are treated
analogously, by other networking gear as well as the linux kernel...
That is an axiom, and you will have to accept it as it is. On practical use cases of routing there will be little to no difference on where those 2 addresses are used.
In the fifth entry, does 192.168.122.0 represent the network of the
loopback addresses? Is 192.168.122.0 a broadcast IP address?
No. That is the network address of your ens3
interface. Take a look at the dev
on that line. local
table is a place where local routes are stored. That doesn't mean only loopback related routes are there. Just the ones where you will deliver data locally.
Quoting ip
manpage again:
At startup time the kernel configures the default RPDB consisting of three rules:
1. Priority: 0, Selector: match anything, Action: lookup routing table local (ID 255).
The local table is a special routing table containing high priority control routes for
local and broadcast addresses.
What is the difference between the two broadcast entries: the fifth
one for 192.168.122.0 and the last for 192.168.122.255?
Same as question 2, but for network 192.168.122.0/24
dev ens3
and not loopback device: Conceptual differences with same use cases for real world routing.
Is 127.0.0.1 an address in 127.0.0.0/8? Why is the third entry for
127.0.0.1 singled out of the second entry for 127.0.0.0/8?
To ensure that all traffic related to 127.0.0.0/8
will be delivered locally, and the origin will always be 127.0.0.1
. Manpage again:
local - the destinations are assigned to this host. The packets are looped back and
delivered locally.
broadcast - the destinations are broadcast addresses. The packets are sent as link
broadcasts.
My point of view here is that this will force any traffic destinated to 127.0.0.0/8
network come from 127.0.0.1
. This may initially sound dumb but, you could have another application/service inside linux using the 127.0.0.2
address and since local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1
route has 127.0.0.1
address as source (src
) this will avoid problems.
I have upvoted your post. I haven't get to finish understanding your post, so not yet accepted it. I have many questions, and sometimes I am overwhelmed. Thank you for your patience and understanding
– Tim
Apr 3 at 11:42
That's fine @Tim . Take your time cause this is a subject that will demand from you more than only Linux knowledge but also some Networking solid base as well. Maybe a book about networking should be a good start :) . The TCP/IP Guide is a good start, and have a good free content on it - tcpipguide.com
– nwildner
2 days ago
add a comment |
I'll try to answer all your questions one at the time.
First of all, you should take a look at ip(8)
manpages and take a time to read the manpage as explained here. You can learn a lot by reading the manuals someone had put time and effort to share precious information inside Unix-like Operating Systems.
In the first entry, does 127.0.0.0 represent the network of the
loopback addresses? Is 127.0.0.0 a broadcast IP address?
Yes. The 127.0.0.0
address represent the Network address(first address of a network). This is a conceptual definition of ipv4.
What is the difference between the two loopback broadcast entries: the
first one for 127.0.0.0.0 and the fourth for 127.255.255.255?
Conceptual: They are different. Network and Broadcast addresses. You will have to read some books or google it and find yourself those differences since that is out of scope here at U&L. Maybe this question at SE Network Engineering can help you:
- Why couldn't a nework address be used as as broadcast address as well?
Real use case: They are almost the same on Linux Server scenarios so, are created as brodcast
types of address. Quoting the wonderful linux-ip document:
...The network address and broadcast address are both entered as
broadcast
type addresses on the interface to which they have been
bound. Conceptually, there is significance to the distinction between
a network and broadcast address, but practically, they are treated
analogously, by other networking gear as well as the linux kernel...
That is an axiom, and you will have to accept it as it is. On practical use cases of routing there will be little to no difference on where those 2 addresses are used.
In the fifth entry, does 192.168.122.0 represent the network of the
loopback addresses? Is 192.168.122.0 a broadcast IP address?
No. That is the network address of your ens3
interface. Take a look at the dev
on that line. local
table is a place where local routes are stored. That doesn't mean only loopback related routes are there. Just the ones where you will deliver data locally.
Quoting ip
manpage again:
At startup time the kernel configures the default RPDB consisting of three rules:
1. Priority: 0, Selector: match anything, Action: lookup routing table local (ID 255).
The local table is a special routing table containing high priority control routes for
local and broadcast addresses.
What is the difference between the two broadcast entries: the fifth
one for 192.168.122.0 and the last for 192.168.122.255?
Same as question 2, but for network 192.168.122.0/24
dev ens3
and not loopback device: Conceptual differences with same use cases for real world routing.
Is 127.0.0.1 an address in 127.0.0.0/8? Why is the third entry for
127.0.0.1 singled out of the second entry for 127.0.0.0/8?
To ensure that all traffic related to 127.0.0.0/8
will be delivered locally, and the origin will always be 127.0.0.1
. Manpage again:
local - the destinations are assigned to this host. The packets are looped back and
delivered locally.
broadcast - the destinations are broadcast addresses. The packets are sent as link
broadcasts.
My point of view here is that this will force any traffic destinated to 127.0.0.0/8
network come from 127.0.0.1
. This may initially sound dumb but, you could have another application/service inside linux using the 127.0.0.2
address and since local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1
route has 127.0.0.1
address as source (src
) this will avoid problems.
I have upvoted your post. I haven't get to finish understanding your post, so not yet accepted it. I have many questions, and sometimes I am overwhelmed. Thank you for your patience and understanding
– Tim
Apr 3 at 11:42
That's fine @Tim . Take your time cause this is a subject that will demand from you more than only Linux knowledge but also some Networking solid base as well. Maybe a book about networking should be a good start :) . The TCP/IP Guide is a good start, and have a good free content on it - tcpipguide.com
– nwildner
2 days ago
add a comment |
I'll try to answer all your questions one at the time.
First of all, you should take a look at ip(8)
manpages and take a time to read the manpage as explained here. You can learn a lot by reading the manuals someone had put time and effort to share precious information inside Unix-like Operating Systems.
In the first entry, does 127.0.0.0 represent the network of the
loopback addresses? Is 127.0.0.0 a broadcast IP address?
Yes. The 127.0.0.0
address represent the Network address(first address of a network). This is a conceptual definition of ipv4.
What is the difference between the two loopback broadcast entries: the
first one for 127.0.0.0.0 and the fourth for 127.255.255.255?
Conceptual: They are different. Network and Broadcast addresses. You will have to read some books or google it and find yourself those differences since that is out of scope here at U&L. Maybe this question at SE Network Engineering can help you:
- Why couldn't a nework address be used as as broadcast address as well?
Real use case: They are almost the same on Linux Server scenarios so, are created as brodcast
types of address. Quoting the wonderful linux-ip document:
...The network address and broadcast address are both entered as
broadcast
type addresses on the interface to which they have been
bound. Conceptually, there is significance to the distinction between
a network and broadcast address, but practically, they are treated
analogously, by other networking gear as well as the linux kernel...
That is an axiom, and you will have to accept it as it is. On practical use cases of routing there will be little to no difference on where those 2 addresses are used.
In the fifth entry, does 192.168.122.0 represent the network of the
loopback addresses? Is 192.168.122.0 a broadcast IP address?
No. That is the network address of your ens3
interface. Take a look at the dev
on that line. local
table is a place where local routes are stored. That doesn't mean only loopback related routes are there. Just the ones where you will deliver data locally.
Quoting ip
manpage again:
At startup time the kernel configures the default RPDB consisting of three rules:
1. Priority: 0, Selector: match anything, Action: lookup routing table local (ID 255).
The local table is a special routing table containing high priority control routes for
local and broadcast addresses.
What is the difference between the two broadcast entries: the fifth
one for 192.168.122.0 and the last for 192.168.122.255?
Same as question 2, but for network 192.168.122.0/24
dev ens3
and not loopback device: Conceptual differences with same use cases for real world routing.
Is 127.0.0.1 an address in 127.0.0.0/8? Why is the third entry for
127.0.0.1 singled out of the second entry for 127.0.0.0/8?
To ensure that all traffic related to 127.0.0.0/8
will be delivered locally, and the origin will always be 127.0.0.1
. Manpage again:
local - the destinations are assigned to this host. The packets are looped back and
delivered locally.
broadcast - the destinations are broadcast addresses. The packets are sent as link
broadcasts.
My point of view here is that this will force any traffic destinated to 127.0.0.0/8
network come from 127.0.0.1
. This may initially sound dumb but, you could have another application/service inside linux using the 127.0.0.2
address and since local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1
route has 127.0.0.1
address as source (src
) this will avoid problems.
I'll try to answer all your questions one at the time.
First of all, you should take a look at ip(8)
manpages and take a time to read the manpage as explained here. You can learn a lot by reading the manuals someone had put time and effort to share precious information inside Unix-like Operating Systems.
In the first entry, does 127.0.0.0 represent the network of the
loopback addresses? Is 127.0.0.0 a broadcast IP address?
Yes. The 127.0.0.0
address represent the Network address(first address of a network). This is a conceptual definition of ipv4.
What is the difference between the two loopback broadcast entries: the
first one for 127.0.0.0.0 and the fourth for 127.255.255.255?
Conceptual: They are different. Network and Broadcast addresses. You will have to read some books or google it and find yourself those differences since that is out of scope here at U&L. Maybe this question at SE Network Engineering can help you:
- Why couldn't a nework address be used as as broadcast address as well?
Real use case: They are almost the same on Linux Server scenarios so, are created as brodcast
types of address. Quoting the wonderful linux-ip document:
...The network address and broadcast address are both entered as
broadcast
type addresses on the interface to which they have been
bound. Conceptually, there is significance to the distinction between
a network and broadcast address, but practically, they are treated
analogously, by other networking gear as well as the linux kernel...
That is an axiom, and you will have to accept it as it is. On practical use cases of routing there will be little to no difference on where those 2 addresses are used.
In the fifth entry, does 192.168.122.0 represent the network of the
loopback addresses? Is 192.168.122.0 a broadcast IP address?
No. That is the network address of your ens3
interface. Take a look at the dev
on that line. local
table is a place where local routes are stored. That doesn't mean only loopback related routes are there. Just the ones where you will deliver data locally.
Quoting ip
manpage again:
At startup time the kernel configures the default RPDB consisting of three rules:
1. Priority: 0, Selector: match anything, Action: lookup routing table local (ID 255).
The local table is a special routing table containing high priority control routes for
local and broadcast addresses.
What is the difference between the two broadcast entries: the fifth
one for 192.168.122.0 and the last for 192.168.122.255?
Same as question 2, but for network 192.168.122.0/24
dev ens3
and not loopback device: Conceptual differences with same use cases for real world routing.
Is 127.0.0.1 an address in 127.0.0.0/8? Why is the third entry for
127.0.0.1 singled out of the second entry for 127.0.0.0/8?
To ensure that all traffic related to 127.0.0.0/8
will be delivered locally, and the origin will always be 127.0.0.1
. Manpage again:
local - the destinations are assigned to this host. The packets are looped back and
delivered locally.
broadcast - the destinations are broadcast addresses. The packets are sent as link
broadcasts.
My point of view here is that this will force any traffic destinated to 127.0.0.0/8
network come from 127.0.0.1
. This may initially sound dumb but, you could have another application/service inside linux using the 127.0.0.2
address and since local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1
route has 127.0.0.1
address as source (src
) this will avoid problems.
edited Mar 28 at 11:04
answered Mar 27 at 19:10
nwildnernwildner
15k34581
15k34581
I have upvoted your post. I haven't get to finish understanding your post, so not yet accepted it. I have many questions, and sometimes I am overwhelmed. Thank you for your patience and understanding
– Tim
Apr 3 at 11:42
That's fine @Tim . Take your time cause this is a subject that will demand from you more than only Linux knowledge but also some Networking solid base as well. Maybe a book about networking should be a good start :) . The TCP/IP Guide is a good start, and have a good free content on it - tcpipguide.com
– nwildner
2 days ago
add a comment |
I have upvoted your post. I haven't get to finish understanding your post, so not yet accepted it. I have many questions, and sometimes I am overwhelmed. Thank you for your patience and understanding
– Tim
Apr 3 at 11:42
That's fine @Tim . Take your time cause this is a subject that will demand from you more than only Linux knowledge but also some Networking solid base as well. Maybe a book about networking should be a good start :) . The TCP/IP Guide is a good start, and have a good free content on it - tcpipguide.com
– nwildner
2 days ago
I have upvoted your post. I haven't get to finish understanding your post, so not yet accepted it. I have many questions, and sometimes I am overwhelmed. Thank you for your patience and understanding
– Tim
Apr 3 at 11:42
I have upvoted your post. I haven't get to finish understanding your post, so not yet accepted it. I have many questions, and sometimes I am overwhelmed. Thank you for your patience and understanding
– Tim
Apr 3 at 11:42
That's fine @Tim . Take your time cause this is a subject that will demand from you more than only Linux knowledge but also some Networking solid base as well. Maybe a book about networking should be a good start :) . The TCP/IP Guide is a good start, and have a good free content on it - tcpipguide.com
– nwildner
2 days ago
That's fine @Tim . Take your time cause this is a subject that will demand from you more than only Linux knowledge but also some Networking solid base as well. Maybe a book about networking should be a good start :) . The TCP/IP Guide is a good start, and have a good free content on it - tcpipguide.com
– nwildner
2 days ago
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f509051%2fhow-shall-i-understand-the-routing-table-local%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
-ip, routing
Hey @Tim . Have you taken a time to at least read the answer i've put some effort to create? Or are you flooding U&L with questions that you will never read the answer? You should comment if you agree, disagree or if there is another additional doubt that was not covered on peoples answers if you want them to keep colaborating with you and reach the ideal answer you are expecting from the community ;)
– nwildner
Apr 3 at 11:26