ubuntu server 18.04 有線網卡默認關閉,需要手工配置才能使用的方法


 

1、安裝完ubuntu server 18.04 后,筆記本電腦的有線網卡已經識別了,但是沒有ip, 並且插上網線后端口燈不亮。

解決方法:

第一步、配置端口鏈路狀態為 up

 # ip link set dev xxx up

第二步、配置網口的靜態Ip地址。

ubuntu server 使用netplan 工具進行配置,參考官網配置如下:

https://ubuntu.com/server/docs/network-configuration

 

To configure your system to use static address assignment, create a netplan configuration in the file /etc/netplan/99_config.yaml. The example below assumes you are configuring your first Ethernet interface identified as eth0. Change the addressesgateway4, and nameservers values to meet the requirements of your network.

network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      addresses:
        - 10.10.10.2/24
      gateway4: 10.10.10.1
      nameservers:
          search: [mydomain, otherdomain]
          addresses: [10.10.10.1, 1.1.1.1]

The configuration can then be applied using the netplan command.

sudo netplan apply

 

 

第三步:配置網口的dns server

# vi /etc/resolv.conf

nameserver:  內容填寫為其他電腦上可以分配的dns server ip. 

例如: 101.198.198.198       221.130.33.52

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM