====== Networkmanager command line ====== * [[https://fedoraproject.org/wiki/Networking/CLI|https://fedoraproject.org/wiki/Networking/CLI]] * Reference Manual: [[https://people.freedesktop.org/~lkundrak/nm-docs/nm-settings.html|https://people.freedesktop.org/~lkundrak/nm-docs/nm-settings.html]] * Bridging: [[https://developer.gnome.org/NetworkManager/stable/nmcli-examples.html|https://developer.gnome.org/NetworkManager/stable/nmcli-examples.html]] * und [[https://www.hogarthuk.com/?q=node/18|https://www.hogarthuk.com/?q=node/18]] Alle Verbindungen zeigen bzw. nur aktive: nmcli connection show nmcli connection show --active Verbindung aktivieren nmcli connection up id Deaktivieren nmcli connection down id Löschen nmcl connection delete [xxxx] Alle Configs neu laden ''nmcli conn reload'' Neu anlegen nmcli connection edit con-name ====== Bridge anlegen ====== Doku: [[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/sec-Network_Bridging_Using_the_NetworkManager_Command_Line_Tool_nmcli.html|https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/sec-Network_Bridging_Using_the_NetworkManager_Command_Line_Tool_nmcli.html]] und [[https://fedoramagazine.org/build-network-bridge-fedora/|https://fedoramagazine.org/build-network-bridge-fedora/]] nmcli connection add ifname br0 type bridge con-name br0 Ethernet Schnittstelle hinzufügen nmcli connection add type bridge-slave ifname eth1 master br0 ====== Verbindung konfigurieren ====== mit goto navigieren, mit back zurück. describe beschreibt Optionen. Z.B. mit describe bridge: ===| nmcli interactive connection editor |=== Adding a new 'bridge' connection Type 'help' or '?' for available commands. Type 'describe [.]' for detailed property description. You may edit the following settings: connection, bridge, 802-3-ethernet (ethernet), ipv4, ipv6 nmcli> describe Error: no setting selected; valid are [connection, bridge, 802-3-ethernet (ethernet), ipv4, ipv6] use 'goto ' first, or 'describe .' nmcli> describe bridge <<>> === [mac-address] === [NM property description] If specified, the MAC address of bridge. When creating a new bridge, this MAC address will be set. When matching an existing (outside NetworkManager created) bridge, this MAC address must match. === [stp] === [NM property description] Controls whether Spanning Tree Protocol (STP) is enabled for this bridge. === [priority] === [NM property description] Sets the Spanning Tree Protocol (STP) priority for this bridge. Lower values are "better"; the lowest priority bridge will be elected the root bridge. === [forward-delay] === [NM property description] The Spanning Tree Protocol (STP) forwarding delay, in seconds. === [hello-time] === [NM property description] The Spanning Tree Protocol (STP) hello time, in seconds. === [max-age] === [NM property description] The Spanning Tree Protocol (STP) maximum message age, in seconds. === [ageing-time] === [NM property description] The Ethernet MAC address aging time, in seconds. Mit set wird eine property gesetzt z.B. set bridge.stp true set bridge.mac 78:24:af:88:eb:99 nmcli ipv4> set ipv4.addresses 192.168.72.1 nmcli ipv4>? ------------------------------------------------------------------------------ ---[ Main menu ]--- goto [ | ] :: go to a setting or property remove [.] | :: remove setting or reset property value set [. ] :: set property value describe [.] :: describe property print [all | [.]] :: print the connection verify [all | fix] :: verify the connection save [persistent|temporary] :: save the connection activate [] [/|] :: activate the connection back :: go one level up (back) help/? [] :: print this help nmcli :: nmcli configuration quit :: exit nmcli ------------------------------------------------------------------------------ **print** listet die gesetzten Einstellungen auf. **verify** verifiziert die Einstellungen **save persistent **sichert die Einstellungen und aktiviert die Verbindung sofort