Ip command Manual (1)
Summary
IP is a powerful network configuration tool in the iproute2 software package. It can replace some traditional
Network management tools. For example, ifconfig and route. This manual will be divided into chapters to introduce IP commands and their selection
.
The original text of this article is in
Http://defiant.coinet.com/iproute2/ip-cref/ (18:40:46)
------------------------------------------------------------------------
By nixe0n
Author: Alexey N. KUZNETSOV
Compile: nixe0n
1. About this document
2. ip command syntax
3. IP address error message
4. IP link-configure network devices
4.1.ip link set -- change device Properties
4.2.ip link show -- display device Properties
5. IP Address -- Protocol address management
5.1.ip address add -- Add a new Protocol address
5.2.ip address Delete -- delete a Protocol address
5.3.ip address show -- display Protocol address
5.4.ip address flush -- clear Protocol address
6. IP neighbor -- neighbor/ARP table management command
6.1.ip neighbor add -- Add a new adjacent entry
IP neighbor change -- modify an existing entry
IP neighbor Replace -- replace an existing entry
6.2.ip neighbor Delete -- delete an adjacent entry
6.3.ip neighbor show -- display network neighbor Information
6.4.ip neighbor flush -- clear the adjacent entries
1. About this document
IP is a powerful network configuration tool in the iproute2 software package. This article will introduce the IP
Command and its options. For ease of understanding, the author lists many examples in this article. However, as the author says
This is not a tutorial, but a user manual.
2. ip command syntax
The ip command is used as follows:
IP [Options] object [Command [arguments]
Options is an option for modifying IP behavior or changing its output. All options are
-It can start with a character in two forms: long and short. Currently, IP supports the following options:
-V and-version print the IP version and exit.
-S,-stats, and-Statistics Output more detailed information. If this option appears twice or multiple times,
The output information is more detailed.
-F,-family is followed by the protocol type, including: iNet, inet6, or link.
Protocol type. If there is not enough information to tell the protocol type used by the IP address, the default value Inet or
Any. Link is special. It indicates that no network protocol is involved.
-4 is short for-family inet.
-6 is short for-family inet6.
-0 is short for-family link.
-O and-oneline use single-line output for each record and replace the returned row with characters. If you need to use WC,
This option is used when tools such as grep process IP output.
-R,-resolve queries the domain name resolution system and replaces the Host IP address with the obtained host name.
Object is the object you want to manage or obtain information. Currently, IP addresses recognize the following objects:
Link Network Device
Address the protocol (IP or IPv6) address of a device
Neighbor ARP or ndisc buffer entries
Route route table entries
Rules in the Rule routing policy database
Maddress multicast address
Mroute Multicast Route buffer entries
Tunnel IP Channel
In addition, all object names can be abbreviated. For example, address can be abbreviated to ADDR or even.
Command sets the operation performed on the specified object, which is related to the object type. Generally,
IP supports adding, deleting, and displaying objects ). Some objects are not supported.
All these operations, or some other commands. For all objects, you can use the help command
For help. This command lists the commands and parameter syntaxes supported by this object. If no object is specified
The default command is used for the IP address. In general, the default command is list. If the object cannot
The Help Command is executed.
Arguments are some parameters of commands, which depend on objects and commands. IP supports two types of parameters
Number: flag and parameter. Flag is composed of a keyword. parameter is composed of one keyword and one number.
Value. For convenience, each command has a default parameter that can be ignored. For example, the dev parameter is
The default parameter of the IP link command. Therefore, IP link ls eth0 is equal to IP link ls Dev eth0. We
The following sections describe how to use each command. The default parameters of the command are marked with default.
Almost all keywords can be abbreviated to the first few letters. The abbreviated method is very
Convenience, but we do not recommend using the abbreviated form in the script. In addition, all
The abbreviated form will be listed in the article.
3. IP address error message
The IP address operation may fail due to the following reasons:
Command Line syntax error: an unknown keyword (an unknown keyword); incorrect IP address format
(Incorrectly formated IP address ). In this case, the IP will print an error message and
Exit. The error message contains the cause of the failure. Sometimes the IP will print help information.
Parameters cannot pass Consistency Verification.
Because the user does not provide enough information, the IP address cannot compile the kernel request from the parameter.
The kernel returns some system call errors. The IP uses perror (3) to output error messages.
The information contains a comment and a system call number.
The kernel returns an error in the rtnetlink request. This type of error message starts with "rtnetlik answers.
All IP operations are atomic operations. For example, if the IP address fails to be executed, it will not do anything in the system.
With the exception of IP link command, it modifies some device parameters.
We cannot list all error messages, especially syntax errors. However, the error message does not mean
It is often clear. Below, we will list some common errors:
The kernel does not support Netlink (Netlink is used to transmit information between the kernel module and the user). The following error occurs:
Incorrect information:
Cannot open netlink socket: invalid value
The kernel does not support rtnetlink and the following error message is displayed:
Cannot talk to rtnetlink: connect refused
Cannot send Dump Request: connect refused
If the config_ip_multiple_tables option is not configured during kernel compilation. When using IP rules
An error message similar to the following information is displayed:
Kuznet @ kaise $ IP rule list
Rtnetlink error: invalid argument
Dump terminated
4. IP link-configure network devices
The object link is composed of network devices, command display, and device status changes.
Command set and show (or list)
4.1.ip link set -- change device Properties
Abbreviation: Set, S
Parameters:
Dev name (default) specifies the network device for the operation
Up/down start/Close the device.
For example, IP link set Dev eth0 up
ARP on/off changes the noarp option of the network device.
This operation is not allowed if the device is in the up status. However, neither the kernel nor the IP address is in this situation.
To check. When the device is running, changing this option will lead to unexpected
Result.
Multicast on/off changes the multicast option for network devices.
Dynamic on/off changes the dynamic options of network devices.
Change the name of the device to name (for example, eth0 ). If the device is running or has
The address is configured. We recommend that you do not perform this operation.
Txqueuelen number or txqlen number change the length of the device transmission queue.
For example, IP link set Dev eth0 txqueuelen 100
The MTU number changes the MTU value of the network device.
For example, IP link set Dev eth0 MTU 1500
Address lladdress: Modify the MAC address of the network device.
For example, IP link set Dev eth0 address 00: 01: 4f: 00: 15: F1
Broadcat lladdress or BRD lladdress: Modify the broadcast address of the data link layer.
Note: For most network devices (such as Ethernet), modifying the link layer broadcast address will cause
Damage. Therefore, if you do not have a deep understanding of this operation, it is best not to use this operation.
Peer lladdress when using point-to-point connections, you can use this operation to modify the data link layer at the peer end.
Address.
Note: The promisc or allmulti option cannot be modified for the IP address. These two options are outdated, and
And should not be modified at will.
Note: If you modify multiple parameters at the same time, the IP address will be immediately canceled if any modification fails. This
In this case, the system may enter an unexpected state. To avoid this situation, try not to use IP addresses.
Link set modifies multiple parameters at the same time, for example, IP link set Dev eth0 MTU 1500
Txqueuelen 100.
4.2.ip link show -- display device Properties
Abbreviations: Show, list, lst, sh, ls, l
Parameters
Dev name (default) Name specifies the name of the network device, for example, eth0. If this parameter is omitted,
All device properties are listed.
Up only displays information about active network interfaces.
Output Format
Kuznet @ Alisa :~ $ IP link ls eth0
3: eth0: <broadcast, multicast, up> MTU 1500 qdisc CBQ qlen 100
Link/ether 00: A0: CC: 66: 18: 78 brd ff:
Kuznet @ Alisa :~ $ IP link ls sit0
5: sit0 @ Nome: <noarp, up> MTU 1480 qdisc noqueue
Link/Sit 0.0.0.0 BRD 0.0.0.0
Kuznet @ Alisa :~ $ IP link ls dummy
2: dummy: <broadcast, noarp> MTU 1500 qdisc Noop
Link/ether 00: 00: 00: 00: 00 brd ff: FF
Kuznet @ Alisa :~ $
In the displayed information, the number before each quotation mark is an interface index used to identify network interfaces.
This number is followed by the name of the network interface (such as eth0 and dummy). It is also one-to-one with the network interface.
Yes. However, in some cases, for example, if the driver module is uninstalled, the corresponding interface name will be removed from the list.
But other newly created interfaces use the same name. The system administrator can use IP link set
Name: Modify the interface name.
The interface name can be something else or @ none. This means that the device is bound to another device. For example
If a packet is sent to the device, the device encapsulates the packet and sends it from the master device. If the device name
If it is set to none, the master device is unknown.
Next, we will see MTU (maximal transfer unit, maximum transmission unit ). It determines this
Interfaces.
Qdisc (queuing Discipline) displays the queuing algorithm used by this network interface. Noqueue Representation
Packet queuing is not performed. Noop indicates that this network interface is out of the black hole mode, that is, all incoming packets
The device data is directly discarded. Qlen is the default length of the network interface transmission queue.
The network interface can be marked as follows:
The device is running and can receive and send packets.
The loopback interface cannot be used to communicate with other hosts. All data packets sent to this interface are
Will be returned, and this interface can only receive data packets that are returned.
The broadcast device can send data packets to all hosts. Ethernet connection is a classic
Type.
Pointtopoint is directly connected between two nodes. All data packets sent from a contact are sent
All received packets are sent from the peer node.
Multicast indicates that the device has multicast capability and can send packets to some adjacent networks.
Node. In fact, broadcast is a special case of multicast. Its multicast group includes all nodes connected to it.
In terms of definition, pointtopoint and broadcast connections belong to multicast.
* If the network interface flag does not belong to any of the loopback, broadcast, or pointtopoint
It is assumed that it is nmba (non-broadcast multi-access) type. This is the most common sign.
The promisc device is in hybrid mode and receives all the data on the connection, regardless of whether the destination address is itself.
In general, this mode is mainly used for bridge and network monitoring.
The allmulti device receives all multicast data packets on the connection.
This mode is used.
Noarp is different from other signs. Its meaning is related to the network protocol involved. It generally indicates
This device does not need address resolution, and the software or hardware does not need to use the help of the system protocol stack to know how
Data packets are delivered to the destination.
Dynamic indicates that the network interface is created and revoked dynamically.
Slave indicates that this interface is bound to other network interfaces.
* In addition, there are other signs. These signs may be out of date (for example, notrailers)
, Or has not been implemented (such as: Debug), or is only specific to some devices (such as: Master,
Automedia, portsel ). Therefore, we will not discuss it here.
* For promisc and allmulti flags, ifconfig and IP display values are different. IP Link
The LS command displays the real status of the device, while ifconfig displays the status of the virtual device you set.
The second line of the displayed information contains information related to the link layer address (MAC address. The first word
(Ether, SIT) defines the hardware type of the interface. The hardware type of the interface determines the format and language of the MAC address.
Method. The default format is the MAC address and broadcast address of the hardware.
The address is a hexadecimal number separated by a colon. However, the write-only connection has a specific address.
Format. For example, the IP address format of the IP channel is separated by dots.
Nbma (non-broadcast multi-access) connections do not have clearly defined broadcast addresses and peer addresses
. However, this domain contains some useful information, for example, relying on the broadcast address of the ARP Server.
If you use this command, the multicast address is not displayed. You must use the IP maddr LS command. For more information, see section
Section 9 IP maddr ls.
Statistics
With the-Statistics option, the ip command prints the statistical information of the network interface, for example:
Kuznet @ Alisa :~ $ IP-s link ls eth0
3: eth0: <broadcast, multicast, up> MTU 1500 qdisc CBQ qlen 100
Link/ether 00: A0: CC: 66: 18: 78 brd ff: FF
RX: bytes packets errors dropped overrun MCAST
2449949362 2786187 0 0 0 0
TX: bytes packets errors dropped carrier collsns
178558497 1783946 332 0 332 35172
Kuznet @ Alisa :~ $
RX: and TX: Start with receiving and sending statistics respectively. The obtained statistics include:
The number of bytes sent or received by the bytes network interface. If the number of bytes exceeds the maximum value of the data type
Numeric value will cause a rollback. Therefore, if you want to continuously monitor this metric, you need a user space monitoring
The control process periodically saves this data.
The number of packets received or sent by the packets network interface.
Number of errors.
Dropped: Number of dropped data packets due to system resource restrictions.
The number of packets received by overrun due to congestion. If the interface is blocked, it means
The kernel or your machine is too slow to process the received data.
The number of multicast packets received by MCAST. Only a few devices support this option.
Number of times that the carrier connection media fails, for example, poor network connection.
The number of events that conflict with collsns Ethernet Media.
Total number of compressed data packets. This metric is only applicable to network interfaces that use VJ header compression.
If the-s option appears twice or more times, the IP will output more detailed error information statistics.
Kuznet @ Alisa :~ $ IP-s link ls eth0
3: eth0: <broadcast, multicast, up> MTU 1500 qdisc CBQ qlen 100
Link/ether 00: A0: CC: 66: 18: 78 brd ff: FF
RX: bytes packets errors dropped overrun MCAST
2449949362 2786187 0 0 0 0
RX errors: length CRC frame FIFO missed
0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
178558497 1783946 332 0 332 35172
TX errors: aborted FIFO window heartbeat
0 0 0 332
Kuznet @ Alisa :~ $
The names of these errors are purely ethereized. For other types of devices, these domains may have different solutions.
Release.
5. IP Address -- Protocol address management
Abbreviation: Address, ADDR,
The IP address is the protocol (IP or IPv6) Address bound to the network device. Each network device
There should be less than one Protocol address. In addition, a network device can bind multiple Protocol addresses.
The ip addr command can display the Protocol address and its nature of the network device, add a new address, and delete the old location.
Address.
Command add, delete, flush, and show (or list)
5.1.ip address add -- Add a new Protocol address
Abbreviation: add,
Parameters
Dev name: name of the device to which the operation is performed
The address of the local address (default) interface. The address format is related to the Protocol. Use IPv4 address.
IPv6 addresses are separated by colons. Address can be followed by a slash and 10 representing the number of digits in the mask
Base number.
Peer address: the peer address of the point-to-point interface. The address can also follow a slash to indicate the mask bit.
Number in decimal format.
The broadcast address of the broadcast address interface. For convenience, you can use + and-(Note 1) instead of broadcast location.
Address. For example:
Ip addr add local 192.168.1.1/24 BRD + Dev eth0
Ip addr add local 192.168.1.1/28 BRD-dev eth0
Label name sets a string for each address as a label. To work with the Linux-2.0's network alias and
The string must start with the device name, followed by a colon, for example:
# Ip addr add local 192.168.4.1/28 BRD + label eth0: 1 Dev eth0
Scope scope_value (note 2) sets the effective range of the address, which is used by the kernel to set the source address for the data packet
. The valid range is listed in the/etc/iproute2/tr_scopes file. The system has preset some range values.
:
The global address is globally valid.
The site address is a local connection, that is, it is valid only when the target address is the device address.
The site (only for IPv6) address is valid within the site.
The host address is valid within the host.
* Note 1: If yes, ip addr ls displays the network address. If yes, ip addr ls displays a wide range of IP addresses.
Playback address.
* Note 2: For scope, see Appendix A for more details.
Example
Add a loopback address to the loopback device:
# Ip addr add 127.0.0.1/8 Dev lo BRD + scope host
Add an IP address 10.0.0.1 to the Ethernet interface eth0 and set the mask length to 24 bits (155.155.155.0 ),
Standard broadcast address, label: eth0: alias:
# Ip addr add 10.0.0.1/24 BRD + Dev eth0 label eth0: alias
5.2.ip address Delete -- delete a Protocol address
Abbreviation: delete, Del, d
Parameters
The parameters of this command are the same as those of the ip addr add command. Only the device name is required.
Parameters. Others are optional. If no parameter except the device name is specified, the IP address deletes this parameter.
The first address of the device.
Example
Delete a loopback address of the loopback device. However, it is best not to try this way.
# Ip addr del 127.0.0.1/8 Dev Lo
The following shell code cancels all IP addresses on the device.
While IP-F Inet add del Dev eth0; do
: Nothing
Done
In addition, you can use the ip addr flush command to cancel the IP address.
5.3.ip address show -- display Protocol address
Abbreviations: Show, list, lst, sh, ls, l
Parameters
Dev name (default) device name
Scope scope_val only lists the addresses in this range.
To prefix only lists addresses that match the prefix. For example:
Ip addr ls to 192.168.1.1
Label pattern only lists the addresses where Tags match pattern. pattern is a shell-style regular expression.
Expression.
Dynamic and permanent are only applicable to IPv6. With dynamic, IP addresses only list dynamic
When permanent is used, only the fixed addresses are listed.
Tentative: this parameter applies only to IPv6 and only lists addresses that do not pass duplicate address detection [Reference 2 ].
.
Deprecated: this parameter is only applicable to IPv6. only deprecated [Reference 2] addresses are listed.
Primary and secondary only list the master (primary) or slave (secondary) addresses.
Output Format
Duznet @ Alisa :~ $ Ip addr ls eth0
3: eth0: <broadcast, multicast, up> MTU 1500 qdisc CBQ qlen 100
Link/ether 00: A0: CC: 66: 18: 78 brd ff: FF
Inet 193.233.7.90/24 BRD 193.233.7.255 scope global eth0
Inet6 3ffe: 2400: 0: 1: 2a0: CCFF: fe66: 1878/64 scope Global Dynamic
Valid_lft forever preferred_lft 604746sec
Inet6 fe80: 2a0: CCFF: fe66: 1878/10 scope Link
Duznet @ Alisa :~ $
The output of the first two lines is the same as that of IP link ls.
Next, the IP and IPv6 addresses, broadcast addresses, and other address attributes: scope, flag
(FLAG) and label ). The address flag is set by the kernel and cannot be modified by the system administrator. Currently, the kernel
The following flag is defined:
When secondary selects the default source address for the output data packet, this address is not used by the kernel. If
The slave database has an address and sets different addresses for the same network segment.
(Secondary) address. For example, eth0 already has an address 192.168.1.108/24.
192.168.1.3/24,192.168 .1.3/24 will be marked as a slave address by the kernel.
The address dynamic is created through stateless automatic configuration (stateless
Autoconfiguration) [see 2]. If the address is still valid, two time messages are included in the output.
. After the preferred_lft expires, the address will change to the deprecated state. After the valiid_lft expires,
The address is invalid.
Deprecated is not allowed. That is to say, although the address is valid, it cannot be used to create
Create a new connection.
Tentative because the duplicate address monitoring [Reference 2] has not been completed or the monitoring fails, this address cannot
.
5.4.ip address flush -- clear Protocol address
Abbreviation: flush, F
Introduction
This command can clear the Protocol address selected according to certain conditions.
Parameters
The parameters of this command are the same as IP address show. The only difference is that if no parameter is specified
Nothing can be done.
Warning
This command (and all the flush commands discussed later) is very dangerous. If an error occurs, it cannot be recovered.
It clears the operated address.
Statistics options
If the-Statistics option is used in the ip addr flush command, the command will output more detailed
Information. The output information includes the number of deleted addresses and the number of circles in the list. If you use
-S option. ip addr flush outputs all deleted addresses in the format described in the previous section.
Example
Delete all addresses belonging to the private network 10.0.0.0/8:
Netadm @ AMBER :~ # IP-s a f-10/8
2: dummy Inet 10.7.7.7/16 BRD 10.7.20.255 scope global dummy
3: eth0 Inet 10.10.7.7/16 BRD 10.20.255 scope global eth0
4: eth1 Inet 10.8.7.7/16 BRD 10.8.20.255 scope global eth1
* ** Round 1, deleting 3 addresses ***
* ** Flush is complete after 1 round ***
Netadm @ AMBER :~ #
Cancel the IP addresses of all Ethernet cards
Netadm @ AMBER :~ # IP-4 ADDR flush label "eth0"
The last example is the IPv6 address operation. After forwarding is enabled or automatic configuration is disabled
To cancel the host address automatically obtained through the Stateless Address Configuration:
Netadm @ AMBER :~ # IP-6 ADDR flush dynamic
6. IP neighbor -- neighbor/ARP table management command
Abbreviations: neighbor, neighbor, neigh, n
The neighbor object binds the Protocol address of the same network segment to the link layer address. In the kernel
These entries are organized into tables. An IPv4 table is also called an ARP table.
The IP neighbor command allows you to display, add, and delete entries and their attributes.
Command add, change, replace, delete, fulsh, show (or list)
Appendix B describes in detail how to use the IP management proxy arp/ndisc.
6.1.ip neighbor add -- Add a new adjacent entry
IP neighbor change -- modify an existing entry
IP neighbor Replace -- replace an existing entry
Abbreviation: add, A; change, chg; replace, REPL
Introduction: these three commands are used to create an adjacent table entry or update an existing one.
Parameters
To address (default) is the adjacent Protocol address. It can be IPv4 or IPv6.
The device connecting Dev name and adjacent nodes.
The link layer address of the lladdr lladdress neighbor. Lladdress can be blank.
The status of the NUD nud_state adjacent entry. NUD is neighbour unreachability Detection
Abbreviation. Possible statuses include:
Permanent -- the adjacent entries are always valid and can only be deleted by the Administrator.
Noarp-the adjacent entries are valid and do not need to be validated. It will be deleted upon expiration of its life cycle.
Reachable -- within the time-out period, this adjacent entry is valid.
Stale -- this adjacent entry is valid but suspicious. If the entry is valid, IP neigh does not
It changes the adjacent State and does not modify its address.
Example
Add a permanent ARP entry for the address 10.0.0.3 on the device eth0:
IP neigh add 10.0.0.3 lladdr 0: 0: 0: 0: 0: 1 Dev eth0 NUD perm
Change the status to reachable.
IP neigh chg 10.0.0.3 Dev eth0 NUD reachable
6.2.ip neighbor Delete -- delete an adjacent entry
Abbreviation: delete, Del, d
Introduction
This command is used to delete an adjacent entry.
Parameters
The parameters of this command are the same as those of the IP neigh add command, but lladdr and NUD will be ignored.
Example
Delete an ARP entry 10.0.0.3 on the eth0 device.
IP neigh del 10.0.0.3 Dev eth0
After the DELETE command is executed, the deleted entry will not disappear immediately, and it will be collected in the next garbage collection by the system.
The cluster is deleted. If the operated entry is in use, it cannot be deleted.
Warning
If you try to delete or manually modify a noarp entry created by the kernel, it will lead to some unanticipated
Action.
6.3.ip neighbor show -- display network neighbor Information
Abbreviation: Show, list, sh, ls
Introduction
This command is used to display network neighbor information.
Parameters
To address (default) specifies the address to display
Dev name only displays the neighbor of the device name
Unused only displays the neighbors that are not currently in use
NUD nud_state only lists the adjacent entries in the nud_state state. The value of nud_state is described below
Shao. NUD all indicates all States. This option can be used multiple times. If this option is missing, the IP address will
Lists All entries except none and noarp.
Output Format
Duznet @ Alisa :~ $ IP neigh ls
: Dev lo lladdr 00: 00: 00: 00: 00: 00 NUD noarp
Fe80: 200: CFF: fe76: 3f85 Dev eth0 lladdr 00: 00: 0C: 76: 3f: 86 Router
NUD stale
0.0.0.0 Dev lo lladdr 00: 00: 00: 00: 00: 00 NUD noarp
193.233.7.254 Dev eth0 lladdr 00: 00: 0C: 76: 3f: 85 NUD reachable
193.233.7.85 Dev eth0 lladdr 00: E0: 1E: 63: 39: 00 NUD stale
Kuznet @ Alisa :~ $
The first part of each line is the Protocol address of the network neighbor. The second part is the device name. The saved part is that
Information of the adjacent entries.
Lladdr is the link layer address of the device.
NUD indicates the connection status. The complete list and brief description of the status are as follows:
The status of the none network neighbor is null.
The incomplete neighbor is being parsed.
The reachable network neighbor is valid and reachable.
The stale neighbor is valid, but it may not be reachable. Therefore, the kernel will perform a check during the first transmission.
Delay a data packet has been sent to the network neighbor in stale, and the kernel is waiting for response information.
The probe delay timer has expired and no confirmation information has been received. Kernel start to use arp/ndisc message probing
Test this network neighbor.
Failed parsing failed.
The noarp network neighbor is valid and does not need to be checked.
Permanent: This is a noarp entry. Only the system administrator can delete it from the list.
In these States, except none, faliled, and incomplete.
Ipvv6 network neighbor can have a label called router, which indicates that this node is an IPv6 path.
By.
-Statistics
-The Statistics option displays a lot of useful information. For example:
Kuznet @ Alisa :~ $ IP-S n ls 193.233.7.254
193.233.7.254. Dev eth0 lladdr 00: 00: 0C: 76: 3f: 85 ref 5
Used 12/13/20 NUD reachable
Kuznet @ Alisa :~ $
The output information contains three additional times: ref and vertical cylinder separation. Ref indicates how many users use this
Entries. The three time periods are the use time, confirmation time, and refresh time. Therefore, the time output above
Indicates:
The entry was used 12 seconds ago;
Confirmed 13 seconds ago;
Updated 20 seconds ago.
6.4.ip neighbor flush -- clear the adjacent entries
Abbreviation: flush, F
Introduction
This command is used to clear the list entries that match a certain condition.
Parameters
The parameters of this command are the same as those of IP neigh Sh. The difference is that if there is no parameter
No. By default, deleted entries do not include entries in the permanent and noarp statuses.
.
-Statistics
If the-Statistics option is used, the output of this command is more detailed. It outputs the deleted entries.
Number and the number of times the neighboring table is traversed. If two-s options are used, the command output includes the deleted items.
Target information.
Example
Netadm @ Alisa :~ # IP-s n f 193.233.7.254
193.233.7.254 Dev eth0 lladdr 00: 00: 0C: 76: 3f: 85 ref 5
Used 12/13/20 NUD reachable
* ** Round 1, deleting 1 entries ***
* ** Flush is complete after 1 round ***
Netadm @ Alisa :~ #