How to modify the MAC address in linux

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.