Setting a static IP address, but dynamically obtaining DNS config from a router
I am trying to do something similar as indicated at post 1187648, but when I do so, I can no longer resolve hosts. Is there a way to enable some of DHCP where I can have a static IP address, but everything else such as the DNS servers are automatically obtained from the gateway (which is my Linksys router)?
For example, when I had this in my /etc/network/interfaces file: Code:
# This file describes the network interfaces available on your system Thanks, bgoodr |
You need to put your nameserver IP(s) in /etc/resolv.conf.
|
If you really want a static IP, you may be able to tell the router to assign a certain IP based on the MAC address of your NIC.
ifconfig eth1 will give you the MAC (it calls it the HWaddr) |
Quote:
But after some tinkering, you are right: In my situation, I want that router to forward certain protocols only, and the only way it can do that without the router changing the target IP address dynamically is if I configure my target machine to not request a possibly varying IP address by way of DHCP. Quote:
Thanks to the both of you for your help! bgoodr |
All times are GMT -5. The time now is 12:19 AM. |