• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 248
  • Last Modified:

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?
0
pointman
Asked:
pointman
1 Solution
 
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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
 
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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now