ip
may fail for one of the following reasons:
ip
prints an error message
and exits. As a rule, the error message will contain information
about the reason for the failure. Sometimes it also prints a help page.
ip
failed to compile a kernel request from the arguments
because the user didn't give enough information.
ip
prints the error message, as it is output with perror(3)
,
prefixed with a comment and a syscall identifier.
ip
prints the error message, as it is output
with perror(3)
prefixed with ``RTNETLINK answers:''.
All the operations are atomic, i.e.
if the ip
utility fails, it does not change anything
in the system. One harmful exception is ip link
command
(Sec.4, p.),
which may change only some of the device parameters given
on command line.
It is difficult to list all the error messages (especially syntax errors). However, as a rule, their meaning is clear from the context of the command.
The most common mistakes are:
Cannot open netlink socket: Invalid value
Cannot talk to rtnetlink: Connection refused Cannot send dump request: Connection refused
CONFIG_IP_MULTIPLE_TABLES
option was not selected
when configuring the kernel. In this case any attempt to use the
ip
rule
command will fail, f.e.
kuznet@kaiser $ ip rule list RTNETLINK error: Invalid argument dump terminated