Howto NetworkManager: Difference between revisions
Mandulete1 (talk | contribs) |
Mandulete1 (talk | contribs) |
||
Line 4: | Line 4: | ||
start and enable NetworkManager: | start and enable NetworkManager: | ||
systemctl enable NetworkManager && systemctl start NetworkManager | systemctl enable NetworkManager && systemctl start NetworkManager | ||
verify NetworkManager service status: | |||
systemctl status NetworkManager | |||
restart NetworkManager service: | |||
systemctl restart NetworkManager | |||
= add address to ethernet = | = add address to ethernet = | ||
add static ip address to your eth0 interface: | add static ip address to your eth0 interface: |
Revision as of 19:10, 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
verify NetworkManager service status:
systemctl status NetworkManager
restart NetworkManager service:
systemctl restart NetworkManager
add address to ethernet
add static ip address to your eth0 interface:
nmcli con add con-name eth0 ipv4.method manual type ethernet ifname eth0 ipv4.address 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 con up eth0
if you want to configure dhcp to your eth0 interface use the following command instead:
nmcli con add con-name eth0 ipv4.method auto type ethernet ifname eth0 autoconnect yes
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 down or deactive network profile using nmcli:
nmcli con up static
bring up or enable network profile using nmcli:
nmcli con up static
reload configuration using nmcli:
nmcli con reload nmcli con up static
add another ip address to interface eth0 using nmcli
nmcli con modify "static" +ipv4.address "192.168.75.18/24"
replace added ip address on interface eth0 using nmcli:
nmcli con modify "static" -ipv4.address "192.168.75.18/24"
replace current nameservers with 8.8.8.8 using nmcli:
nmcli con modify "static" ipv4.dns 8.8.8.8
create bridge interface
create the bridge interface:
nmcli connection add type bridge autoconnect yes con-name br0 ifname br0
add device to bridge:
nmcli connection add type bridge-slave autoconnect yes con-name br0-eth0 ifname eth0 master br0
add ip address to bridge interface:
nmcli connection modify br0 ipv4.address 192.168.75.15 ipv4.method manual ipv4.gateway 192.168.75.1 ipv4.dns 4.2.2.1,4.2.2.2
active bridge interface:
nmcli connection up br0
network teaming
add team interface:
nmcli con add type team con-name team0 ifname team0 config '{"runner": {"name": "activebackup"}}'
add ipv4 address to interface:
nmcli con modify team0 ipv4.address 192.168.75.15/24 ipv4.method manual ipv4.gateway 192.168.75.1 ipv4.dns 4.2.2.1,4.2.2.2
add ports to interface:
nmcli con add type team-slave con-name team0-eth0 ifname eth0 master team0 nmcli con add type team-slave con-name team0-eth1 ifname eth1 master team0
start interface team0:
nmcli con up team0
enable interfaces:
nmcli device enable eth0 nmcli device enable eth1
test connection disabling one interface:
nmcli device disconnect eth0