添加/编辑虚拟网桥
/etc/netpaln/br0.yaml
ipv4 dhcp:
network: version: 2 ethernets: eno8303: #替换为实际网卡 dhcp4: false dhcp6: false bridges: br0: interfaces: [eno8303] #替换为实际网卡 dhcp4: true parameters: stp: false dhcp6: false
ipv4 静态分配
network: version: 2 ethernets: eno8303:#替换为实际网卡 dhcp4: false dhcp6: false bridges: br0: interfaces: [eno8303] #替换为实际网卡 dhcp4: false addresses: [192.168.1.250/24] routes: - to: default via: 192.168.1.1 nameservers: addresses: [114.114.114.114] parameters: stp: false dhcp6: true
生效:
sudo netplan apply
标签:false,dhcp4,netplan,网卡,22.04,网桥,dhcp6,eno8303 From: https://www.cnblogs.com/M-360973977/p/17876837.html