Commit Graph

85 Commits

Author SHA1 Message Date
Paolo Abeni
0c42c6b130 man: ip.8: add reference to mptcp man-page
While at it, additionally fix a mandoc warning in mptcp.8

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
2020-04-29 17:36:14 +00:00
Andrea Claudi
229bb886a3 man: ip.8: Add missing vrf subcommand description
Add description to the vrf subcommand and a reference to the
dedicated man page.

Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2020-02-28 13:48:23 -08:00
Bjarni Ingi Gislason
9ab56784a2 man: Fix unequal number of .RS and .RE macros
Add missing or excessive ".RE" macros.

  Remove an excessive ".EE" macro.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2019-12-04 11:13:12 -08:00
Hangbin Liu
ca697cee4c ip: add a new parameter -Numeric
Add a new parameter '-Numeric' to show the number of protocol, scope,
dsfield, etc directly instead of converting it to human readable name.
Do the same on tc and ss.

This patch is based on David Ahern's previous patch.

Suggested-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
2019-06-18 08:37:47 -07:00
Stephen Hemminger
f76ad635f2 man: break long lines in man page sources
No impact for output, just easier to edit.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2019-03-22 10:05:31 -07:00
Petr Vorel
8b5f9338e5 man: Document COLORFGBG environment variable
Default colors are not contrast enough on dark backround
and this functionality, which uses more suitable colors
is hidden in the code.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
2019-03-01 11:09:18 -08:00
Stephen Hemminger
738aebe52b drop support for DECnet
DECnet belongs in the history museum of dead protocols along
with Appletalk and IPX.

Linux support has outlived its natural life and the time has
come to remove it from iproute2. Dead code is a source
of bugs and exploits.

If anyone actually has DECnet running on some old distribution
they can just keep to the old version of iproute2.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@gmail.com>
2018-12-13 12:50:01 -08:00
Stephen Hemminger
ce5071eda6 drop support for IPX
IPX has been depracted then removed from upstream kernels.
Drop support from ip route as well.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@gmail.com>
2018-11-24 07:27:56 -08:00
Phil Sutter
ff1ab8edf8 Make colored output configurable
Allow for -color={never,auto,always} to have colored output disabled,
enabled only if stdout is a terminal or enabled regardless of stdout
state.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-08-20 08:54:06 -07:00
Stephen Hemminger
bff0f25241 man: add documentation for json and pretty flags
Add description for -json and -pretty options.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@gmail.com>
2018-02-10 08:16:14 -08:00
Luca Boccassi
be78fade55 man: add more keywords to ip.8 short description
A Debian user suggested adding more network-related keywords to the
ip manpage, so that manpage-scraping and indexing software like
apropos can do a better job of categorizing the programs.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=877983

Suggested-by: Lynoure Braakman <lynoure@gmail.com>
Signed-off-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2017-12-30 09:43:47 -08:00
Phil Sutter
6a78ef97b6 man: ip.8: Document -brief flag
Brief output is especially useful for new users, so at least mention
it's existence in ip man page.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2017-05-03 09:28:40 -07:00
Alexander Alemayhu
0db70c59e1 man: add examples to ip.8
Having some examples in the top level man page might make it a little bit easier
for new users to get started. Reused some words / sentences from the existing
man pages.

Suggested-by: 積丹尼 Dan Jacobson <jidanni@jidanni.org>
Signed-off-by: Alexander Alemayhu <alexander@alemayhu.com>
2017-03-14 16:41:13 -07:00
Davide Caratti
d0baa1389f man: ip.8: add missing 'macsec' item to OBJECT list
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
2016-09-01 09:08:50 -07:00
Phil Sutter
134080cff3 man: ip, ip-link: Fix ip option location
This patch drops the redundant description of some of ip's options in
ip-link.8's description of the 'show' subcommand, preserving the
description of -iec (but appending it to the list in ip.8 with minor
fixes).

Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-05-31 12:33:48 -07:00
Phil Sutter
ac0eff58fd man: ip.8: Add missing flags and token subcommand description
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-02 11:23:52 -08:00
Stephen Hemminger
5699275b42 man8: scrub trailing whitespace
Remove extraneous whitespace
2015-11-23 15:41:37 -08:00
Satish Ashok
25bc3d3d4a ip, bridge: document -timestamp option
This patch documents bridge and ip -timestamp option

