diff options
| author | Michael Biebl <biebl@debian.org> | 2015-01-22 00:29:39 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2015-01-22 00:29:39 +0100 |
| commit | 2c032d8f1c6292c1338a615e6ec40252889ba85c (patch) | |
| tree | 1f77182220b2b0264288ba4a476ab47e5bc48716 /man/nmcli-examples.5 | |
| parent | 33491bc4279481db8ae47213e34a6d695a0e8830 (diff) | |
Imported Upstream version 1.0.0 upstream/1.0.0
Diffstat (limited to 'man/nmcli-examples.5')
| -rw-r--r-- | man/nmcli-examples.5 | 43 |
1 files changed, 30 insertions, 13 deletions
diff --git a/man/nmcli-examples.5 b/man/nmcli-examples.5 index 7145d682..23045ecd 100644 --- a/man/nmcli-examples.5 +++ b/man/nmcli-examples.5 @@ -2,12 +2,12 @@ .\" Title: nmcli-examples .\" Author: .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/> -.\" Date: 16 June 2014 +.\" Date: 19 November 2014 .\" Manual: Examples -.\" Source: NetworkManager 0.9.10 +.\" Source: NetworkManager 1.0 .\" Language: English .\" -.TH "NMCLI\-EXAMPLES" "5" "" "NetworkManager 0\&.9\&.10" "Examples" +.TH "NMCLI\-EXAMPLES" "5" "" "NetworkManager 1\&.0" "Examples" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -121,6 +121,7 @@ GENERAL\&.STATE: 100 (connected) GENERAL\&.REASON: 0 (No reason given) GENERAL\&.UDI: /sys/devices/pci0000:00/0000:00:1c\&.1/0000:03:00\&.0/net/wlan0 GENERAL\&.IP\-IFACE: wlan0 +GENERAL\&.IS\-SOFTWARE: no GENERAL\&.NM\-MANAGED: yes GENERAL\&.AUTOCONNECT: yes GENERAL\&.FIRMWARE\-MISSING: no @@ -350,6 +351,7 @@ interface, the second to \fB $ nmcli con add con\-name my\-con\-em1 ifname em1 type ethernet ip4 192\&.168\&.100\&.100/24 gw4 192\&.168\&.100\&.1 ip4 1\&.2\&.3\&.4 ip6 abbe::cafe $ nmcli con mod my\-con\-em1 ipv4\&.dns "8\&.8\&.8\&.8 8\&.8\&.4\&.4" +$ nmcli con mod my\-con\-em1 +ipv4\&.dns 1\&.2\&.3\&.4 $ nmcli con mod my\-con\-em1 ipv6\&.dns "2001:4860:4860::8888 2001:4860:4860::8844" $ nmcli \-p con show my\-con\-em1 \fR @@ -362,7 +364,7 @@ $ nmcli \-p con show my\-con\-em1 The first command adds an Ethernet connection profile named \fImy\-con\-em1\fR that is bound to interface name -\fIem1\fR\&. The profile is configured with static IP addresses\&. Three addresses are added, two IPv4 addresses and one IPv6\&. The first IP 192\&.168\&.100\&.100 has a prefix of 24 (netmask equivalent of 255\&.255\&.255\&.0)\&. Gateway entry for the first IP address will become the default route if this profile is activated on em1 interface (and there is no connection with higher priority)\&. The second two addresses don\*(Aqt specify a prefix, so a default prefix will be used, i\&.e\&. 32 for IPv4 and 128 for IPv6\&. The second and third commands modify DNS parameters of the new connection profile\&. The last +\fIem1\fR\&. The profile is configured with static IP addresses\&. Three addresses are added, two IPv4 addresses and one IPv6\&. The first IP 192\&.168\&.100\&.100 has a prefix of 24 (netmask equivalent of 255\&.255\&.255\&.0)\&. Gateway entry will become the default route if this profile is activated on em1 interface (and there is no connection with higher priority)\&. The next two addresses do not specify a prefix, so a default prefix will be used, i\&.e\&. 32 for IPv4 and 128 for IPv6\&. The second, third and fourth commands modify DNS parameters of the new connection profile\&. The last \fIcon show\fR command displays the profile so that all parameters can be reviewed\&. .PP @@ -469,6 +471,7 @@ connection\&.uuid: de89cdeb\-a3e1\-4d53\-8fa0\-c22546c775 connection\&.interface\-name: \-\- connection\&.type: 802\-3\-ethernet connection\&.autoconnect: yes +connection\&.autoconnect\-priority: 0 connection\&.timestamp: 0 connection\&.read\-only: no connection\&.permissions: @@ -494,7 +497,9 @@ ipv4\&.method: auto ipv4\&.dns: ipv4\&.dns\-search: ipv4\&.addresses: +ipv4\&.gateway: \-\- ipv4\&.routes: +ipv4\&.route\-metric: \-1 ipv4\&.ignore\-auto\-routes: no ipv4\&.ignore\-auto\-dns: no ipv4\&.dhcp\-client\-id: \-\- @@ -507,7 +512,9 @@ ipv6\&.method: auto ipv6\&.dns: ipv6\&.dns\-search: ipv6\&.addresses: +ipv6\&.gateway: \-\- ipv6\&.routes: +ipv6\&.route\-metric: \-1 ipv6\&.ignore\-auto\-routes: no ipv6\&.ignore\-auto\-dns: no ipv6\&.never\-default: no @@ -524,22 +531,23 @@ nmcli ipv4\&.addresses> desc === [addresses] === [NM property description] -Array of IPv4 address structures\&. Each IPv4 address structure is composed of 3 32\-bit values; the first being the IPv4 address (network byte order), the second the prefix (1 \- 32), and last the IPv4 gateway (network byte order)\&. The gateway may be left as 0 if no gateway exists for that subnet\&. For the \*(Aqauto\*(Aq method, given IP addresses are appended to those returned by automatic configuration\&. Addresses cannot be used with the \*(Aqshared\*(Aq, \*(Aqlink\-local\*(Aq, or \*(Aqdisabled\*(Aq methods as addressing is either automatic or disabled with these methods\&. +Array of IP addresses\&. [nmcli specific description] Enter a list of IPv4 addresses formatted as: - ip[/prefix] [gateway], ip[/prefix] [gateway],\&.\&.\&. + ip[/prefix], ip[/prefix],\&.\&.\&. Missing prefix is regarded as prefix of 32\&. -Example: 192\&.168\&.1\&.5/24 192\&.168\&.1\&.1, 10\&.0\&.0\&.11/24 +Example: 192\&.168\&.1\&.5/24, 10\&.0\&.0\&.11/24 -nmcli ipv4\&.addresses> set 192\&.168\&.1\&.100/24 192\&.168\&.1\&.1 +nmcli ipv4\&.addresses> set 192\&.168\&.1\&.100/24 Do you also want to set \*(Aqipv4\&.method\*(Aq to \*(Aqmanual\*(Aq? [yes]: yes nmcli ipv4\&.addresses> nmcli ipv4\&.addresses> print -addresses: { ip = 192\&.168\&.1\&.100/24, gw = 192\&.168\&.1\&.1 } +addresses: 192\&.168\&.1\&.100/24 nmcli ipv4\&.addresses> back nmcli ipv4> b +nmcli> set ipv4\&.gateway 192\&.168\&.1\&.1 nmcli> verify Verify connection: OK nmcli> print @@ -551,6 +559,7 @@ connection\&.uuid: de89cdeb\-a3e1\-4d53\-8fa0\-c22546c775 connection\&.interface\-name: \-\- connection\&.type: 802\-3\-ethernet connection\&.autoconnect: yes +connection\&.autoconnect\-priority: 0 connection\&.timestamp: 0 connection\&.read\-only: no connection\&.permissions: @@ -575,8 +584,10 @@ connection\&.gateway\-ping\-timeout: 0 ipv4\&.method: manual ipv4\&.dns: ipv4\&.dns\-search: -ipv4\&.addresses: { ip = 192\&.168\&.1\&.100/24, gw = 192\&.168\&.1\&.1 } +ipv4\&.addresses: 192\&.168\&.1\&.100/24 +ipv4\&.gateway: 192\&.168\&.1\&.1 ipv4\&.routes: +ipv4\&.route\-metric: \-1 ipv4\&.ignore\-auto\-routes: no ipv4\&.ignore\-auto\-dns: no ipv4\&.dhcp\-client\-id: \-\- @@ -590,6 +601,7 @@ ipv6\&.dns: ipv6\&.dns\-search: ipv6\&.addresses: ipv6\&.routes: +ipv6\&.route\-metric: \-1 ipv6\&.ignore\-auto\-routes: no ipv6\&.ignore\-auto\-dns: no ipv6\&.never\-default: no @@ -607,6 +619,7 @@ connection\&.uuid: de89cdeb\-a3e1\-4d53\-8fa0\-c22546c775 connection\&.interface\-name: \-\- connection\&.type: 802\-3\-ethernet connection\&.autoconnect: yes +connection\&.autoconnect\-priority: 0 connection\&.timestamp: 0 connection\&.read\-only: no connection\&.permissions: @@ -629,10 +642,12 @@ connection\&.gateway\-ping\-timeout: 0 802\-3\-ethernet\&.s390\-options: \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- ipv4\&.method: manual -ipv4\&.dns: 8\&.8\&.8\&.8, 8\&.8\&.4\&.4 +ipv4\&.dns: 8\&.8\&.8\&.8,8\&.8\&.4\&.4 ipv4\&.dns\-search: -ipv4\&.addresses: { ip = 192\&.168\&.1\&.100/24, gw = 192\&.168\&.1\&.1 } +ipv4\&.addresses: 192\&.168\&.1\&.100/24 +ipv4\&.gateway: 192\&.168\&.1\&.1 ipv4\&.routes: +ipv4\&.route\-metric: \-1 ipv4\&.ignore\-auto\-routes: no ipv4\&.ignore\-auto\-dns: no ipv4\&.dhcp\-client\-id: \-\- @@ -645,7 +660,9 @@ ipv6\&.method: auto ipv6\&.dns: ipv6\&.dns\-search: ipv6\&.addresses: +ipv6\&.gateway: \-\- ipv6\&.routes: +ipv6\&.route\-metric: \-1 ipv6\&.ignore\-auto\-routes: no ipv6\&.ignore\-auto\-dns: no ipv6\&.never\-default: no @@ -664,7 +681,7 @@ nmcli> quit .RE .\} .PP -Example session in the nmcli interactive connection editor\&. The scenario creates an Ethernet connection (configuration) with static addressing (IPs and DNS)\&. +Example session in the nmcli interactive connection editor\&. The scenario creates an Ethernet connection profile with static addressing (IPs and DNS)\&. .SH "SEE ALSO" .PP \fBnmcli\fR(1), |