Networking Forums

Networking Forums > Computer Networking > Windows Networking > AddIPAddress

Reply
 
 
Betsy
Guest
Posts: n/a

 
      01-12-2006, 08:42 PM
I'm not sure if this is the correct forum and if not, I apologize but I'm
having a hard time finding a good fit for the question.

Our application adds an IP Address using the IP Helper function
AddIPAddress. In some cases, the address we add appears to be the used as the
default IP for the machine.

Does anyone know how a source IP is assigned for an application when
multiple IPs exist on the machine? For example, we have 192.168.15.104 and
add 192.168.15.200; we see when we start IE, it uses 192.168.15.200 as its
source address.

Is there any way to set priorities on the IP address so that applications
will grab a particular IP as the default ?
 
Reply With Quote
 
 
 
 
Ace Fekay [MVP]
Guest
Posts: n/a

 
      01-12-2006, 11:21 PM
In news:1E606A79-D27F-4BD7-A3EC-(E-Mail Removed),
Betsy <(E-Mail Removed)> stated, which I commented on below:
> I'm not sure if this is the correct forum and if not, I apologize but
> I'm having a hard time finding a good fit for the question.
>
> Our application adds an IP Address using the IP Helper function
> AddIPAddress. In some cases, the address we add appears to be the
> used as the default IP for the machine.
>
> Does anyone know how a source IP is assigned for an application when
> multiple IPs exist on the machine? For example, we have
> 192.168.15.104 and add 192.168.15.200; we see when we start IE, it
> uses 192.168.15.200 as its source address.
>
> Is there any way to set priorities on the IP address so that
> applications will grab a particular IP as the default ?


That is a function of two features: Round Robin and Subnet Mask
Priortization. Since both IPs are on the same subnet with the same machine,
that can be problematic. Only time to use two NICs on the same subnet is to
use NIC Teaming with the NIC manufacturer's driver tools. Unless you are
saying there are two physical machines with the same host name?

Either way, if the IPs are on the same subnet, and the querying client is on
the same subnet, Round Robin will kick in. DNS will alternate the responses
for each query coming in. Subnet Mask Priortization will give a response to
a client based on the closest subnet match, if no match, back to Round
Robin.

However, unfortunately you cannot force DNS to give a specific IP to a query
when there is more than one unless the client is on the same subnet and one
of the IPs match the client's subnet and the other doesn't.

--
Ace

This posting is provided "AS-IS" with no warranties or guarantees and
confers no rights.

If you are having difficulty in reading or finding responses to your post,
instead of the website you are using, if I may suggest to use OEx (Outlook
Express or any other newsreader of your choosing), and configure a newsgroup
account, pointing to news.microsoft.com. This is a direct link into the
Microsoft Public Newsgroups, and it is FREE and DOES NOT require a Usenet
account with your ISP. With OEx, you can easily find your post, track
threads, cross-post, and sort by date, poster's name, watched threads or
subject.

Not sure how? It's easy:
How to Configure OEx for Internet News
http://support.microsoft.com/?id=171164

Ace Fekay, MCSE 2003 & 2000, MCSA 2003 & 2000, MCSE+I, MCT, MVP
Microsoft MVP - Windows Server Directory Services
Microsoft Certified Trainer
Assimilation Imminent. Resistance is Futile.
Infinite Diversities in Infinite Combinations.
=================================


 
Reply With Quote
 
Betsy
Guest
Posts: n/a

 
      01-12-2006, 11:34 PM
Thank you for the reply but I don't think I made the problem clear.

I am interested in the application starting on the server with two IP and
how it chooses which IP it will attach to to send requests. I don't think DNS
should be involved with this. There is only one DNS entry for the host which
is the IP I would like for it to choose. The etc\hosts only has the correct
address. But I add an alias IP to the stack using the AddIPAddress call and
applications on the machine start using the alias IP to send requests instead
of the IP which the hostname resolves to and which is in the etc/hosts file.
 
Reply With Quote
 
Ace Fekay [MVP]
Guest
Posts: n/a

 
      01-13-2006, 12:33 AM
