CentOS 6.3 first install network configuration 1, modify static network configuration Java code [root @ David server ~] # Vim/etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE = "eth0" www.2cto.com BOOTPROTO = "static" HWADDR = "00: 0C: 29: 99: 5A: 3C "NM_CONTROLLED =" yes "ONBOOT =" yes "TYPE =" Ethernet "UUID =" yellow "IPADDR =" 8.0.0.10 "BROADCAST =" 8.0.0.255 "NETMASK =" 255.255.255.0 "NETWORK =" 8.0.0.0 "GATEWAY =" 8.0.0.1 "IPV6INIT =" no "IPV6_AUTOCONF =" no "simplify Java code configuration [root @ David server ~] # Vim/etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE = "eth0" www.2cto.com BOOTPROTO = "static" ONBOOT = "yes" TYPE = "Ethernet" IPADDR = "8.0.0.11" BROADCAST = "8.0.0.255" NETMASK = "255.255.255.0" NETWORK = "8.0.0.0" GATEWAY = "8.0.0.1" 255.6init = "no" 255.6_autoconf = "no" 2, modify DNS Service Java code [root @ David server ~] # Vim/etc/resolv. conf nameserver 8.0.0.1 3, restart the NIC Java code [root @ David server ~] # Service network restart Shutting down interface eth0: [OK] Shutting down loopback interface: [OK] Bringing up loopback interface: [OK] Bringing up interface eth0: [OK] output the above information, or
Java code [root @ David server ~] # Ifdown eth0; ifup eth0 www.2cto.com is also OK 4. Configure the Java code for dual Nic [root @ David server ~] # Vim/etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE = "eth1" BOOTPROTO = "static" ONBOOT = "yes" TYPE = "Ethernet" IPADDR = "192.168.0.10" BROADCAST =" 192.168.0.255 "NETMASK =" 255.255.0.0 "NETWORK =" 192.168.0.0"