nmcli-connection:tldr:3c624
nmcli-connection: Create a static IPv6-only connection.
$ nmcli connection add ifname ${interface_name} type ${ethernet} ip6 ${2001:db8::2-64} gw6 ${2001:db8::1} ipv6.dns ${2001:db8::1} ipv4.method ${ignore}
try on your machine
This command is using the nmcli utility to add a new network connection.
Explanation of each part of the command:
nmcli connection add
: This specifies the nmcli command to add a new connection.ifname ${interface_name}
: This specifies the interface name, which is a placeholder and should be replaced with the desired name of the network interface. For example, if the interface is "eth0", you would replace${interface_name}
witheth0
.type ${ethernet}
: This specifies the type of connection, which is Ethernet in this case. The${ethernet}
is a placeholder and must be replaced with the actual type, e.g.,ethernet
.ip6 ${2001:db8::2-64}
: This sets the IPv6 address for the connection.${2001:db8::2-64}
is a placeholder and should be replaced with the desired IPv6 address range. In this example, it is set to2001:db8::2-64
.gw6 ${2001:db8::1}
: This sets the IPv6 gateway for the connection.${2001:db8::1}
is a placeholder and should be replaced with the desired IPv6 gateway address. In this example, it is set to2001:db8::1
.ipv6.dns ${2001:db8::1}
: This sets the DNS server for IPv6.${2001:db8::1}
is a placeholder and should be replaced with the desired IPv6 DNS server address. In this example, it is set to2001:db8::1
.ipv4.method ${ignore}
: This specifies the method for IPv4 configuration. In this case, it is set to${ignore}
, which means the IPv4 configuration will be ignored.${ignore}
is a placeholder and can be replaced with other values likeauto
,manual
, ordisabled
, depending on the desired configuration.
This explanation was created by an AI. In most cases those are correct. But please always be careful and
never run a command you are not sure if it is safe.