[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=08:00:27:E7:6B:2B
TYPE=Ethernet
BOOTPROT=static
IPADDR=192.168.1.10
GATEWAY=192.168.1.1
NETMASK=255.255.255.0
ONBOOT=yes
[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
HWADDR=08:00:27:13:9F:DB
TYPE=Ethernet
BOOTPROT=static
IPADDR=192.168.10.10
GATEWAY=192.168.10.1
NETMASK=255.255.255.0
ONBOOT=yes
参数说明
HWADDR是网卡的MAC地址
IPADDR是IPV4地址
NETMASK是子网掩码
GATEWAY是网关
修改配置信息后,需要重启网络
[root@localhost mysql-cluster-gpl-7.4.11]# service network restart
Shutting down interface eth1: Device state: 3 (disconnected)
[ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth1: Active connection state: activating
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/34
state: activated
Connection activated
[ OK ]
DEVICE=eth0
HWADDR=08:00:27:E7:6B:2B
TYPE=Ethernet
BOOTPROT=static
IPADDR=192.168.1.10
GATEWAY=192.168.1.1
NETMASK=255.255.255.0
ONBOOT=yes
[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
HWADDR=08:00:27:13:9F:DB
TYPE=Ethernet
BOOTPROT=static
IPADDR=192.168.10.10
GATEWAY=192.168.10.1
NETMASK=255.255.255.0
ONBOOT=yes
HWADDR是网卡的MAC地址
IPADDR是IPV4地址
NETMASK是子网掩码
GATEWAY是网关
修改配置信息后,需要重启网络
[root@localhost mysql-cluster-gpl-7.4.11]# service network restart
Shutting down interface eth1: Device state: 3 (disconnected)
[ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth1: Active connection state: activating
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/34
state: activated
Connection activated
[ OK ]
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26506993/viewspace-2102804/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/26506993/viewspace-2102804/