2

Trying to set up an anycast DNS setup. For the time being, we have two routers, R01 and our Mgmt router that we're using until we move to SDN (in testing phases).

The problem we're having is the DNS receives the query on 10.1.2.8 like it should but it responds via 10.99.0.130 using NAT. The box that the DNS server is on has a gateway of last resort set to .1 for upgrades and other traffic, and 10.1.2.8 is configured on the loopback interface. How do we force responses back through the way it came (through R01)?

             Internet
BGP AS 64000   +   +      Static Routed
Aggregating +--+   +----+ 10.99.0.128/29
10.1.2.0/24 |           | SNAT on .130
   +--------+-+    +----+------------+
   |R01       |    |Mgmt/OOB Rtr     |
   |          |    |                 |
   +-----+----+    +---------+-------+
      .2 |                   | .1
         |  172.19.0.0/24    |
    +----+----+--------------+---+
              |
              | .4
      +---------------+
      |DNS Service    |
      |Anycast        |
      |VIP 10.1.2.8/32|
      +---------------+
1
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
    – Ron Maupin
    Aug 13, 2017 at 20:34

1 Answer 1

1

Your DNS server doesn't know where the packet(s) came from. Thus responses will follow whatever the route table says is the best path to the destination -- which is a different path if the origin was R01.

You'll need some sort of policy-based routing on the server -- route based on src, not dest; anything from 10.1.2.8 should be forwarded to 172.19.0.2. How to set that up on your (unspecified) host OS is off-topic here. (as it isn't a router)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.