Secondary IP addresses

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does anyone know if it is possible to setup a Windows 2003 server and use the
secondary IP address as the source IP for traffic initiated from the server?
By default, the server always sources traffic from the primary IP.

Thanks,
RJ
 
RJ said:
Does anyone know if it is possible to setup a Windows 2003 server and use the
secondary IP address as the source IP for traffic initiated from the server?
By default, the server always sources traffic from the primary IP.

How about the obvious, reorder the IP addresses or
NIC cards (or bindings.)
 
Thanks for the post.

I actually need to be able to source traffic from both IP addresses on the
same NIC.
 
RJ said:
Thanks for the post.

I actually need to be able to source traffic from both IP addresses on the
same NIC.

You can't. TCP/IP does not work that way. Traffic uses the Destination to
determine the proper route in the Routing Table,..the Routing Table then
determines the Nic it is sent from. There is no relationship between the
Nic that receives something and the Nic that replies,...that is considered
two separate communincation sessions.
 
Phillip Windell said:
You can't. TCP/IP does not work that way. Traffic uses the Destination to
determine the proper route in the Routing Table,..the Routing Table then
determines the Nic it is sent from. There is no relationship between the
Nic that receives something and the Nic that replies,...that is considered
two separate communincation sessions.


While I believe you are correct it is for the wrong
reason -- that is NOT how TCP/IP works it is just
how most service programmers use the default and
likely how AD etc will work (unless there is some
registry setting to affect the default which I doubt.)

When a programmer opens a socket, or sending or
receiving, that programmer can specify which IP
to use if the machine has more than one or that
programmer can just use the default which will likely
be the first one, one the first (bound) NIC.

I have heard even professional programmers claim
their service could not work this way due to IP
restrictions, but I have also written the code and it
is quite easy to override the defaults and you can
see this for yourself with many products like IIS
or many SMTP servers.

IIS can bind selectively to any IP address and so
should most SMTP servers (although some of these
are the ones where the programmers claimed they
couldn't do it.)
[/QUOTE]
 
Herb Martin said:
I have heard even professional programmers claim
their service could not work this way due to IP
restrictions, but I have also written the code and it
is quite easy to override the defaults and you can
see this for yourself with many products like IIS
or many SMTP servers.

IIS can bind selectively to any IP address and so
should most SMTP servers (although some of these
are the ones where the programmers claimed they
couldn't do it.)

I'm aware of applications like that. IIS being one as an example. But
that I don't think it applies in this particular post. Sometimes I include
this as an exception to the rule, sometimes I don't. But even with IIS,..you
may bind a particular site to a particular IP# and it will receive on that
very IP#, however the outbound packets will still go out the NIC that is
determined by the Routing Table and not the Nic or IP# that it received on.
So IIS is not even really an acception to the rule here either. Now if we
are talking about two IP#s on the same NIC, then I believe it will always
associate with the Default IP of the Nic when going outbound.

If Eth0 recieves a packet from the Internet, but Eth1 is the Nic associated
with the Default Gateway, then the reply to the incoming packet gets sent
out Eth1 unless there is a specified route in the Routing Table for that
destination that is associated with Eth0.
 
Thanks for all the posts.

My conclusion is that secondary IP addresses can only be used for inbound
packets. If you look at the routing table of the server, the secondary IP
addresses are associated with the loopback address for the gateway and
interface. Even when I tried to create a host route using a secondary IP
address, the gateway and interface took on the primary IP address.

I guess I would need 2 nics because you need to specify an interface for a
route and secondary IP addresses are virtual and do not show up as an
interface when looking at the routing table.

Then my only option is with 2 nics on the same subnet using the same def GW.
Do you think this will cause routing problems? I know Windows does not
really support multiple GWs.

BTW, this situation is in regards to needing 2 smtp servers to send outbound
packets. SMTP connectors are not an option due to Exchange organization
rules.

Thanks,
RJ
 
I'm aware of applications like that. IIS being one as an example. But
that I don't think it applies in this particular post.

Well it didn't orginally since AD, and the NetLogon/LDAP
services probably don't support the feature.

But it is NOT a limitation of IP.
very IP#, however the outbound packets will still go out the NIC that is
determined by the Routing Table and not the Nic or IP# that it received
on.

Yes, but that has nothing to do with what return address they
will have.
So IIS is not even really an acception to the rule here either. Now if we
are talking about two IP#s on the same NIC, then I believe it will always
associate with the Default IP of the Nic when going outbound.

Which NIC they leave is not related to the original question
or to the particular address at all.

What was being discussed was the use of an IP for the return
address and then the way IP works.

IP allows services to bind to any address they choose, but
when sent, the packets themselves will leave (or arrive) on
whatever NIC is most suitable based on routing rules.

The two are only marginally related.
 
RJ said:
Then my only option is with 2 nics on the same subnet using the same def
GW.

I don't think so.
Do you think this will cause routing problems?
Yes.

BTW, this situation is in regards to needing 2 smtp servers to send outbound
packets. SMTP connectors are not an option due to Exchange organization
rules.

Two servers in what way? Two physical machines? Two what?
 
Phillip Windell said:
GW.

I don't think so.

You are correct, it is not his only option but the
FIRST Default gateway on the FIRST NIC (and lowest
cost/priority number) will be used, if it is up/available.

There can only be one default gateway (active) at
any particular moment.

The Default Gateway is ACTUALLY the "router of
last resort" even though most books never tell you
that.

No, because only the first will be used. The second
will be irrelevant UNLESS the more suitable default
gateways are DOWN -- not responding at all.
Two servers in what way? Two physical machines? Two what?

I agree. I have multiple SMTP servers on a single machine
using/bound-to different IPs.

That works.
 
Phillip Windell said:
Fine.

What's the solution?

For his origianal problem, my suggestion of reording
the NICs does what he asked, but I am fairly sure he
really WANTS something else.
 
I guess I was not clear in my original post. It should have read like my
second post. Can windows source traffic from 2 IP different IP addresses
concurrently. I did not want to source traffic from a secondary IP address
without also sourcing traffic from a primary IP address as well.

I need one SMTP server to send outbound email to the Internet and one SMTP
server to send inbound email to a smarthost internally. I cannot use an SMTP
connector because the SMTP server will not forward to a smarthost for the
same domain that the SMTP server is part of in the Exchange Organization.

RJ
 
RJ said:
I guess I was not clear in my original post. It should have read like my
second post. Can windows source traffic from 2 IP different IP addresses
concurrently.

Sure. This is not a limitation of either Windows or IP.
I did not want to source traffic from a secondary IP address
without also sourcing traffic from a primary IP address as well.

I believe you indicate when you originally indicated the
Win2003 Server we assumed you meant the built-in services
like File, Print, or even AD.

These COULD do it but probably don't have the control
settings to manage it in practice.
I need one SMTP server to send outbound email to the Internet and one SMTP

Absolutely possible but it depends on the SMTP server
software in question to know whether it is possible or
easy with that particular server (SMTP software.)
server to send inbound email to a smarthost internally. I cannot use an SMTP
connector because the SMTP server will not forward to a smarthost for the
same domain that the SMTP server is part of in the Exchange Organization.

I don't personally use the built-in or IIS SMTP servers
must so you might ask someone in the IIS group or
Exchange group if you are using the MS Server.

My bet is there is a registry setting if not an easy
dialog box item.

My third party SMTP server does this easily - as
do many of them.
 
Back
Top