We know that under Linux network card is called eth0, eth1, eth2 ....., all the network card configuration files are stored in / etc / sysconfig / network-script / under the file name is ifcfg-eth0, ifcfg-eth1 , ifcfg-eth2 .... to named. A card corresponding to a configuration file. If we give eth0 to configure two IP addresses, how are we to do?
1. Implementation of the "cp ifcfg-eth0 ifcfg-eth0: 1" to copy eth0 configuration file, the file name in the original file name added ": 1."
2. Editorial changes ifcfg-eth0: 1 in the appropriate fields, as follows:
以下为引用的内容: # VIA Technologies, Inc. VT6102 [Rhine-II]
DEVICE = eth0 / / Here is the equipment, need to modify a eht0: 1
BOOTPROTO = none
BROADCAST = 192.168.1.255 / / IP address, broadcast address, which corresponds can be
HWADDR = 00:14:2 A: 2D: 59:6 B / / NIC's Mac address, do not need to modify the
IPADDR = 192.168.1.17 / / IP address, change what you want
IPV6INIT = yes
IPV6_AUTOCONF = yes
NETMASK = 255.255.255.0 / / subnet mask, which corresponds can be
NETWORK = 192.168.1.0 / / network address, which corresponds can be
ONBOOT = yes
GATEWAY = 192.168.1.1 / / gateway address, the corresponding can
TYPE = Ethernet
PEERDNS = yes
USERCTL = no