I need to add a static route on a windows server toward a web server with a service; I need to add a static route with this command on a Windows command prompt:
ROUTE ADD -p IPADREESS GATEWAYIP
Is there a way to do a static route toward a DNS address instead of a IP Address ? How ?
For example:
ROUTE ADD -p DNSServer GATEWAYIP
Best Answer
The syntax of the
route add
command isWhere destination is either an IP address or host name for the network or host.
Example:
See this Microsoft article: To add a static IP route
You have to keep in mind that the entry will be resolved to an IP address, so if the DNS for the host name changes, there will still be the original IP address in the routing table.