How Linux configures multiple IP addresses

Source: Internet
Author: User

Windows system to implement a single NIC to bind multiple IP is very easy to do! However, Linxu system can also be a single NIC binding multiple IP can be implemented? If implemented, is it difficult to operate?

Recent WHIM research pull down! The finishing configuration process is as follows:

Configuration steps:

1, run ifconfig add a ip:192.168.10.22

Command format:: Ifconfig+eth0:x + ip+netmask (subnet mask)

Ifconfig eth0:0 192.168.10.22 netmask 255.255.255.0

Note: If you want to add more, X plus 1 is OK, can support up to 255.

2, in the #cet/sysconfig/network-scripts directory to establish a corresponding eth0:0 directory and modify the relevant data can be.

Here we can use the CP command to do this operation

CP Ifcfg-eth0 ifcfg-eth0:0

Modify the device name, and the IP corresponds to it. Here is a configuration file that I have modified, which I can refer to, red as the modified part.

device=eth0:0

Bootproto=static
broadcast=192.168.1.255
Hwaddr=00:00:12:62:45:16
ipaddr=192.168.1.22
netmask=255.255.255.0
network=192.168.1.0
Onboot=yes
Type=ethernet

3. Re-entry into force

This article quotes from: Wind network http://www.ithov.com

Reprint please keep the original link: http://www.ithov.com/linux/93251.shtml

C1972cht

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.