linux - What is the global attribute of a network interface? -


i saw following line of code in code repo work on:

ip addr | grep 'inet .*global' | cut -f 6 -d ' ' | cut -f1 -d '/' | head -n 1 

i want understand "global" attribute mean part of network interface attribute?

i hope asking in right place...

thanks lot, matan

ip addr convert ifa_scope struct ifaddrmsg string, struct ifaddrmsg how ip command information kernel (http://man7.org/linux/man-pages/man7/rtnetlink.7.html).

about ifa_scope:

scope of address. default rt_scope_universe (which corresponds value 0) , field set value ifconfig/ip, although diferent value can chosen. main exception address in reange 127.x.x.x, given rt_scope_host scop. see chapter 30 more details.

(c) understanding linux network internals

and rt_scope_universe converted ip string value "global".

about scope of address, helps decide use or not interface job. example if want communication inside machine, can choose 1 of network interfaces scope host, if talk outside world can choose interface scope global etc.

to detail understanding advise book give quote.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -