Community discussions

MikroTik App
 
WirelessRudy
Forum Guru
Forum Guru
Topic Author
Posts: 3094
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

dns server issue with loadbalancing - software bug?

Thu Aug 23, 2007 12:34 am

Hi guys,

I have a network with two gateways to the internet. When one of them is set as main (and the other just standby) de dns server of that same router catches all dns requests from others fine and resolves it by looking in its cache or get it from the ISP dns server. It works fine for the other gateway too, both have the same ISP (and thus dns servers)

The moment I now put both gateways in the routing as default (for loadbalancing) everything works fine. Double capacity for my network and browsing, etc. is fine and for special download programs double the speed! Great!......but...

After I while all new sessions dies out....
After some digging I find that the dns server of the router handling the dual gateway traffic isn't working anymore! The cache ´bleeds´ to death and after flushing the cache it doesn't build a new one.

Just remove one of the gateways from the routing and the dns server works again and fills its cache....

Is this a ´bug´ in the software? I run the latest versions.

So, dual gateway loadbalancing works fine, only the dns server can't cope with it?

Rudy
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6624
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Re: dns server issue with loadbalancing - software bug?

Thu Aug 23, 2007 3:27 pm

Well it is possible to disable DNS cache,
it is possible to increase size for DNS cache,
however dual gateway configuration should not bring cache full very fast.
 
WirelessRudy
Forum Guru
Forum Guru
Topic Author
Posts: 3094
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

Re: dns server issue with loadbalancing - software bug?

Thu Aug 23, 2007 3:42 pm

Well it is possible to disable DNS cache,
it is possible to increase size for DNS cache,
however dual gateway configuration should not bring cache full very fast.
Sergejs,

When I flush the cache its empty and stays that way. So it looks to me the dns server doesn't know were to route its packages if there are two default routes enabled. The cache just stays empty.

The moment I remove one of the gateways immediately the cache is beeing used again. It works then, on each of the gateways. Just not on the two combined in one default gateway routine.

Rudy
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6624
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Re: dns server issue with loadbalancing - software bug?

Thu Aug 23, 2007 4:22 pm

Rudy,
RouterOS provides DNS cache facilitiy, not DNS server.
I'm not aware of the your router configuration for load balancing, what kind of configuration is used ?
 
bushy
Member Candidate
Member Candidate
Posts: 140
Joined: Thu Oct 20, 2005 11:56 pm
Location: Ireland

Re: dns server issue with loadbalancing - software bug?

Thu Aug 23, 2007 4:26 pm

Have you a rule to deal with traffic from the MT box itself ?
 
WirelessRudy
Forum Guru
Forum Guru
Topic Author
Posts: 3094
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

Re: dns server issue with loadbalancing - software bug?

Thu Aug 23, 2007 4:34 pm

Rudy,
RouterOS provides DNS cache facilitiy, not DNS server.
I'm not aware of the your router configuration for load balancing, what kind of configuration is used ?
OK, I named it that way. It's the cache.
This is a part of the config:

18 A S ;;; Default Route
0.0.0.0/0 r 192.168.200.1
r 10.20.40.1

The LB in itself works fine, traffic is devided over both gateways, its only the dns playing up.
 
changeip
Forum Guru
Forum Guru
Posts: 3819
Joined: Fri May 28, 2004 5:22 pm

Re: dns server issue with loadbalancing - software bug?

Thu Aug 23, 2007 7:11 pm

What he's probably trying to say is that Mikrotik DNS resolver, which loads the cache, is not working across 2 gateways. I assume what's happening is that the DNS requests are going out with the wrong src address and not coming back, and possibly it's realizing that no answers are coming back and getting confused.

Try taking a pcap (packet sniffer) after this happens. Take a short sample from ether1, and a short sample from ether2 (the two gateway interfaces whatever they are). Then use wireshark to look at the packets and see what is really happening under the hood. Sometimes the only way to know whats happening is to look at what's actually being sent / received. If you don't know how to use wireshark to review then post them somewhere and I'll help you figure it out.

Sam
 
WirelessRudy
Forum Guru
Forum Guru
Topic Author
Posts: 3094
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

Re: dns server issue with loadbalancing - software bug?

Thu Aug 23, 2007 7:52 pm

OK, changeip

