(ip link) module introduces procedures to access and modify the
network links on your machine. They are equivalent to the
family of commands, from
Datatype representing the status of a network link.
<link> make-link link? link-name link-id link-type link-flags link-mtu link-qdisc link-state link-mode link-group link-qlen link-addr link-brd
Name of the link, such as
Index of the link, a unique number used to identify the link.
Type of the link, as an integer.
Flags associated with the device, as a list of symbols, such as
MTU of the link, as an integer.
Queuing discipline of the link, as a string, such as
State of the link, as an integer. Use
(netlink constant) to get a symbol, such as
Mode of the link. 0 means
DORMANT, 1 means
Identifier of the group it belongs to. 0 for
Size of the queue.
Ethernet address of the link, as a string.
Broadcast (ethernet) address of the link, as a string.
Returns the list of existing links in the system, as a list of
Display link on the standard output, using a format similar to
ip link from
Modify an existing link and set its flags and attributes to the ones specified by the various keywords. When a keyword is omited, the corresponding attribute is not changed.
device can be a device index (as a number) or a device name (as a string).
Do not set
#:down at the same time. Do not set
*-off at the same time.
Print the set of devices on standard output. Setting any of the keyword to a non-false value will filter the results to only show results that match the corresponding value. You may set more than one keyword.
Add a new link with given name and type. Additional arguments can be passed to control the state of the link at creation. type-args is an association list containing additional values for the given type.
When type is
"vlan", type-args can contain a number associated
'id: the VLAN id to be created.
When type is
"veth", type-args can contain a string associated
'peer: the name of the peer.
The following is an example in which we create a new veth (virtual ethernet) pair and give them a name:
;; same as "ip l add v0p0 type veth peer v0p1" (link-add "v0p0" "veth" #:type-args '((peer . "v0p1")))
Delete a link. device can contain the name of the link, as a string, or its index, as a number.