MX record & resolving server name

  • Thread starter Thread starter AndyMac
  • Start date Start date
A

AndyMac

Hi,

I have a remote site (couple of Win2K Pro machines, a Win2K Server running
DNS) that connects to our local site through a VPN. Our local site runs
Exchange2K (this machine has 4 IPs - .1 .2 .3 & .4 - , Exchange listens on 1
of them - .3 - ) on Win2K Server for email access. Since yesterday, our
remote site is having problems picking up mail.

There is an MX record on our remote Win2K Server which points to
mail.ourdomain.com. DNS on that server resolves "mail" to the correct 4 ip
addresses. What seems to be happening is that DNS is serving these IP
address to the Win2K Pro machines which are using the first address in the
list when trying to pick up mail. This address list appears to be being
served randomly, if I flushdns on the clients and lookup "mail" again they
get the list in a different order. As long as the list they receive has .3
listed first they can pick up their mail. If it appears at any other
position on the list then they are timing out when Outlook is opened.

Is there a way around this other then removing the three other IP addresses
from DNS? I'm new to DNS so I'm maybe missing something really simple.

Thanks,

AndyMac.
 
Not sure why you need an MX record for your internal DNS at all. As long as
the users can resolve the server name to the correct internal IP address,
that's all they should need to connect to your HQ's Exchange server using
Outlook. Or am I misunderstanding your question? In brief, MX records are
used when a sending server needs to find out the host names of mail servers
based on a domain name. Even if your remote users use POP, it isn't
necessary internally. Your domain's *public* DNS should have an MX record so
that sending servers on the Internet can find the correct server for your
domain's mail.
 
OK, that makes sense.

Taking the MX record out of the equation then. Outlook's configured to
retrieve email from a server called "mail". The client machine queries DNS
on our remote site for the IP address for this server and is returned all 4
ip addresses. It then attempt to connect to the server using the first IP
address it received - which isn't necessarily the correct one.

This means my question now becomes; in the forward lookup zones in DNS I
have 4 entries for the same server (mail) which point to 4 different IP
addresses. All 4 of these addresses are returned to a client that queries
DNS to resolve "mail" to an IP address for picking up email. Is there a way
I can set one of these host entries as a Primary entry for that hostname?

AndyMac.





"Lanwench [MVP - Exchange]"
 
In
AndyMac said:
OK, that makes sense.

Taking the MX record out of the equation then. Outlook's configured
to retrieve email from a server called "mail". The client machine
queries DNS on our remote site for the IP address for this server and
is returned all 4 ip addresses. It then attempt to connect to the
server using the first IP address it received - which isn't
necessarily the correct one.

This means my question now becomes; in the forward lookup zones in
DNS I have 4 entries for the same server (mail) which point to 4
different IP addresses. All 4 of these addresses are returned to a
client that queries DNS to resolve "mail" to an IP address for
picking up email. Is there a way I can set one of these host entries
as a Primary entry for that hostname?

AndyMac.





"Lanwench [MVP - Exchange]"
Not sure why you need an MX record for your internal DNS at all. As
long as the users can resolve the server name to the correct
internal IP address, that's all they should need to connect to your
HQ's Exchange server using Outlook. Or am I misunderstanding your
question? In brief, MX records are used when a sending server needs
to find out the host names of mail servers based on a domain name.
Even if your remote users use POP, it isn't necessary internally.
Your domain's *public* DNS should have an MX record so that sending
servers on the Internet can find the correct server for your
domain's mail.

No, you can't not by the host record. YYou're dealing with Round Robin
there. The DNS server will present the client the 4 possible answers and the
client chooses one. However, you can change the priority on the MX records.
The lower priority will be chosen first. Pick the one you want it to use
first, change the priority to 5 and leave the other 3 defaulted to 10.

--
Regards,
Ace

Please direct all replies to the newsgroup so all can benefit.
This posting is provided "AS-IS" with no warranties and confers no
rights.

Ace Fekay, MCSE 2000, MCSE+I, MCSA, MCT, MVP
Microsoft Windows MVP - Active Directory

HAM AND EGGS: A day's work for a chicken; A lifetime commitment for a
pig. --
=================================
 
A> Outlook's configured to retrieve email from a server called
A> "mail". The client machine queries DNS on our remote site
A> for the IP address for this server and is returned all 4 ip
A> addresses. It then attempt to connect to the server using
A> the first IP address it received - which isn't necessarily
A> the correct one

Then modify the list of IP addresses that that rôle domain name maps to so
that it contains _only_ correct ones. (Yes, it really is this simple.)
 
Hi,

You're slightly missing my point. I only have one MX record in DNS but four
ip addresses for the hostname that MX record points to. I didn't think you
could prioritise these but I found a forum posting on the net from someone
who claimed that you could.

Thanks,

AndyMac.
 
