RedHat Enterprise IP Address Management

Source: Internet
Author: User
In RedHatLinux, how does one configure multiple IP addresses for the next Nic? The network configuration of the graphic interface under RedHatLinux cannot be found where the second IP address is configured. If an IP address is temporarily added (lost after restart), you can use the ifconfig command. You can use the manifconfig command to view ifconfig usage. The most common command for configuring ip addresses for NICS is # ifconfigeth0192.168.0.1netmask1_255.255.0u.

In RedHat Linux, how does one configure multiple IP addresses for the next Nic? The network configuration of the graphic interface under RedHat Linux cannot be found where to configure the second IP address.
If an IP address is temporarily added (lost after restart), you can use the ifconfig command. You can use man ifconfig to view ifconfig usage. The most common command for configuring ip addresses for NICS is
# Ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up
Note:
Eth0 is the first Nic, and the others are eth1, eth *
192.168.0.1 is the IP address configured for the first Nic
Netmask 255.255.255.255.0 is configured with a subnet mask.
Up indicates immediate activation.
How can I configure multiple IP addresses for eth0 for a single Nic? If I use the ifconfig command, only eth0 needs to be changed. I checked some information and understood how to change eth0 to eth0: x (x is 0-255, for example, eth0: 0 or eth0: 1). eth0: x is called a virtual network interface and is built on the network excuse (eth0.
Therefore, you can use the following command to configure multiple ip addresses for a single NIC:
# Ifconfig eth0: 0 192.168.0.1 netmask 255.255.255.0 up
# Ifconfig eth0: 1 192.168.0.2 netmask 255.255.255.0 up
# Ping 192.168.0.1
# Ping 192.168.0.2
After the ping test is passed, the function of configuring multiple ip addresses for a single Nic is completed. After reboot, the IP address is changed.
Therefore, you must set the auto-enable IP settings when starting the instance.
First:
Add the above command ifconfig to rc. local.
Second:
Is modeled like/etc/sysconfig/network-scripts/ifcfg-eth0 Add a file named according to the name of the network Virtual Interface
For example, ifcfg-eth0: 0 or ifcfg-eth0: 1 and so on
# Below to see the ifcfg-eth0: 0 file configuration information
DEVICE = eth0: 0 # Network Virtual Interface eth0: 0
ONBOOT = yes # activated at startup
BOOTPROTO = static # use a static IP Address
IPADDR = 192.168.0.1 # assign an IP address
NETMASK = 255.255.255.0 # Subnet Mask
Other configuration files are similar.
Restart NETWORK SERVICE
# Service network restart
Ping test. The configuration is successful.

How can I disable an ip address?
# Ifconfig eth * [: x] down (* indicates the network card number, and x indicates the Virtual Interface number 0-255)

Tip: It is said that there is a netconfig, which is not found in RedHat Enterprise 5.
Tip: the network configuration of the graphic interface under RedHat linux cannot be found where to configure the second IP address.
This statement is incorrect. You can use a copy Nic to configure the second IP address. However, an error occurred while doing so!
The graphic interface is not easy to understand. You need to try several times to understand the correspondence between the graphic and text configuration.

Related Article

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.