debian和centos的网络配置与网络启动

来源:互联网 发布:创维5t36数据 编辑:程序博客网 时间:2024/05/22 12:48

debian7.8的网络配置

修改配置文件vi /etc/network/interfaces

auto lo eth0
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet static
address 192.168.2.53
netmask 255.255.255.0
gateway 192.168.2.200


重启网络

service networking restart



Centos6.5的网络配置

修改配置文件vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
TYPE=Ethernet
UUID=cb65308d-d57e-4def-8bf4-4587771f2ce0
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=192.168.2.44
NETMASK=255.255.255.0
GATEWAY=192.168.2.200
PEERDNS=no
DNS1=114.114.114.114
DEFROUTE=yes
 IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"

网络重启

service network restart


0 0
原创粉丝点击