Now we are talking high sience to me, it looks. But actually my idea was in your direction. We need to ´see´ what is actually happening, the dns resolver as you call it might become confused. That makes sense to me.

I´ve got Ethereal that should be ablt to do that job isn't it. I haven't been playing with it a lot bus we'll see how far I come.

I'm downloading Wireshark as we speak.

But then we found the ´confusing´ scenario, we still need to find a solution. Any suggestions on that?
 
changeip
Forum Guru
Forum Guru
Posts: 3819
Joined: Fri May 28, 2004 5:22 pm

Re: dns server issue with loadbalancing - software bug?

Thu Aug 23, 2007 7:55 pm

let's wait to see what the router is sending to see if its really an issue. it might just be that your preferred source or something needs to be set. if we figure out its broken then we can send supouts and have them fix it.
 
WirelessRudy
Forum Guru
Forum Guru
Topic Author
Posts: 3094
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

Re: dns server issue with loadbalancing - software bug?

Sat Sep 08, 2007 3:01 am

let's wait to see what the router is sending to see if its really an issue. it might just be that your preferred source or something needs to be set. if we figure out its broken then we can send supouts and have them fix it.
Sorry did´'t come back on the issue yet. No time.
This weekend will give it a go!

From reading the WireShark documentation I think I need to set it up on a PC and connect that one by means of a simple hub to the same network the interface runs on we need to monitor? Am I right?
I need to find myself a simple hub, I only have smartswitched hubs.
So it will take some time but I will come back on it, the problem is still there....
 
WirelessRudy
Forum Guru
Forum Guru
Topic Author
Posts: 3094
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

Re: dns server issue with loadbalancing - software bug?

Sat Sep 08, 2007 3:04 am

to think of it; Can't we use the Torch tool? Can't we look for the special dns traffice we are looking for? I dno't know what protocol, port and more the traffic is but I'll bet you know?
With the torch tool I can just monitor the different interfaces to see what is happening. I only need to know what to look for....?
 
User avatar
winxp2000
Member Candidate
Member Candidate
Posts: 113
Joined: Mon Jan 30, 2006 8:57 pm
Location: China
Contact:

Re: dns server issue with loadbalancing - software bug?

Sat Sep 08, 2007 11:24 pm

All of above friends, why you try to share the DNS cache from MT?

It will make you resolve DNS ip faster than useing the ISP dns ip ??

I try the DNS cache setting in MT in lots casese test.

It work normal as same as the setting of ISP ip.
 
WirelessRudy
Forum Guru
Forum Guru
Topic Author
Posts: 3094
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

Re: dns server issue with loadbalancing - software bug?

Sun Sep 09, 2007 2:46 am

All of above friends, why you try to share the DNS cache from MT?

It will make you resolve DNS ip faster than useing the ISP dns ip ??

I try the DNS cache setting in MT in lots casese test.

It work normal as same as the setting of ISP ip.

Well my friend, access times to a local dns cache is only 1ms on average, to the ISP dns server is on average 60ms. But at times also more....
So for fine tuning your network, local dns cache speeds up browsing.
 
changeip
Forum Guru
Forum Guru
Posts: 3819
Joined: Fri May 28, 2004 5:22 pm

Re: dns server issue with loadbalancing - software bug?

Sun Sep 09, 2007 6:47 pm

let's wait to see what the router is sending to see if its really an issue. it might just be that your preferred source or something needs to be set. if we figure out its broken then we can send supouts and have them fix it.
Sorry did´'t come back on the issue yet. No time.
This weekend will give it a go!

From reading the WireShark documentation I think I need to set it up on a PC and connect that one by means of a simple hub to the same network the interface runs on we need to monitor? Am I right?
I need to find myself a simple hub, I only have smartswitched hubs.
So it will take some time but I will come back on it, the problem is still there....

Just use Tools -> Packet Sniffer. Set the filename to 'temp.pcap', make it 10000kb file size, set it to 'ALL' interfaces (so we can see across the entire router), and then hit start. Once done, you can view the packets in the packets window, or download the temp.pcap file and open with wireshark. The problem with 'ALL' interfaces is that in wireshark you can't tell which interface it came from anymore, whereas in the packets window you can. . . so you might have to take a few packet captures, one from each interface, to determine where things are going.

Sam

Who is online

Users browsing this forum: nithinkumar2000, sutrus, ysha and 63 guests