Debian is related to dual-ip binding for a single Nic
Source: Internet
Author: User
Debian is related to binding Dual ip addresses to a single NIC-Debian, a Linux release technology. For more information, see the following. From/shoushuai's studio
Recently, we need to create a server with the ip addresses of China Netcom and China Telecom respectively. This has caused a lot of problems and I am still familiar with it. Share with you. A single network card is bound to a dual ip address. Many practices are being reproduced on the Internet. No one tests the authenticity of the ip address, especially for children's shoes that are far away from the data center.
Procedure $ sudo vi/etc/network/interfaces
Auto lo eth0iface lo inet loopbackiface eth0 inet staticaddress 192.168.10.56netmask 255.255.254.1gateway 192.168.10.1
Auto eth0: 0 address 192.168.11.250netmask 255.255.254.0gateway 192.168.10.52
$ Sudo/etc/init. d/networking restart the network
It's just a practice circulating on the Internet, but I don't know if you have tested it. This doesn't work. The problem is eth0: 0. If one network card has two default gateways, data will not be forwarded, the specific principle should be clear about the ip routing process.
Therefore, the correct method is to remove the gateway in eth0: 0, and then add the gateway in the route. For how to add the gateway, please refer to my previous post. You can also use iptable to do this.
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