CentOS dual-Nic dual IP settings

Source: Internet
Author: User
CentOS dual-Nic dual-IP system environment: CentOS Linux network environment: two IP addresses, 192.168.0.10 and 10.10.30.2, mask 255.255.255.0, the two subnet gateway addresses are 192.168.0.1 and 10.10.30.1. 1. configure the IP address 192. 168 for the network adapter eth0... CentOS dual-Nic dual-IP system environment: CentOS Linux network environment: two IP addresses, 192.168.0.10 and 10.10.30.2, mask 255.255.255.0,
The gateway addresses of the two subnets are 192.168.0.1 and 10.10.30.1. 1. configure the IP address 192.168.0.10 for the Nic eth0 and configure the IP address 10.10.30.2 for the Nic eth1 configuration file:/etc/sysconfig/network-scripts/ifcfg-eth0/etc/sysconfig/network-scripts/ifcfg-eth1 2. set the default gateway to any one. This default gateway determines the interface used when the system takes the initiative to use the network. Configuration File:/etc/sysconfig/network 3. edit the route table www.2cto.com and modify/etc/iproute2/rt_tables. add the following content: 252 net2w.net3 #/etc/rc. local add original route return route ip route flush table net2ip route add default via 192.168.0.1 dev eth0 src 192.168.0.10 table net2ip rule add from 192.168.0.10 table net2ip route flush table net3ip route add default via 10.10.30.1 dev eth1 src 10.30.2 table net3ip rule add from 10.10.30.2 table net3 this article is from ChinaCache

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.