Linux certification guide: RHEL Nic binding multiple IP addresses

Source: Internet
Author: User
In the lab, because the internal lan has the IP address of the network segment 192.168.1.0, if you want to connect to the Internet, you need to change the IP address to the network segment 172.16.20.0. The network segment 192.168.1.0 can access the instructor's FTP, 172.16.20.0 can access the Internet. I need to use both CIDR blocks. It is very troublesome to set them. Therefore, bind the NIC to multiple IP addresses. In RHEL, there are two ways to bind multiple IP addresses. One is to manually add one IP address at a time, and the other is to add multiple IP addresses at a time.

In the lab, because the internal lan has the IP address of the network segment 192.168.1.0, if you want to connect to the Internet, you need to change the IP address to the network segment 172.16.20.0. The network segment 192.168.1.0 can access the instructor's FTP, 172.16.20.0 can access the Internet.

I need to use both CIDR blocks. It is very troublesome to set them. Therefore, bind the NIC to multiple IP addresses.

In RHEL, there are two ways to bind multiple IP addresses. One is to manually add one IP address at a time, and the other is to add multiple IP addresses at a time.

First, let's talk about the first one:

My habit is to explain everything:

[Root @ localhost network-scripts] # vi ifcfg-eth0: 0

Change the DEVICE to the eth0: 0 IP address.

In this way, you can use two IP addresses at the same time.

If you need more than two IP addresses, creating a ifcfg-eth0 one by one: x Files is troublesome. RHEL provides the batch addition method:

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.