In news:A11080DC-F5DC-48BB-B6EF-(E-Mail Removed),
Betsy <(E-Mail Removed)> stated, which I commented on below:
> Thank you for the reply but I don't think I made the problem clear.
>
> I am interested in the application starting on the server with two IP
> and how it chooses which IP it will attach to to send requests. I
> don't think DNS should be involved with this. There is only one DNS
> entry for the host which is the IP I would like for it to choose. The
> etc\hosts only has the correct address. But I add an alias IP to the
> stack using the AddIPAddress call and applications on the machine
> start using the alias IP to send requests instead of the IP which the
> hostname resolves to and which is in the etc/hosts file.


I see. I am not familiar with scripting how to make that call, but I would
assume you would want to hardcode the IP you wnat in your code if it is
getting the wrong IP. I hope that makes sense and I understood you
correctly.

Ace


 
Reply With Quote
 
Betsy
Guest
Posts: n/a

 
      01-13-2006, 12:57 AM
Thanks. That would be a good solution if it were my application grabbing the
alias IP. I'm interesting in finding a way so that other applications do not
use the alias that I add via the AddIPAddress.


"Ace Fekay [MVP]" wrote:

> In news:A11080DC-F5DC-48BB-B6EF-(E-Mail Removed),
> Betsy <(E-Mail Removed)> stated, which I commented on below:
> > Thank you for the reply but I don't think I made the problem clear.
> >
> > I am interested in the application starting on the server with two IP
> > and how it chooses which IP it will attach to to send requests. I
> > don't think DNS should be involved with this. There is only one DNS
> > entry for the host which is the IP I would like for it to choose. The
> > etc\hosts only has the correct address. But I add an alias IP to the
> > stack using the AddIPAddress call and applications on the machine
> > start using the alias IP to send requests instead of the IP which the
> > hostname resolves to and which is in the etc/hosts file.

>
> I see. I am not familiar with scripting how to make that call, but I would
> assume you would want to hardcode the IP you wnat in your code if it is
> getting the wrong IP. I hope that makes sense and I understood you
> correctly.
>
> Ace
>
>
>

 
Reply With Quote
 
Ace Fekay [MVP]
Guest
Posts: n/a

 
      01-13-2006, 01:28 AM
In news:03E27751-7A85-4088-A4D0-(E-Mail Removed),
Betsy <(E-Mail Removed)> stated, which I commented on below:
> Thanks. That would be a good solution if it were my application
> grabbing the alias IP. I'm interesting in finding a way so that other
> applications do not use the alias that I add via the AddIPAddress.


If the host has the correct IP in DNS, can you specify to use the hostname
instead of the IP? This way the system resolver will resolve it.

Ace


 
Reply With Quote
 
Betsy
Guest
Posts: n/a

 
      01-13-2006, 01:02 PM
The applications starting on the machine are default applications such as IE.
Is there a setting to have applications use the IP that the hostname resolves
to ? Or a setting that will tell it to attach to a particular IP when the
machine has more than one IP assigned ?

"Ace Fekay [MVP]" wrote:

> In news:03E27751-7A85-4088-A4D0-(E-Mail Removed),
> Betsy <(E-Mail Removed)> stated, which I commented on below:
> > Thanks. That would be a good solution if it were my application
> > grabbing the alias IP. I'm interesting in finding a way so that other
> > applications do not use the alias that I add via the AddIPAddress.

>
> If the host has the correct IP in DNS, can you specify to use the hostname
> instead of the IP? This way the system resolver will resolve it.
>
> Ace
>
>
>

 
Reply With Quote
 
Ace Fekay [MVP]
Guest
Posts: n/a

 
      01-13-2006, 05:37 PM
In news:3C813B64-B4E7-4E70-A5DF-(E-Mail Removed),
Betsy <(E-Mail Removed)> stated, which I commented on below:
> The applications starting on the machine are default applications
> such as IE. Is there a setting to have applications use the IP that
> the hostname resolves to ? Or a setting that will tell it to attach
> to a particular IP when the machine has more than one IP assigned ?


Default apps such as IE?

I thought you were writing a specific app using the addIpAddress function?
Maybe I am not understanding what you are trying to accomplish.

IE and any other network enabled apps use the operating system's default
hostname resolver service. That's why I was suggesting to just let the
operating system's resolver service resolve it from DNS. You can also use a
hosts file. Keep in mind, hosts files are legacy and are administrative
overhead, since DNS is a central repository for hostnames anyway.

Ace


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




1 2 3 4 5 6 7 8 9 10 11