RedHat6网络配置

RedHat6网络配置

1)配置IP

编辑/etc/sysconfig/network-scripts/ifcfg-eth0(不同的网卡为ifcfg-eth?)

a)静态IP

  1. DEVICE=eth0

  2. HWADDR=00:0C:29:F3:13:87

  3. TYPE=Ethernet

  4. UUID=24b0bad9-c606-4498-a03a-65afa7d5ce63

  5. ONBOOT=yes

  6. NM_CONTROLLED=yes

  7. BOOTPROTO=static

  8. IPADDR=192.168.1.150

  9. NETMASK=255.255.255.0

  10. NETWORK=192.168.1.150

  11. GATEWAY=192.168.1.1

  12. DNS=xxx.xxx.xxx.xxx


b)动态IP

  1. DEVICE=eth0

  2. HWADDR=00:0C:29:F3:13:87

  3. TYPE=Ethernet

  4. UUID=24b0bad9-c606-4498-a03a-65afa7d5ce63

  5. ONBOOT=yes

  6. NM_CONTROLLED=yes

  7. BOOTPROTO=dbcp



2)重启IP服务

service network restart

你可能感兴趣的:(RedHat6网络配置)