Manage ip address interfaces in ruby
|list||List multicast addresses|
|add||Add a multicast address|
|delete||Delete a multicast address|
|permanent||The neighbour entry is valid forever and can be only be removed administratively.|
|noarp||the neighbour entry is valid. No attempts to validate this entry will be made but it can be removed when its lifetime expires.|
|reachable||the neighbour entry is valid until the reachability timeout expires.|
|stale||the neighbour entry is valid but suspicious. This option to ip neigh does not change the neighbour state if it was valid and the address is not changed by this command.|
|none||this is a pseudo state used when initially creating a neighbour entry or after trying to remove it before it becomes free to do so.|
|incomplete||the neighbour entry has not (yet) been validated/resolved.|
|delay||neighbor entry validation is currently delayed.|
|probe||neighbor is being probed.|
|failed||max number of probes exceeded without success, neighbor validation has ultimately failed.|
List multicast addresses
||The prefix selecting the neighbours to list.|
||only list the neighbours attached to this device.|
||only list the neighbours for given VRF.|
||list neighbour proxies.|
||only list neighbours which are not currently in use.|
||Only list neighbour entries in this state. NUD_STATE takes values listed below or the special value all which means all states. This option may occur more than once. If this option is absent, ip lists all entries except for none and noarp.|
Returns an array of
||Destination network address.|
||Which device the neighbour entry is bound to.|
||The link layer address of the neighbour.|
||The state of the neighbour entry.|
||Information about the neighbour entry.|
||Number of seconds since the ARP entry was last used.|
||Number of seconds since the ARP entry was last confirmed.|
||Number of seconds since the ARP entry was last updated.|
||Number of probes|
||Free neighbour cache entry reference count.|
host.ip('neighbour', 'list', stats: true) [ [ 0] #<Struct:Kanrisuru::Core::IP::IPNeighbour:0x000010e0 destination = #<IPAddr: IPv4:10.0.0.97/255.255.255.255>, device = "ens3", lladdr = "fa:16:3e:2d:bd:e9", state = [  "STALE" ], stats = #<Struct:Kanrisuru::Core::IP::IPNeighbourStats:0x000011d0 confirmed = 5799900, probes = 1, ref_count = nil, updated = 5799870, used = 5799900 > >, [ 1] .. , [ 9] #<Struct:Kanrisuru::Core::IP::IPNeighbour:0x00001ab8 destination = #<IPAddr: IPv4:10.0.0.241/255.255.255.255>, device = "ens3", lladdr = "fa:16:3e:f2:a2:8d", state = [  "STALE" ], stats = #<Struct:Kanrisuru::Core::IP::IPNeighbourStats:0x00001ba8 confirmed = 5799887, probes = 1, ref_count = nil, updated = 5799859, used = 5799980 > >,  #<Struct:Kanrisuru::Core::IP::IPNeighbour:0x00001bd0 destination = #<IPAddr: IPv4:10.0.0.92/255.255.255.255>, device = "ens3", lladdr = "fa:16:3e:3f:8f:96", state = [  "STALE" ], stats = #<Struct:Kanrisuru::Core::IP::IPNeighbourStats:0x00001cc0 confirmed = 5799982, probes = 1, ref_count = nil, updated = 5799951, used = 5800043 > > ]
Add a new neighbour entry
||the protocol address of the neighbour. It is either an IPv4 or IPv6 address.|
||the interface to which this neighbour is attached.|
||indicates whether we are proxying for this neighbour entry|
||indicates whether neighbour is a router|
||this neigh entry was learned externally. This option can be used to indicate to the kernel that this is a controller learnt dynamic entry. Kernel will not gc such an entry.|
No explicit data struct returned, only option is
status to see if the program exited properly.
Add a new neighbour entry.
Coincide with the arguments of add.
Add a new entry or change an existing one.
Coincide with the arguments of add.
Delete a neighbour entry.
The arguments are the same as with ip neigh add, except that lladdr and nud are ignored.
- Ubuntu, Debian, Centos, Fedora, Redhat, OpenSuse, SLES