Signed-off-by: Satish Ashok <sashok@cumulusnetworks.com>
2015-10-12 09:28:55 -07:00
Phil Sutter
9b2e9f4a8c man: ip: add -h[uman-readable] option
Since 'ip help' lists it, it should be described in ip.8 as well.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2015-09-23 15:57:50 -07:00
Pavel Šimerda
142434dc51 ip: fix and extend documentation
* Use unabbreviated `address` and `maddress`
 * Keep only `-n` and `-netns` for network namespace
2015-08-13 14:11:09 -07:00
Stephen Hemminger
ce743da171 ip: document exit code
The ip command has always had a consistent exit status
document it so that developers see it.
2015-05-07 08:11:28 -07:00
Mathias Nyman
d7bd2db52c ip: Add color output option
It is hard to quickly find what you are looking for in the output of the
ip command. Color helps.

This patch adds a '-c' flag to highlight these with individual colors:
  - interface name
  - ip address
  - mac address
  - up/down state

Signed-off-by: Mathias Nyman <m.nyman@iki.fi>
Tested-by: Yegor Yefremov <yegorslists@googlemail.com>
2015-05-04 08:39:17 -07:00
Stephen Hemminger
bd733e4088 Merge branch 'master' into net-next
Conflicts:
	man/man8/ip-route.8.in
