Ubuntu 14.04 网络配置

1、配置网卡

root@HDController:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto enp2s0
iface enp2s0 inet static
address 10.0.55.22	
netmask 255.255.255.0
gateway 10.0.55.254
dns-nameservers 10.0.100.10

2、使配置文件生效

root@HDController:~# resolvconf -u

3、重启网卡服务

root@HDController:~# systemctl networking.service
Unknown operation networking.service.
root@HDController:~# sudo /etc/init.d/networking restart
[ ok ] Restarting networking (via systemctl): networking.service.

  

posted @ 2017-08-01 13:50  努力哥  阅读(983)  评论(0)    收藏  举报