Article Title: how to modify the MAC address in linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
I. how to modify the MAC address
In linux:
Required
# Ifconfig eth0 down
Disable the Nic first
Use ifconfig eth0 hw ether 1234567890ab
In this way, the change is successful.
To change it permanently, follow these steps:
Add these three sentences to/etc/rc. d/rc. local (you can also add the following three lines to/etc/init. d/network)
Ifconfig eth0 down
Ifconfig eth0 hw ether 1234567890ab
Ifconfig eht0 up
II. how to modify an IP address
# Ifconfig ethe0 down
# Ifconfig ethe0 192.168.169.245 netmask 255.255.255.0
The preceding method is invalid at next startup.
If it will take effect in the future, add it to the following file
Modify the ifcfg-eth0 address under/etc/sysconfig/network-scripts/
3. add two IP addresses to a network card
Ifconfig eth0: 1 192.168.1.1 netmask 255.255.255.0
Ifconfig eth0: 2 192.168.1.2 netmask 255.255.255.0
The preceding method modifies two IP addresses for the network adapter eth0.
SOURCE address http://www.xici.net/main.asp? Url =/u12820200/d59097342.htm