Ubuntu修改网络_ubuntu修改网络配置

Ubuntu修改网络_ubuntu修改网络配置

解决方案goocz2025-02-17 11:23:4034A+A-
ip link set $device up 
ip link set $device down
vi /etc/netplan/01-netcfg.yaml 
--------------------------------------------------------- 
# This file describes the network interfaces available on your system 
# For more information, see netplan(5). 
network: 
  version: 2 
  renderer: networkd 
  ethernets: 
    enp61s0f1: 
      dhcp4: no 
      addresses: [192.168.1.1/24] 
    enp61s0f0: 
      dhcp4: true 
      addresses: [192.168.21.211/22] 
      gateway4: 192.168.20.1 
      nameservers: 
               addresses: [10.8.8.8,10.6.6.6] 
      dhcp-identifier: mac 
----------------------------------------------------------- 
netplan apply 
ifconfig enp61s0f0 down && ifconfig enp61s0f0 up
点击这里复制本文地址 以上内容由goocz整理呈现,请务必在转载分享时注明本文地址!如对内容有疑问,请联系我们,谢谢!

果子教程网 © All Rights Reserved.  蜀ICP备2024111239号-5