Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure suse linux dual network card and dual gateway

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

How to configure suse linux dual network card and dual gateway? in view of this problem, this article introduces the corresponding analysis and answer in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.

The company has a SUSE LINUX server that needs two networks, one of which is 192, which is used on the OP management platform system. One is the B network, the network segment is 202, which is used to access the external network. We all know that it is impossible for a computer to have two gateways, because the default gateway (default gateway) can only be one. If we frequently switch gateways and DNS to access the Internet and OP management platform system, it will bring great inconvenience to the work, so I use soft routing to achieve dual network cards and double gateways to achieve simultaneous access to the Internet and OP management platform system.

Let's look at the specific operations:

1. Edit the configuration file of the network card:

Open the Nic configuration file with an editor such as vi, and configure it as follows:

(1) / etc/sysconfig/network/ifcfg-eth-id-68:b5:99:76:83:a2 # 192 network segment connecting 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 # 202network segment connects to the external network

DEVICE= "eth2"

BOOTPROTO= "no"

IPADDR= "202.106.128.204"

NETMASK= "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 saves and exits.

Or enter the command directly.

# route add-net 192.168.192.0Universe 24 gw 192.168.192.1 dev eth0

Finally, you need # rcnetwork restart (restart the network service)

Then # netstat-rn to see the new route entries.

The answer to the question about how to configure suse linux dual network card and dual gateway is shared here. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report