Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Enable Two network cards on CentOS 6.3

Posted on 2013-05-29
7
Medium Priority
?
641 Views
Last Modified: 2013-07-14
I have a server running on CentOS 6.3 which have two network cards. I gave network ID to first network card -

10.10.28.181
255.255.255.0
10.10.28.1

Second network card -

172.164.1.181
255.255.255.0
172.164.1.100

First network card is used for accessing internet on server and Second network card is used for my INTRA-NET environment which i use for my internal LAN.

Problem is that only one network card is active at a time. When i want to surf internet i have to make active first  network card and when i want to work on my local LAN i have to make active second network card.

I want to make both cards active so that computers on my local LAN can access my server even when i am surfing the internet on server.

Thanx in advance.
0
Comment
Question by:edreamers
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 21

Assisted Solution

by:Mazdajai
Mazdajai earned 668 total points
ID: 39205632
You can only have 1 default gateway in every server, most likely you would need to remove 172.164.1.100 on the second network card.
0
 
LVL 23

Accepted Solution

by:
savone earned 1332 total points
ID: 39205788
You can absolutely have both cards on at the same time, and they both can have gateway, but only one will work.

Can you post the output of the following commands:

cat /etc/sysconfig/network-scripts/ifcfg-eth*
0
 

Author Comment

by:edreamers
ID: 39212565
I attached the output of the above command Savone.
Untitled-1.doc
0
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 

Author Comment

by:edreamers
ID: 39212567
As suggested by Mazdajai i removed 172.164.1.100 from the second network card. but now it shows 0.0.0.0 in gateway address.
0
 

Author Comment

by:edreamers
ID: 39212568
I worked on many Windows Server before, but windows server allows to add two different gateways and both network cards works simultaneously on two different networks. But in Linux I don't know who to achieve this.
0
 
LVL 23

Assisted Solution

by:savone
savone earned 1332 total points
ID: 39212866
Ok so you have both gateways configured.  Here is the issue I think you are having.

The default gateway is the way out onto the network for the system.  You can ONLY have one DEFAULT on any computer that I know of.  Think about your default settings for any program.  Would it make sense to have two default settings?  How would it know which one to "default" to?  The word itself implies there will be only one or one set.

So here is what I am thinking, please correct me if I am wrong.

You surf the internet from the server on the 172. address.  When people connect from the  10. network they do not receive a response because the Linux server sends the information out on the "default gateway" which is to the wrong network.

What you need is called "source routing".  This means if traffic comes in on the 10. network it will go back out to the 10. network.  If it comes in from the 172. network, it will go out to the 172. network.

I hope I explained this effectively.

You can find an easy explanation on how to set this up here (look at the first answer):

http://unix.stackexchange.com/questions/22770/two-interfaces-two-addresses-two-gateways


You can read more about it here:

http://tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.rpdb.multiple-links.html
0
 

Author Comment

by:edreamers
ID: 39324313
I tried a lot but not able to succeed. So I am migrating to Windows Platform. Thanx everyone for their support.
0

Featured Post

Cyber Threats to Small Businesses (Part 2)

The evolving cybersecurity landscape presents SMBs with a host of new threats to their clients, their data, and their bottom line. In part 2 of this blog series, learn three quick processes Webroot’s CISO, Gary Hayslip, recommends to help small businesses beat modern threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Outsource Your Fax Infrastructure to the Cloud (And come out looking like an IT Hero!) Relative to the many demands on today’s IT teams, spending capital, time and resources to maintain physical fax servers and infrastructure is not a high priority.
PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses

662 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question