Change the IP address (#setup)
1. Input Vi/etc/sysconfig/network-scripts/ifcfg-eth0
2, the contents of the inside of the revision changed to
hwaddr=fc:4d:d4:2e:af:31
type= Ethernet
uuid= ad8ede6c-2e68-441c-8d8b-8e760fe38305
Onboot=yes
nm_controlled=yes
netmask=255.255.252.0
ipaddr= 10.10.3.95
gateway=10.10.0.1
Network restart
/etc/init.d/network restart
OK----ifconfig to see it.
Ifup eth0
Ifdown eth0
------------------------------------------------
Change DNS
1, vi/etc/resolv.conf
2. Input
NameServer 8.8.8.8
NameServer 1.2.4.8
VM cloning, eth0 into eth1 processing
Cause Analysis:
Many Linux distribution use Udev to dynamically manage device files and name them based on the device's information. For example, in
In Debian Etch, Udev identifies the network card during system boot, and the MAC address and network card name are recorded in Udev's rules
The script. VMware automatically generates the MAC address of the virtual machine. As a result, the virtual machine for the base system has recorded the virtual machine's network
The MAC address of the card corresponds to the NIC Eth0, and the MAC address changes in the cloned virtual machine, and Udev automatically corresponds the Mac to the network
Card eth1. And so on, Udev records the relationship of all identified Mac and Nic names, so each clone of the NIC name is automatically added 1.
In fact, the kernel only recognized a network card, and NIC name-related configuration has not changed any
Workaround:
1, Vi/etc/udev/rules.d/70-persistent-net.rules
Delete the line associated with Name= "Eth0″, and then change which line of eth1 corresponds to" Eth1″ to "Eth0″.
2, cp/etc/sysconfig/networking/devices/ifcfg-eth0/etc/sysconfig/network-scripts/
3. Service Network restart
LINUXIP address, network card related