centos6.5,新服务器,修改网卡配置文件,重启网卡服务。
-
[root@localhost home]# ifconfig
-
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:16436 Metric:1
-
RX packets:52 errors:0 dropped:0 overruns:0 frame:0
-
TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
-
collisions:0 txqueuelen:0
-
RX bytes:4898 (4.7 KiB) TX bytes:4898 (4.7 KiB)
-
[root@localhost network-scripts]# l ifcfg*
-rw-r--r--. 1 root root 201 Mar 3 20:30 ifcfg-eth0
-rw-r--r--. 1 root root 136 Nov 26 2014 ifcfg-eth1
-rw-r--r--. 1 root root 254 Oct 10 2013 ifcfg-lo
-
[root@localhost network-scripts]# cat ifcfg-eth1
DEVICE=eth1
HWADDR=00:15:17:A3:61:FD
TYPE=Ethernet
UUID=42369607-7d32-413d-be2b-df6b1cb13ee5
ONBOOT=no
NM_CONTROLLED=yes
BOOTPROTO=dhcp
[root@localhost network-scripts]# cat ifcfg-eth0
DEVICE=eth0
HWADDR=00:15:17:A3:61:FC
TYPE=Ethernet
UUID=f5a525ab-86d0-4b27-bc98-da301bfe3ca6
ONBOOT=yes
NM_CONTROLLED=yes
IPADDR=192.168.1.50
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
BOOTPROTO=static
-
[root@localhost network-scripts]# service network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: Determining if ip address 192.168.1.50 is already in use for device eth0...
[ OK ]
阅读(902) | 评论(0) | 转发(0) |