I have two dns server (1dns, 2dns) when the 1st dns is not be able to resolve the query it has to query the 2nd dns but it is important that the source ip of the query 1dns-2dns is the same to the 1st dns ip.
I've very recently done this for an internal DNS Solution.
Here's how it works. We've got 2 DNS servers. They both run PowerDNS and PowerDNS-Recursor. They use Postgres-9.1 as the backend, and there is native Postgresql Hot-standby replication occurring between the "master" and "standby".
PowerDNS on each server looks at localhost for it's database connection.
PowerDNS's recursors are told to look at Google's Public DNS for the next hop in recursion.
There's a replication check script also, which updates a Timestamp in a table, then checks it on the standby (but that's just for my OCD monitoring style).
All the documentation on how this works is actually really well listed on the PDNS website. I'm not going to copypasta my configs verbatim for you, because well, you need to learn how to do this for yourself.
Basically there are two ways. Either make your script so that they send changes to both your master and slave server databases or use the master/slave configuration combined with pdns_control in order to send/retrieve updates from specific zones.
There is more detailed documentation on this available on the PowerDNS website.