进出口新进LINUX,我需要你的帮助,我的OVH VPS Ubuntu服务器16.04LTS接口实际上是在向DHCP静态如何更改DHCP接口静态接口在OVH VPS在Ubuntu 16.04
其实我的/ etc /网络/接口文件是:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# Source interfaces
# Please check /etc/network/interfaces.d before changing this file
# as interfaces may have been defined in /etc/network/interfaces.d
# See LP: #1262951
source /etc/network/interfaces.d/*.cfg
/etc/network/interfaces.d/*.cfg只有命名一个文件源路径:50云init.cfg和该文件包含:
auto lo
iface lo inet loopback
auto ens3
iface ens3 inet dhcp
所以我的IP地址是149.xxx.xxx.61,我需要将其转换为具有iface ens3静态IP地址。
其实使用ifconfig -a是:
ens3 Link encap:Ethernet HWaddr fa:16:3e:ae:e3:83
inet addr:149.xxx.xxx.61 Bcast:149.xxx.xxx.61 Mask:255.255.255.255
inet6 addr: fe80::xxxx:xxxx:feae:e383/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:894526 errors:0 dropped:0 overruns:0 frame:0
TX packets:297070 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:102187906 (102.1 MB) TX bytes:63602471 (63.6 MB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:14743 errors:0 dropped:0 overruns:0 frame:0
TX packets:14743 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:31459525 (31.4 MB) TX bytes:31459525 (31.4 MB)
我怎样才能做到这一点?