binding Ports to ethx

I currently have 2 network cards in my server, and would like to use both of them.  How do i tell an application or port to use a specific ethx device?
pointmanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jeffa072897Commented:
I'm not sure if this will help you, but a couple of hints/suggestions.
Does your application have to know the exact device it wants or is it intelligent to
know by a specific IP address which each card will have?
If your app is one you developed that you should be albe to reference eth0 and eth1 in the
app (sorry, I'm not a programmer). Which ethernet is which should be constant if you set the startup scripts up.
I've used two cards several times and when I want an app to go out a specific port I've
just specified the destination.

0
pointmanAuthor Commented:
No, it doens't ask which eth device to goto, yes thw Eth device will have a seperate IP, not sure if the program can be told what IP to use(still trying to get that info from the Programmer.)  I'll keep looking into it..  thanks
0
ahoffmannCommented:
You don't need to tell an "application" which NIC to use.
The network drivers (TCP/IP, IPX/SPX, etc.) and related programs, deamons, services (or however it's called by the OS) will do it automatically (of cause depending on their configuration).
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

pointmanAuthor Commented:
Ahoffmann:  that is a statement that i already know, what i am asking is How do (ask, tell, or get) a program to use a specific ethx device.  All daemons/servers are useing the default eth device (usually Eth0) i'm trying to do this without running a kernel level script.  
0
ahoffmannCommented:
Hmm, you want to know "who" sets up you ether device?
This is done by ifconfig, look at the boot scripts in /etc/rc.d/*, depending on your linux distribution it's more or less readable.
The second thing is route, which sets up the routing table and automatically detects the ethx device to be used according to the destination IP address. You may display this info with:
  netstat -rn

Is this what you want to know?
0
alexbikCommented:
Hi,

You can't tell an application to use one of your ehternet cards. The cards are (along with PPP connections and other network interfaces) handled by the kernel. An application oly 'sees' a network, not the devices used to connect to it. Ofcourse, you can tell (some) applications to only listen to one specific IP address, but you don't have any control over outgoing datagrams from your application. Which packets are routed to which NIC is determined only by the routing table.

Alex.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pointmanAuthor Commented:
Thank you, Im the one who built the machine. I set up everything on it,  I just don't have the time to work the problem right now and i needed the answer so i don't fall behind deadline.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.