Table of Contents
DNS BEHIND ROUTER
how to do DNS with routers
In Tower Networking Inc., all user traversals requires DNS resolution to obtain the destination address. By default, DNS resolution is a network traversal without specific destination address (i.e., a broadcast). This means that the traversal will attempt to visit every node attempting to resolve the domain name. While this works for a switch-only network, the traversal cannot reach a DNS server if it is on a non-default route from a router.
There are 3 ways to solve this issue: 1. The default route can be set to point to a network that always has a DNS server (i.e., [color=7FFFD4]port 1</color>). 2. A designated DNS server address can be set on ALICE so that the DNS resolution traversal has a specific destination address. 3. Place a DNS server on every side of the router. You are free to choose how do you want to setup your network. The ideal solution differs depending on the scale and situation. It may also be possible to mix the solutions to create your own unique approach to handle this kinds or problem.
DNS servers on default route
This is the easiest solution. To do this, you only need to configure the default route on the router using the route routine on netsh. command: route default via <color red>port1 on <address of router 1></color>
This solution works for small networks but when the number of routers increases, it may become difficult to track the default routing path to a network with a DNS server.
Designated DNS server address
This solution requires configuration on the users and the router. The use of DHCP may be necessary to quickly designated DNS server addresses on many users without doing them one by one. To use this solution on the example problem, designate a DNS server address with the net routine using netsh. command: net dns set <color red>@dns-1 on <address of ALICE></color> Then a route for DNS needs to be added to the router using the route routine using netsh. command: route add <color red>@dns-1 via port1 on <address of router 1></color>
For example, the user lumbering-civet is configured to use the address @mydns as its DNS server. This means that when this user attempts to perform DNS resolution, it will only try to connect to the device/user with the address @mydns
This solution can be easily scaled when new routers are added, they just have to point the DNS route back to ROUTER 1 without needing to trace the default route chain. However, it may be infeasible to configure the designated DNS server addresses of many users, therefore, this solution usually requires the help of a DHCP server.
DNS servers everywhere
This solution will work without any network and routing configuration. However, it is expensive to implement and it may be physically difficult to place DNS servers everywhere due to limited power points. However, this solution has another benefit in that DNS traversal traffic is localized. This will halve the amount of traffic across wide network because every user always performs DNS traversals.
Notice that in this example, DNS traffic does not pass through ROUTER 1 because each sub-network has its own DNS server.
