Ubuntu NIC configuration or NIC device unmanaged rescue method

Source: Internet
Author: User

Ubuntu Network Configuration
debian/ubuntu管理网络连接的有两套方案,右上角的图形化的NetworkManager和配置文件的 ifup/ifdown,如果在 /etc/network/interfaces里设置了网卡信息,那么NetworkManager就不会接管该网卡,如果没有设置配置文件NetworkManager默认是会接管网卡的,但有时可能会出现图形化管理挂掉的情况,图形化管理工具显示设备未托管,出现这种情况可通过设置配置文件的方案拉起网卡。

Modify the configuration file so that the configuration file schema takes effect.

sudo vim /etc/NetworkManager/NetworkManager.conf    将`managed=false`修改成`managed=true`#重启或者source重载下配置文件(两种方法任选)sudo source /etc/NetworkManager/NetworkManager.confsudo reboot

Modifying the network card configuration file

    sudo vim /etc/network/interfaces

Change to the following:

有线配置部分    # 自动挂载enp4s0f2网卡    auto enp4s0f2    iface enp4s0f2 inet static      # 静态IP    address 172.16.168.128    # 网关地址    gateway 172.16.168.1  #拨号上网请把gateway全部设置为0    # 子网掩码    netmask 255.255.255.0#------------------分割线----------------------无线配置部分(是否设置根据需要):    auto wlan0    iface wlan0 inet static    netmask 255.255.255.0    gateway 192.168.0.1    address 192.168.0.113    pre-up ip link set wlan0 up    pre-up iwconfig wlan0 essid ssid    wpa-ssid TP-Link # 这里的ssid为路由里设置的无线名称    wpa-psk 12345678 # 无线密码adsl拨号上网(是否设置根据需要):    auto dsl-provider    iface dsl-provider inet ppp # dsl-provider 为之前配置好的拨号名称    provider dsl-provider

Restart networking

sudo /etc/init.d/networking stopsudo /etc/init.d/networking start

* * Use of restart may not be effective recommended Stop/start * *

Configure DNS
# 默认文件不存在sudo vim /etc/resolvconf/resolv.conf.d/base添加DNS地址nameserver 114.114.114.114

Refresh the configuration file

sudo resolvconf -u

Ubuntu NIC configuration or NIC device unmanaged rescue method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.