Family rt-link
netlink specification¶
Contents
Operations¶
newlink¶
Create a new link.
- attribute-set
link-attrs
- fixed-header
ifinfomsg
- do
- request
- attributes
[
ifi-index
,ifname
,net-ns-pid
,net-ns-fd
,target-netnsid
,link-netnsid
,linkinfo
,group
,num-tx-queues
,num-rx-queues
,address
,broadcast
,mtu
,txqlen
,operstate
,linkmode
,group
,gso-max-size
,gso-max-segs
,gro-max-size
,gso-ipv4-max-size
,gro-ipv4-max-size
,af-spec
]
dellink¶
Delete an existing link.
- attribute-set
link-attrs
- fixed-header
ifinfomsg
- do
- request
- attributes
[
ifi-index
,ifname
]
getlink¶
Get / dump information about a link.
- attribute-set
link-attrs
- fixed-header
ifinfomsg
- do
- request
- attributes
[
ifi-index
,ifname
,alt-ifname
,ext-mask
,target-netnsid
]
- reply
- attributes
[
ifi-family
,ifi-type
,ifi-index
,ifi-flags
,ifi-change
,address
,broadcast
,ifname
,mtu
,link
,qdisc
,stats
,cost
,priority
,master
,wireless
,protinfo
,txqlen
,map
,weight
,operstate
,linkmode
,linkinfo
,net-ns-pid
,ifalias
,num-vf
,vfinfo-list
,stats64
,vf-ports
,port-self
,af-spec
,group
,net-ns-fd
,ext-mask
,promiscuity
,num-tx-queues
,num-rx-queues
,carrier
,phys-port-id
,carrier-changes
,phys-switch-id
,link-netnsid
,phys-port-name
,proto-down
,gso-max-segs
,gso-max-size
,pad
,xdp
,event
,new-netnsid
,if-netnsid
,target-netnsid
,carrier-up-count
,carrier-down-count
,new-ifindex
,min-mtu
,max-mtu
,prop-list
,alt-ifname
,perm-address
,proto-down-reason
,parent-dev-name
,parent-dev-bus-name
,gro-max-size
,tso-max-size
,tso-max-segs
,allmulti
,devlink-port
,gso-ipv4-max-size
,gro-ipv4-max-size
]
- dump
- request
- attributes
[
target-netnsid
,ext-mask
,master
,linkinfo
]
- reply
- attributes
[
ifi-family
,ifi-type
,ifi-index
,ifi-flags
,ifi-change
,address
,broadcast
,ifname
,mtu
,link
,qdisc
,stats
,cost
,priority
,master
,wireless
,protinfo
,txqlen
,map
,weight
,operstate
,linkmode
,linkinfo
,net-ns-pid
,ifalias
,num-vf
,vfinfo-list
,stats64
,vf-ports
,port-self
,af-spec
,group
,net-ns-fd
,ext-mask
,promiscuity
,num-tx-queues
,num-rx-queues
,carrier
,phys-port-id
,carrier-changes
,phys-switch-id
,link-netnsid
,phys-port-name
,proto-down
,gso-max-segs
,gso-max-size
,pad
,xdp
,event
,new-netnsid
,if-netnsid
,target-netnsid
,carrier-up-count
,carrier-down-count
,new-ifindex
,min-mtu
,max-mtu
,prop-list
,alt-ifname
,perm-address
,proto-down-reason
,parent-dev-name
,parent-dev-bus-name
,gro-max-size
,tso-max-size
,tso-max-segs
,allmulti
,devlink-port
,gso-ipv4-max-size
,gro-ipv4-max-size
]
setlink¶
Set information about a link.
- attribute-set
link-attrs
- fixed-header
ifinfomsg
- do
- request
- attributes
[
ifi-family
,ifi-type
,ifi-index
,ifi-flags
,ifi-change
,address
,broadcast
,ifname
,mtu
,link
,qdisc
,stats
,cost
,priority
,master
,wireless
,protinfo
,txqlen
,map
,weight
,operstate
,linkmode
,linkinfo
,net-ns-pid
,ifalias
,num-vf
,vfinfo-list
,stats64
,vf-ports
,port-self
,af-spec
,group
,net-ns-fd
,ext-mask
,promiscuity
,num-tx-queues
,num-rx-queues
,carrier
,phys-port-id
,carrier-changes
,phys-switch-id
,link-netnsid
,phys-port-name
,proto-down
,gso-max-segs
,gso-max-size
,pad
,xdp
,event
,new-netnsid
,if-netnsid
,target-netnsid
,carrier-up-count
,carrier-down-count
,new-ifindex
,min-mtu
,max-mtu
,prop-list
,alt-ifname
,perm-address
,proto-down-reason
,parent-dev-name
,parent-dev-bus-name
,gro-max-size
,tso-max-size
,tso-max-segs
,allmulti
,devlink-port
,gso-ipv4-max-size
,gro-ipv4-max-size
]
getstats¶
Get / dump link stats.
- attribute-set
stats-attrs
- fixed-header
if_stats_msg
- do
- request
- attributes
[
ifindex
]
- reply
- attributes
[
family
,ifindex
,filter-mask
,link-64
,link-xstats
,link-xstats-slave
,link-offload-xstats
,af-spec
]
- dump
request
- reply
- attributes
[
family
,ifindex
,filter-mask
,link-64
,link-xstats
,link-xstats-slave
,link-offload-xstats
,af-spec
]
Multicast groups¶
rtnlgrp-link
rtnlgrp-stats
Definitions¶
ifinfo-flags¶
- type
flags
- entries
- up
- broadcast
- debug
- loopback
- point-to-point
- no-trailers
- running
- no-arp
- promisc
- all-multi
- master
- slave
- multicast
- portsel
- auto-media
- dynamic
- lower-up
- dormant
- echo
ifla-bridge-id¶
- type
struct
- members
- prio
- addr
ifla-cacheinfo¶
- type
struct
- members
- max-reasm-len
- tstamp
- reachable-time
- retrans-time
rtnl-link-stats¶
- type
struct
- members
- rx-packets
- tx-packets
- rx-bytes
- tx-bytes
- rx-errors
- tx-errors
- rx-dropped
- tx-dropped
- multicast
- collisions
- rx-length-errors
- rx-over-errors
- rx-crc-errors
- rx-frame-errors
- rx-fifo-errors
- rx-missed-errors
- tx-aborted-errors
- tx-carrier-errors
- tx-fifo-errors
- tx-heartbeat-errors
- tx-window-errors
- rx-compressed
- tx-compressed
- rx-nohandler
rtnl-link-stats64¶
- type
struct
- members
- rx-packets
- tx-packets
- rx-bytes
- tx-bytes
- rx-errors
- tx-errors
- rx-dropped
- tx-dropped
- multicast
- collisions
- rx-length-errors
- rx-over-errors
- rx-crc-errors
- rx-frame-errors
- rx-fifo-errors
- rx-missed-errors
- tx-aborted-errors
- tx-carrier-errors
- tx-fifo-errors
- tx-heartbeat-errors
- tx-window-errors
- rx-compressed
- tx-compressed
- rx-nohandler
- rx-otherhost-dropped
rtnl-link-ifmap¶
- type
struct
- members
- mem-start
- mem-end
- base-addr
- irq
- dma
- port
ipv4-devconf¶
- type
struct
- members
- forwarding
- mc-forwarding
- proxy-arp
- accept-redirects
- secure-redirects
- send-redirects
- shared-media
- rp-filter
- accept-source-route
- bootp-relay
- log-martians
- tag
- arpfilter
- medium-id
- noxfrm
- nopolicy
- force-igmp-version
- arp-announce
- arp-ignore
- promote-secondaries
- arp-accept
- arp-notify
- accept-local
- src-vmark
- proxy-arp-pvlan
- route-localnet
- igmpv2-unsolicited-report-interval
- igmpv3-unsolicited-report-interval
- ignore-routes-with-linkdown
- drop-unicast-in-l2-multicast
- drop-gratuitous-arp
- bc-forwarding
- arp-evict-nocarrier
ipv6-devconf¶
- type
struct
- members
- forwarding
- hoplimit
- mtu6
- accept-ra
- accept-redirects
- autoconf
- dad-transmits
- rtr-solicits
- rtr-solicit-interval
- rtr-solicit-delay
- use-tempaddr
- temp-valid-lft
- temp-prefered-lft
- regen-max-retry
- max-desync-factor
- max-addresses
- force-mld-version
- accept-ra-defrtr
- accept-ra-pinfo
- accept-ra-rtr-pref
- rtr-probe-interval
- accept-ra-rt-info-max-plen
- proxy-ndp
- optimistic-dad
- accept-source-route
- mc-forwarding
- disable-ipv6
- accept-dad
- force-tllao
- ndisc-notify
- mldv1-unsolicited-report-interval
- mldv2-unsolicited-report-interval
- suppress-frag-ndisc
- accept-ra-from-local
- use-optimistic
- accept-ra-mtu
- stable-secret
- use-oif-addrs-only
- accept-ra-min-hop-limit
- ignore-routes-with-linkdown
- drop-unicast-in-l2-multicast
- drop-unsolicited-na
- keep-addr-on-down
- rtr-solicit-max-interval
- seg6-enabled
- seg6-require-hmac
- enhanced-dad
- addr-gen-mode
- disable-policy
- accept-ra-rt-info-min-plen
- ndisc-tclass
- rpl-seg-enabled
- ra-defrtr-metric
- ioam6-enabled
- ioam6-id
- ioam6-id-wide
- ndisc-evict-nocarrier
- accept-untracked-na
ifla-icmp6-stats¶
- type
struct
- members
- inmsgs
- inerrors
- outmsgs
- outerrors
- csumerrors
- ratelimithost
ifla-inet6-stats¶
- type
struct
- members
- inpkts
- inoctets
- indelivers
- outforwdatagrams
- outpkts
- outoctets
- inhdrerrors
- intoobigerrors
- innoroutes
- inaddrerrors
- inunknownprotos
- intruncatedpkts
- indiscards
- outdiscards
- outnoroutes
- reasmtimeout
- reasmreqds
- reasmoks
- reasmfails
- fragoks
- fragfails
- fragcreates
- inmcastpkts
- outmcastpkts
- inbcastpkts
- outbcastpkts
- inmcastoctets
- outmcastoctets
- inbcastoctets
- outbcastoctets
- csumerrors
- noectpkts
- ect1-pkts
- ect0-pkts
- cepkts
- reasm-overlaps
br-boolopt-multi¶
- type
struct
- members
- optval
- optmask
if_stats_msg¶
- type
struct
- members
- family
- pad
- ifindex
- filter-mask
Attribute sets¶
link-attrs¶
address (binary
)¶
- display-hint
mac
broadcast (binary
)¶
- display-hint
mac
stats (binary
)¶
- struct
rtnl-link-stats
map (binary
)¶
- struct
rtnl-link-ifmap
linkinfo (nest
)¶
- nested-attributes
linkinfo-attrs
vfinfo-list (nest
)¶
- nested-attributes
vfinfo-attrs
stats64 (binary
)¶
- struct
rtnl-link-stats64
vf-ports (nest
)¶
- nested-attributes
vf-ports-attrs
port-self (nest
)¶
- nested-attributes
port-self-attrs
af-spec (nest
)¶
- nested-attributes
af-spec-attrs
xdp (nest
)¶
- nested-attributes
xdp-attrs
prop-list (nest
)¶
- nested-attributes
link-attrs
alt-ifname (string
)¶
- multi-attr
True
perm-address (binary
)¶
- display-hint
mac
dpll-pin (nest
)¶
- nested-attributes
link-dpll-pin-attrs
af-spec-attrs¶
inet (nest
)¶
- value
2
- nested-attributes
ifla-attrs
inet6 (nest
)¶
- value
10
- nested-attributes
ifla6-attrs
mctp (nest
)¶
- value
45
- nested-attributes
mctp-attrs
linkinfo-attrs¶
data (sub-message
)¶
- sub-message
linkinfo-data-msg
- selector
kind
slave-data (sub-message
)¶
- sub-message
linkinfo-member-data-msg
- selector
slave-kind
linkinfo-bridge-attrs¶
root-id (binary
)¶
- struct
ifla-bridge-id
bridge-id (binary
)¶
- struct
ifla-bridge-id
group-addr (binary
)¶
- display-hint
mac
multi-boolopt (binary
)¶
- struct
br-boolopt-multi
linkinfo-brport-attrs¶
root-id (binary
)¶
- struct
ifla-bridge-id
bridge-id (binary
)¶
- struct
ifla-bridge-id
linkinfo-iptun-attrs¶
local (binary
)¶
- display-hint
ipv4
remote (binary
)¶
- display-hint
ipv4
6rd-prefix (binary
)¶
- display-hint
ipv6
6rd-relay-prefix (binary
)¶
- display-hint
ipv4
ifla-attrs¶
conf (binary
)¶
- struct
ipv4-devconf
ifla6-attrs¶
conf (binary
)¶
- struct
ipv6-devconf
stats (binary
)¶
- struct
ifla-inet6-stats
cacheinfo (binary
)¶
- struct
ifla-cacheinfo
icmp6-stats (binary
)¶
- struct
ifla-icmp6-stats
stats-attrs¶
link-64 (binary
)¶
- struct
rtnl-link-stats64
link-offload-xstats (nest
)¶
- nested-attributes
link-offload-xstats
link-offload-xstats¶
hw-s-info (array-nest
)¶
- nested-attributes
hw-s-info-one
Sub-messages¶
linkinfo-data-msg¶
- bridge
- attribute-set
linkinfo-bridge-attrs
- erspan
- attribute-set
linkinfo-gre-attrs
- gre
- attribute-set
linkinfo-gre-attrs
- gretap
- attribute-set
linkinfo-gre-attrs
- geneve
- attribute-set
linkinfo-geneve-attrs
- ipip
- attribute-set
linkinfo-iptun-attrs
- sit
- attribute-set
linkinfo-iptun-attrs
- tun
- attribute-set
linkinfo-tun-attrs
- vrf
- attribute-set
linkinfo-vrf-attrs
linkinfo-member-data-msg¶
- bridge
- attribute-set
linkinfo-brport-attrs
bond