backgroundFor some customers working on video and website business scenarios, some machines will have too much traffic, causing the single network card to be fully utilized. Therefore, multiple network cards need to be configured, and each network card is configured with a public IP address. Generally speaking, eth0 is configured with a public IP, and eth1 is configured with a public IP + an intranet IP. Statement: Since the business needs to bind dual network cards, and the first network card also has an ipv6 address, the centos8 system can be configured using the nmcli command line; centos6 and 7 are incompatible due to version bugs and are processed using configuration files. Network topology diagram:1. CentOS 8 system01 View the connected network card information 02Delete all configurations(Note that the network will be disconnected here, so operate on the two network cards separately, or operate on the remote console) Note: Confirm which network card is bound to the OSS external network address on the cloud. If it is the first network card, it is recommended to delete the second network card first. After the second network card is successfully bound, you can log in remotely and delete the next network card. 03 Create two new network cards, of which network card 2 contains two IP(ipv4) Note: The network card names before and after ifname are different. Do not make a mistake. Use the command ip a to check the specific network card information before operation according to the actual situation. 04Add routing table and corresponding policy routing to network card 2(+ means adding new configuration, - means reducing configuration, and no sign means replacement) Note: table 100 here refers to the (table_id) routing table. If not specified, it will be added to the default routing table. 05 Load Configuration 06Reactivate the corresponding network card 07 View the default routing information 08 View the routing information of routing table 100 09 View policy routing information 10Configure the ipv6 address of the first network card 11Restart network card 1 12 Test whether the ipv6 address is effective 2. CentOS 6 and 7 systemsIntranet IP: 192.168.xxx Intranet gateway: 192.168.xxx.1 Public network IP: 15.xxx Public network subnet: 255.255.255.192 Public network gateway: 15.xxx 01Configure multiple ip addresses for eth1, public network + intranet ip address (ipv4) 02Configure routing (ipv4) 03Configure routing policy (ipv4) 04eth0 network card adds IPv6 configuration 05Configure eth0 ipv6 routing 06 Close NetworkManager and restart the networkBecause there is a bug in the default gateway 0.0.0.0/0 address configured using the nmcli command in centos6 and 7 systems and centos8 systems, and the /0 mask is not supported, NetworkManager is turned off and network is used. 07Test whether the network card configuration is effective ConclusionThe advantages of multiple public IP addresses mainly include: Improved network security: Multiple public IPs can allow different network devices to use different public IPs, thereby enhancing network security and preventing hacker attacks and network intrusions. Ensure business continuity: Especially in business scenarios such as websites or videos, multiple public IP addresses can greatly avoid the situation when a certain IP fails. You can use the backup public IP address to ensure business continuity. Improve network quality: Multiple public IP addresses can more fully distribute network traffic, thereby reducing network congestion and improving users' viewing experience. Easy to manage: Resources can be allocated and managed according to different business needs. For example, IP1 is used for video services and IP2 is used for audio services. This also facilitates subsequent monitoring and maintenance by operation and maintenance personnel. |
<<: It will take time for 5G cross-network roaming to become popular
>>: Want to save power on your 5G phone? Wake it up first!
Hello everyone, I am Xiao Jiang. The previous art...
We live in an era of fast-paced digital transform...
GreenCloudVPS released an email about its 8th ann...
According to the established plan, the three majo...
Challenges facing smart cities When designing a s...
Today, as demand for colocation and wholesale dat...
In this section, Rui Ge will continue to show you...
As the fifth generation of mobile communication n...
[Shenzhen, China, July 30, 2020] The 2020 Win-Win...
LOCVPS has added a new data center product in Eur...
On the eve of the Dragon Boat Festival, the Minis...
[51CTO.com original article] At the just conclude...
The implementation of 5G technology will bring th...
On August 2, the 2017 Xiaoyu Yilian E=mc² new pro...
This article is reprinted from the WeChat public ...