Howto NetworkManager: Difference between revisions

From Vidalinux Wiki
Jump to navigation Jump to search
Line 5: Line 5:
  nmcli con show --active
  nmcli con show --active
show more details about connection device
show more details about connection device
  nmcli con show static
  nmcli con show "System eth0"
delete connection device:
nmcli con del "System eth0"
bring up new profile using nmcli
bring up new profile using nmcli
  nmcli connection up static
  nmcli con up static
reload configuration using nmcli
reload configuration using nmcli
  nmcli connection reload
  nmcli con reload
  nmcli connection up static
  nmcli con up static
modify ip address using nmcli
modify ip address using nmcli
  nmcli connection modify "static" ipv4.addresses "172.25.0.10/24 172.25.0.254"
  nmcli con modify "static" ipv4.addresses "172.25.0.10/24 172.25.0.254"
add another ip address to interface using nmcli
add another ip address to interface using nmcli
  nmcli connection modify "static" +ipv4.addresses "172.25.0.15/24"
  nmcli con modify "static" +ipv4.addresses "172.25.0.15/24"
modify dns using nmcli
modify dns using nmcli
  nmcli connection modify "static" ipv4.dns 8.8.8.8
  nmcli con modify "static" ipv4.dns 8.8.8.8


= install NetworkManager =
= install NetworkManager =

Revision as of 01:56, 18 November 2021

NetworkManager commands

show connections using nmcli

nmcli con show

show active connections using nmcli

nmcli con show --active

show more details about connection device

nmcli con show "System eth0"

delete connection device:

nmcli con del "System eth0"

bring up new profile using nmcli

nmcli con up static

reload configuration using nmcli

nmcli con reload
nmcli con up static

modify ip address using nmcli

nmcli con modify "static" ipv4.addresses "172.25.0.10/24 172.25.0.254"

add another ip address to interface using nmcli

nmcli con modify "static" +ipv4.addresses "172.25.0.15/24"

modify dns using nmcli

nmcli con modify "static" ipv4.dns 8.8.8.8

install NetworkManager

make sure you have network-manager installed:

yum install networkmanager -y

start and enable NetworkManager:

systemctl enable NetworkManager && systemctl start NetworkManager

add address to ethernet

add ip address to your eth0 interface:

nmcli con add con-name eth0 ipv4.method manual type ethernet ifname eth0 ipv4.addresses 192.168.75.15/24 ipv4.gateway 192.168.75.1 ipv4.dns 4.2.2.1,4.2.2.2 autoconnect yes

enable network interface eth0:

nmcli connection up eth0

create bridge interface

create the bridge interface:

nmcli connection add type bridge autoconnect yes con-name br0 ifname br0

add ip address to bridge interface:

nmcli connection modify br0 ipv4.addresses 192.168.75.15 ipv4.method manual ipv4.gateway 192.168.75.1 ipv4.dns 4.2.2.1,4.2.2.2

add device to bridge:

nmcli connection delete eth0
nmcli connection add type bridge-slave autoconnect yes con-name eth0 ifname eth0 master br0

active bridge interface:

nmcli connection up br0