日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

ubuntu20.04 域名解析暂时失败

發布時間:2023/12/13 综合教程 27 生活家
生活随笔 收集整理的這篇文章主要介紹了 ubuntu20.04 域名解析暂时失败 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1、前言

ping: www.baidu.com: 域名解析暫時失敗

2、排查

ifconfig 顯示如下,enx000ec635404a網卡沒有ip配置

enp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.19.138  netmask 255.255.255.0  broadcast 192.168.19.255
        inet6 fe80::d058:2b28:6be9:fe29  prefixlen 64  scopeid 0x20<link>
        ether ce:e6:4c:68:04:bc  txqueuelen 1000  (以太網)
        RX packets 276511173  bytes 348533647010 (348.5 GB)
        RX errors 0  dropped 23750  overruns 0  frame 0
        TX packets 465668303  bytes 541502143429 (541.5 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enx000ec635404a: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 00:0e:c6:35:40:4a  txqueuelen 1000  (以太網)
        RX packets 71039  bytes 12267317 (12.2 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 10258570  bytes 11216668369 (11.2 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (本地環回)
        RX packets 6466211  bytes 1905907598 (1.9 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6466211  bytes 1905907598 (1.9 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

sudo vim /etc/netplan/00-installer-config.yaml 創建配置文件,輸入以下內容

enx000ec635404a 網卡名稱與上述缺少ip的網卡一致

network:
  ethernets:
    enx000ec635404a:     #配置的網卡的名稱
      addresses: [192.168.0.138/24]    #配置的靜態ip地址和掩碼
      dhcp4: no    #關閉DHCP,如果需要打開DHCP則寫yes
      optional: true
      gateway4: 192.168.0.1    #網關地址
      nameservers:
         addresses: [192.168.0.1,114.114.114.114]    #DNS服務器地址,多個DNS服務器地址需要用英文逗號分隔開
  version: 2
  renderer: networkd    #指定后端采用systemd-networkd或者Network Manager,可不填寫則默認使用systemd-workd

sudo netplan apply 使網絡配置生效

結果

enp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.19.138  netmask 255.255.255.0  broadcast 192.168.19.255
        inet6 fe80::d058:2b28:6be9:fe29  prefixlen 64  scopeid 0x20<link>
        ether ce:e6:4c:68:04:bc  txqueuelen 1000  (以太網)
        RX packets 276511173  bytes 348533647010 (348.5 GB)
        RX errors 0  dropped 23750  overruns 0  frame 0
        TX packets 465668303  bytes 541502143429 (541.5 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enx000ec635404a: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.138  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::864b:38d0:a3d7:cc1d  prefixlen 64  scopeid 0x20<link>
        ether 00:0e:c6:35:40:4a  txqueuelen 1000  (以太網)
        RX packets 71039  bytes 12267317 (12.2 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 10258570  bytes 11216668369 (11.2 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (本地環回)
        RX packets 6466211  bytes 1905907598 (1.9 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6466211  bytes 1905907598 (1.9 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

3、擴展

ping: www.baidu.com: 域名解析暫時失敗 簡單解決

Ubuntu 20.04修改ip地址

Ubuntu系統重啟后/etc/resolv.conf內容丟失的解決方案

linux中nmcli命令使用及網絡配置

總結

以上是生活随笔為你收集整理的ubuntu20.04 域名解析暂时失败的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。