Howto NetworkManager: Difference between revisions

From Vidalinux Wiki
Jump to navigation Jump to search
No edit summary
Line 7: Line 7:
add ip address to your eth0 interface:
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
  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
= 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 ${BR_NAME}

Revision as of 01:46, 18 November 2021

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

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 ${BR_NAME}