1830165 Members
2371 Online
109999 Solutions
New Discussion

Multiple IP problem

 
Ryan Ma
Frequent Advisor

Multiple IP problem

I have a machine planned to run two Oracle Web instance. There are some problems which make me confuse.

1. Is there any problem to set two IP in the same subnet in one HP box? I have two network cards and I want to set one IP on each.

2. How can I force the network card to response its own connection? It seems only one network card will send for all outgoing traffic.

3. I want to set two host name on these two IP. If I send mail outside, I want the destination know the mail which host the mail comes from. Can it be set and how?
9 REPLIES 9
harry d brown jr
Honored Contributor

Re: Multiple IP problem

You can have two IP's on the same subnet, but you will have to use static routing to force a connection between points. You should also define a default route.

live free or die
harry
Live Free or Die
Ryan Ma
Frequent Advisor

Re: Multiple IP problem

Harry,

I am not clear about what you mean on static route. One of the application using two IP is web sevice.

Ryan
harry d brown jr
Honored Contributor

Re: Multiple IP problem

A static route is one you have to PRE-Define using:

route add IP gateway

but you need to add them permanently to your network files.

Go to the bottom of this document for static routes and page up a few:

http://www.wagoneers.com/UNIX/HP-UX/hp-techtips-00nov14.txt


live free or die
harry
Live Free or Die
Ryan Ma
Frequent Advisor

Re: Multiple IP problem

Adding a static route can force the routing path of a IP but it does not solve my problem.

Let me give an example.
HostA and HostB are in the same machine with different IP.

How can I send mail to internet using different hostname?

I would like the receiver get this differently:

From: root@HostA
....

From: root@HostB
....
John Waller
Esteemed Contributor

Re: Multiple IP problem

Unless I am mistaken the hostname shown by the sender of the email,will be the same given by the hostname command. Even though you are using 2 networks cards and IP addresses, the sendmail daemon will only know itself by one name (hostname). All you are doing with the second host name is creating a type of alias for your system.
Ryan Ma
Frequent Advisor

Re: Multiple IP problem

Then how can a HP box running two instance of web services such as Oracle? Traffice should be clearly seperated especially you are using Firewall in your environment.


I have just found a document in HP.
It state that HP just does not currently support two interfaces in the same subnet.

http://us-support.external.hp.com/cki/bin/doc.pl/sid=296ccf2218f5cccd0f/screen=ckiDisplayDocument?docId=200000048086687
Ryan Ma
Frequent Advisor

Re: Multiple IP problem

Claude Leduc
Occasional Contributor

Re: Multiple IP problem

This should do the trick for your interface problem, but you won't be able to give 2 host name to the same machine even if you have 2 nics... At my knowledge the machine is only able to get 1 hostname as stated by the hostname command...For email issue, you can assign multiple domain from which you send just look into it... Don't confuse hostname with domain...
Christopher Caldwell
Honored Contributor

Re: Multiple IP problem

From mail's perspective, the outbound "From address" is configurable in sendmail and/or your mail client (e.g. Eudora if you're using POP3).

I'd imagine that clients like elm use the base hostname of the machine to set the from address, given that the address isn't coerced by sendmail.

To coerce the address in sendmail, start with the DM macro in /etc/mail/sendmail.cf

You can command-line coerce the "From address" using the -r (reply-to) option of mailx -

cat mymessage | mailx -r you@yourdomain.com me@mydomain.com