2015-04-07 08:56:14 -07:00
Pavel Šimerda
a89d5329d4 docs: make spacing consistent
Result of the following command:

    sed -ri 's/\.  /. /g' man/*/*

Signed-Off-By: Pavel Šimerda <psimerda@redhat.com>
2015-04-07 08:41:36 -07:00
Eric W. Biederman
dacc5d4197 add basic mpls support to iproute
- Pull in the uapi mpls.h
- Update rtnetlink.h to include the mpls rtnetlink notification multicast group.
- Define AF_MPLS in utils.h if it is not defined from elsewhere
  as is done with AF_DECnet

The address syntax for multiple mpls labels is a complete invention.
When I looked there seemed to be no wide spread convention for talking
about an mpls label stack in text for.  Sometimes people did:
"{ Label1, Label2, Label3 }", sometimes people would do:
"[ label3, label2, label1 ]", and most of the time label
stacks were not explicitly shown at all.

The syntax I wound up using, so it would not have spaces and so it
would visually distinct from other kinds of addresses is.

label1/label2/label3 Where label1 is the label at the top of the label
stack and label3 is the label at the bottom on the label stack.

When there is a single label this matches what seems to be convention
with other tools.  Just print out the numeric value of the mpls label.

The netlink protocol for labels uses the on the wire format for a
label stack. The ttl and traffic class are expected to be 0.  Using
the on the wire format is common and what happens with other address
types. BGP when passing label stacks also uses this technique with the
exception that the ttl byte is not included making each label in a BGP
label stack 3 bytes instead of 4.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2015-03-24 15:45:23 -07:00
Vadim Kochan
b13ba03f54 ip netns: Allow exec on each netns
This change allows to exec some cmd on each
named netns (except default) by specifying '-all' option:

    # ip -all netns exec ip link

Each command executes synchronously.

Exit status is not considered, so there might be a case
that some CMD can fail on some netns but success on the other.

EXAMPLES:

1) Show link info on all netns:

$ ip -all netns exec ip link

netns: test_net
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
4: tap0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 500
    link/ether 1a:19:6f:25:eb:85 brd ff:ff:ff:ff:ff:ff

netns: home0
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
4: tap0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 500
    link/ether ea:1a:59:40:d3:29 brd ff:ff:ff:ff:ff:ff

netns: lan0
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
4: tap0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 500
    link/ether ce:49:d5:46:81:ea brd ff:ff:ff:ff:ff:ff

2) Set UP tap0 device for the all netns:

$ ip -all netns exec ip link set dev tap0 up

netns: test_net

netns: home0

netns: lan0

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2015-02-05 10:28:19 -08:00
Vadim Kochan
52700d40a2 ip: Allow to easy change network namespace
Added new '-netns' option to simplify executing following cmd:

    ip netns exec NETNS ip OPTIONS COMMAND OBJECT

    to

    ip -n[etns] NETNS OPTIONS COMMAND OBJECT

e.g.:

    ip -net vnet0 link add br0 type bridge
    ip -n vnet0 link

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
2014-12-27 10:22:29 -08:00
vadimk
a5eafa9a5e man ip: Add missing '-details' option
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2014-10-29 22:26:16 -07:00
Stephen Hemminger
09154ec15f ip: add batch mode to man page 2013-07-13 10:02:03 -07:00
Eric W. Biederman
f480917486 iproute2: Document the -D and -I options
While looking into a sysctl regression in decnet on old kernels I
discovered this omission in the iproute2 documentation.

I can't imagine anyone's muscle memory remembering the longer forms.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2013-03-11 16:53:37 -07:00
Kees van Reeuwijk
4957250166 iproute2: clarification of various man8 pages
Rephrasing for clarity.

Note that in ip-rule.8 I rephrased a sentence to "The RPDB is scanned
in order of decreasing priority." The original version talked about
*in*creasing priority, but from the context that didn't make sense.

Signed-off-by: Kees van Reeuwijk <reeuwijk@few.vu.nl>
2013-02-11 09:22:06 -08:00
Julian Anastasov
ea63a69b6d iproute2: add support for tcp_metrics
ip tcp_metrics/tcpmetrics

	We support get/del for single entry and dump for
show/flush.

v3:
 - fix rtt/rttvar shifts as suggested by Eric Dumazet
 - show rtt/rttvar usecs as suggested by David Laight

Signed-off-by: Julian Anastasov <ja@ssi.bg>
2012-10-08 10:23:07 -07:00
Stephen Hemminger
27bca61531 Add support for AF_BRIDGE
This can be useful when displaying neighbour table
2012-09-17 15:50:27 -07:00
Andreas Schwab
1b3c149b41 iproute2: Fix various manpage formatting nits
Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
2012-09-07 09:01:51 -07:00
Stephen Hemminger
c7f04f021c Fix formatting of ip.8 family man page
fix bad formatting in description of -f option
2012-08-17 15:28:59 -07:00
James Chapman
6121e1fef8 iproute2: add ip-l2tp man page
Add a man page to cover the "ip l2tp" commands. Add a reference to it
in the main ip page.

This version removes the unnecessary setting of promiscuous mode
in the examples.

Signed-off-by: James Chapman <jchapman@katalix.com>
2012-05-03 08:31:06 -07:00
nick black
db4a7f198b Update ip manpage
Fix synopsis and other references to match current code.
2012-01-20 12:32:44 -08:00
Stephen Hemminger
2a9721f1c4 Split up ip man page
The man page for ip command had grown too large to be readable.
Break it up into separate pages.
2011-12-22 10:34:03 -08:00
Greg Rose
7b8179c780 iproute2: Add new command to ip link to enable/disable VF spoof check
Add ip link command parsing for VF spoof checking enable/disable

V2 - Fixed problem with parsing of dump info on kernels that don't
     support the spoof checking option and also wrapped the ifla_vf_info
     structure in #ifdef __KERNEL__ to prevent user space from directly
     accessing the structure
V3 - Improved parsing of vfinfo
V4 - Put Makefile back to proper list of subdirs
V5 - Remove struct ifla_vf_info, it is only used by the kernel
V6 - Make sure spoof check is reported by the driver - rtnl will set
     it to -1 to indicate driver didn't report a value.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-11-23 14:53:12 -08:00
Stephen Hemminger
b702f9cc37 ip: fix man page warnings
Fix usage of ".R" which is not man macro.
2011-10-10 08:55:56 -07:00
Sridhar Samudrala
a22e92951d iproute2: Fix usage and man page for 'ip link'
Add bridge as a supported type with 'ip link' in usage and all the missing
types in 'ip' man page. Also fixed some typos.

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
2011-10-07 11:04:46 -07:00
Stephen Hemminger
8555902504 Add ntable to ip man page
Add some documentation about ip neighbour table parameter command.
2011-08-31 13:23:04 -07:00
Bin Li
ed0f006b86 ip: fix typo in ip link manual page
Extra bracket
2011-08-31 10:42:00 -07:00
Andreas Henriksson
c0c44bfedd iproute2: Remove "monitor" from "ip route help" output
$ ip route help 2>&1 | grep monitor
ip route { add | del | change | append | replace | monitor } ROUTE
$ ip route monitor
Command "monitor" is unknown, try "ip route help".

(I guess what was really intended is "ip monitor route", so just remove
the argument from the help output.)

Originally reported by martin f krafft at http://bugs.debian.org/537681

While at it, also drop all non-existant (route,link,netns) monitor
arguments from the ip(8) man page.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
2011-07-20 16:04:04 -07:00
Eric W. Biederman
0dc34c7713 iproute2: Add processless network namespace support
The goal of this code change is to implement a mechanism such that it is
simple to work with a kernel that is using multiple network namespaces
at once.

This comes in handy for interacting with vpns where there may be rfc1918
address overlaps, and different policies default routes, name servers
and the like.

Configuration specific to a network namespace that would ordinarily be
stored under /etc/ is stored under /etc/netns/<name>.  For example if
the dns server configuration is different for your vpn you would create
a file /etc/netns/myvpn/resolv.conf.

File descriptors that can be used to manipulate a network namespace can
be created by opening /var/run/netns/<NAME>.

This adds the following commands to iproute.
ip netns add NAME
ip netns delete NAME
ip netns monitor
ip netns list
ip netns exec NAME cmd ....
ip link set DEV netns NAME

ip netns exec exists to cater the vast majority of programs that only
know how to operate in a single network namespace.  ip netns exec
changes the default network namespace, creates a new mount namespace,
remounts /sys and bind mounts netns specific configuration files to
their standard locations.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
2011-07-13 09:48:26 -07:00
David Ward
cbec021913 xfrm: Update documentation
The ip(8) man page and the "ip xfrm [ XFRM-OBJECT ] help" command output
are updated to include missing options, fix errors, and improve grammar.
There are no functional changes made.

The documentation for the ip command has many different meanings for the
same formatting symbols (which really needs to be fixed). This patch makes
consistent use of brackets [ ] to indicate optional parameters, pipes | to
mean "OR", braces { } to group things together, and dashes - instead of
underscores _ inside of parameter names. The parameters are listed in the
order in which they are parsed in the source code.

There are several parameters and options that are still not mentioned or
need to be described more thoroughly in the "COMMAND SYNTAX" section of
the ip(8) man page. I would appreciate help from the developers with this.

Signed-off-by: David Ward <david.ward@ll.mit.edu>
2011-07-11 10:12:06 -07:00
Jiri Pirko
a1e191b90c iplink: implement setting of master devic 2011-02-25 19:55:19 -08:00
Vlad Dogaru
678b99ee6d iproute2: fix man page whitespace
Signed-off-by: Vlad Dogaru <ddvlad@rosedu.org>
2011-02-25 13:01:19 -08:00
Gerrit Renker
9b2cdc00da iproute: fix unit conversion of rtt/rttvar/rto_min
Since July 2008 (2.6.27, c1e20f7c8b9), the kernel stores the values for
RTAX_{RTT{,VAR},RTO_MIN} in milliseconds. When using a kernel > 2.6.27 with
the current iproute2, conversion of these values is broken in either way.

This patch
 * updates the code to pass and retrieve milliseconds;
 * since values < 1msec would be rounded up, also drops the usec/nsec variants;
 * since there is no way to query kernel HZ, also drops the jiffies variant.

Arguments such as
	rtt		3.23sec
	rto_min		0xff
	rto_min		0.200s
	rttvar		25ms
now all work as expected when reading back previously set values.
2011-02-25 12:51:48 -08:00
Vlad Dogaru
db02608b6f iproute2: support device group semantics
Add the group keyword to ip link set, which has the following meaning:
If both a group and a device name are pressent, we change the device's
group to the specified one. If only a group is present, then the
operation specified by the rest of the command should apply on an entire
group, not a single device.

So, to set eth0 to the default group, one would use
	ip link set dev eth0 group default

Conversely, to set all the devices in the default group down, use
	ip link set group default down

Signed-off-by: Vlad Dogaru <ddvlad@rosedu.org>
2011-02-25 12:43:14 -08:00