Suselinux dual-Nic dual-gateway configuration

Source: Internet
Author: User
The company has a SUSELINUX server that requires two networks and one network segment 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 only...

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"

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.