Add multiple IPs in Linux

Source: Internet
Author: User

1. View Linux native IP

2. Execute at the command line:

Ifconfig eth0:0 192.168.0.1 netmask 255.255.255.0 up

Eth0 indicates the NIC name

Eth0:0 in the back of the 0, is to represent the number of newly added IP, such as 0,1,2,3

192.168.0.1 is the newly added IP address

Up indicates immediate activation

Note: After this setting, the restart will fail

3. Methods of non-invalidation

The command: Ifconfig eth0:0 192.168.0.1 netmask 255.255.255.0 up joins to file

/etc/rc.d/rc.local

4. Method of removing an IP

Ifconfig eth0:0 Down

5. The second method adds an IP to Linux

Add multiple IPs in Linux

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.