You're slightly missing my point. I only have one MX record in DNS but
four
ip addresses for the hostname that MX record points to. I didn't think you
could prioritise these but I found a forum posting on the net from someone
who claimed that you could.

Well... create four A records for the different IP addresses
e.g. mx1, mx2, mx3 and mx4, then add four MX records for
your domain pointing each one to one of the above A recs
and giving to each MX a different preference number e.g.
10, 20, 30 and 40, this way you'll be able to prioritize traffic
to the different mail servers
 
In
ObiWan said:
Well... create four A records for the different IP addresses
e.g. mx1, mx2, mx3 and mx4, then add four MX records for
your domain pointing each one to one of the above A recs
and giving to each MX a different preference number e.g.
10, 20, 30 and 40, this way you'll be able to prioritize traffic
to the different mail servers


I agree ! Easiest way to do it with mutliple MXs. Curious what site the
poster is talking about?

--
Regards,
Ace

Please direct all replies to the newsgroup so all can benefit.
This posting is provided "AS-IS" with no warranties and confers no
rights.

Ace Fekay, MCSE 2000, MCSE+I, MCSA, MCT, MVP
Microsoft Windows MVP - Active Directory

HAM AND EGGS: A day's work for a chicken; A lifetime commitment for a
pig. --
=================================
 
Well... create four A records for the different IP addresses
e.g. mx1, mx2, mx3 and mx4, then add four MX records for
your domain pointing each one to one of the above A recs
and giving to each MX a different preference number e.g.
10, 20, 30 and 40, this way you'll be able to prioritize traffic
to the different mail servers

If I'm understanding this correctly you're suggesting A records such as:

mx1.mydomain.com -> 10.0.0.1
mx2.mydomain.com -> 10.0.0.2
mx3.mydomain.com -> 10.0.0.3
mx4.mydomain.com -> 10.0.0.4

and then 4 mx records pointing to the A records above? I can see how that
would help by ensuring that the correct IP address would eventually be
returned.

What's the flaw in the origianl way we had DNS setup? I only ask as we have
another 4 sites running this setup and they haven't had any problems (been
running for approx 12/18 months).

AndyMac.
 
If I'm understanding this correctly you're suggesting A records such as:

mx1.mydomain.com -> 10.0.0.1
mx2.mydomain.com -> 10.0.0.2
mx3.mydomain.com -> 10.0.0.3
mx4.mydomain.com -> 10.0.0.4

and then 4 mx records pointing to the A records above? I can see how that
would help by ensuring that the correct IP address would eventually be
returned.

Yes, that's the idea
What's the flaw in the origianl way we had DNS setup?

No flaw, only.. if you have four A records for the same
host like in

mail A 10.0.0.1
mail A 10.0.0.2
mail A 10.0.0.3
mail A 10.0.0.4

and a single MX pointing to "mail" then the IP which
will be used isn't under your control, either the DNS
or the mail server will eventually use an internal round
robin mechanism to select the address, also, let's say
we're using your current settings (as above), now let's
say the server at 10.0.0.2 isn't working that would result
in some "mail failures" whenever the mail server tries
to contact your MX (picking a "random IP") btw the mail
server will eventually retry, pick a different IP and then
succeed, but this will delay the mail flow, on the other
hand, having prioritized MX records will allow the mail
server to automagically pick the next MX in the "chain"
(in preference order) and use it to send you the mail

As a note, you may also setup a "gemini balance"
<g> here, the idea may be more or less the following

mx1 A 10.0.0.1
mx2 A 10.0.0.2
mx3 A 10.0.0.3
mx4 A 10.0.0.4

then something like

mail MX 10 mx1
mail MX 10 mx2
mail MX 20 mx3
mail MX 20 mx4

the above will balance the mail load between mx1 and mx2
while mx3 and mx4 will be the "second _balanced_ choice"
the above has some advantages but some drawbacks too
as noted above if one of the "coupled" machines is down
btw this will be "balanced" by the redundant MX records
with different preference numbers

hope it's clear

Regards


--

* ObiWan

DNS "fail-safe" for Windows 2000 and 9X clients.
http://ntcanuck.com

Support and discussions forum
http://ntcanuck.com/net/board

408 XP/2000 tweaks and tips
http://ntcanuck.com/tq/Tip_Quarry.htm
 
In
AndyMac said:


Hi AndyMac

The article kind of stated the same thing I was saying. Obi's suggestion
follows that as well and should help you out.

--
Regards,
Ace

Please direct all replies to the newsgroup so all can benefit.
This posting is provided "AS-IS" with no warranties and confers no
rights.

Ace Fekay, MCSE 2000, MCSE+I, MCSA, MCT, MVP
Microsoft Windows MVP - Active Directory

HAM AND EGGS: A day's work for a chicken; A lifetime commitment for a
pig. --
=================================
 
Back
Top