User Tools

Site Tools


linux:networking:rockylinux_nmcli

RockyLinux - nmcli

The commands configure a static IP address (192.168.1.219) on a virtual network bridge (br200), which is set up to handle traffic from VLAN ID 200 on the physical interface enp7s0. The original physical interface is left without an IP address of its own.

nmcli device set enp7s0 managed yes
nmcli con add con-name enp7s0 ifname enp7s0 type ethernet \
 ipv4.method disable ipv6.method disabled

nmcli con add con-name enp7s0.200 ifname enp7s0.200 type vlan \
 dev enp7s0 id 200 ipv4.method disable ipv6.method disabled

nmcli con add type bridge con-name br200 ifname br200
nmcli con mod br200 ipv4.addresses 192.168.1.219/24 \
 ipv4.gateway 192.168.1.1 \
 ipv4.dns 1.1.1.1 \
 ipv4.dns 8.8.8.8 \
 ipv4.method manual \
 ipv6.method disabled
 nmcli con up br200
linux/networking/rockylinux_nmcli.txt · Last modified: by jonathan