Are the IPv4 and IPv6 networks for my loopback interface the same network?2019 Community Moderator ElectionConfigure Atheros AR9285 wireless in Gentoo802.3ad on FreeBSD and Linux using crossover cables?Why would my Linux host suddently stop receiving multicast? All other nics on private network are receivingCannot connect to network in fedora 19Confusion about interfaces, iptables, connections, local connectionFTP not happening on RHEL 6 Server configured using a Vm Player 11I have no local IP on my CentOS 7.1 dedicated serverIPv6 packets injected on tun interface go up to IPv4 stackDebian8 server : Can't resolve IP adresses or DNSDirect connection Centos7 (loadbalance) to QNAP (trunk)
Is it possible to have a strip of cold climate in the middle of a planet?
Did Swami Prabhupada reject Advaita?
Biological Blimps: Propulsion
Why does the Sun have different day lengths, but not the gas giants?
Multiplicative persistence
Delivering sarcasm
How do you respond to a colleague from another team when they're wrongly expecting that you'll help them?
lightning-datatable row number error
Is the U.S. Code copyrighted by the Government?
Does an advisor owe his/her student anything? Will an advisor keep a PhD student only out of pity?
When were female captains banned from Starfleet?
Reverse int within the 32-bit signed integer range: [−2^31, 2^31 − 1]
Terse Method to Swap Lowest for Highest?
How do you make your own symbol when Detexify fails?
How to indicate a cut out for a product window
Should I outline or discovery write my stories?
Electoral considerations aside, what are potential benefits, for the US, of policy changes proposed by the tweet recognizing Golan annexation?
Yosemite Fire Rings - What to Expect?
What does chmod -u do?
Fear of getting stuck on one programming language / technology that is not used in my country
Start making guitar arrangements
Where does the bonus feat in the cleric starting package come from?
Can I sign legal documents with a smiley face?
Does a 'pending' US visa application constitute a denial?
Are the IPv4 and IPv6 networks for my loopback interface the same network?
2019 Community Moderator ElectionConfigure Atheros AR9285 wireless in Gentoo802.3ad on FreeBSD and Linux using crossover cables?Why would my Linux host suddently stop receiving multicast? All other nics on private network are receivingCannot connect to network in fedora 19Confusion about interfaces, iptables, connections, local connectionFTP not happening on RHEL 6 Server configured using a Vm Player 11I have no local IP on my CentOS 7.1 dedicated serverIPv6 packets injected on tun interface go up to IPv4 stackDebian8 server : Can't resolve IP adresses or DNSDirect connection Centos7 (loadbalance) to QNAP (trunk)
In output of ifconfig
:
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 1552397 bytes 88437726 (88.4 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1552397 bytes 88437726 (88.4 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
netmask 255.0.0.0
indicate the network is 127.0.0.0/8
, and consists many IP addresses
prefixlen 128
indicates the network has just one IP address. (https://networkengineering.stackexchange.com/a/57868/7894 seems to me that prefixlen specifies a network mask for IPv6)
Do they describe the same network?
Is a network defined as a set of IP addresses (therefore difference between IPv4 and IPv6 addresses can lead to different networks), or a set of network interfaces (therefore IPv4 and IPv6 addresses won't make difference, since they are assigned to the same network interfaces)?
networking ip loopback
|
show 2 more comments
In output of ifconfig
:
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 1552397 bytes 88437726 (88.4 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1552397 bytes 88437726 (88.4 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
netmask 255.0.0.0
indicate the network is 127.0.0.0/8
, and consists many IP addresses
prefixlen 128
indicates the network has just one IP address. (https://networkengineering.stackexchange.com/a/57868/7894 seems to me that prefixlen specifies a network mask for IPv6)
Do they describe the same network?
Is a network defined as a set of IP addresses (therefore difference between IPv4 and IPv6 addresses can lead to different networks), or a set of network interfaces (therefore IPv4 and IPv6 addresses won't make difference, since they are assigned to the same network interfaces)?
networking ip loopback
1
Don’t think of loopback as a network, you’ll only end up confused.
– Stephen Kitt
yesterday
2
On the other hand, Tim could just as well have asked this about a real network interface, so loopback being or not being a network is a bit of a red herring. I have a machine with avio0
interface that has a /32 IP4 address and a /56 IP6 address about which Tim could ask the same question.
– JdeBP
yesterday
the prefixlen refers to the ipv6 ::1 loopback, not to the ipv4 127.0.0.1/8. They're xompletely different things.
– mosvy
yesterday
@mosvy "the prefixlen refers to the ipv6 ::1 loopback," do you mean prefixlen always specifies the current network interface, instead of a network? networkengineering.stackexchange.com/a/57868/7894 seems to me that prefixlen specifies a network mask for IPv6
– Tim
yesterday
No. It specifies the length of the network part of an address, which for ::1/128 is 128. For the ipv4 127.0.0.1 with network mask 255.0.0.0 the prefix length is 8. ipv4 and ipv6 are different protocols, so I don't see how the question whether an ipv4 and an ipv6 address can be part of the same network makes any sense.
– mosvy
yesterday
|
show 2 more comments
In output of ifconfig
:
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 1552397 bytes 88437726 (88.4 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1552397 bytes 88437726 (88.4 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
netmask 255.0.0.0
indicate the network is 127.0.0.0/8
, and consists many IP addresses
prefixlen 128
indicates the network has just one IP address. (https://networkengineering.stackexchange.com/a/57868/7894 seems to me that prefixlen specifies a network mask for IPv6)
Do they describe the same network?
Is a network defined as a set of IP addresses (therefore difference between IPv4 and IPv6 addresses can lead to different networks), or a set of network interfaces (therefore IPv4 and IPv6 addresses won't make difference, since they are assigned to the same network interfaces)?
networking ip loopback
In output of ifconfig
:
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 1552397 bytes 88437726 (88.4 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1552397 bytes 88437726 (88.4 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
netmask 255.0.0.0
indicate the network is 127.0.0.0/8
, and consists many IP addresses
prefixlen 128
indicates the network has just one IP address. (https://networkengineering.stackexchange.com/a/57868/7894 seems to me that prefixlen specifies a network mask for IPv6)
Do they describe the same network?
Is a network defined as a set of IP addresses (therefore difference between IPv4 and IPv6 addresses can lead to different networks), or a set of network interfaces (therefore IPv4 and IPv6 addresses won't make difference, since they are assigned to the same network interfaces)?
networking ip loopback
networking ip loopback
edited yesterday
Tim
asked yesterday
TimTim
28k78269488
28k78269488
1
Don’t think of loopback as a network, you’ll only end up confused.
– Stephen Kitt
yesterday
2
On the other hand, Tim could just as well have asked this about a real network interface, so loopback being or not being a network is a bit of a red herring. I have a machine with avio0
interface that has a /32 IP4 address and a /56 IP6 address about which Tim could ask the same question.
– JdeBP
yesterday
the prefixlen refers to the ipv6 ::1 loopback, not to the ipv4 127.0.0.1/8. They're xompletely different things.
– mosvy
yesterday
@mosvy "the prefixlen refers to the ipv6 ::1 loopback," do you mean prefixlen always specifies the current network interface, instead of a network? networkengineering.stackexchange.com/a/57868/7894 seems to me that prefixlen specifies a network mask for IPv6
– Tim
yesterday
No. It specifies the length of the network part of an address, which for ::1/128 is 128. For the ipv4 127.0.0.1 with network mask 255.0.0.0 the prefix length is 8. ipv4 and ipv6 are different protocols, so I don't see how the question whether an ipv4 and an ipv6 address can be part of the same network makes any sense.
– mosvy
yesterday
|
show 2 more comments
1
Don’t think of loopback as a network, you’ll only end up confused.
– Stephen Kitt
yesterday
2
On the other hand, Tim could just as well have asked this about a real network interface, so loopback being or not being a network is a bit of a red herring. I have a machine with avio0
interface that has a /32 IP4 address and a /56 IP6 address about which Tim could ask the same question.
– JdeBP
yesterday
the prefixlen refers to the ipv6 ::1 loopback, not to the ipv4 127.0.0.1/8. They're xompletely different things.
– mosvy
yesterday
@mosvy "the prefixlen refers to the ipv6 ::1 loopback," do you mean prefixlen always specifies the current network interface, instead of a network? networkengineering.stackexchange.com/a/57868/7894 seems to me that prefixlen specifies a network mask for IPv6
– Tim
yesterday
No. It specifies the length of the network part of an address, which for ::1/128 is 128. For the ipv4 127.0.0.1 with network mask 255.0.0.0 the prefix length is 8. ipv4 and ipv6 are different protocols, so I don't see how the question whether an ipv4 and an ipv6 address can be part of the same network makes any sense.
– mosvy
yesterday
1
1
Don’t think of loopback as a network, you’ll only end up confused.
– Stephen Kitt
yesterday
Don’t think of loopback as a network, you’ll only end up confused.
– Stephen Kitt
yesterday
2
2
On the other hand, Tim could just as well have asked this about a real network interface, so loopback being or not being a network is a bit of a red herring. I have a machine with a
vio0
interface that has a /32 IP4 address and a /56 IP6 address about which Tim could ask the same question.– JdeBP
yesterday
On the other hand, Tim could just as well have asked this about a real network interface, so loopback being or not being a network is a bit of a red herring. I have a machine with a
vio0
interface that has a /32 IP4 address and a /56 IP6 address about which Tim could ask the same question.– JdeBP
yesterday
the prefixlen refers to the ipv6 ::1 loopback, not to the ipv4 127.0.0.1/8. They're xompletely different things.
– mosvy
yesterday
the prefixlen refers to the ipv6 ::1 loopback, not to the ipv4 127.0.0.1/8. They're xompletely different things.
– mosvy
yesterday
@mosvy "the prefixlen refers to the ipv6 ::1 loopback," do you mean prefixlen always specifies the current network interface, instead of a network? networkengineering.stackexchange.com/a/57868/7894 seems to me that prefixlen specifies a network mask for IPv6
– Tim
yesterday
@mosvy "the prefixlen refers to the ipv6 ::1 loopback," do you mean prefixlen always specifies the current network interface, instead of a network? networkengineering.stackexchange.com/a/57868/7894 seems to me that prefixlen specifies a network mask for IPv6
– Tim
yesterday
No. It specifies the length of the network part of an address, which for ::1/128 is 128. For the ipv4 127.0.0.1 with network mask 255.0.0.0 the prefix length is 8. ipv4 and ipv6 are different protocols, so I don't see how the question whether an ipv4 and an ipv6 address can be part of the same network makes any sense.
– mosvy
yesterday
No. It specifies the length of the network part of an address, which for ::1/128 is 128. For the ipv4 127.0.0.1 with network mask 255.0.0.0 the prefix length is 8. ipv4 and ipv6 are different protocols, so I don't see how the question whether an ipv4 and an ipv6 address can be part of the same network makes any sense.
– mosvy
yesterday
|
show 2 more comments
2 Answers
2
active
oldest
votes
It depends on which abstraction layer you're looking at.
If we look at L3 of the OSI model, the IPv6 and IPv4 sides of the loopback interface are completely separate: there is no routing functionality between the two (unless you explicitly set it up). There is an optional (enabled by default, but switchable per socket) mapping of the entire IPv4 address space to a subset of the IPv6 address space, but you need to be at L4 or above to make use of it.
On an actual physical NIC, we could also look at L2 and the physical layer, and see that both L3 protocols are actually sharing the same Ethernet media and MAC addresses, and are therefore "the same network" in L2 sense. But a loopback interface does not have a L2 layer, let alone a physical layer.
Fundamentally, the loopback interface is a shortcut at the L3 level from the outgoing side of the IP (either IPv4 or IPv6) driver stack to the incoming side. When an application wants to communicate with another application using the network protocols, and both applications happen to be in the same host, the loopback interface allows the traffic between them to be routed more efficiently, without unnecessarily passing back & forth through the entire depth of the network protocol stack.
Sometimes applications want to allow some traffic only within the single host, or only on a specific physical NIC: for this purpose, it is useful to have the host-internal shortcut be presented as a L3 network interface, so the higher-level protocols can just use it like any other network interface without needing to implement a special case.
Is it really routing though? Or is it a sort of mapping in the interface between L3 and L4? I don't think I can make an IPv6 routing table entry and have it affect where the system routes IPv4 packets. Also, applications can opt out of the mapping by using theIPV6_V6ONLY
socket option, and the administrator can set the system-wide default by using/proc/sys/net/ipv6/bindv6only
.
– telcoM
yesterday
I just wanna ask why do people analize the network strusture using OSI model. It's not used in the real world. Such answers are too unfriendly.
– 炸鱼薯条德里克
19 hours ago
add a comment |
Q: Is a network defined as a set of IP addresses (...), or a set of network interfaces (...) ?
My opinions:
You cannot really define a network in terms of IPv6 addresses. The concept "a set of network interfaces" is more useful. See the definition of "link" below.
This precise definition for "network" might not be widely agreed enough. So it might not be a useful term in your question.
This differs from working with IPv4. In the IPv4 world, the term "subnet" was more common and useful.
My reasoning:
RFC 8200 starts with an introduction, and then definitions of 11 key terms. They do not include "network", but they do include "link".
link: a communication facility or medium over which nodes can
communicate at the link layer, i.e., the layer
immediately below IPv6. Examples are Ethernets (simple
or bridged); [...]
interface: a node's attachment to a link.
All interfaces share the exact same prefix for link-local unicast addresses: fe80::/10
. Different hosts on different links can use the same link-local address. At a user level, you have to specify which link you want, by including an interface specifier. E.g. ping fe80::1234%lo
.
Link-local addresses can be ignored in many cases. However they are an essential part of how IPv6 works:
When you run a standard IPv6 Local Area Network through an L2 Ethernet "switch" (or switches), the routable unicast addresses have to be resolved using Neighbour Discovery packets. ND packets are are sent using link-local addresses. [1]
Notes
The
ip link
command is for "network device configuration". In other words, the command "ip link" is actually used to configure interfaces :-).A "loopback interface" like
lo
is contrived by the operating system. The IPv6 standards say that::1
may be assigned to
a virtual interface (typically called the "loopback interface") to an imaginary link that goes nowhere.
It does not tell you exactly how this will be implemented e.g. in Linux. I think there are some weird questions you can ask about this, but the answers do not really tell you very much.
You can still get away with thinking in IPv4 terms a lot of the time. But IPv6 adoption is increasing. It is good to at least try to learn IPv6 equivalents, when you are learning about specific IPv4 features. Realistically, you will probably see some terms used for IPv4, and some different terms used for IPv6. You will not always know a generic definition that can account for both IPv4 and IPv6.
[1] Neighbour discovery actually uses both unicast and multicast link-local addresses. E.g. ND requests are usually sent from a unicast address, to a multicast address. Link-local multicast addresses are perhaps not as simple as the unicast ones. They are the multicast addresses where the "scop" part is set to link-local.
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%2f507991%2fare-the-ipv4-and-ipv6-networks-for-my-loopback-interface-the-same-network%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
It depends on which abstraction layer you're looking at.
If we look at L3 of the OSI model, the IPv6 and IPv4 sides of the loopback interface are completely separate: there is no routing functionality between the two (unless you explicitly set it up). There is an optional (enabled by default, but switchable per socket) mapping of the entire IPv4 address space to a subset of the IPv6 address space, but you need to be at L4 or above to make use of it.
On an actual physical NIC, we could also look at L2 and the physical layer, and see that both L3 protocols are actually sharing the same Ethernet media and MAC addresses, and are therefore "the same network" in L2 sense. But a loopback interface does not have a L2 layer, let alone a physical layer.
Fundamentally, the loopback interface is a shortcut at the L3 level from the outgoing side of the IP (either IPv4 or IPv6) driver stack to the incoming side. When an application wants to communicate with another application using the network protocols, and both applications happen to be in the same host, the loopback interface allows the traffic between them to be routed more efficiently, without unnecessarily passing back & forth through the entire depth of the network protocol stack.
Sometimes applications want to allow some traffic only within the single host, or only on a specific physical NIC: for this purpose, it is useful to have the host-internal shortcut be presented as a L3 network interface, so the higher-level protocols can just use it like any other network interface without needing to implement a special case.
Is it really routing though? Or is it a sort of mapping in the interface between L3 and L4? I don't think I can make an IPv6 routing table entry and have it affect where the system routes IPv4 packets. Also, applications can opt out of the mapping by using theIPV6_V6ONLY
socket option, and the administrator can set the system-wide default by using/proc/sys/net/ipv6/bindv6only
.
– telcoM
yesterday
I just wanna ask why do people analize the network strusture using OSI model. It's not used in the real world. Such answers are too unfriendly.
– 炸鱼薯条德里克
19 hours ago
add a comment |
It depends on which abstraction layer you're looking at.
If we look at L3 of the OSI model, the IPv6 and IPv4 sides of the loopback interface are completely separate: there is no routing functionality between the two (unless you explicitly set it up). There is an optional (enabled by default, but switchable per socket) mapping of the entire IPv4 address space to a subset of the IPv6 address space, but you need to be at L4 or above to make use of it.
On an actual physical NIC, we could also look at L2 and the physical layer, and see that both L3 protocols are actually sharing the same Ethernet media and MAC addresses, and are therefore "the same network" in L2 sense. But a loopback interface does not have a L2 layer, let alone a physical layer.
Fundamentally, the loopback interface is a shortcut at the L3 level from the outgoing side of the IP (either IPv4 or IPv6) driver stack to the incoming side. When an application wants to communicate with another application using the network protocols, and both applications happen to be in the same host, the loopback interface allows the traffic between them to be routed more efficiently, without unnecessarily passing back & forth through the entire depth of the network protocol stack.
Sometimes applications want to allow some traffic only within the single host, or only on a specific physical NIC: for this purpose, it is useful to have the host-internal shortcut be presented as a L3 network interface, so the higher-level protocols can just use it like any other network interface without needing to implement a special case.
Is it really routing though? Or is it a sort of mapping in the interface between L3 and L4? I don't think I can make an IPv6 routing table entry and have it affect where the system routes IPv4 packets. Also, applications can opt out of the mapping by using theIPV6_V6ONLY
socket option, and the administrator can set the system-wide default by using/proc/sys/net/ipv6/bindv6only
.
– telcoM
yesterday
I just wanna ask why do people analize the network strusture using OSI model. It's not used in the real world. Such answers are too unfriendly.
– 炸鱼薯条德里克
19 hours ago
add a comment |
It depends on which abstraction layer you're looking at.
If we look at L3 of the OSI model, the IPv6 and IPv4 sides of the loopback interface are completely separate: there is no routing functionality between the two (unless you explicitly set it up). There is an optional (enabled by default, but switchable per socket) mapping of the entire IPv4 address space to a subset of the IPv6 address space, but you need to be at L4 or above to make use of it.
On an actual physical NIC, we could also look at L2 and the physical layer, and see that both L3 protocols are actually sharing the same Ethernet media and MAC addresses, and are therefore "the same network" in L2 sense. But a loopback interface does not have a L2 layer, let alone a physical layer.
Fundamentally, the loopback interface is a shortcut at the L3 level from the outgoing side of the IP (either IPv4 or IPv6) driver stack to the incoming side. When an application wants to communicate with another application using the network protocols, and both applications happen to be in the same host, the loopback interface allows the traffic between them to be routed more efficiently, without unnecessarily passing back & forth through the entire depth of the network protocol stack.
Sometimes applications want to allow some traffic only within the single host, or only on a specific physical NIC: for this purpose, it is useful to have the host-internal shortcut be presented as a L3 network interface, so the higher-level protocols can just use it like any other network interface without needing to implement a special case.
It depends on which abstraction layer you're looking at.
If we look at L3 of the OSI model, the IPv6 and IPv4 sides of the loopback interface are completely separate: there is no routing functionality between the two (unless you explicitly set it up). There is an optional (enabled by default, but switchable per socket) mapping of the entire IPv4 address space to a subset of the IPv6 address space, but you need to be at L4 or above to make use of it.
On an actual physical NIC, we could also look at L2 and the physical layer, and see that both L3 protocols are actually sharing the same Ethernet media and MAC addresses, and are therefore "the same network" in L2 sense. But a loopback interface does not have a L2 layer, let alone a physical layer.
Fundamentally, the loopback interface is a shortcut at the L3 level from the outgoing side of the IP (either IPv4 or IPv6) driver stack to the incoming side. When an application wants to communicate with another application using the network protocols, and both applications happen to be in the same host, the loopback interface allows the traffic between them to be routed more efficiently, without unnecessarily passing back & forth through the entire depth of the network protocol stack.
Sometimes applications want to allow some traffic only within the single host, or only on a specific physical NIC: for this purpose, it is useful to have the host-internal shortcut be presented as a L3 network interface, so the higher-level protocols can just use it like any other network interface without needing to implement a special case.
edited yesterday
answered yesterday
telcoMtelcoM
19.6k12449
19.6k12449
Is it really routing though? Or is it a sort of mapping in the interface between L3 and L4? I don't think I can make an IPv6 routing table entry and have it affect where the system routes IPv4 packets. Also, applications can opt out of the mapping by using theIPV6_V6ONLY
socket option, and the administrator can set the system-wide default by using/proc/sys/net/ipv6/bindv6only
.
– telcoM
yesterday
I just wanna ask why do people analize the network strusture using OSI model. It's not used in the real world. Such answers are too unfriendly.
– 炸鱼薯条德里克
19 hours ago
add a comment |
Is it really routing though? Or is it a sort of mapping in the interface between L3 and L4? I don't think I can make an IPv6 routing table entry and have it affect where the system routes IPv4 packets. Also, applications can opt out of the mapping by using theIPV6_V6ONLY
socket option, and the administrator can set the system-wide default by using/proc/sys/net/ipv6/bindv6only
.
– telcoM
yesterday
I just wanna ask why do people analize the network strusture using OSI model. It's not used in the real world. Such answers are too unfriendly.
– 炸鱼薯条德里克
19 hours ago
Is it really routing though? Or is it a sort of mapping in the interface between L3 and L4? I don't think I can make an IPv6 routing table entry and have it affect where the system routes IPv4 packets. Also, applications can opt out of the mapping by using the
IPV6_V6ONLY
socket option, and the administrator can set the system-wide default by using /proc/sys/net/ipv6/bindv6only
.– telcoM
yesterday
Is it really routing though? Or is it a sort of mapping in the interface between L3 and L4? I don't think I can make an IPv6 routing table entry and have it affect where the system routes IPv4 packets. Also, applications can opt out of the mapping by using the
IPV6_V6ONLY
socket option, and the administrator can set the system-wide default by using /proc/sys/net/ipv6/bindv6only
.– telcoM
yesterday
I just wanna ask why do people analize the network strusture using OSI model. It's not used in the real world. Such answers are too unfriendly.
– 炸鱼薯条德里克
19 hours ago
I just wanna ask why do people analize the network strusture using OSI model. It's not used in the real world. Such answers are too unfriendly.
– 炸鱼薯条德里克
19 hours ago
add a comment |
Q: Is a network defined as a set of IP addresses (...), or a set of network interfaces (...) ?
My opinions:
You cannot really define a network in terms of IPv6 addresses. The concept "a set of network interfaces" is more useful. See the definition of "link" below.
This precise definition for "network" might not be widely agreed enough. So it might not be a useful term in your question.
This differs from working with IPv4. In the IPv4 world, the term "subnet" was more common and useful.
My reasoning:
RFC 8200 starts with an introduction, and then definitions of 11 key terms. They do not include "network", but they do include "link".
link: a communication facility or medium over which nodes can
communicate at the link layer, i.e., the layer
immediately below IPv6. Examples are Ethernets (simple
or bridged); [...]
interface: a node's attachment to a link.
All interfaces share the exact same prefix for link-local unicast addresses: fe80::/10
. Different hosts on different links can use the same link-local address. At a user level, you have to specify which link you want, by including an interface specifier. E.g. ping fe80::1234%lo
.
Link-local addresses can be ignored in many cases. However they are an essential part of how IPv6 works:
When you run a standard IPv6 Local Area Network through an L2 Ethernet "switch" (or switches), the routable unicast addresses have to be resolved using Neighbour Discovery packets. ND packets are are sent using link-local addresses. [1]
Notes
The
ip link
command is for "network device configuration". In other words, the command "ip link" is actually used to configure interfaces :-).A "loopback interface" like
lo
is contrived by the operating system. The IPv6 standards say that::1
may be assigned to
a virtual interface (typically called the "loopback interface") to an imaginary link that goes nowhere.
It does not tell you exactly how this will be implemented e.g. in Linux. I think there are some weird questions you can ask about this, but the answers do not really tell you very much.
You can still get away with thinking in IPv4 terms a lot of the time. But IPv6 adoption is increasing. It is good to at least try to learn IPv6 equivalents, when you are learning about specific IPv4 features. Realistically, you will probably see some terms used for IPv4, and some different terms used for IPv6. You will not always know a generic definition that can account for both IPv4 and IPv6.
[1] Neighbour discovery actually uses both unicast and multicast link-local addresses. E.g. ND requests are usually sent from a unicast address, to a multicast address. Link-local multicast addresses are perhaps not as simple as the unicast ones. They are the multicast addresses where the "scop" part is set to link-local.
add a comment |
Q: Is a network defined as a set of IP addresses (...), or a set of network interfaces (...) ?
My opinions:
You cannot really define a network in terms of IPv6 addresses. The concept "a set of network interfaces" is more useful. See the definition of "link" below.
This precise definition for "network" might not be widely agreed enough. So it might not be a useful term in your question.
This differs from working with IPv4. In the IPv4 world, the term "subnet" was more common and useful.
My reasoning:
RFC 8200 starts with an introduction, and then definitions of 11 key terms. They do not include "network", but they do include "link".
link: a communication facility or medium over which nodes can
communicate at the link layer, i.e., the layer
immediately below IPv6. Examples are Ethernets (simple
or bridged); [...]
interface: a node's attachment to a link.
All interfaces share the exact same prefix for link-local unicast addresses: fe80::/10
. Different hosts on different links can use the same link-local address. At a user level, you have to specify which link you want, by including an interface specifier. E.g. ping fe80::1234%lo
.
Link-local addresses can be ignored in many cases. However they are an essential part of how IPv6 works:
When you run a standard IPv6 Local Area Network through an L2 Ethernet "switch" (or switches), the routable unicast addresses have to be resolved using Neighbour Discovery packets. ND packets are are sent using link-local addresses. [1]
Notes
The
ip link
command is for "network device configuration". In other words, the command "ip link" is actually used to configure interfaces :-).A "loopback interface" like
lo
is contrived by the operating system. The IPv6 standards say that::1
may be assigned to
a virtual interface (typically called the "loopback interface") to an imaginary link that goes nowhere.
It does not tell you exactly how this will be implemented e.g. in Linux. I think there are some weird questions you can ask about this, but the answers do not really tell you very much.
You can still get away with thinking in IPv4 terms a lot of the time. But IPv6 adoption is increasing. It is good to at least try to learn IPv6 equivalents, when you are learning about specific IPv4 features. Realistically, you will probably see some terms used for IPv4, and some different terms used for IPv6. You will not always know a generic definition that can account for both IPv4 and IPv6.
[1] Neighbour discovery actually uses both unicast and multicast link-local addresses. E.g. ND requests are usually sent from a unicast address, to a multicast address. Link-local multicast addresses are perhaps not as simple as the unicast ones. They are the multicast addresses where the "scop" part is set to link-local.
add a comment |
Q: Is a network defined as a set of IP addresses (...), or a set of network interfaces (...) ?
My opinions:
You cannot really define a network in terms of IPv6 addresses. The concept "a set of network interfaces" is more useful. See the definition of "link" below.
This precise definition for "network" might not be widely agreed enough. So it might not be a useful term in your question.
This differs from working with IPv4. In the IPv4 world, the term "subnet" was more common and useful.
My reasoning:
RFC 8200 starts with an introduction, and then definitions of 11 key terms. They do not include "network", but they do include "link".
link: a communication facility or medium over which nodes can
communicate at the link layer, i.e., the layer
immediately below IPv6. Examples are Ethernets (simple
or bridged); [...]
interface: a node's attachment to a link.
All interfaces share the exact same prefix for link-local unicast addresses: fe80::/10
. Different hosts on different links can use the same link-local address. At a user level, you have to specify which link you want, by including an interface specifier. E.g. ping fe80::1234%lo
.
Link-local addresses can be ignored in many cases. However they are an essential part of how IPv6 works:
When you run a standard IPv6 Local Area Network through an L2 Ethernet "switch" (or switches), the routable unicast addresses have to be resolved using Neighbour Discovery packets. ND packets are are sent using link-local addresses. [1]
Notes
The
ip link
command is for "network device configuration". In other words, the command "ip link" is actually used to configure interfaces :-).A "loopback interface" like
lo
is contrived by the operating system. The IPv6 standards say that::1
may be assigned to
a virtual interface (typically called the "loopback interface") to an imaginary link that goes nowhere.
It does not tell you exactly how this will be implemented e.g. in Linux. I think there are some weird questions you can ask about this, but the answers do not really tell you very much.
You can still get away with thinking in IPv4 terms a lot of the time. But IPv6 adoption is increasing. It is good to at least try to learn IPv6 equivalents, when you are learning about specific IPv4 features. Realistically, you will probably see some terms used for IPv4, and some different terms used for IPv6. You will not always know a generic definition that can account for both IPv4 and IPv6.
[1] Neighbour discovery actually uses both unicast and multicast link-local addresses. E.g. ND requests are usually sent from a unicast address, to a multicast address. Link-local multicast addresses are perhaps not as simple as the unicast ones. They are the multicast addresses where the "scop" part is set to link-local.
Q: Is a network defined as a set of IP addresses (...), or a set of network interfaces (...) ?
My opinions:
You cannot really define a network in terms of IPv6 addresses. The concept "a set of network interfaces" is more useful. See the definition of "link" below.
This precise definition for "network" might not be widely agreed enough. So it might not be a useful term in your question.
This differs from working with IPv4. In the IPv4 world, the term "subnet" was more common and useful.
My reasoning:
RFC 8200 starts with an introduction, and then definitions of 11 key terms. They do not include "network", but they do include "link".
link: a communication facility or medium over which nodes can
communicate at the link layer, i.e., the layer
immediately below IPv6. Examples are Ethernets (simple
or bridged); [...]
interface: a node's attachment to a link.
All interfaces share the exact same prefix for link-local unicast addresses: fe80::/10
. Different hosts on different links can use the same link-local address. At a user level, you have to specify which link you want, by including an interface specifier. E.g. ping fe80::1234%lo
.
Link-local addresses can be ignored in many cases. However they are an essential part of how IPv6 works:
When you run a standard IPv6 Local Area Network through an L2 Ethernet "switch" (or switches), the routable unicast addresses have to be resolved using Neighbour Discovery packets. ND packets are are sent using link-local addresses. [1]
Notes
The
ip link
command is for "network device configuration". In other words, the command "ip link" is actually used to configure interfaces :-).A "loopback interface" like
lo
is contrived by the operating system. The IPv6 standards say that::1
may be assigned to
a virtual interface (typically called the "loopback interface") to an imaginary link that goes nowhere.
It does not tell you exactly how this will be implemented e.g. in Linux. I think there are some weird questions you can ask about this, but the answers do not really tell you very much.
You can still get away with thinking in IPv4 terms a lot of the time. But IPv6 adoption is increasing. It is good to at least try to learn IPv6 equivalents, when you are learning about specific IPv4 features. Realistically, you will probably see some terms used for IPv4, and some different terms used for IPv6. You will not always know a generic definition that can account for both IPv4 and IPv6.
[1] Neighbour discovery actually uses both unicast and multicast link-local addresses. E.g. ND requests are usually sent from a unicast address, to a multicast address. Link-local multicast addresses are perhaps not as simple as the unicast ones. They are the multicast addresses where the "scop" part is set to link-local.
edited yesterday
answered yesterday
sourcejedisourcejedi
25.4k445110
25.4k445110
add a comment |
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%2f507991%2fare-the-ipv4-and-ipv6-networks-for-my-loopback-interface-the-same-network%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
1
Don’t think of loopback as a network, you’ll only end up confused.
– Stephen Kitt
yesterday
2
On the other hand, Tim could just as well have asked this about a real network interface, so loopback being or not being a network is a bit of a red herring. I have a machine with a
vio0
interface that has a /32 IP4 address and a /56 IP6 address about which Tim could ask the same question.– JdeBP
yesterday
the prefixlen refers to the ipv6 ::1 loopback, not to the ipv4 127.0.0.1/8. They're xompletely different things.
– mosvy
yesterday
@mosvy "the prefixlen refers to the ipv6 ::1 loopback," do you mean prefixlen always specifies the current network interface, instead of a network? networkengineering.stackexchange.com/a/57868/7894 seems to me that prefixlen specifies a network mask for IPv6
– Tim
yesterday
No. It specifies the length of the network part of an address, which for ::1/128 is 128. For the ipv4 127.0.0.1 with network mask 255.0.0.0 the prefix length is 8. ipv4 and ipv6 are different protocols, so I don't see how the question whether an ipv4 and an ipv6 address can be part of the same network makes any sense.
– mosvy
yesterday