How to understand ifconfig or ip addr show [closed]
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
The ifconfig
command dumps a lot of information at you, especially if you have a lot of interfaces, and you don't know where they come from. I've read through this tutorial page, which gives a great rundown on most of the information in ifconfig
. But it doesn't contain all the information I want (and could also be outdated by 12 years).
Using ip addr show eth0
:
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:e2:80:18 brd ff:ff:ff:ff:ff:ff
inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0 valid_lft forever preferred_lft forever
I find it tough to parse some of the output.
- Under
eth0
:<...>
describes... the interface capabilities? Uncertain where I can find the full set of options, uncertain what they're called, no idea what to google. What're the other options?state UP
- I know there's alsostate DOWN
andstate RUNNING
. These are all software constructs, right? Nothing is physically changing when I runip link set dev eth0 down
, right? So how does the kernel act differently when this state changes? does this state changes?group default
- interface groups. What is the unique problem they solve?
- Under
inet
- What does
scope global
mean - How can a private IP have a global scope? What am I missing?
- What does
ifconfig
closed as too broad by Ipor Sircer, Jeff Schaller, Isaac, SivaPrasath, countermode Aug 30 at 9:55
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |Â
up vote
0
down vote
favorite
The ifconfig
command dumps a lot of information at you, especially if you have a lot of interfaces, and you don't know where they come from. I've read through this tutorial page, which gives a great rundown on most of the information in ifconfig
. But it doesn't contain all the information I want (and could also be outdated by 12 years).
Using ip addr show eth0
:
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:e2:80:18 brd ff:ff:ff:ff:ff:ff
inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0 valid_lft forever preferred_lft forever
I find it tough to parse some of the output.
- Under
eth0
:<...>
describes... the interface capabilities? Uncertain where I can find the full set of options, uncertain what they're called, no idea what to google. What're the other options?state UP
- I know there's alsostate DOWN
andstate RUNNING
. These are all software constructs, right? Nothing is physically changing when I runip link set dev eth0 down
, right? So how does the kernel act differently when this state changes? does this state changes?group default
- interface groups. What is the unique problem they solve?
- Under
inet
- What does
scope global
mean - How can a private IP have a global scope? What am I missing?
- What does
ifconfig
closed as too broad by Ipor Sircer, Jeff Schaller, Isaac, SivaPrasath, countermode Aug 30 at 9:55
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
The ifconfig
command dumps a lot of information at you, especially if you have a lot of interfaces, and you don't know where they come from. I've read through this tutorial page, which gives a great rundown on most of the information in ifconfig
. But it doesn't contain all the information I want (and could also be outdated by 12 years).
Using ip addr show eth0
:
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:e2:80:18 brd ff:ff:ff:ff:ff:ff
inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0 valid_lft forever preferred_lft forever
I find it tough to parse some of the output.
- Under
eth0
:<...>
describes... the interface capabilities? Uncertain where I can find the full set of options, uncertain what they're called, no idea what to google. What're the other options?state UP
- I know there's alsostate DOWN
andstate RUNNING
. These are all software constructs, right? Nothing is physically changing when I runip link set dev eth0 down
, right? So how does the kernel act differently when this state changes? does this state changes?group default
- interface groups. What is the unique problem they solve?
- Under
inet
- What does
scope global
mean - How can a private IP have a global scope? What am I missing?
- What does
ifconfig
The ifconfig
command dumps a lot of information at you, especially if you have a lot of interfaces, and you don't know where they come from. I've read through this tutorial page, which gives a great rundown on most of the information in ifconfig
. But it doesn't contain all the information I want (and could also be outdated by 12 years).
Using ip addr show eth0
:
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:e2:80:18 brd ff:ff:ff:ff:ff:ff
inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0 valid_lft forever preferred_lft forever
I find it tough to parse some of the output.
- Under
eth0
:<...>
describes... the interface capabilities? Uncertain where I can find the full set of options, uncertain what they're called, no idea what to google. What're the other options?state UP
- I know there's alsostate DOWN
andstate RUNNING
. These are all software constructs, right? Nothing is physically changing when I runip link set dev eth0 down
, right? So how does the kernel act differently when this state changes? does this state changes?group default
- interface groups. What is the unique problem they solve?
- Under
inet
- What does
scope global
mean - How can a private IP have a global scope? What am I missing?
- What does
ifconfig
asked Aug 29 at 17:55
Ari Sweedler
508
508
closed as too broad by Ipor Sircer, Jeff Schaller, Isaac, SivaPrasath, countermode Aug 30 at 9:55
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
closed as too broad by Ipor Sircer, Jeff Schaller, Isaac, SivaPrasath, countermode Aug 30 at 9:55
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
2
down vote
accepted
Addresses with global scope are global from the point of view of the host, i.e. they are not restricted to the host or the local link. The host does not care, and does nothing different, in the case the address falls within the ranges specified in RFC1819 (Address Allocation for Private Internets). The "private" addresses are private only by convention. The host does not care which router does NAT, and how many hops away from the host the address translation from private to public addresses is done. Besides, you can implement NAT with other addresses too.
Interesting. So "private/public" for IPs and "scope" for IPs are on different layers, just like "port" and "IP" are on different layers. I see that 127.0.0.1 hasscope host lo
, meaning it is not global. What are the benefits of restricting an IP address's scope to an interface/local link?
â Ari Sweedler
Aug 29 at 19:44
On ubuntu,ifconfig
yieldsScope:link
foreth0
andScope:host
forloopback
. There is no scope specified fordocker0
- so you don't need a scope to be reachable? On MacOS, I see "scopeid" as a single digit hex number.
â Ari Sweedler
Aug 29 at 19:47
add a comment |Â
up vote
3
down vote
Here're the parts that I can already parse, for reference for anyone else with the same question.
eth0
is the interface name. It can be any string:mtu 1500
maximum transmission unit = 1500 bytes, this is the largest size that a frame sent over this interface can be. This number is usually limited by the Ethernet protocol's cap of 1500. If you send a larger packet and it arrives at an ethernet interface, then the frame will get fragmented and its payload transmitted in 2 or more packets. Not really any benefit to that, so it's best to follow standards.qdisc
pfifo_fast
queuing discipline = three pipes of first in first out, this determines how an interface chooses which packet to transmit next, when it's being overloaded.group default
Interface groups give a single interface to clients by combining the capabilities of the aggregated interfaces on them.qlen 1000
transmission queue length = 1000 packets. The 1000th packet will be queued, the 1001st will be dropped.
link/ether
means the link layer protocol isethernet
:brd
means broadcast. This is the address that the device will set asdestination
when it sends a broadcast. An interface sees all traffic on the wire it's sitting on, but is polite enough to only read data addressed to it. The way you address an interface is by using it's specific address, or the broadcast address.
inet
means the network layer protocol isinternet
(ipv4
)lft
stands for lifetime. If you get this address throughdhcp
, then you'll have a valid lifetime for your lease on the IP address. And just to make handoffs a little bit easier, a (probably) shorter preferred lifetime.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
Addresses with global scope are global from the point of view of the host, i.e. they are not restricted to the host or the local link. The host does not care, and does nothing different, in the case the address falls within the ranges specified in RFC1819 (Address Allocation for Private Internets). The "private" addresses are private only by convention. The host does not care which router does NAT, and how many hops away from the host the address translation from private to public addresses is done. Besides, you can implement NAT with other addresses too.
Interesting. So "private/public" for IPs and "scope" for IPs are on different layers, just like "port" and "IP" are on different layers. I see that 127.0.0.1 hasscope host lo
, meaning it is not global. What are the benefits of restricting an IP address's scope to an interface/local link?
â Ari Sweedler
Aug 29 at 19:44
On ubuntu,ifconfig
yieldsScope:link
foreth0
andScope:host
forloopback
. There is no scope specified fordocker0
- so you don't need a scope to be reachable? On MacOS, I see "scopeid" as a single digit hex number.
â Ari Sweedler
Aug 29 at 19:47
add a comment |Â
up vote
2
down vote
accepted
Addresses with global scope are global from the point of view of the host, i.e. they are not restricted to the host or the local link. The host does not care, and does nothing different, in the case the address falls within the ranges specified in RFC1819 (Address Allocation for Private Internets). The "private" addresses are private only by convention. The host does not care which router does NAT, and how many hops away from the host the address translation from private to public addresses is done. Besides, you can implement NAT with other addresses too.
Interesting. So "private/public" for IPs and "scope" for IPs are on different layers, just like "port" and "IP" are on different layers. I see that 127.0.0.1 hasscope host lo
, meaning it is not global. What are the benefits of restricting an IP address's scope to an interface/local link?
â Ari Sweedler
Aug 29 at 19:44
On ubuntu,ifconfig
yieldsScope:link
foreth0
andScope:host
forloopback
. There is no scope specified fordocker0
- so you don't need a scope to be reachable? On MacOS, I see "scopeid" as a single digit hex number.
â Ari Sweedler
Aug 29 at 19:47
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
Addresses with global scope are global from the point of view of the host, i.e. they are not restricted to the host or the local link. The host does not care, and does nothing different, in the case the address falls within the ranges specified in RFC1819 (Address Allocation for Private Internets). The "private" addresses are private only by convention. The host does not care which router does NAT, and how many hops away from the host the address translation from private to public addresses is done. Besides, you can implement NAT with other addresses too.
Addresses with global scope are global from the point of view of the host, i.e. they are not restricted to the host or the local link. The host does not care, and does nothing different, in the case the address falls within the ranges specified in RFC1819 (Address Allocation for Private Internets). The "private" addresses are private only by convention. The host does not care which router does NAT, and how many hops away from the host the address translation from private to public addresses is done. Besides, you can implement NAT with other addresses too.
edited Aug 29 at 19:38
answered Aug 29 at 19:22
Johan Myréen
6,94711423
6,94711423
Interesting. So "private/public" for IPs and "scope" for IPs are on different layers, just like "port" and "IP" are on different layers. I see that 127.0.0.1 hasscope host lo
, meaning it is not global. What are the benefits of restricting an IP address's scope to an interface/local link?
â Ari Sweedler
Aug 29 at 19:44
On ubuntu,ifconfig
yieldsScope:link
foreth0
andScope:host
forloopback
. There is no scope specified fordocker0
- so you don't need a scope to be reachable? On MacOS, I see "scopeid" as a single digit hex number.
â Ari Sweedler
Aug 29 at 19:47
add a comment |Â
Interesting. So "private/public" for IPs and "scope" for IPs are on different layers, just like "port" and "IP" are on different layers. I see that 127.0.0.1 hasscope host lo
, meaning it is not global. What are the benefits of restricting an IP address's scope to an interface/local link?
â Ari Sweedler
Aug 29 at 19:44
On ubuntu,ifconfig
yieldsScope:link
foreth0
andScope:host
forloopback
. There is no scope specified fordocker0
- so you don't need a scope to be reachable? On MacOS, I see "scopeid" as a single digit hex number.
â Ari Sweedler
Aug 29 at 19:47
Interesting. So "private/public" for IPs and "scope" for IPs are on different layers, just like "port" and "IP" are on different layers. I see that 127.0.0.1 has
scope host lo
, meaning it is not global. What are the benefits of restricting an IP address's scope to an interface/local link?â Ari Sweedler
Aug 29 at 19:44
Interesting. So "private/public" for IPs and "scope" for IPs are on different layers, just like "port" and "IP" are on different layers. I see that 127.0.0.1 has
scope host lo
, meaning it is not global. What are the benefits of restricting an IP address's scope to an interface/local link?â Ari Sweedler
Aug 29 at 19:44
On ubuntu,
ifconfig
yields Scope:link
for eth0
and Scope:host
for loopback
. There is no scope specified for docker0
- so you don't need a scope to be reachable? On MacOS, I see "scopeid" as a single digit hex number.â Ari Sweedler
Aug 29 at 19:47
On ubuntu,
ifconfig
yields Scope:link
for eth0
and Scope:host
for loopback
. There is no scope specified for docker0
- so you don't need a scope to be reachable? On MacOS, I see "scopeid" as a single digit hex number.â Ari Sweedler
Aug 29 at 19:47
add a comment |Â
up vote
3
down vote
Here're the parts that I can already parse, for reference for anyone else with the same question.
eth0
is the interface name. It can be any string:mtu 1500
maximum transmission unit = 1500 bytes, this is the largest size that a frame sent over this interface can be. This number is usually limited by the Ethernet protocol's cap of 1500. If you send a larger packet and it arrives at an ethernet interface, then the frame will get fragmented and its payload transmitted in 2 or more packets. Not really any benefit to that, so it's best to follow standards.qdisc
pfifo_fast
queuing discipline = three pipes of first in first out, this determines how an interface chooses which packet to transmit next, when it's being overloaded.group default
Interface groups give a single interface to clients by combining the capabilities of the aggregated interfaces on them.qlen 1000
transmission queue length = 1000 packets. The 1000th packet will be queued, the 1001st will be dropped.
link/ether
means the link layer protocol isethernet
:brd
means broadcast. This is the address that the device will set asdestination
when it sends a broadcast. An interface sees all traffic on the wire it's sitting on, but is polite enough to only read data addressed to it. The way you address an interface is by using it's specific address, or the broadcast address.
inet
means the network layer protocol isinternet
(ipv4
)lft
stands for lifetime. If you get this address throughdhcp
, then you'll have a valid lifetime for your lease on the IP address. And just to make handoffs a little bit easier, a (probably) shorter preferred lifetime.
add a comment |Â
up vote
3
down vote
Here're the parts that I can already parse, for reference for anyone else with the same question.
eth0
is the interface name. It can be any string:mtu 1500
maximum transmission unit = 1500 bytes, this is the largest size that a frame sent over this interface can be. This number is usually limited by the Ethernet protocol's cap of 1500. If you send a larger packet and it arrives at an ethernet interface, then the frame will get fragmented and its payload transmitted in 2 or more packets. Not really any benefit to that, so it's best to follow standards.qdisc
pfifo_fast
queuing discipline = three pipes of first in first out, this determines how an interface chooses which packet to transmit next, when it's being overloaded.group default
Interface groups give a single interface to clients by combining the capabilities of the aggregated interfaces on them.qlen 1000
transmission queue length = 1000 packets. The 1000th packet will be queued, the 1001st will be dropped.
link/ether
means the link layer protocol isethernet
:brd
means broadcast. This is the address that the device will set asdestination
when it sends a broadcast. An interface sees all traffic on the wire it's sitting on, but is polite enough to only read data addressed to it. The way you address an interface is by using it's specific address, or the broadcast address.
inet
means the network layer protocol isinternet
(ipv4
)lft
stands for lifetime. If you get this address throughdhcp
, then you'll have a valid lifetime for your lease on the IP address. And just to make handoffs a little bit easier, a (probably) shorter preferred lifetime.
add a comment |Â
up vote
3
down vote
up vote
3
down vote
Here're the parts that I can already parse, for reference for anyone else with the same question.
eth0
is the interface name. It can be any string:mtu 1500
maximum transmission unit = 1500 bytes, this is the largest size that a frame sent over this interface can be. This number is usually limited by the Ethernet protocol's cap of 1500. If you send a larger packet and it arrives at an ethernet interface, then the frame will get fragmented and its payload transmitted in 2 or more packets. Not really any benefit to that, so it's best to follow standards.qdisc
pfifo_fast
queuing discipline = three pipes of first in first out, this determines how an interface chooses which packet to transmit next, when it's being overloaded.group default
Interface groups give a single interface to clients by combining the capabilities of the aggregated interfaces on them.qlen 1000
transmission queue length = 1000 packets. The 1000th packet will be queued, the 1001st will be dropped.
link/ether
means the link layer protocol isethernet
:brd
means broadcast. This is the address that the device will set asdestination
when it sends a broadcast. An interface sees all traffic on the wire it's sitting on, but is polite enough to only read data addressed to it. The way you address an interface is by using it's specific address, or the broadcast address.
inet
means the network layer protocol isinternet
(ipv4
)lft
stands for lifetime. If you get this address throughdhcp
, then you'll have a valid lifetime for your lease on the IP address. And just to make handoffs a little bit easier, a (probably) shorter preferred lifetime.
Here're the parts that I can already parse, for reference for anyone else with the same question.
eth0
is the interface name. It can be any string:mtu 1500
maximum transmission unit = 1500 bytes, this is the largest size that a frame sent over this interface can be. This number is usually limited by the Ethernet protocol's cap of 1500. If you send a larger packet and it arrives at an ethernet interface, then the frame will get fragmented and its payload transmitted in 2 or more packets. Not really any benefit to that, so it's best to follow standards.qdisc
pfifo_fast
queuing discipline = three pipes of first in first out, this determines how an interface chooses which packet to transmit next, when it's being overloaded.group default
Interface groups give a single interface to clients by combining the capabilities of the aggregated interfaces on them.qlen 1000
transmission queue length = 1000 packets. The 1000th packet will be queued, the 1001st will be dropped.
link/ether
means the link layer protocol isethernet
:brd
means broadcast. This is the address that the device will set asdestination
when it sends a broadcast. An interface sees all traffic on the wire it's sitting on, but is polite enough to only read data addressed to it. The way you address an interface is by using it's specific address, or the broadcast address.
inet
means the network layer protocol isinternet
(ipv4
)lft
stands for lifetime. If you get this address throughdhcp
, then you'll have a valid lifetime for your lease on the IP address. And just to make handoffs a little bit easier, a (probably) shorter preferred lifetime.
answered Aug 29 at 17:55
Ari Sweedler
508
508
add a comment |Â
add a comment |Â