1. virtualBox 设置
设置->网络->网卡1:
设置->网络->网卡2:
2.ubuntu 设置动态ip
可以了解下 lshw,netplan,ipconfig
ipconfig -a 查看所有网卡,
lshw -c network -short
H/W path Device Class Description =============================================== /0/100/3 enp0s3 network 82540EM Gigabit Ethernet Controller /0/100/8 enp0s8 network 82540EM Gigabit Ethernet Controller
sudo /vim/etc/netplan/50-cloud-init.yaml
network: ethernets: enp0s3: addresses: [] dhcp4: true optional: true enp0s8: addresses: [] dhcp4: true optional: true version: 2
重启.
原文链接:https://www.f2er.com/ubuntu/349272.html