deepin system modifies the IP address of record

What is needed today when configuring routing software device wired network card a static address, so they modified as follows:

1, the backup network configuration file:

sudo cp /etc/network/interfaces /etc/netword/interfaces.bak

2, modify the network configuration file:

sudo vi /etc/network/interface

Then inside the comment the following line:

source-directory /etc/network/interfaces.d

After the addition of the following:

car enp7s0

iface enp7s0 inet static

address 192.168.100.2

netmask 255.255.255.0

gateway 192.168.100.254

Then save and exit.

3, add dns configuration:

Back up your dns configuration file:

sudo cp /etc/resolv.conf /etc/resolv.conf.bak

Then modify the dns configuration file:

south you /etc/resolv.conf

The prior dns server address 114.114.114.114 and modified to 192.168.4.1, following FIG.

 

 4, restart the web server:

sudo /etc/init.d/networking restart

The findings suggest that the restart is successful, but then see a static address used by ifconfig.

So I modified by the system's own deepin graphical interface as shown below:

 

 And then found still not entered into force.

So there is no way, only to find the Baidu to find information. Then search for a big God his deepin (old version) is configured with a network profile where I did not add the (original page is not timely shots, hold up here), I re-released directly modify the configuration after the entry into force of the following:

 

 Place the red box above where I was not so previously configured.

The last two lines I added static routes, so as not to conflict with the Internet wireless network card can not lead to the Internet, but can be a normal soft router management.

to sum up:

deepin系统在修改网络配置文件的时候需要注释掉source-directory /etc/network/interfaces.d这行的内部,然后在下面添加配置的时候需要配置环回接口自己启动,如上面截图所示。

Guess you like

Origin www.cnblogs.com/ThundRuss-XPLI/p/12355377.html