fprintf(stderr, "Usage: ip address {add|change|replace} IFADDR dev IFNAME [ LIFETIME ]\n");
fprintf(stderr, " [ CONFFLAG-LIST ]\n");
fprintf(stderr, " ip address del IFADDR dev IFNAME [mngtmpaddr]\n");
- fprintf(stderr, " ip address {show|save|flush} [ dev IFNAME ] [ scope SCOPE-ID ]\n");
+ fprintf(stderr, " ip address {save|flush} [ dev IFNAME ] [ scope SCOPE-ID ]\n");
fprintf(stderr, " [ to PREFIX ] [ FLAG-LIST ] [ label LABEL ] [up]\n");
+ fprintf(stderr, " ip address [ show [ dev IFNAME ] [ scope SCOPE-ID ] [ master DEVICE ]\n");
+ fprintf(stderr, " [ type TYPE ] [ to PREFIX ] [ FLAG-LIST ]\n");
+ fprintf(stderr, " [ label LABEL ] [up] ]\n");
fprintf(stderr, " ip address {showdump|restore}\n");
fprintf(stderr, "IFADDR := PREFIX | ADDR peer PREFIX\n");
fprintf(stderr, " [ broadcast ADDR ] [ anycast ADDR ]\n");
fprintf(stderr, "CONFFLAG := [ home | nodad | mngtmpaddr | noprefixroute | autojoin ]\n");
fprintf(stderr, "LIFETIME := [ valid_lft LFT ] [ preferred_lft LFT ]\n");
fprintf(stderr, "LFT := forever | SECONDS\n");
+ fprintf(stderr, "TYPE := { vlan | veth | vcan | dummy | ifb | macvlan | macvtap |\n");
+ fprintf(stderr, " bridge | bond | ipoib | ip6tnl | ipip | sit | vxlan |\n");
+ fprintf(stderr, " gre | gretap | ip6gre | ip6gretap | vti | nlmon |\n");
+ fprintf(stderr, " bond_slave | ipvlan | geneve | bridge_slave | vrf }\n");
exit(-1);
}
if (!ifindex)
invarg("Device does not exist\n", *argv);
filter.master = ifindex;
- } else if (do_link && strcmp(*argv, "type") == 0) {
+ } else if (strcmp(*argv, "type") == 0) {
NEXT_ARG();
filter.kind = *argv;
} else {
.IB IFADDR " dev " IFNAME " [ " mngtmpaddr " ]"
.ti -8
-.BR "ip address" " { " show " | " save " | " flush " } [ " dev
+.BR "ip address" " { " save " | " flush " } [ " dev
.IR IFNAME " ] [ "
.B scope
.IR SCOPE-ID " ] [ "
.B label
.IR PATTERN " ] [ " up " ]"
+.ti -8
+.BR "ip address" " [ " show " [ " dev
+.IR IFNAME " ] [ "
+.B scope
+.IR SCOPE-ID " ] [ "
+.B to
+.IR PREFIX " ] [ " FLAG-LIST " ] [ "
+.B label
+.IR PATTERN " ] [ "
+.B master
+.IR DEVICE " ] [ "
+.B type
+.IR TYPE " ] [ "
+.BR up " ] ]"
+
.ti -8
.BR "ip address" " { " showdump " | " restore " }"
.BR forever " |"
.IR SECONDS " ]"
+.ti -8
+.IR TYPE " := [ "
+.BR bridge " | "
+.BR bond " | "
+.BR can " | "
+.BR dummy " | "
+.BR hsr " | "
+.BR ifb " | "
+.BR ipoib " |"
+.BR macvlan " | "
+.BR macvtap " | "
+.BR vcan " | "
+.BR veth " | "
+.BR vlan " | "
+.BR vxlan " |"
+.BR ip6tnl " |"
+.BR ipip " |"
+.BR sit " |"
+.BR gre " |"
+.BR gretap " |"
+.BR ip6gre " |"
+.BR ip6gretap " |"
+.BR vti " |"
+.BR nlmon " |"
+.BR ipvlan " |"
+.BR lowpan " |"
+.BR geneve " ]"
+
.SH "DESCRIPTION"
The
.B address
.I PATTERN
is a usual shell style pattern.
+.TP
+.BI master " DEVICE"
+only list interfaces enslaved to this master device.
+
+.TP
+.BI type " TYPE"
+only list interfaces of the given type.
+
.TP
.B up
only list running interfaces.
.PP
This command has the same arguments as
-.B show.
-The difference is that it does not run when no arguments are given.
+.BR show " except that " type " and " master " selectors are not supported."
+Another difference is that it does not run when no arguments are given.
.PP
.B Warning: