We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now


Network Programming with two network cards

sengkiat asked
Medium Priority
Last Modified: 2010-03-18
I am using a LINUX system and am trying to configure it to accept two network cards. They are both 3c509. I am using Redhat. Does anyone have experienced with this?

How do I do network programming such that I can choose
to access via whichever network card and send by another network card. Can the normal socket programming do this?

Please advise thanks.
Watch Question

Hmm since the cards are the same, it might bring up a conflict problem, that Linux is also a bit tricky when assigning IRQ's and stuff like that, i would suggest a small experiment on a small useless box...
even thoough i am afraid that the cards will use also the same memory blocks, eben i you succed making them wrk together, yoou might experience varioous and serious prblems with stacks...
sorry for the bad language...but i am posting from my "useless" box :) and this keyboard has certain problems with some keys...lolz ...hehe wonder why i failed login so many times...

I have a system with two net cards working well. One card sees the Internet by a router and the other sees my internal network. My linux box does the routing between the nets, using IP masquerade.

Well, I am using Slackware, not Red Hat. Anyway, you need to configure the cards to be different. I am using NE2000 clones with jumpers, maybe you need the config disks for your boards. I defined one to use IRQ 5, IO 300h and the other as IRQ 10, IO 340h.

Then I configured both cards to be detected at boot time, defining in the /etc/lilo.conf file:

append="ether=5,0x300,eth0 ether=10,0x340,eth1"

Then you need to adjust the rc.inet1 to have ifconfig commands for eth0 and eth1. Also you need to adjust your routes. I figured out looking in the NET-3 Howto.

Good luck.
Unlock this solution and get a sample of our free trial.
(No credit card required)

Ah by the way all of the info I just sent you can be found in the Ethernet-Howto at
www.linux.org       Under the support > howto tabs you see when you first connect. I believe it's under section 3 or 4 of the howto, entitled "Using Multiple Ethernet Cards". You can have a look if I confused you any.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.