编辑文件,需要sudo权限,sudo vim /etc/NetworkManager/system-connections/ethernet-shared
字段[ipv4]method改为shared,将字段mac-address注释掉,这样只需要根据字段interface-name为enp3s0来绑定设备
然后重启网络,sudo systemctl restart networking,之后enp1s0网卡将会被分配IP,10.42.0.1
[connection]
id=ethernet-shared
uuid=1f2daa30-9d76-4678-8959-0bef933085cc
type=ethernet
interface-name=enp1s0
permissions=
secondaries=
[ethernet]
duplex=full
#mac-address=00:00:00:00:00:00
mac-address-blacklist=
[ipv4]
dns-search=
method=shared
[ipv6]
addr-gen-mode=stable-privacy
dns-search=
ip6-privacy=0
method=auto