命令:
nmcli connection add con-name eth1 ifname eth1 type macvlan dev eth0 ip4 172.25.254.100/24 geteway 172.25.254.2 ipv4.dns 114.114.114.114 ipv4.method manual mode bridge
在 Linux 系统中,基于物理网卡 eth0 ,创建一个名为eth1的MACVLAN 类型虚拟网卡 ,并为这个虚拟网卡配置静态固定的 IP 地址 / 网关 / DNS ,指定工作模式为最常用的桥接模式,创建后该网卡配置会被NetworkManager永久保存,开机自动加载。


