# nmcli c s
NAME UUID TYPE DEVICE
enp1s0 3d64f6a1-a3eb-4dad-ad20-c52a21f5c060 ethernet enp1s0
virbr0 02b891f8-55be-4f44-8a18-d3ec680f01b0 bridge virbr0
# nmcli c add type vlan ifname vlan10 con-name vlan10 dev enp1s0 id 10
# nmcli c mod vlan10 ipv4.method manual ipv4.address 192.168.10.220/24
# nmcli c u vlan10
# nmcli c del vlan10
# nmcli c del enp1s0
# nmcli connection add type ethernet ifname enp1s0 con-name enp1s0
【例】
1) ホスト側
# nmcli c del vlan10
# nmcli c del vlan20
# nmcli c del vlan80
# nmcli c del vlan90
# nmcli c add type vlan ifname vlan10 con-name vlan10 dev enp39s0 id 10
# nmcli c add type vlan ifname vlan20 con-name vlan20 dev enp39s0 id 20
# nmcli c add type vlan ifname vlan80 con-name vlan80 dev enp39s0 id 80
# nmcli c add type vlan ifname vlan90 con-name vlan90 dev enp39s0 id 90
# nmcli c mod vlan10 ipv4.method manual ipv4.address 192.168.10.220/24
# nmcli c mod vlan20 ipv4.method manual ipv4.address 192.168.20.220/24
# nmcli c mod vlan80 ipv4.method manual ipv4.address 192.168.80.220/24
# nmcli c mod vlan90 ipv4.method manual ipv4.address 192.168.90.220/24
# nmcli c u vlan10
# nmcli c add type vlan ifname vlan20 con-name vlan20 dev enp39s0 id 20
# nmcli c add type vlan ifname vlan80 con-name vlan80 dev enp39s0 id 80
# nmcli c add type vlan ifname vlan90 con-name vlan90 dev enp39s0 id 90
# nmcli c mod vlan10 ipv4.method manual ipv4.address 192.168.10.220/24
# nmcli c mod vlan20 ipv4.method manual ipv4.address 192.168.20.220/24
# nmcli c mod vlan80 ipv4.method manual ipv4.address 192.168.80.220/24
# nmcli c mod vlan90 ipv4.method manual ipv4.address 192.168.90.220/24
# nmcli c u vlan10
# nmcli c u vlan20
# nmcli c u vlan80
# nmcli c u vlan90
# nmcli c del vlan10
# nmcli c del vlan20
# nmcli c del vlan80
# nmcli c del vlan90
2)ゲスト側
# nmcli c mod enp1s0 ipv4.method manual ipv4.address 192.168.10.1/24
# nmcli c mod enp1s0 ipv4.method manual ipv4.address 192.168.20.1/24
# nmcli c mod enp1s0 ipv4.method manual ipv4.address 192.168.80.1/24
# nmcli c mod enp1s0 ipv4.method manual ipv4.address 192.168.90.1/24
# nmcli c u enp1s0
https://qiita.com/kanatatsu64/items/b7b8eca17202386d27e3
https://qiita.com/hana_shin/items/59e8492057d8686465e8
0 件のコメント:
コメントを投稿