Suse linux dual-network card dual gateway Configuration

Source: Internet
Author: User

The company has an suse linux server that requires two networks and one CIDR block is 192, which is used to go to the OP Management Platform System. One is B network, and the network segment is 202, which is used for Internet access. We all know that it is impossible for a computer to have two gateways, because the default gateway can only be one. If the gateway and DNS are frequently switched to implement the Internet access and the OP Management Platform System, it will cause great inconvenience to the work, so I used a soft route to achieve dual-network card dual gateway to achieve simultaneous Internet access and OP Management Platform System.
The specific operations are as follows:
1. Edit the NIC configuration file:
Open the NIC configuration file in the vi editor and perform the following configuration:
(1)/etc/sysconfig/network/ifcfg-eth-id-68: b5: 99: 76: 83: a2 #192 network segment connection OP Management Platform System
DEVICE = "eth0"
BOOTPROTO = "no"
IPADDR = "192.168.192.10"
NETMASK = "255.255.255.0"
ONBOOT = "yes"
(2)/etc/sysconfig/network/ifcfg-eth-id-68: b5: 99: 76: 83: a4 #202 network segment connection to the Internet
DEVICE = "eth1"
BOOTPROTO = "no"
IPADDR = "202.106.128.204"
NETMASK = "255.255.255.255.248"
GATEWAY = "202.106.128.206"
ONBOOT = "yes"
2. The two gateways are 192.168.192.1 and 202.106.128.206, respectively.

Vi/etc/sysconfig/network/routes
Add a soft route:
192.168.192.0 192.168.192.1 255.255.255.0 eth0
Then wq is saved and exited.
Or directly enter the command
# Route add-net 192.168.192.0/24 gw 192.168.192.1 dev eth0

 
Always # rcnetwork restart (restart Network Service)
 
Then # netstat-rn to view the new route entries.


Now, you can access the Internet and the OP Management Platform!
Author: "dripping water and stone"

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.