When does SER perform DNS lookups? Is it a matter of how the entry is made in the ser.cfg? I ask because one of our customers changed their DNS servers and the SER proxy was not updated. In the ser.cfg all routing is done by IP (or I had thought it was). However, the site started experiencing some very odd call drops and after updating the resolv.conf on the proxy server with the proper DNS servers (one of them had changed) everything was fine.
Should IP address entries be quoted or non-quoted? Does the presence of the quotes cause a DNS lookup even though the item in them is purely numeric (i.e. "162.128.33.54"). Is there a way to avoid the DNS lookups?
On Jun 26, 2003 at 12:22, Jamin W. Collins jcollins@asgardsrealm.net wrote:
When does SER perform DNS lookups? Is it a matter of how the entry is made in the ser.cfg? I ask because one of our customers changed their DNS servers and the SER proxy was not updated. In the ser.cfg all routing is done by IP (or I had thought it was). However, the site started experiencing some very odd call drops and after updating the resolv.conf on the proxy server with the proper DNS servers (one of them had changed) everything was fine.
DNS lookups for the addresses in ser.cfg are performed only once, on ser startup immediately after reading the cfg. file.
Should IP address entries be quoted or non-quoted?
It doesn't matter (they have to be quoted for modules functions, like t_relay_to, they can be unquoted for forward*(...) ).
Does the presence of the quotes cause a DNS lookup even though the item in them is purely numeric (i.e. "162.128.33.54").
No. Internal ser resolve functions will be called, but in the default compilation (with -DDNS_IP_HACK added) they will recognize ipv4 & ipv6 addresses and no dns lookup will be performed.
Runtime DNS lookups for requests are performed only for forward (uri:host), t_relay() and other uri involving forwarding functions.
Andrei
On Thu, Jun 26, 2003 at 08:03:59PM +0200, Andrei Pelinescu-Onciul wrote:
Runtime DNS lookups for requests are performed only for forward (uri:host), t_relay() and other uri involving forwarding functions.
That would appear to have been it. Even though the uri:host was purely IP. But the odd part is that it would stay up for a few seconds and then the remote end would tear it down.
Correcting the system's DNS server entries (one of them had been replaced with a new server) corrected the problem. Just found it very odd since all the references in the config were by IP not name.
Andrei Pelinescu-Onciul wrote:
On Jun 26, 2003 at 12:22, Jamin W. Collins jcollins@asgardsrealm.net wrote:
When does SER perform DNS lookups? Is it a matter of how the entry is made in the ser.cfg? I ask because one of our customers changed their DNS servers and the SER proxy was not updated. In the ser.cfg all routing is done by IP (or I had thought it was). However, the site started experiencing some very odd call drops and after updating the resolv.conf on the proxy server with the proper DNS servers (one of them had changed) everything was fine.
DNS lookups for the addresses in ser.cfg are performed only once, on ser startup immediately after reading the cfg. file.
Should IP address entries be quoted or non-quoted?
It doesn't matter (they have to be quoted for modules functions, like t_relay_to, they can be unquoted for forward*(...) ).
Does the presence of the quotes cause a DNS lookup even though the item in them is purely numeric (i.e. "162.128.33.54").
No. Internal ser resolve functions will be called, but in the default compilation (with -DDNS_IP_HACK added) they will recognize ipv4 & ipv6 addresses and no dns lookup will be performed.
Runtime DNS lookups for requests are performed only for forward (uri:host), t_relay() and other uri involving forwarding functions.
Not quite. Run-time reverse DNS lookups also performed when you are doing comparisons involving src_ip.
-Maxim
On Jun 26, 2003 at 23:26, Maxim Sobolev sobomax@portaone.com wrote:
Andrei Pelinescu-Onciul wrote:
On Jun 26, 2003 at 12:22, Jamin W. Collins jcollins@asgardsrealm.net wrote:
When does SER perform DNS lookups? Is it a matter of how the entry is made in the ser.cfg? I ask because one of our customers changed their DNS servers and the SER proxy was not updated. In the ser.cfg all routing is done by IP (or I had thought it was). However, the site started experiencing some very odd call drops and after updating the resolv.conf on the proxy server with the proper DNS servers (one of them had changed) everything was fine.
DNS lookups for the addresses in ser.cfg are performed only once, on ser startup immediately after reading the cfg. file.
Should IP address entries be quoted or non-quoted?
It doesn't matter (they have to be quoted for modules functions, like t_relay_to, they can be unquoted for forward*(...) ).
Does the presence of the quotes cause a DNS lookup even though the item in them is purely numeric (i.e. "162.128.33.54").
No. Internal ser resolve functions will be called, but in the default compilation (with -DDNS_IP_HACK added) they will recognize ipv4 & ipv6 addresses and no dns lookup will be performed.
Runtime DNS lookups for requests are performed only for forward (uri:host), t_relay() and other uri involving forwarding functions.
Not quite. Run-time reverse DNS lookups also performed when you are doing comparisons involving src_ip.
Yes, you are right. I forgot about those. In ser 0.8.10 comparisons with source/dest ip will always involve a rev. dns lookup if the operand is enclosed in quotes (e.g. src_ip=="1.2.3.4" as oposed to src_ip==1.2.3.4 or src_ip==1.2.3.4/32 which will not involve dns lookups). In ser 0.8.11pre* things are a little better: if an ip addr. is in quotes it will first be compared to src_ip without any dns lookups, but if it does not match, a rev dns on src_ip will be performed and each alias in the result will be compared with the operand. So if you use ip addresses in comparisons, use them without quotes, things will run mutch faster.
Andrei